$5 Microcontrollers: Arduino, Raspberry Pi Zero, Or NodeMCU?
It used to be the case that if you wanted to get a computer, you’d have to remortgage your house to pay for it. Now, you can get one for an Abraham Lincoln. Go figure.
Yes, microcontrollers are computers, and there are three that come in under the $5 price point: The Arduino, the Raspberry Pi Zero, and the NodeMCU. So, what are their strengths? What are their weaknesses? More importantly, which one should you use for your project?
The Arduino Uno: Age Before Beauty
The Arduino Uno is the oldest device on our run-down. It dates back to 2005 when it was created as as a teaching tool for students at the Interaction Design Institute Ivrea, in Northern Italy. Since then, it has been improved, modified, and cloned countless times, and spawned a revolution in electronics and creative programming.
If you were to buy an official Arduino from their online store, or from a retailer like Farnell, Adafruit, or Maplin, you can easily expect to pay around $25. The genuine product hasn’t deflated in price as one might have hoped. However, the Arduino is an open-source product and there are manufacturers in China who have created perfect clones which sell for as little as $5 on eBay and AliExpress.
These $5 knock-offs work and act just like the real thing. They use the exact same chips, and are built to the same specifications as the genuine article. The only reason you should ever pay full price is to support the Arduino project.
Probably the biggest advantage of the Arduino is its simplicity. There’s no configuration required beyond physically building the thing you’re making. You don’t have to build and configure a full Linux system, as you would with a Raspberry Pi. You just write the code on whatever computer you normally use, compile it, and flash it to the chip.
Another huge advantage of the Arduino is that they are surprisingly fault-tolerant. It’s extremely difficult – but by no means impossible – to irreparably damage one.
The biggest downside of the Arduino is that they’re fundamentally austere. If you want to add functionality like ethernet connectivity or bluetooth, you’ll have to pay extra for a compatible shield . These aren’t cheap, with official shields costing between $20 and $40 on average. But as with the Arduinos themselves, you can save money by buying Chinese knock-offs online.
Another thing to be wary of is that the Arduino Uno also uses a slow ATMEGA CPU, and has limited memory and storage. This means that if you’re gathering data like sensor readings, you’ll have to figure out how to process it at a connected computer.
Probably the best use-case for the Arduino Uno is as a tool for learning electronics , and building simple Internet of Things (IoT) products. While it isn’t the most powerful microcontroller on the market, it’s certainly the most well-understood and well-documented, and there’s an awful lot of tutorials and guides available for it.
You should also consider the other Arduino models , each of which is suited to a slightly different purpose.
The Raspberry Pi Zero: The Free Gift Computer
The Raspberry Pi Zero is essentially the original Raspberry Pi Model A+ , but shrunk to the size of a business card. You can buy it from all the usual suspects – Farnell, Pimoroni, and AdaFruit – for $5, or £4 in the UK.
In fact, when it first came out, the Raspberry Pi Zero was given away as a free cover gift in the 40th issue of the MagPi. How insane is that? A computer that can run a full version of Linux was just given away like a cheap tube of lipgloss in a teen magazine.
While its single-core 1Ghz CPU and measly 512MB of RAM isn’t enough to browse the Internet smoothly, it can do pretty much everything else you’d use a microcontroller for.
Sadly, the Raspberry Pi falls down in two major areas: Networking and USB connectivity. It has only two micro USB ports, and there’s no Ethernet, Bluetooth, or Wi-Fi to speak of. To add or extend this functionality, you’ll have to buy an adaptor. This will cost less than you think. A MicroUSB to RJ45 network adaptor can be had for just $2.16 on AliExpress, including free shipping.
The Raspberry Pi Zero offers the most processing power out of all the microcontrollers listed. As a result, it’s best used for more CPU intense projects where an Arduino would struggle to cope, such as data processing and visualization.
The NodeMCU: The Arduino Killer
The NodeMCU is an impressive little microcontroller, and offers a lot for its diminutive pricetag.
Unlike the Arduino, which is powered by an 8bit ATMEGA clocked at 16MHz, this is powered by the ESP8266 chipset, which uses a 32bit Tensilica Xtensa LX106 core, clocked at 80MHz. It also includes Wi-Fi, a built-in TCP/IP stack, 4 megabytes of onboard storage, 20kB of RAM, and 10 pins of GPIO (General Purpose Input Output). These can be connected to components like motors, sensors, and servos.
Much like the Arduino, there’s very little setup involved. You just write your code, and send it to the device over an USB connection.
Programs for the NodeMCU are written in Lua, which is an interpreted programming language similar to Python and Ruby. In many respects, it’s probably easier to learn than the variant of C used by the Arduino. It has a much simpler syntax.
Speaking of which, if you already know how to write code for the Arduino, you can flash the NodeMCU with an Arduino image. James Bruce explored how to do this in his review , where he described the NodeMCU as an “Arduino Killer”.
You can pick up a NodeMCU for as little as $3 direct from China (or closer to $9 on Amazon), and it’s the only board here which packs any form of onboard networking. If you wanted to add this feature to the Arduino Uno, for example, you can easily find yourself paying an extra $40.
What Board Is Right For You
Let’s recap. If you’re going to be learning electronics from scratch, you should get an Arduino. If you’re going to be making a project that requires a lot of power, use the Raspberry Pi Zero. If your project connects to the Internet in any way, use the NodeMCU.
Out of these microcontrollers, which one is your favorite, and why? Drop me a line in the comments below, and we’ll talk all about it.