Open source electronics “trainer” boards like the Arduino, Raspberry Pi, the BeagleBone and others have been an enormous boon to introducing more people to electronics and science.
This is because they make working with microcontrollers and programming easier by way of abstraction.
The popularity of these boards has exploded over the past 8-10 years or so.
In the past, using a microcontroller in your projects meant working directly with the micro and supporting hardware, programming in C, and a host of other things.
Be that as it may, there are reasons why the hobbyist should consider learning to work directly with the “naked” or stand-alone microcontroller. We’ll talk about some of those reasons in the words that follow, but first we’ll talk about the difference between a trainer and a microcontroller.
Difference Between Arduino (or Similar Trainer) and a Stand-Alone Microcontroller
The Arduino Uno consists of the microcontroller (MCU) and various supporting components like the voltage regulator, crystal, etc.
Just like your brain is part of your whole body, the MCU is the “brains” behind the board and is part of it.
Often, trainers like the Arduino are referred to as ecosystems.
An ecosystem consists of the board and the integrated development environment or IDE.
A microcontroller is simply one of the components (the main one) on the trainer. It is not an ecosystem in and of itself, but things like supporting hardware and IDEs are readily available. They’re just not wrapped up as neatly as they are in the Arduino ecosystem.
For example, when working with a naked micro, you’ll need to supply the regulator, capacitors, and other components. You’ll also need a compatible IDE, which you can often download for free.
For years, electronics enthusiasts did things this way and worked with stand-alone microcontrollers like the PIC or AVR.
Then came the Arduino, with the purpose of helping students and non-engineers create things, learn, and control their world. Other similar ecosystems or platforms soon followed.
While there are many pros to working with trainers, there are also some cons.
[Update: See A Closer look Inside the Arduino Uno for a closer examination of the board and some of the nuances of working with it]
As of this writing, the prices for some trainers range from $24.95 (Arduino Uno) on the low end to $55 on the high end (BeagleBone Black). A Raspberry Pi 3 Model B will set you back $39.95.
Note that the RPi and BeagleBone Black are technically fully-functional, Linux based computers.
Since the Arduino boards seem to be among the most popular of the trainers, we’ll focus on them.
An ATmega328P, the same microcontroller that powers the Arduino Uno, lists for less than $2 in quantities of one from some vendors. If you’re willing to buy a higher quantity, like ten or more, the price drops even more.
Trainers like the Arduino and friends are great for learning and prototyping projects, but if you plan on actually keeping your creation for a while, a naked microcontroller would be better.
Let’s say I want to build a widget to assist me in parking my car in the “sweet spot” in my garage. The hanging tennis ball is too easy and un-elegant, so I decide to grab my Arduino and go to work.
When finished, the gadget works beautifully and I want to keep using it.
The problem is I have to drop another $25 on another Arduino for my next project or cannibalize my helpful parking assistant.
And if you’re planning to mass-produce your project, forget it.
Getting Flexible – Working with a Stand-alone Microcontroller
No, we’re not talking about stretching here.
For starters, the Arduino Uno measures 55mm x 75mm; the microcontroller on the Uno only measures 10mm x 35mm. This can save a significant amount of space.
If you can learn to work with the ATmega328P, it won’t be much harder to bridge the gap and work with other micros. There are a plethora of microcontrollers and platforms out there ranging from simple 4-bit micros to vividly more complex 32-bit versions. The choice depends on the needs of the project; sometimes a 4-bit MCU will be good enough. Other times, you’ll need a 16 or 32-bit micro with all the extra peripherals like SPI, I2C, various counters/timers, etc.
Depending on the complexity of your project, things like the Arduino and Raspberry Pi can be a total over-kill.
You may also find that you need your MCU to run at a higher or lower speed. The Arduino’s built in crystal can get in the way of this. With a naked micro, you can use any crystal you want, if the speed is within the specs of your microcontroller. Many, including the ATmega328P, also have their own internal oscillator.
Remember, the higher the clock rate, the more power the MCU will typically draw. This can be a very important consideration when working with projects that will be powered by a small battery or where it would be inconvenient to change the battery often.
There’s so much more to Learn
If you’re an electronics enthusiast it’s likely that you enjoy learning new things and have an inquisitive mind.
That alone could be a compelling reason to learn to work with the naked MCU.
If you were to take your DVR or smartphone apart, you wouldn’t find an Arduino or RPi inside. You would find several microcontrollers though. Things are not produced with trainer boards in the real world. One reason for this is the cost, as we discussed earlier. Another is flexibility.
If you ever wanted to get crazy and say, hack your toaster oven, you may have to work with the microcontroller inside. You could even replace the factory MCU with one containing your own firmware.
Most of us probably won’t hack our toaster, but the idea can be extended to a lot of gadgets.
The Arduino IDE is a great tool to get you started with embedded systems and programming.
Thing is, it’s very basic as far as IDEs go. This is because to make learning simple, the designers have hidden a lot of detail and functionality behind layers of abstraction, many of which come in the form of libraries.
For example, in C programming, there usually isn’t a built in digitalWrite() function (unless you write your own version).
The libraries and abstractions make doing things like reading the temperature of a sensor (an analog value) much easier for middle-schoolers and electronics newbies.
So why go with a naked MCU and a more complex IDE?
Again, you’re trading simplicity for increased flexibility and functionality.
The Arduino IDE also does not support a wide range of AVR micros out of the box. If you take the plunge and experiment with other micros, you’ll need a different IDE anyway.
Time to get Naked
Boards like the Arduino, Raspberry Pi, and Beagle are great for learning and prototyping, so I’m not suggesting at all that you give up on them completely.
But if you strive to keep building more complex projects, you may find yourself eventually hitting a wall.
If you want to take your hobby to the next level, you should consider moving beyond trainers. If you want to learn more about programming, microprocessor architecture, and hardware you should consider the same.
The fact that you’ll learn more, gain more flexibility, and save money are three good reasons for this.
It may seem intimidating at first, but eventually you’ll be doing things you couldn’t do before with your creations.
Want to get started with Arduino & microcontrollers? You’ll love the new course How to Get Started With Arduino in 1 Day or Less!
FREE Guide: 10 Mistakes ALL Electronic Enthusiasts Make
Learn the mistakes made by newbies and veterans alike...
... and HOW to avoid them