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?
All of the lab exercises for this class are based on the Arduino Uno, and can be done with it. The processor at the core of the Uno, Atmel’s ATMega328, is a solid 8-bit microcontroller with plenty of features to serve most physical computing projects’ needs. 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 as 8-bit controllers. 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 MKR line of controllers, starting with the MKRZero, are the ones I currently use the most.
The MKRZero is based on the Atmel SAMD21 Cortex M0 ARM processor, is a good starting board. It has a breadboard-friendly DIP package with plenty of I/O connections, and a built-in SD card slot and rechargeable battery connector and charging circuit. Code you’ve written for the Uno will also run on this board 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. It’s also 3.3V board, 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. 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 adaptations of the MKR idea. They use the same processsor, 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 or the Arduino Mega2560. 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. The Mega is an 8-bit board, but with plenty of I/O and memory to do what you need for projects with lots of I/O. 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 Feather M0 variants with different radios on them as well. The Feather M0 WiFi WINC1500 uses the same WiFi radio as the MKR1000. The Adafruit WINC1500 library for this board is based on the Arduino WiFi101 libraries, so code is relatively compatible with the MKR1000. See their tutorial for some important changes though. All of these variants have more or less the same I/O pins as the MKR1000, though they’re arranged differently on the different boards.
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 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.
If you’re working on a project that needs Bluetooth LE project, there are many boards that can do the job. The most popular Bluetooth LE radios for the Arduino IDE are Nordic’s radios. These are not microcontrollers themselves, but external components that you add to a microcontroller. They include the nRF8001, which you can add on to any microcontroller, and the nRF51822, which has its own built-in Cortex M0 processor. Sandeep Mistry’s Arduino BLEPeripheral library works with these radios. The RedBear Labs BLE Nano, has an nRF51822 built in,which is one of the smallest programmable Bluetooth LE boards. It has very few I/O pins, however.
Another 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.
Here’s a comparison chart of Arduino processors. This doesn’t cover all the processors in this document, but it gives you an idea of the range of processors available.
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 ComparedA comparison chart of microcontrollers for use in Intro to Physical Computing
|Board||Manufacturer||Processor||Operating Voltage||Analog Input Pins||Digital I/O pins/PWM Pins (1)||Features||Connectivity||Complexity|
|Uno||Arduino||Atmega328||5V||6||14 (of which 6 provide PWM output)||SPI, UART, I2C||Beginner
|Leonardo||Arduino||Atmega32U4||5V||12||20 (of which 7 provide PWM output)||Beginner|
|MKRZero||Arduino||SAMD21 M0||3.3V||7||22 (12 PWM)||LiPo charger, Real-time Clock,SD card slot||SPI, UART, I2C, USB||Beginner|
|MKR1000||Arduino||SAMD21 M0||3.3V||7||22 (12 PWM)||LiPo charger, Real-time Clock||WiFI, SPI, UART, I2C, USB||Intermediate|
|Due||Arduino||SAM3X8E M4||3.3V||12||54 (of which 12 provide PWM output)||Real-time Clock||SPI,4 UART, I2C, USB||Beginner|
|Mega2560||Arduino||ATmega2560||5V||16||54 (of which 15 provide PWM output)||SPI, 4 UART, I2C||Beginner|
|DIY Uno-compatible||You||Atmega328||5V||6||14 (of which 6 provide PWM output)||SPI, UART, I2C||Intermediate|
|DIY Tiny||You||ATtiny84 or Attiny85||5V||3 or 6||5 or 11||Software UART||Intermediate|
|Feather M0 Proto||Adafruit||SAMD21 M0||3.3V||6||14 (of which 7 provide PWM output)||LiPo charger & Real-time Clock||SPI, UART, I2C, USB||Beginner|
|Feather M0 Adalogger||Adafruit||SAMD21 M0||3.3V||6||14 (of which 7 provide PWM output)||LiPo charger, Real-time Clock, SD card slot||SPI, UART, I2C, USB||Beginner|
|Feather M0 WiFi WINC1500||Adafruit||SAMD21 M0||3.3V||6||14 (of which 7 provide PWM output)||LiPo charger, Real-time Clock||WiFi, SPI, UART, I2C, USB||Intermediate|
|Feather M0 ESP8266 Huzzah||Adafruit||ESP8266||3.3V||1 (1V range)||4||LiPo charger||WiFi, SPI, UART, I2C||Intermediate|
|Spark Fun Thing Dev||Sparkfun||ESP8266||3.3V||1 (1V range)||4||WiFi, SPI, UART, I2C||Intermediate|
|BLE Nano||Red Bear Labs||nRF51822 & ARM Cortex M0||3.3V||3||9||Bluetooth LE, SPI, UART, I2C||Advanced|
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. For RedBear Labs‘ boards, Spark Fun and Digikey are good US resellers.