Picking a Microcontroller

by Tom Igoe, August 2016
updated August 2018


With a wide variety of Arduino and Arduino-compatible options on the market, students often ask “which is the best controller for me to get?” What follows is a guide how to decide what to choose. This is by no means an exhaustive list, it only includes boards I use regularly enough to recommend.

The things you should consider in picking a controller, other than price:

  • Is this controller compatible with my other components?
    • Does it operate on the same voltage range?
    • Does it have the correct interface (e.g. asynchronous serial, I2C, SPI)?
    • Is it programmable with the tools I am using and any existing code I am using?
  • What  physical inputs and outputs do I need?
  • With what other devices does it need to communicate?
    • What protocols will they use (e.g. WiFi, Bluetooth, USB, etc)?
    • What aspects of the project can be handled by those other devices?
  • Is the form factor one I can work with?

The lab exercises for this class were originally written for the Arduino Uno. The processor at the core of the Uno, Atmel’s ATMega328, is an 8-bit microcontroller. The ATMega328 is one of the few processors that still comes in a breadboard-friendly DIP package, so you can even build your own Uno-compatible circuit on a breadboard if you want to save money. In projects where you’re using multiple controllers, the DIY breadboard option is a smart choice. However, it’s not a task for you if you aren’t yet comfortable building circuits and reading schematics.

Nowadays, 32-bit microcontrollers are available for about the same price or cheaper than 8-bit controllers. The Arduino Nano series and MKR series are mostly 32-bit processors (the Nano Every is still 8-bit) that can do all that the original Uno can do and more. As of 2019, we’re basing this class on the Arduino Nano 33 IoT.  These newer controllers have more processing power and memory for your program than the Uno and other 8-bit controllers, and if you’re buying your first controller, your best choice is probably a 32-bit controller. The Nano line and the MKR line are the ones I currently use the most.

For Beginners

The Nano family is a good, inexpensive starting place. The Nano Every is thoroughly compatible with the Uno’s architecture for a lower price. It operates on 5 volts, just like the Uno. The Nano 33 IoT is the same processor as the MKR series, the SAMD21 Cortex M0+ ARM processor, and has a Bluetooth and WiFi radio on board, again at a lower price than the MKR line.  All of these are breadboard-friendly DIP packages, with plenty of features. Code you’ve written for the Uno will also run on the Nanos as well, but you’ll need to pay attention to which pins your external components are connected to, since the layout is not the same. All of the Nanos except the Every are 3.3V boards, meaning that the default voltage is 3.3 volts, not 5 volts. This can present some challenges when dealing with sensors that operate on 5 volts, though nowadays most sensors are 3.3-volt compatible.

The MKRZero is the next step up. It has the same SAMD Cortex M0+, and a built-in SD card slot and rechargeable battery connector and charging circuit. Like most of the Nanos, the MKRs are 3.3V boards. There are several other boards in the MKR line as well, like the MKR1000 and MKR1010, which are WiFi boards, the MKR 1400 GSM and the MKR WAN 1300, which features LoRa connectivity.

Caveat: be wary of cheap derivatives, clones, and counterfeits of these boards. There are a number of very good derivatives that offer extra features, or different layouts. There are also a number of derivatives and clones that try to look the same, but use lower quality components or spend less time on inspecting assembled boards. We see a few broken projects every year that are due to a clone board failing.  Many of the vendors linked from this page sell their own Arduino-compatible variants that are reputable, if you want to look for derivatives.

Adafruit’s Feather M0 boards are also good DIP-format boards. They use the same processor, Atmel’s CortexM0+, they also use the DIP package, and they come in a variety of special-purpose variations. The basic Feather M0 Proto board has just the processor, it’s like a MKR1000 without the Wifi. The Feather Adalogger M0 is the same thing with a built-in SD card. The Feathers also have a built-in LiPo battery charger.

With one of the boards above, you can do everything covered in the labs for this class, with a faster and more capable processor than the Uno. Everything that follows is for readers who are already comfortable with microcontrollers, and looking for more info for advanced projects. For more information, see the comparison chart and vendors at the bottom of this page.

3.3V? 5V? What’s the difference?

1.7V, of course (a little electrical humor).

The Arduino Uno and the boards that came before it operated on 5 volts DC. However many newer controllers, including all the ones here,  and the embedded Linux boards like the BeagleBone and the Raspberry Pi, operate on 3.3 volts instead. Many older components, like the Sharp IR rangers that are popular in physical computing, operate on 5 volts, and many newer ones operate on 3.3 volts. Because of this change, you often need to adjust the voltage output of one component before it goes into another component. This is called level shifting. It’s a common technique you learn how to deal with when you work with many different components.


I Need A Lot of Input and Output…

Many physical computing projects need lots of input and output connections to read lots of sensors. There are lots of strategies for handling this. Many of the most common strategies are described in chapter 14 of Physical Computing: Sensing and Controlling the Physical World by Dan O’Sullivan and Tom Igoe. Although that book describes processors other than the Arduino, the circuits and techniques described work well with Arduino-compatible boards.

If you just want a single board with a lot of pins, consider the Arduino Due.   The Due has an Atmel SAM3X8E ARM Cortex-M3 processor, which is a more powerful version of the processor than the M0 in the MKR boards. This, or the strategies in Physical Computing, are probably the best option for multiple I/O for beginners.

If you’re feeling more advanced and want another approach, consider building your project with multiple processors. You can build your own Uno variant on a breadboard, or you can use the even smaller ATTiny84 and ATTiny85 controllers. These controllers have only a few I/O pins, but they are a couple of dollars each, and David Mellis has an excellent guide to programming them. You can link several of them together in one circuit and have each one control a handful of your I/O pins, then use one of the other processors mentioned here as a main controller.

You could also consider the ESP8266 processors below, if you need lots of processors connected wirelessly. They’re not as inexpensive as the ATTiny processors, but they have built-in WiFi.

Different Flavors of Wireless

There are numerous Arduino and Arduino-compatible variants with different radios on them.  The MKR series includes the MKR1000 (WiFi) and MKR 1010 (WiFi and Bluetooth LE); the MKR 1200 (SIGFOX; Europe only); MKR 1300 (LoRa), MKR 1400 (GSM), and MKR 1500 (NB IoT/LTE). The Nano series offers some radio connectivity too: the Nano 33 IoT (WiFi and Bluetooth LE/4.0) and the Nano 33 BLE (Bluetooth 5.0) are good wireless processors. Other manufacturers carry similar boards, like Adafruit’s Feather line.

Espressif’s ESP8266 processor is a very inexpensive 32-bit processor with WiFi built in. It’s very popular when you’re building projects that need lots of WiFi devices. It has relatively little I/O, however,  and only one analog in that can only read a 1-volt range. So the lower cost is often lost in extra components to add I/O.  The Feather Huzzah ESP8266 is a good implementation of the ESP8266, as is Spark Fun’s ESP8266 Thing Dev board. Many other vendors sell their own version of the ESP8266 board, but these are the two that I’ve used which are simplest for relative beginners to use. The ESP8266 WiFi libraries are based on the Arduino WiFi101 libraries, so code is relatively compatible with the MKR1000.

The ESP8266 boards can also run other languages. There’s a port of JavaScript, a MicroPython version, and Lua version that are relatively mature, and others still in development. Watch the ESP8266 repository for updates.

The ESP8266 boards are not great for the absolute beginner, but they’re relatively easy for intermediate users, and handy when you need a lot of processors networked inexpensively.

Caveat: Bluetooth LE is not as simple as using the Bluetooth 2.0 Serial Port Profile. If you just need a Bluetooth serial connection, consider adding a BlueFruit EZ-Link or a Bluetooth Mate Silver to your board.

Can I Program it in Python/JavaScript?

Yes, but there are limitations. There are microcontrollers on the market that you can program with scripting languages like Python and JavaScript. The Espruino is a good version of JavaScript for microcontrollers, and the MicroPython board does the same for Python. The BBC Micro:Bit runs both. The Espruino JavaScript engine is available for the ESP8266 as well, as is MicroPython for 8266.

Although these scripting engines seem enticing for microcontroller use, they come at a cost. Scripting engines can never run your code as fast as compiled code, and sometimes the timing can be inconsistent, because the engine’s cleaning up memory and not listening to your I/O pins. Any good programming tool needs a good framework for building libraries as well. When you’re looking at new tools like this, check what libraries are available, and what the framework for building libraries looks like, and how many programmers are using it.

The ones mentioned here are the most promising ones I’ve tried myself. Though I’m still not ready to use them in this class, I am watching closely, ever hopeful.

What About Embedded Linux?

There are a number of different embedded Linux processors on the market now that are in the same price range as microcontroller boards. The Raspberry Pi and the BeagleBone Green Wireless are excellent examples of this, and good products. These boards are getting more capable all the time. Many of the Processing and P5.js/node.js examples for this class run on the Raspberry Pi 2 and 3, for example, or the BeagleBone Green Wireless.

For this intro to physical computing class, they are overkill, however, because they require you to learn how an embedded operating system works in addition to the electronics, programming, and physical interaction design we’re already covering. It’s not uncommon to combine a microcontroller with an embedded linux processor, with the former handling physical I/O and the latter handling media control or network communication. The two communicate via asynchronous serial, just like your laptop and your microcontroller will do in the serial labs in this class.

For the purposes of this class, you’re welcome to explore the embedded Linux boards independently once you’ve shown mastery of the material covered in class. Your projects will be evaluated mostly on how well they demonstrate good physical interaction design, however.

MIcrocontrollers Compared

A comparison chart of microcontrollers for use in Intro to Physical Computing
BoardManufacturerProcessorOperating VoltageAnalog Input PinsDigital I/O pins/PWM Pins (1)FeaturesConnectivityComplexity
UnoArduinoAtmega3285V614 (of which 6 provide PWM output)SPI, UART, I2CBeginner
LeonardoArduinoAtmega32U45V1220 (of which 7 provide PWM output)Beginner
MKRZeroArduinoSAMD21 M03.3V722 (12 PWM) LiPo charger, Real-time Clock,SD card slot SPI, UART, I2C, USB Beginner
MKR1000ArduinoSAMD21 M03.3V722 (12 PWM) LiPo charger, Real-time ClockWiFI, SPI, UART, I2C, USBIntermediate
DueArduinoSAM3X8E M43.3V1254 (of which 12 provide PWM output)Real-time ClockSPI,4 UART, I2C, USBBeginner
Mega2560ArduinoATmega25605V1654 (of which 15 provide PWM output)SPI, 4 UART, I2CBeginner
DIY Uno-compatibleYouAtmega3285V614 (of which 6 provide PWM output)SPI, UART, I2CIntermediate
DIY TinyYouATtiny84 or Attiny855V3 or 65 or 11Software UARTIntermediate
Feather M0 ProtoAdafruitSAMD21 M03.3V614 (of which 7 provide PWM output)LiPo charger & Real-time ClockSPI, UART, I2C, USBBeginner
Feather M0 AdaloggerAdafruitSAMD21 M03.3V614 (of which 7 provide PWM output)LiPo charger, Real-time Clock, SD card slotSPI, UART, I2C, USBBeginner
Feather M0 WiFi WINC1500AdafruitSAMD21 M03.3V614 (of which 7 provide PWM output)LiPo charger, Real-time ClockWiFi, SPI, UART, I2C, USBIntermediate
Feather M0 ESP8266 HuzzahAdafruitESP82663.3V1 (1V range)4 LiPo chargerWiFi, SPI, UART, I2CIntermediate
Spark Fun Thing DevSparkfunESP82663.3V1 (1V range)4WiFi, SPI, UART, I2CIntermediate
BLE NanoRed Bear LabsnRF51822 & ARM Cortex M03.3V39Bluetooth LE, SPI, UART, I2CAdvanced

Where To Get Boards

The Arduino boards mentioned here are carried by the Arduino online store as well as many of the vendors mentioned here: Adafruit, Spark Fun, Seeed Studio, and Digikey are the vendors I use most frequently. For Seeed Studio products in the US, Digikey is a useful reseller. It’s worth comparing them all for pricing, though the differences are not usually large.