Comparing Microcontrollers: What Brain Should I Go With?
2023-11-03 | By Antonio Velasco
License: Public Domain Microcontrollers Arduino ESP32 ESP8266 Raspberry Pi
Comparing Microcontrollers: What Brain Should I Go With?
For most electronics projects, microcontrollers are essential miniature computing components that provide a world of functionality and abilities. They’re the brains behind our smart devices and gadgets that we use every day, and with them being everywhere, a great deal of options are available for us to choose from. With that brings the question: which one should I use for my project? Through the blog post, we’ll explore some of the most common microcontrollers and provide some details that’ll hopefully let you make the right choice.
Arduino - The Starter Kit
My first microcontroller was an Arduino, and boy am I glad to have started with that. The Arduino IDE is extremely user-friendly and easy to use, especially if you’re a first-timer. Its design makes it easy to know where to connect your pins or power, and best of all, there are libraries and libraries of documentation for it. I’ve used Arduinos for most of my projects, ranging from using an Arduino UNO for an Autonomous Rover to an Arduino Nano for a Weather Station and a myriad of other projects.
In addition to its simplicity, Arduino offers a wide variety of boards that are compatible or at least very close to compatible with each other. Models often differ in terms of what ports they offer and their size or, in some cases, in their capabilities. Some boards are as small as a penny, such as the Arduino Pro Mini, and some are as big as your hand and offer ports like SPI, I2C, and UART, such as the Arduino UNO R3. Additionally, there are modified versions of each that carry special features like Bluetooth, humidity/temperature/barometric sensors, and much more.
While Arduinos may not have as much computing power as other microcontrollers, their availability, simplicity, and intuitive design are unbeatable. Moreover, while it’s great as a starter board, you can still use it for an endless amount of projects. However, as you move on to bigger projects, you might find yourself needing more muscle.
Raspberry Pi - A Computer in the Palm of Your Hand
Raspberry Pi definitely packs more punch than the Arduino. For reference, Raspberry Pi can often put out a processing power of 1.6 GHz–100x more than the Arduino’s usual 16 MHz. Arduino can control some of your components, but when it comes to more complicated software applications, the Raspberry Pi is your guy. While it’s great that it offers microSD capability to upload your own code, you don’t even need to—Raspberry Pi has their own operating system built-in, so you won’t need to use an IDE. It’s even got all the bells and whistles of a normal computer–HDMI output, Bluetooth, ethernet, and WiFi—stuff you’d need to add onto a basic Arduino. It's great for anything that requires multimedia or projects that involve automation and basic IoT.
Although they are much more robust, they are more expensive as well, making them impractical for a lot of basic applications that the Arduino could easily handle. However, this high cost also makes it impractical for basic IoT applications that don’t require as much power, but still need WiFi/Bluetooth capabilities. That’s where this next microcontroller comes in.
ESP32 - The IoT Workhorse
The ESP32 is a very low-cost, low-power microcontroller with WiFi and Bluetooth capabilities that make it perfect for IoT and Home Automation projects. What’s even cooler is that they’re compatible with Arduino code, making it easy to hop into without too much experience. There’s even a cheaper option (the ESP8266) if you don’t need all the power that the ESP32 provides. Raspberry Pi could perform the job that an ESP32 does, but the cost and size of each make it impractical. The ESP32 fills the gap between the Arduino and the Raspberry Pi for a WiFi/Bluetooth capable microcontroller that has enough processing power to handle IoT tasks.
What Should I Go With?
For your project, you need to make sure to not only choose a chip with the right capabilities, but also the right fit. This means thinking of whether the microcontroller will be overkill with too much power or take up more space than you may desire. For example, if I’m creating a simple daylight sensor that will turn off my lights automatically, the Raspberry Pi would work, but its size and cost would make it impractical for this application. In this case, the ESP32 would work better as it is smaller, cost-effective, and can get the job done. Another example would be making an LED light show on a breadboard. The ESP32 and Raspberry Pi could get the job done, but not only would it be impractical due to cost, but it would also make it much harder to implement and code as it is not as easy to work with those two. Sometimes simplicity is more efficient and will save you a buck or two.
For beginners, Arduino is the place to start; the shallow part of the pool where you can touch the ground and gradually walk to the deep end. Raspberry Pi offers a more advanced look at things and opens up your possibilities much further, but can also get costly. ESP32’s provide a way to use smart electronics that require WiFi/Bluetooth for IoT projects without breaking the bank. Moving on, there are much more powerful controllers like those in the STM32 family that professionals use for extremely precise tasks, but that’s for another day.
Conclusion
Microcontrollers allow us to arm our electronics to accomplish a number of tasks. They give our projects brains and open up a world of possibilities. Choosing the right microcontroller will ensure that your project will go smoothly and work efficiently. Regardless of what you're working on though, there’s a microcontroller for you out there—just gotta get out there and find it.
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.
Visit TechForum