Microcontrollers Overview
Introduction
A microcontroller (MCU) is a computer on one chip: CPU, RAM, flash, timers, ADC, UART, I²C, SPI — plus GPIO pins you can actually touch on a dev board. Your firmware runs here. Laptops use microprocessors with OS and gigabytes of RAM; your robot controller uses an MCU with kilobytes and no fan.
This article compares families you meet at HBO-ICT (AVR, ESP8266/ESP32, STM32), how to read a board as MCU + support circuits, and where to go deeper in the profile.
MCU vs microprocessor
| Microcontroller (MCU) | Microprocessor (MPU) | |
|---|---|---|
| Memory | On-chip flash + SRAM | External DRAM, boot from storage |
| OS | Often bare-metal or RTOS | Linux, Windows |
| Power | mW – W | W – tens of W |
| Examples | ATmega328, STM32F4, ESP32 | Raspberry Pi CPU, PC CPU |
A Raspberry Pi is an MPU running Linux — great for gateways, not the same as programming an STM32 directly. Many projects use both: MCU for real-time I/O, Pi for cloud and UI.
What is inside the chip
1 2 3 4 5 6 7 8 | |
See Computer architecture and Memory systems for how this maps to theory.
Families you will meet
| Family | Example board | Strengths | Watch out for |
|---|---|---|---|
| AVR (8-bit) | Arduino Uno (ATmega328) | Simple, huge tutorial base | 5 V logic, limited RAM |
| ESP8266 | WeMos D1 Mini | Wi-Fi, cheap | Single core, limited pins |
| ESP32 | DevKitC | Wi-Fi + BLE, dual core, RTOS | Power use, pin mux complex |
| STM32 (ARM) | Nucleo, Blue Pill | Professional HAL, many peripherals | Steeper toolchain |
| RP2040 | Raspberry Pi Pico | Good docs, PIO | Newer ecosystem |
No family is "best" — match I/O count, connectivity, power, and course toolchain.
Dev board vs bare chip
Development board = MCU + USB-serial + regulator + LED + headers. You program the MCU; the extra chips handle power and upload.
Always find:
- MCU part number (e.g. ESP32-WROOM-32)
- Schematic PDF — which pin goes to which header
- Logic level — 3.3 V vs 5 V
- Boot strap pins — must be correct for flash mode
Use Reading datasheets for the chip; use board wiki for pinout.
Programming and flashing
| Path | Tools |
|---|---|
| Arduino-style | USB cable, bootloader on board |
| STM32 / bare metal | ST-Link, J-Link, openocd |
| ESP32 | USB-UART or JTAG |
Firmware lands in flash; RAM holds runtime data. See GCC toolchain in depth.
Videos — getting started
ESP32 introduction
Introduction to ESP32 - Getting Started
ESP8266 mini boards (shields ecosystem)
#106 Wemos ESP8266 Mini Shields — how dev boards stack and extend I/O.
Choosing an MCU for a project
| Need | Lean toward |
|---|---|
| Wi-Fi cloud telemetry | ESP32, ESP8266 |
| Low power battery | STM32L, nRF52 |
| Many motors/sensors, no Wi-Fi | STM32F4, Teensy |
| Course requires Arduino Uno | ATmega328 — learn, then migrate |
Document choice in architecture — Hardware architecture.
Relevant topics
- Hardware architecture
- Firmware architecture
- Introduction to computer systems
- ESP32 Technical Reference (Espressif)
Starting points
- Identify MCU on your board — photo + part number.
- Open reference manual table of contents — find GPIO chapter.
- List three peripherals your project needs — match to datasheet.
- Draw block diagram: MCU, sensors, actuators, power.
Focus points
- 3.3 V vs 5 V — ESP32/STM32 vs Uno.
- Current budget — Wi-Fi transmit spikes; motor separate supply.
- Debug header — know SWD/UART before board is soldered in enclosure.
- Arduino is a layer — underneath is still C/C++ on an MCU.
Key points
- MCU integrates CPU, memory, and peripherals for embedded control.
- ESP8266/ESP32, STM32, and AVR are common in education and industry.
- Dev board schematics bridge header labels to MCU pins.
- Pick hardware for connectivity, I/O, power, and toolchain — not hype.