It’s that time of the year again! A majority of B.Tech CS and Electronics students can be seen at local robotics shops buying Arduino and a bunch of other technical stuff. But what is that technical stuff?
Are you a student or a DIY enthusiast looking to jump into the beautiful world of microcontrollers? Then don’t worry, you’re in the right place.
What is a Microcontroller?
A microcontroller, in layman terms, is a computer incorporated on a single Integrated Circuit (IC). However, don’t let the technical terms scare you. Modern-day MCUs are extremely easy to learn, control and build unique projects.
In this post, we’re going to take a look at three of the most popular microcontroller families amongst students and enthusiasts alike — Arduino, ESP8266/ESP32 and Raspberry Pi.
Also read: Nvidia Jetson Nano vs Raspberry Pi 4
Arduino was initially made as an easy tool for fast prototyping and aimed at students who had no prior experience with electronics and programming. It is an open-source electronics platform built with ease of use in mind.
Arduino boards can read all sorts of inputs (buttons or even a Twitter message) and convert them into an output, activate a motor, switch on an LED, show some data, and more.
To do so, you use the Arduino Programming Language and the Arduino IDE to program the microcontroller. The Arduino programming language is straightforward to learn even if you have never programmed before.
The simple example ‘sketches’ (Arduino programs) present in the Arduino IDE offer a lot of insight into the basic programming and control structure of the Arduino.
There are some fantastic tutorials online as well. Pick this board up, and you’ll be inventing stuff within minutes.
On the hardware side, most Arduinos are powered by the ATmega328P IC. This IC works on a 5v logic level — meaning if a voltage of 5v is applied to any of its pins, the IC reads that input as 1, while no voltage applied means 0. The same logic translates to when sending outputs from the IC (Arduino in this case).
Apart from the incredible ease of use and the steep learning curve, the Arduino comes in all shapes and sizes! Want an Arduino for a quick and straightforward prototype?
Pick up the Arduino UNO, quite possibly the most stable and easy to use/learn microcontroller on the market right now, not to mention the most popular.
Need something a little bit smaller in size? Or perhaps more power efficient? Pick up the Arduino Pro Mini or the Arduino Nano. Need something for a wearable project? The Arduino Gemma or the Lilypad got your back!
A large number of options are available while choosing aboard. In addition to a fantastic community, library and hardware support globally make Arduino arguably the best MCU to start tinkering with, even if it’s your first project.
The ESP8266 is a low-cost WiFi microchip with a full TCP/IP stack and microcontroller capability produced by Shanghai-based Chinese manufacturer Espressif Systems.
While the Arduino and ESP8266 are worlds apart concerning hardware, things get more interesting on the software/programming side.
There are two ways you can program an ESP, either using a programming language called Lua or using the Arduino programming language in the Arduino IDE. In short, you can treat it like an Arduino with onboard WiFi capabilities.
While Lua is easy to learn and might provide a little bit more flexibility in some advanced deployments, being able to program the ESP using the Arduino programming language means that most beginners can easily translate their Arduino knowledge directly to the ESP8266, learning about TCP/IP and WiFi protocols in the process.
There are excellent community and library support available for the ESP modules by the Arduino community, which makes the creating process more enjoyable.
The ESP32 is the successor to the ESP8266. It adds increased WiFi bandwidth, better reception and BLE (Bluetooth Low Energy) 4.1 capabilities to the existing architecture.
The ESP8266 is also available in some inexpensive variants provided by various third-party manufacturers, the most popular ones being the ESP-01, Node MCU (comes in two variants, Amica (V1) and Lolin (V2)), The Wemos D1 and the Wemos D1 mini.
The ESP is a great board if you want to build your first IoT (Internet of Things) project. Or perhaps if you think you’ve mastered Arduino and now it’s time to move on to better, more advanced boards.
Raspberry Pi is a single-board computer. SoC-based on Broadcom BCM2837 includes 4× ARM Cortex-A53, 1.2GHz Processor, VideoCore IV GPU, 1GB RAM (B and B+models). It’s small, and I mean credit card size small.
Think of it as a combination of Arduino plus your computer, all on a board hardly the size of a credit card. All you need to do is plug in a monitor, keyboard and a microSD card with a suitable OS on it, and you’re good to go!
Since the raspberry pi runs a complete OS and behaves like a proper computer in many ways, you can use almost any programming language on it.
However, Python is the most commonly used one because it makes interfacing with the GPIO (General Purpose Input Output) pins a lot easier.
The Pi can do anything the Arduino and the ESP can do and go beyond. The possibilities are endless.
Which one should you choose?
This is a subjective question. It depends on your skill level and understanding of microcontroller units and the overall purpose of your project. However, here are some basic guidelines that you can follow
- Take into account the overall vision of your project. What is the total budget? Would it need headless control? Would you have to monitor it from afar? Whether or not you want to make the data gathered by the project available publically and so on.
- Consider whether you’re running the project on battery power or AC supply. You might want to change your choice of board and sensors etc. depending upon the battery power available to you.
- Consider where you’ll be deploying your project. The space constraints that you have. Whether or not it needs to be waterproof, shockproof etc.
Hoping this helps you choose the right one for your need. Happy Making!