← Back to Blog Electronics Microcontrollers

Microcontrollers - ESP32, ARM and 8 bit Explained

How we choose the right brain for a prototype or product - power, connectivity, security, buses, memory, toolchains and PCB layout that ships.

Microcontroller boards hero

Why MCU choice shapes your entire product

Pick the microcontroller well and everything downstream gets easier. Firmware compiles faster, the PCB layout is simpler, the battery lasts longer, and certification is less painful. Pick badly and every week you will fight a new constraint. We have learned to begin with requirements not parts. What does the product do, how often, how connected, how secure and how long should it run on a battery. Only then do we look at families and parts.

Engineers also weigh ecosystem and risk. Can we get dev kits next day and sample code now. Is the silicon available with second source modules. Are the toolchains stable and free from surprise licenses. These boring questions prevent schedule slips later. The best microcontroller is often the one we can ship with today that still scales for version two.

Three families engineers actually use

We group choices into three families that cover 95 percent of projects we see in the workshop.

FamilyExamplesWhy you pick itTrade offs
8 bitATmega328P, ATTiny, PIC16Low cost, simple, ultra low sleep currentLimited RAM and speed, no modern connectivity
ARM CortexSTM32, SAMD21 or 51, nRF52, RP2040Performance, peripherals, strong ecosystemsToolchains and layout complexity increase
ESP32ESP32 S3, C3, classic ESP32, ESP8266Wi Fi and BLE in one, great price and modulesHigher idle power, radio layout rules, noisy environments need care

8 bit - still unbeatable for simple, ultra low power jobs

When tasks are small and battery life is king, 8 bit wins. Think coin cell beacons, simple timers, toys, small motor drivers and single sensor nodes. The code is compact, wake up is instant, sleep current can be in microamps, and the BOM is tiny. We still use ATmega and ATTiny parts for inputs and outputs that need to be rock solid with almost zero power draw.

What engineers like is the determinism. A loop reads a sensor, drives a pin, toggles a relay. There is no scheduler unless you add one. Timers are simple, interrupts are predictable and startup is fast. You can hit very low power numbers with a few lines of code and a good regulator. Debug is easy through a serial header. The downside is you will run out of RAM fast with complex logic or large buffers and you will not have Wi Fi or BLE on board.

Pro tip - use a tiny 8 bit as a companion chip for power management. It can gate power rails, monitor a battery and wake the main processor only when needed. This hybrid design saves energy and keeps the main codebase clean.

ARM Cortex - the modern workhorse

ARM Cortex parts cover small to serious. From low power M0 plus chips up to M7 class with floating point and high speed buses. Engineers pick them when performance and peripherals matter. You get proper ADCs, hardware timers, DMA, USB device or host, and sometimes Ethernet or CAN. Driver support is wide. STM32 and nRF52 parts are dependable across many suppliers. RP2040 adds PIO blocks that make custom serial protocols cheap to implement.

We like ARM when we have multiple interfaces to juggle or precise control loops to run. A motor controller with encoder feedback, a USB data logger, a wearable with BLE and sensors, a camera interface or audio processing chain. Tooling is heavier than Arduino but the control you gain is worth it. With SWD or JTAG you debug at source line level and watch registers in real time.

ESP32 - built in Wi Fi and BLE for connected devices

ESP32 is the first choice when Wi Fi or BLE are core to the product. The price to capability ratio is hard to beat. The S3 variant adds USB and vector extensions for simple ML tasks. The C3 brings RISC V in a small package with BLE and Wi Fi at very low cost. Modules remove RF risk and simplify certification paths. You do need to respect antenna keep outs and ground planes, and to budget power used by the radios.

Engineers worry about idle power and radio coexistence. The answer is duty cycle and smart sleep. Push data in bursts then sleep radios and CPU. Use light sleep and deep sleep modes aggressively. Store state in RTC memory. Use a buck regulator instead of a linear when running from Li Ion to avoid wasting energy. Measure real current on hardware not just read a spec sheet.

Buses and communication

Buses are not all equal. Choose based on speed, distance, noise and ecosystem.

Wireless channels, range and the environment

Channels are how radios avoid talking over each other. In practice, they are slices of spectrum with a center frequency and width. Engineers choose channels based on interference in the venue, regulatory limits and how much throughput or latency the application needs. The trick is understanding how modulation, packet size and duty cycle turn into usable data under real interference.

TechBandChannel widthPacket size ballparkThroughput ballparkRange ballparkNotes
BLE 52.4 GHz2 MHz~20 - 244 bytes app payload~100 kbps - 1 Mbps effectiveRoom to buildingGreat for sensors and phone links, watch connection interval and MTU
Wi Fi 2.42.4 GHz20 - 40 MHz~1500 byte frames10s of Mbps usableRoom to buildingHeavily shared with mics, cameras and consumer gear
Wi Fi 5 GHz5 GHz20 - 80 MHz~1500 byte frames100s of Mbps usableRoom to line of sightClean but shorter range and DFS may apply
LoRa433/868/915 MHz125 - 500 kHz~10 - 200 bytes typical~0.3 - 50 kbpsCity blocks to kilometersVery robust at low data rates, duty cycle limits apply

Packet size and reliability are not the same as headline speed. BLE can move more than you think if you raise MTU and use notifications effectively, but latency and connection interval still gate user experience. LoRa can cross a campus or a stadium but only with small payloads at measured intervals. Wi Fi carries large bursts when the air is clean but collapses under contention and noisy reflections.

Interference in the real world - TV and film sets are crowded RF spaces. Wireless mics live in UHF. Camera links and lighting controls occupy both 2.4 and 5 GHz. If you ship a BLE or Wi Fi device into that space without planning you will collide with something critical.

What we choose in noisy venues

Field note - the Sydney Opera House effect

During a project at the Sydney Opera House we saw a strange phenomenon. The building geometry and reflective surfaces created multipath that changed with audience presence. During rehearsal the link was stable. During the show, reflections and absorption from the audience shifted the fade pattern and the communication range collapsed in certain zones. If we were to do it again, we would survey with a spectrum analyzer during a full audience, plan channels with more margin, place access points to exploit line of sight from multiple angles, and use antenna diversity on the device. We would also split control and telemetry across different bands so a spike in one band does not take down both paths.

Pro tip - bring a handheld spectrum analyzer and a simple packet test app. Walk the venue during rehearsal and during audience entry. Measure, do not guess.
Common mistake - mixing 5 V and 3.3 V logic without level shifting. It silently works on the bench then dies in the field. Use proper shifters or design to a single logic domain.

Power design and battery life

Power design is the difference between a week and a year of battery life. Start with a budget table. List every mode and current draw. Sleep, active without radio, active with radio, and charge. Multiply by time spent in each mode per hour or per day. Engineers then pick a regulator that is efficient at the currents you will actually draw, not just at peak.

Mode8 bitnRF52RP2040ESP32 S3
Deep sleepMicroampsMicroampsLow to mediumHundreds of microamps to low milliamps
Active lightVery lowVery lowLowMedium
Active with radioN ALow BLEN AHigher Wi Fi and BLE

Pick buck regulators for Li Ion to 3.3 V. Pick LDOs only when input minus output voltage is small or when noise is critical for analog. Add reverse polarity protection and battery gauges early. Use load switches to kill rails to sensors that are not needed between bursts.

Security and encryption basics that matter

If a device connects to the world, treat security as a requirement. Use TLS for cloud links, validate certificates and pin roots where possible. Use secure boot if the MCU supports it so only signed firmware runs. Store keys in hardware if available or at least in flash that is read protected. Avoid rolling your own crypto. Use proven libraries and keep them updated.

Pro tip - separate device identity from application secrets. If a key leaks you can rotate application secrets without bricking identity.

OTA and firmware update strategy

Plan updates from day one. OTA reduces returns and truck rolls. Use two slots so you can roll back if an update fails. Sign firmware images. Log update success and failures. For ESP32 use the OTA partition scheme in ESP IDF. For STM32 build a tiny bootloader that can fetch new images over serial, USB or network. For RP2040 use UF2 based drag and drop in development then a more automated path for production.

Memory, speed and peripherals - practical comparisons

FamilyTypical flashTypical RAMSpeed ballparkPeripherals you get
8 bit8 KB to 64 KB1 KB to 8 KB8 to 20 MHzTimers, ADC, PWM, UART, I2C, SPI
ARM Cortex M64 KB to 2 MB+16 KB to 1 MB+48 to 600 MHzDMA, USB, CAN, SDIO, high res ADC
ESP32 family4 MB flash module typical320 KB internal plus PSRAM optionsUp to 240 MHz dual coreWi Fi, BLE, USB on S3, camera on some

These are ballparks not guarantees. Always check the exact part datasheet. Also check package availability. Some perfect parts only ship in tiny BGA packages that complicate prototyping and raise assembly cost.

Development tools and ecosystems

Teams ship faster with familiar tools. Arduino is fine to start, but for production move to vendor SDKs for control and stability. ESP IDF for ESP32, STM32Cube HAL for STM32, nRF Connect SDK for nRF52, the Pico SDK for RP2040. Use a real debugger. SWD for ARM, JTAG for ESP32, and always expose a reliable UART for logging. Set up continuous integration so firmware builds reproducibly and tests basic checks on each commit.

PCB layout and hardware do and do not

Real world picks and example designs

We pick based on the constraint that dominates.

Quick selection tables

Use casePickWhy
Always on coin cell8 bit or nRF52Microamp sleep, simple firmware
BLE gadget with phone appnRF52 or ESP32Good BLE stacks and examples
Wi Fi gadgetESP32 S3 or C3Connectivity on board, great price
Motor control or fast IOSTM32 F or GTimers, DMA, FPU
Quick prototype with odd busesRP2040PIO magic and price

Common pitfalls and how to avoid them

Summary and next steps

There is no single best microcontroller. There is a best one for your constraints. Start with power, connectivity and ecosystem. Pick the smallest family that meets the job. Prototype fast. Measure. Then lock the part and design the board for production. We help teams do this every week and we are happy to review your requirements and propose a short list that keeps risk low.

FAQ

Should we start with Arduino or go straight to vendor SDKs

Start with what gets you blinking and logging on real hardware today. Move to vendor SDKs before production so you control power modes, drivers and build pipelines.

How do we get good battery life with ESP32

Duty cycle radios, batch work, use deep sleep aggressively, pick a buck regulator, and measure real current. Avoid chatty protocols when you can push data in bursts.

What about secure elements

They are great for storing keys and doing crypto offload. Use them when you ship many devices or have high risk exposure. For low volume use MCU security features and strong processes.

FAQ

Can we use BLE for live audio or video

In a nutshell No. Saying that we can use BLE audio from 5.3 onwards however BLE is perfect for control and small data. Use Wi Fi or a dedicated AV link for media.

Is LoRa a replacement for Wi Fi

No. LoRa is for low data over long range with duty cycle limits. Use it for telemetry and alerts, not streams.

How do we avoid interference with wireless mics

Ask for the RF plan, avoid known occupied bands, and test on site. Consider 5 GHz Wi Fi or wired links for critical paths.

What packet size should we use

As small as delivers the job. Larger packets reduce header overhead but raise retry pain under loss. We often bundle data into moderate packets and acknowledge at chunk level.