In the early 1970s, two American companies, Intel and Texas Instruments, introduced microprocessors and microcontrollers to the world. These companies envisioned a future dominated by single-chip integrated computers.
Today, such devices play critical roles in almost all consumer electronic devices. You can find microcontrollers in nearly every home on the planet. We have become dependent on microcontrollers, yet surprisingly, only a few people really know what a microcontroller is.
In this tutorial, we will answer that question. We will also compare features of the most popular microcontrollers on the market today.
The Microcontroller System
The diagram below illustrates the microcontroller system as a collection of parts or devices with three features: input, process, and output. A system accepts at least one input, performs some action on that input, and prodces one or more outputs.
The inputs and outputs of a microcontroller system are voltages that we can use to determine the state of external devices. The microcontroller reads the voltages from an input device and uses this information to decide on the correct voltage to output.
A microcontroller system is embedded in an integrated circuit (IC). A typical microcontroller includes a processor, program memory, RAM, input/output pins, and more on a single chip.
Devices that can be Controlled by Microcontrollers
Microcontrollers can be used to control a wide variety of electronic devices. They are perfect for applications requiring multiple repetitive operations or high-speed computations. Here’s a list of some devices that a microcontroller could be used to control:
- Computers
- Computer peripherals
- Telephone systems
- Home appliances
- Industrial equipment
- Security systems
- Sensors and sensor arrays
What is a Development Board
Experienced DIY electronics builders find it easy to build circuits on breadboards. However, as the complexity of a circuit increases, it becomes difficult too to use breadboards. This is where development boards come in handy.
Development boards are PCBs that contain a particular microcontroller IC and all of the supporting external circuitry to make the microcontroller easier to use for quick development and prototyping.
The most popular development boards on the market are without doubt the Raspberry Pi and the Arduino Uno. Their introduction to the DIY electronics hobby has revolutionized the way people learn about electronics and build electronic projects.
Development boards always have input/output pins to make adding sensors, displays, motors, and servos easy.
Programming Microcontrollers
Some microcontrollers are easier to program than others, but every common microcontroller should have lots of resources online that can help you learn how to program it.
Some microcontrollers like the Arduino have their own integrated development environment (IDE). In the Arduino IDE, you can write Arduino code and upload it to the microcontroller via a USB cable. Lots of other microcontrollers can be programmed using the Arduino IDE, for example the ESP8266 WiFi module.
How to Choose a Microcontroller
There are so many microcontrollers on the market today, and selecting the best microcontroller for your project may be a bit challenging for new designers.
It’s true, there are a lot of factors to consider when selecting a microcontroller. But the most important are functionality, ease of programming, cost, and of course, the availability of support.
Popular microcontrollers will have the best support for troubleshooting any issues you might have. Using a more widely accepted microcontroller means that it will be easier to get help quickly when you get stuck.
Comparison of Popular Microcontrollers
To help you decide which microcontroller is best for your project, the table below compares the features of the most popular microcontrollers available today:
Microcontroller | Features | Performance specifications | Programming language | Compiler/IDE | Common applications |
Atmel ATtiny85 | Pins: 8 GPIO pins: 6 512B RAM 8KB SRAM 512 Byte EEPROM Clock speed: 20 MHz internal clock Two timers Analog to digital converter | Operating voltage: 2.7V to 5.5V Operating temperature: -40°C to +85°C | Arduino (with limitations), C/C++, or assembly code | AVR GCC, MPLAB XC8, MPLAB X IDE, Microchip Studio, IAR Embedded Workbench | Safety-critical circuits, industrial control systems, SMPS and power regulation systems, and analog signal analysis. |
Espressif ESP8266 | Pins: 30 GPIO pins: 16 Flash Memory: 4 MB SRAM: 64 KB Clock Speed: 80 MHz UART, I2C, and SPI communication | Operating voltage: 3.3V Supply voltage: 7V-12V | Arduino | Arduino IDE | Networked and internet connected devices, prototype IoT devices, low power circuits, and projects requiring interfaces with WiFi and Bluetooth. |
Intel 8051 | Pins: 40 4KB ROM 128 bytes RAM Full-duplex UART communication | Operating voltage: 5V Supply voltage: 2.5V to 5.5V Operating temperature: -0°C to +70°C | Assembly, BASIC, C\C++ | CX51 C Compiler, IAR Embedded Workbench, BASCOM-AVR | Automobiles, medical devices, consumer appliances, communication systems, robotics, industrial control systems, radio and networking equipment, and remote sensing. |
Texas Instruments MSP430 | GPIO pins: 51 Non-volatile memory: 64 kB RAM: 2 kB Analog to digital converter Real-time clock UART, I2C, and SPI communication | Operating voltage: 2.5V – 5.5V Active mode: 330 µA at 1 MHz, 3 V. | Assembly, C/C++ | Texas Instruments C/C++compiler, MSP430 – GCC, BASCOM-AVR | Industrial automation, home automation, infrastructure metering networks, portable test equipment, health and medical electronics, and consumer electronics |
PJRC Teensy 3.2 | Pins: 34 GPIO pins: 34 32 bit ARM Cortex-M4 72 MHz CPU Flash memory: 256 kB RAM: 64 kB EEPROM: 2 kB Pulse width modulation Seven timers USB, UART, SPI, I2C, and I2S communication Real time clock | Operating voltage: 3.3V Supply voltage: 3.6V to 6.0V | Adapted Arduino, C/C++, Python | AVR-GCC, BASCOM-AVR, MicroPython | Motor control, small electronics, drones, remote controlled vehicles, robots, and sensor networks. |
STMicroelectronics STM32 | GPIO pins: 51-140 USB, UART, SPI, I2C, and I2S communication Twelve 16-bit timers Two 32-bit timers Temperature sensor, Analog to digital converter Digital to analog converter Real time clock | Operating voltage: 3.3V Supply voltage: 1.7V to 3.6V | C language | Embedded ARM GCC compiler, Arm Keil MDK, PlatformIO IDE, STM32CubeIDE, Segger Embedded, Studio, SW4STM32 | Industrial PLC controllers, printers and scanners, security systems, video surveillance systems, HVAC systems, power meters, motor drivers, and PC peripherals. |
Silicon Labs EFM32 | GPIO pins: 18-26 ARM Cortex-M3 CPU Flash memory: 512 kB RAM: 32 kB USART, I2C, and SPI communication Analog to digital converter | Operating voltage: 1.98V to 3.8V Operating temperature: -40°C to +85°C | C language | GNU ARM C Compiler | Low power devices, IoT projects, and security systems |
Single Board Computers
Microcontrollers can handle a wide range of complex circuit designs, but they still may not be sufficient for some complex projects. In this case, you might need to use a single-board computer. Single-board computers pack all of the functionality of a computer in a device the size of a credit card.
Here is a comparison of the most popular Raspberry Pi single-board computers:
Device | RAM | Processor | USB | Ethernet | WiFi | Bluetooth | HDMI | Other Video | MicroSD |
Raspberry Pi A+ | 512MB | 700 MHz ARM11 | 1 Port | – | – | – | Yes | DSI, Composite | Yes |
Raspberry Pi B | 512MB | 700 MHz ARM11 | 4 Ports | 10/100Mbps | – | – | Yes | DSI, Composite | Yes |
Raspberry Pi 2B | 1GB | 900 MHz Quad-Core ARM Cortex-A7 | 4 Ports | 10/100Mbps | – | – | Yes | DSI, Composite | Yes |
Raspberry Pi 3B | 1GB | Quad-Core 64-bit ARM Cortex A53 | 4 Ports | 10/100Mbps | 802.11n | 4.1 | Yes | DSI, Composite | Yes |
Raspberry Pi 3B+ | 1GB | 64-bit ARM Cortex A53 | 4 Ports | 300/Mbps/PoE | 802.11ac | 4.2 | Yes | DSI, Composite | Yes |
Raspberry Pi Zero | 512MB | 1 GHz single-core ARM11 | 1 Micro USB | – | – | – | Mini-HDMI | – | Yes |
Raspberry Pi Zero wireless | 512MB | 1 GHz single-core ARM11 | 1 Micro USB | – | 802.11n | 4.1 | Mini- HDMI | – | Yes |
Here’s a comparison of the most popular BeagleBone single-board computers:
Device | Memory | Processor | USB | Network | Video | Supported expansion interfaces | MicroSD |
PocketBeagle | 512MB DDR3 (800MHz x 16) | AM3358, 1GHz ARM Cortex-A8 | USB 2.0 480Mbps host/client port, USB 2.0 on expansion header | add-ons | SPI displays | 3x UART, 4x PWM, 2x SPI, 2x I2C, 8x A/D converter, 2x CAN bus (w/o PHY), 2x quadrature encoder, USB | Yes |
BeagleBone Black | 512MB DDR3 (800MHz x 16), 4GB on-board storage using eMMC | AM3358, 1GHz ARM Cortex-A8 | USB 2.0 480Mbps host/client port, USB 2.0 host port | 10/100 Ethernet | microHDMI, Cape add-ons | 4x UART, 12x PWM/Timers, 2x SPI, 2x I2C, 7x A/D converter, 2x CAN bus (w/o PHY), LCD, 3x quadrature encoder, SD/MMC, GPMC | Yes |
BeagleBone Blue | 512MB DDR3 (800MHz x 16), 4GB on-board storage using eMMC | AM3358, 1GHz ARM Cortex-A8 | USB 2.0 480Mbps host/client port, USB 2.0 host port | 2.4GHz WiFi, Bluetooth, BLE | SPI displays | 4x UART, 2-cell LiPo, 2x SPI, I2C, 4x A/D converter, CAN bus (w/ PHY), 8x 6V servo motor, 4x DC motor, 4x quadrature encoder | Yes |
BeagleBone AI | 1GB DDR3 (2x 512Mx16, dual-channel), 16GB on-board storage using eMMC | AM5729, 2x ARM Cortex-A15 | USB 3.0 5Gbps host/client port, USB 2.0 host port | Gigabit Ethernet, 2.4/5GHz WiFi, Bluetooth, BLE | microHDMI, Cape add-ons | 4x UART, 12x PWM/Timers, 2x SPI, 2x I2C, 7x A/D converter, CAN bus (w/o PHY), LCD, 3x quadrature encoder, SD/MMC | Yes |
BeagleBone Green | 512MB DDR3 RAM. 4GB 8-bit eMMC on-board flash storage | AM3358 1GHz ARM Cortex-A8 | USB 2.0 480Mbps host/client port, USB 2.0 host port | Ethernet | UART, PWM/Timers, SPI, I2C, A/D converter, CAN bus (w/o PHY), LCD, SD/MMC | Yes | |
BeagleBone Green Wireless | 512MB DDR3 RAM. 4GB 8-bit eMMC onboard flash storage | AM3358 1GHz ARM Cortex-A8 | 4x USB 2.0 480Mbps host/client port, USB 2.0 host port | Wi-Fi 802.11 b/g/n 2.4 GHz and Bluetooth 4.1 LE | 4x UART, 12x PWM/Timers, 2x SPI, 2x I2C, 7x A/D converter, CAN bus (w/o PHY), LCD, 3x quadrature encoder, SD/MMC | Yes | |
BeagleBoard XM | 128MB-512MB DDR3 RAM. 8-bit eMMC onboard flash storage | AM37x 1GHz ARM Cortex-A8 | USB 2.0 480Mbps host/client port, USB 2.0 host port | Ethernet | S-Video port | UART, PWM/Timers, SPI, I2C, A/D converter, CAN bus (w/o PHY), LCD, SD/MMC | Yes |
So that’s a brief overview of the most popular platforms on the market today! Be sure to leave a comment below if you have questions about anything!