Let’s face it; we’ve all tried to use the wrong tool for the job at hand at least once in our lives. Using a hammer on screws comes to mind as the most common misuse of tools and technology. I will admit it, guilty as charged. Picking the right Open Source Hardware tools and platforms is similar to the picking the right hand tool from our toolbox. Though there is typically enough crossover of functionality between the different types of tools, some are better suited for certain tasks than others. With increasingly more variety of affordable hardware tools coming to market, many makers are starting to ask, “What’s the right tool for the job?”
Microcontrollers (MCU), Single Board Computers (SBC) and Field Programmable Gate Arrays (FPGA) are three different types of electronics platforms that each has their own pros and cons depending on your use case. In the open source world of MCU platforms, the Arduino is arguably the current king. Some notable SBCs are the Intel NUC and the BeagleBone Black. The Intel NUC is a single board computer with a 1.3GHz CPU, that is essentially a barebones desktop ready for a Linux distribution such as Mint, Fedora, or Ubuntu. FPGAs are just starting to get “the maker touch” with the advent of the Papilio and the Mojo. These various boards may physically look quite similar at a casual glance, but reality is much more complicated. Let’s take a look at each type of platform and discuss the use cases for each.
Microcontrollers: Microcontrollers are perhaps the simplest (for better and for worse) of the three devices we’re going to talk about. Microchip’s PIC and Atmel’s AVR microcontroller chips are the two major players in the microcontroller space. Arduino boards have mostly employed AVR chips and make programming easy by including a bootloader that allows your computer and Arduino to talk and install sketches directly. Traditionally, a microcontroller chip would need to be first placed into a hardware programmer to receive the code it executes then placed into the circuit board it will be controlling. Life is better now!
Most popular microcontrollers used in the maker community tend to be single core processors meaning only one program can run. The program with its one main loop begins as soon as the power is applied. It runs with no operating system, no drivers, and no complexity. There are some multicore microcontrollers such as the Parallax Propeller that let you handle running multiple concurrent loops.
The simplicity means microcontroller packages can be small and cheap. But you may find their functionality limited by the single program execution. Another differentiator between microcontrollers is whether or not they are capable of analog I/O via analog-to-digital converters and pulse-width modulation.
If you need to interface with the real world but are not doing much computation intensive work on your sensor data and you are looking to keep costs and complexity low, then a microcontroller is a good choice. If you are looking to go into production with your device consider creating a custom printed circuit board (PCB) instead of using a pre-built microcontroller platform like an Arduino. You can remove unneeded components, customize the physical layout of the board, and achieve significant cost savings once you start to purchase components in bulk. Many projects start with something like an Arduino for prototyping then move to a custom PCB for final manufacturing.
Single Board Computers: Fundamentally SBCs are no different than full-blown desktops or laptop computers. They lack the raw horsepower in terms of processor capability, RAM, storage, or graphics capability. But they are computers nonetheless complete with an Operating System (OS), typically some Linux distro. That means you have the power of an operating system environment at a very affordable price.
Figure 1: The Intel NUC is a single board computer with a 1.3GHz CPU.
This can be both a blessing and curse. For example, interfacing with complex devices such as a webcam can be made as easy as downloading an application and installing it just like any regular computer. If your OS has an appropriate compiler, then you can tailor and run most open source programs if you get a hold of the source code. This is the power of open source hardware and software! On the flip side, you may find that having a fairly robust OS means doing things like interfacing with the General Purpose Input/Output (GPIO) to be slightly more cumbersome as compared to doing a similar function on an Arduino. Also remember that since there is an OS running, it is performing certain functions (e.g. memory management) in addition to running your code. Therefore, real-time applications can be an issue unless you are running a specialized Real-Time OS (RTOS).
If your application is going to require rather intensive computing or you need/want to use a specific programming language such as Python, then an SBC is a better choice. Be careful though. Some SBCs such as the Raspberry Pi have GPIO pins that are only 3.3V tolerant, unlike most Arduino’s where 5V is the norm. You can fry your board or at least the GPIO pin by connecting to a higher voltage. Also, making a device that talks to the Internet is traditionally a bit easier with an SBC. Analog input tends to be more hit-or-miss on SBCs, so read your specs sheets carefully. While the BeagleBone Black has seven analog inputs, the Raspberry Pi has no hardware analog inputs. You can compensate for the lack of dedicated analog hardware using an RC circuit and measuring capacitor discharge time. There are also external ADC chips that can be connected via a serial communications protocol such as I2C.
Field Programmable Gate Arrays: Last but not least are FPGAs, which for many can be a difficult concept to grasp initially, which is why we’re just starting to get the same open source treatment that Arduino and BeagleBone Black did for their respective platforms. I will probably dedicate a future blog entry just on the future of maker-grade FPGA platforms.
Unlike a microcontroller or SBC, you do not program an FPGA in the traditional sense. You use a Hardware Description Language (HDL) such as Verilog or VHDL to create “code” that is visually similar to software but performs a very different function. While software provides a set of instructions to execute on hardware, an HDL tells the FPGA how to configure its internal circuitry. You can even go so far as build a complete processor in an FPGA and run the Arduino bootloader, thus creating an AVR microcontroller in your FPGA. In addition to this hardware “blank canvas” appeal, the other major advantages of an FPGA is speed and the ability to handle parallel I/O without need for interrupts which single core MCUs need in order to deal with asynchronous events.
If you have an application that needs to be very fast and handle multiple parallel I/O simultaneously, then an FPGA is probably the way to go. It does come with a lot of learning overhead but if you are serious about making a production-worthy product, then designing and testing on an FPGA is wise. The same HDL “code” can be used when you’re ready to set the design “in stone silicon” in an Application Specific Integrated Circuit chip (ASICs). Learning FPGAs and HDLs is also a must if you are interested in potentially pursuing an electronics engineering career. But that is another blog post by itself.
Figure 2: The Altera Cyclone III FPGA Starter Board
So what are your thoughts? What platforms do you use predominately and why? This article touched on the highlights of the differences. If you’re interested in a more in-depth review on any of the tools, please let me know in the comments. The reality is that lines between these worlds are blurring more and more, especially in the case of the SBC and MCU with the advent of hybrid tools like the Arduino Yun and the Tre. You can check out my thoughts on that in this previous post: Cloud-ee-with-a-chance-of-microcontrollers.
Michael Parks, P.E. is the co-founder of Green Shoe Garage, a custom electronics design studio and embedded security research firm located in Western Maryland. He produces the Gears of Resistance Podcast to help raise public awareness of technical and scientific matters. Michael is also a licensed Professional Engineer in the state of Maryland and holds a Master’s degree in systems engineering from Johns Hopkins University.
Privacy Centre |
Terms and Conditions
Copyright ©2023 Mouser Electronics, Inc.
Mouser® and Mouser Electronics® are trademarks of Mouser Electronics, Inc. in the U.S. and/or other countries.
All other trademarks are the property of their respective owners.
Corporate headquarters and logistics centre in Mansfield, Texas USA.