At EZMation.com, we build a lot of custom electronics. Some projects need nothing more than a few buttons, sensors and relays. Others need Wi-Fi, Bluetooth, a web interface, USB, displays, remote firmware updates or enough processing power to handle a fairly complicated application.
We have found that six microcontroller families cover a surprisingly large percentage of the custom projects we build:
- Microchip ATtiny816
- Microchip ATmega328PB
- Espressif ESP8266
- Espressif ESP32-C3
- Espressif ESP32-S3
- Espressif ESP32-C6
They are not interchangeable. The trick is knowing when a small, inexpensive 8-bit AVR is the right answer and when it makes more sense to move up to a 32-bit ESP32 with wireless connectivity and a much larger software environment.
Here is how we generally think about the choices at EZMation.
At a Glance
| Device | CPU | Flash | RAM | Wireless | Typical Package / Module Size | Approx. Price* |
|---|---|---|---|---|---|---|
| ATtiny816 | 8-bit AVR, 20 MHz | 8 KB | 512 B | None | 3 x 3 mm QFN | ~$0.80-$1.00 |
| ATmega328PB | 8-bit AVR, 20 MHz | 32 KB | 2 KB | None | 5 x 5 mm QFN or 7 x 7 mm TQFP | ~$1.50-$2.00 |
| ESP8266 | 32-bit Xtensa, 80/160 MHz | External SPI flash | Much more than AVR | 2.4 GHz Wi-Fi | ESP-12F: about 24 x 16 mm | ~$1.25-$2.80 |
| ESP32-C3 | 32-bit RISC-V, 160 MHz | Typically 4 MB on module | 400 KB SRAM | Wi-Fi + Bluetooth LE | ~13 x 17 mm module | ~$3.25-$4.00 |
| ESP32-C6 | 32-bit RISC-V, 160 MHz | Typically 4 MB on module | 512 KB HP SRAM + 16 KB LP SRAM | Wi-Fi 6 + Bluetooth LE + Zigbee/Thread | 13.2 x 16.6 mm module | ~$4.65 |
| ESP32-S3 | Dual-core 32-bit Xtensa, 240 MHz | Typically 8 MB on module | 512 KB SRAM | Wi-Fi + Bluetooth LE | 15.4 x 20.5 mm module | ~$5.40 |
*Prices are representative single-unit or low-quantity street prices and can change significantly with quantity, package, flash size, supplier and market conditions. The AVR prices are for bare ICs while the ESP prices above are for modules, which normally include flash, crystal and RF components. They are therefore not a direct apples-to-apples BOM comparison.
First Decision: Do You Need Wireless?
This is usually the easiest decision.
If the answer is no, we normally start by looking at the ATtiny816 and ATmega328PB.
If the answer is yes, we move into the ESP family.
That simple decision eliminates a lot of unnecessary complexity. There is no reason to put a Wi-Fi-enabled 32-bit processor into a device that only needs to read a switch, control a relay and blink an LED.
On the other hand, if the product needs to connect to a phone, Wi-Fi network, cloud service or web browser, an ESP32 can eliminate a huge amount of additional hardware.
ATtiny816: Small, Inexpensive and Surprisingly Capable
The ATtiny816 is one of our favorite choices when the job is relatively simple and the board needs to be small.
It is an 8-bit AVR running at up to 20 MHz with 8 KB of Flash, 512 bytes of RAM, 128 bytes of EEPROM, a 10-bit ADC, DAC, timers, PWM, SPI, I2C, USART and Microchip's Core Independent Peripherals. It also has a UPDI programming and debugging interface.
The 3 x 3 mm QFN package is a big reason to use it. When the circuit can fit in a very small space, the ATtiny816 is hard to beat.
Where We Would Use an ATtiny816
- Reading pushbuttons and switches
- Controlling LEDs
- Driving a small relay
- Simple motor control
- Reading analog sensors
- Battery-powered sensors
- Temperature monitoring
- Door and window sensors
- Motion sensors
- Simple alarm circuits
- Small lighting controllers
- IR transmitters and receivers
- Small custom remote controls
- Power monitoring interfaces
- Keyboard or button interfaces
- Capacitive touch controls
- Small industrial control boards
- Adding intelligence to another piece of electronics
One of the things we like about the ATtiny816 is that it has a lot of useful hardware built into a very inexpensive chip. The Event System and configurable logic can allow some operations to happen in hardware without constantly involving the CPU.
For a simple custom product, that can be more useful than having a much faster processor.
ATmega328PB: When the ATtiny Isn't Quite Big Enough
The ATmega328PB is the next step up for us when we want to stay with an inexpensive, straightforward AVR design but need more I/O, memory or peripherals.
It has 32 KB of Flash, 2 KB of SRAM, 1 KB of EEPROM, 27 programmable I/O pins and a 20 MHz AVR processor. It also provides two SPI interfaces, two I2C interfaces and two USARTs.
If the ATtiny816 is the "small and simple" AVR, the ATmega328PB is the "I need a little more room" AVR.
Where We Would Use an ATmega328PB
- Multi-sensor controllers
- Relay and contact-closure controllers
- Custom test equipment
- RS-232 or serial control products
- IR control systems
- Motor controllers
- LED controllers
- Small displays
- Keypads
- Data loggers
- Power monitoring
- Generator monitoring
- Industrial control interfaces
- Equipment adapters
- Custom Arduino-compatible hardware
- Small automation controllers
The ATmega328PB is also a comfortable choice when an engineer wants a conventional 8-bit microcontroller without introducing a wireless operating system, RF layout and the additional software complexity that comes with an ESP32.
For some projects, that simplicity is exactly what we want.
ATtiny816 vs. ATmega328PB
Our basic rule is simple:
- Use the ATtiny816 when the application is small, cost and PCB area matter, and the I/O and memory requirements are modest.
- Use the ATmega328PB when the application needs more pins, more Flash, more RAM or more serial interfaces.
There is also a cost consideration. Both are inexpensive enough that the engineering time often matters more than the difference in component price. If squeezing a few dollars out of the BOM saves hours of firmware development or debugging, it is usually not a good trade.
ESP8266: The Chip That Started a Lot of IoT Projects
The ESP8266 deserves a special mention because it changed what was possible with inexpensive embedded electronics.
Before the ESP8266, adding Wi-Fi to a small custom product often meant adding a separate Wi-Fi module next to a microcontroller. The ESP8266 put a processor and Wi-Fi radio into one inexpensive device.
It supports 2.4 GHz 802.11 b/g/n Wi-Fi and can run as a standalone application processor. It can also act as a Wi-Fi interface for another microcontroller.
We have used ESP8266-based designs for everything from network-connected controllers to web interfaces and remote monitoring.
ESP8266 Applications
- Wi-Fi relay controllers
- Smart switches
- Internet-connected sensors
- Temperature and humidity monitors
- Home automation
- Remote equipment monitoring
- Web-controlled devices
- Wi-Fi serial bridges
- Network-connected IR controllers
- Lighting controllers
- IoT prototypes
- Remote power monitoring
- Small web servers
- Network configuration interfaces
- Wireless data loggers
There is one important catch in 2026: the ESP8266 is now considered NRND, or Not Recommended for New Designs, by Espressif. We still like it for existing products and proven designs, and there is a huge amount of existing ESP8266 software and knowledge available. But for a brand-new product, we would normally look at an ESP32-C3 or ESP32-C6 first.
ESP32-C3: Our Go-To Small Wi-Fi/Bluetooth MCU
The ESP32-C3 is where things get really interesting for new designs.
It is a 32-bit RISC-V processor running at up to 160 MHz with 400 KB of SRAM, Wi-Fi, Bluetooth LE, USB Serial/JTAG, ADC, SPI, I2C, UART, I2S, PWM and a long list of other peripherals.
It is still relatively inexpensive, but it is dramatically more capable than an 8-bit AVR.
The C3 is often the first part we consider when someone says, "I need a microcontroller and I also need Wi-Fi."
Why We Like the ESP32-C3
- Low-cost 32-bit processor
- RISC-V architecture
- Wi-Fi built in
- Bluetooth LE built in
- USB Serial/JTAG on the chip
- Good low-power modes
- Large amount of RAM compared with an AVR
- Hardware security features
- Excellent ESP-IDF software support
- Can also be programmed using the Arduino environment
- Small modules are readily available
ESP32-C3 Applications
- Smart home controllers
- Wi-Fi thermostats
- Wireless sensors
- Bluetooth configuration interfaces
- Wi-Fi relay boxes
- Smart lighting
- Garage and door controllers
- Networked test equipment
- Remote power monitors
- Wi-Fi-to-serial bridges
- Bluetooth-to-serial bridges
- Cloud-connected products
- Mobile-app-controlled equipment
- Security and access-control devices
- Industrial automation interfaces
- Small data loggers
For many custom products, the C3 is the sweet spot. It gives us a modern 32-bit processor and wireless connectivity without paying for the considerably larger capabilities of the S3.
ESP32-S3: When the Project Needs More Processing Power
The ESP32-S3 is the part we reach for when the application is more complicated.
It has a dual-core 32-bit Xtensa LX7 processor running at up to 240 MHz, 512 KB of SRAM, Wi-Fi, Bluetooth LE, USB, a camera interface, LCD interface, I2S, SD/MMC support and a much larger peripheral set than the smaller ESP32-C3.
It can also be paired with PSRAM, which makes a big difference for applications that need large buffers, graphics, audio, image processing or more complicated software.
The S3 is particularly interesting when the product has a display or needs to interact with USB.
ESP32-S3 Applications
- Touchscreen control panels
- Graphical displays
- USB devices
- USB keyboards and controllers
- USB mass-storage interfaces
- Audio products
- Internet-connected displays
- Camera interfaces
- Machine interfaces
- Advanced home automation controllers
- Voice and audio interfaces
- Image-processing applications
- Data acquisition systems
- Network-connected test equipment
- Complex web interfaces
- Products requiring PSRAM
- Products with multiple simultaneous communications tasks
Another major advantage is native USB support. The ESP32-S3 can be flashed over USB and can also be used as a USB device. That opens up applications that would otherwise require another USB interface chip.
ESP32-C6: The Choice When You Want the Newer Wireless Features
The ESP32-C6 is a little different from the C3 and S3.
It uses a 160 MHz single-core RISC-V processor and includes Wi-Fi 6, Bluetooth LE 5.3 and an IEEE 802.15.4 radio for protocols such as Thread and Zigbee.
That last feature is the big reason to choose a C6.
If a product needs to participate in a modern smart-home network, Thread or Zigbee may be much more useful than simply having Wi-Fi.
ESP32-C6 Applications
- Smart home devices
- Thread devices
- Zigbee devices
- Wi-Fi 6 IoT devices
- Wireless sensors
- Smart lighting
- Home automation controllers
- Building automation
- Industrial wireless sensors
- Battery-powered networked devices
- Multi-protocol wireless products
- Bluetooth commissioning and configuration
- Connected appliances
- Wireless energy monitoring
- Networked security devices
For a new smart-home product, the C6 is often worth serious consideration because it gives us several wireless options in one device.
ESP32-C3 vs. ESP32-S3 vs. ESP32-C6
These three can look very similar when you are looking at a distributor's product list, but they are optimized for different jobs.
| Feature | ESP32-C3 | ESP32-S3 | ESP32-C6 |
|---|---|---|---|
| CPU | Single-core RISC-V | Dual-core Xtensa LX7 | Single-core RISC-V |
| Maximum CPU Speed | 160 MHz | 240 MHz | 160 MHz |
| RAM | 400 KB SRAM | 512 KB SRAM | 512 KB HP SRAM + 16 KB LP SRAM |
| Wi-Fi | 2.4 GHz 802.11 b/g/n | 2.4 GHz 802.11 b/g/n | 2.4 GHz Wi-Fi 6 |
| Bluetooth | Bluetooth LE 5 | Bluetooth LE 5 | Bluetooth LE 5.3 |
| Thread | No | No | Yes |
| Zigbee | No | No | Yes |
| USB | USB Serial/JTAG | USB Serial/JTAG + USB OTG | USB Serial/JTAG |
| PSRAM | No | Available on selected modules | No |
| Best Fit | General IoT | Graphics, USB, audio, complex applications | Newer multi-protocol wireless products |
Power Consumption: This Is Where the Comparison Gets Interesting
Power consumption is one area where it is easy to make a misleading comparison.
An ATtiny816 or ATmega328PB can run a very simple application on a tiny amount of current. An ESP32, on the other hand, can draw hundreds of milliamps while its radio is transmitting. That sounds like a huge disadvantage until you consider what the ESP32 is actually doing during those milliseconds or seconds of radio activity.
The real question for a battery-powered product is usually not "What is the maximum current?" It is "How much energy does the device use over an entire operating cycle?"
The ESP32-C3, for example, has a typical deep-sleep current of about 5 µA. The ESP32-C6 is around 7 µA in deep sleep, while the ESP32-S3 can operate in the single-digit-microamp range in some deep-sleep configurations.
The ESP8266 also has useful sleep modes. Espressif gives an example where a device spends most of its time asleep and wakes periodically to connect to Wi-Fi, resulting in an average current below 1 mA for the example application.
For a device that spends 99% of its life asleep and only wakes up occasionally, an ESP32 can therefore still make a very good battery-powered solution.
On the other hand, if the device needs to run continuously and only needs to monitor a couple of inputs, an ATtiny816 is probably a much better answer.
Don't Forget the Power Supply
There is another important difference between these families.
The ATtiny816 and ATmega328PB can operate over a relatively wide supply range, with the AVR parts supporting operation down to around 1.8 V depending on the device and operating conditions. The ESP32 family generally wants a regulated 3.3 V supply.
That means an ATmega or ATtiny can sometimes be connected much more directly to a battery or other low-voltage circuit.
ESP32 designs also need a power supply that can handle the short, high-current bursts associated with Wi-Fi transmission. We pay close attention to the regulator, bulk capacitance and PCB power distribution on ESP32 designs. A design that looks fine on paper can become unreliable if the 3.3 V rail dips during RF activity.
Size Matters More Than You Might Expect
For an AVR design, the actual microcontroller can be extremely small.
The ATtiny816 is available in a 3 x 3 mm QFN package. The ATmega328PB can be purchased in a 5 x 5 mm QFN or a 7 x 7 mm TQFP package.
ESP modules are larger because they include much more than the processor. The module normally includes the processor, flash memory, crystal, RF circuitry and antenna.
For example, an ESP32-C6-MINI-1 is approximately 13.2 x 16.6 mm, while an ESP32-S3-MINI-1 is approximately 15.4 x 20.5 mm. An ESP-12F ESP8266 module is approximately 24 x 16 mm.
That sounds large compared with a 3 x 3 mm ATtiny, but there is a big tradeoff: with the ESP module, we don't have to design the RF section from scratch.
For a commercial product, that can be a very good trade.
Programming and Firmware Updates
This is another area where the AVR and ESP families are very different.
ATtiny816
The ATtiny816 uses Microchip's UPDI interface for programming and debugging. It is a simple, single-wire interface that works well during development and manufacturing.
For a production device, firmware can also be loaded as part of the manufacturing process using a programming fixture.
The downside is that remote firmware updates are not something the chip provides by itself. If we need to update firmware in a device after it has been installed, we have to design that capability into the product, typically using another processor or a suitable communication interface and bootloader strategy.
ATmega328PB
The ATmega328PB follows the more traditional AVR development model. Firmware can be programmed through its in-system programming interface, or a bootloader can be used for field programming.
This is a mature and well-understood approach, and it is one reason AVR remains popular for straightforward embedded products.
For a product where firmware updates happen through a service connector during maintenance, this is usually all we need.
ESP8266
The ESP8266 has a built-in bootloader and is normally programmed through a serial interface. It can also support OTA firmware updates over Wi-Fi.
That OTA capability is a major advantage for connected products. If a device is installed inside a wall, mounted on a piece of equipment or shipped to hundreds of customers, we don't necessarily want someone opening the enclosure every time the firmware needs an update.
The downside is that OTA firmware is more complicated than simply programming an AVR. The firmware image, flash layout, bootloader and update process all have to be designed and tested properly.
ESP32-C3 and ESP32-C6
The C3 and C6 use the Espressif bootloader and can be programmed over UART. Both also have built-in USB Serial/JTAG hardware, which can make development and production programming much easier because an external USB-to-serial chip is not necessarily required.
They also support OTA firmware updates through the ESP-IDF software framework.
This makes them particularly attractive for connected products where firmware will continue to evolve after the hardware is deployed.
ESP32-S3
The S3 takes this a step further with its USB capabilities. In addition to normal serial programming, the ESP32-S3 can support USB-based firmware update and USB device applications.
For example, we can build a custom controller that appears to a computer as a USB device, while also providing Wi-Fi and Bluetooth connectivity. That can eliminate several separate interface chips.
What About Arduino?
All six parts can be approached from the Arduino ecosystem to some degree, but they don't all feel the same.
The AVR parts are extremely comfortable territory for traditional Arduino development. The ATmega328 family in particular has been at the heart of countless Arduino-compatible projects.
The ESP8266 also has a very mature Arduino ecosystem.
The ESP32 family can be programmed using Arduino, but for more sophisticated commercial products we often move to Espressif's ESP-IDF framework. ESP-IDF gives us much more control over networking, FreeRTOS tasks, memory, security, OTA updates, USB, power management and the underlying hardware.
Our general approach is to use whatever development environment makes sense for the project. A simple controller does not need an unnecessarily complicated software stack.
Real-World Examples: Which One Would We Pick?
| Project | Our Likely Choice | Why |
|---|---|---|
| Battery-powered door sensor | ATtiny816 | Very small, inexpensive and extremely low-power |
| Simple relay controller | ATtiny816 | More than enough processing power |
| Multi-channel sensor board | ATmega328PB | More I/O and memory |
| IR transmitter | ATtiny816 | Small and inexpensive |
| IR receiver with complicated protocol handling | ATmega328PB | More firmware space and RAM |
| Wi-Fi relay | ESP32-C3 | Wi-Fi and Bluetooth in one inexpensive device |
| Wi-Fi serial bridge | ESP32-C3 | Small, inexpensive and plenty of processing power |
| Smart thermostat | ESP32-C3 | Wireless connectivity and plenty of peripherals |
| Smart-home Thread device | ESP32-C6 | Thread, Zigbee, Bluetooth LE and Wi-Fi 6 |
| Zigbee controller | ESP32-C6 | Integrated 802.15.4 radio |
| Touchscreen controller | ESP32-S3 | More processing power, graphics peripherals and PSRAM options |
| USB control device | ESP32-S3 | Native USB capabilities |
| Audio controller | ESP32-S3 | More CPU, RAM and audio-oriented peripherals |
| Remote power monitor | ESP32-C3 | Wi-Fi makes remote monitoring easy |
| Generator monitoring system | ESP32-C3 | Network connectivity plus enough processing power for measurement and control |
| Small custom display | ESP32-S3 | Better fit for graphics and larger software |
| Simple LED controller | ATtiny816 | There is no reason to pay for Wi-Fi that isn't needed |
| Network-connected lighting controller | ESP32-C3 | Wi-Fi and Bluetooth with a small footprint |
| Existing ESP8266 product | ESP8266 | Keep the proven design rather than redesigning unnecessarily |
| New Wi-Fi product replacing an ESP8266 | ESP32-C3 or C6 | More modern architecture and longer-term design choice |
One of Our Favorite Design Patterns: Use Two Processors
Sometimes the answer is not to pick one.
For example, we may use a small ATtiny816 to handle a dedicated real-time task while an ESP32 handles the network connection and user interface.
The AVR can monitor safety inputs, control a relay, handle precise timing or manage a low-power sensor while the ESP32 sleeps or performs networking tasks.
This can be a very good architecture when the wireless processor does not need to be awake all the time.
It also gives us a useful separation between the "machine" and the "network." If the Wi-Fi connection crashes or needs to reboot, the ATtiny can continue handling the basic control functions.
So Which One Should You Choose?
At EZMation, our decision tree is usually pretty simple:
- Need something tiny and inexpensive? Start with the ATtiny816.
- Need more I/O or memory but no wireless? Look at the ATmega328PB.
- Have an existing ESP8266 design? There may be no reason to change it.
- Starting a new Wi-Fi product? Start with the ESP32-C3.
- Need Thread, Zigbee or Wi-Fi 6? Look closely at the ESP32-C6.
- Need USB, graphics, audio, a camera or more processing power? The ESP32-S3 is probably the best fit.
And there is one final rule we use all the time: don't choose a processor based only on the processor.
Look at the entire product.
How much does the power supply cost? How complicated is the PCB? Does the product need wireless certification? How will it be programmed at the factory? How will firmware be updated in the field? How much software will need to be written? How much RAM will the application really need? How difficult will it be to debug?
A $0.75 microcontroller is not necessarily cheaper than a $4 microcontroller if it adds three interface chips, more PCB area and a week of engineering time.
Likewise, putting an ESP32-S3 into a device that only needs to read two switches and control a relay is probably unnecessary.
The best microcontroller is usually the one that makes the entire product simpler.
Need Help Choosing a Microcontroller?
Choosing the processor is one of the first decisions we make when developing a custom electronic product. At EZMation.com, we can help with the complete design, including the electronics, PCB, firmware, communications, enclosure and 3D-printed or manufactured mechanical components.
Whether you need a tiny sensor, a custom automation controller, a Wi-Fi-connected product, a serial control system, a display, a special-event device or something that doesn't fit into an existing product category, we can design the electronics around what the product actually needs.
Have a custom electronics project in mind? Contact EZMation.com and let's figure out which processor makes sense for it.
Technical specifications and pricing in this article are representative and can change as manufacturers revise products and distributors adjust pricing. Always check the current manufacturer datasheet and component availability before committing a part to a production design.