A Beginner's Guide to Microcontrollers
What do remote controllers, routers, and robots all have in common? Microcontrollers! These days, beginner-friendly microcontrollers are easy to use and program with just a laptop, a USB cable, and some (free) open-source software. Woohoo!! All the projects, here we come!
The catch? There are like, 4324302* different microcontrollers and it can be daunting to get started, especially if you're just getting into electronics. Where the heck do you start?!
Right here, bbies, I got chu. Whether you are looking to build some cool electronic projects, learn programming/tech, or wanting to teach others about electronics, this tutorial will help you figure out what microcontroller is right for your needs, goals, and budgets. Yay! Let's get started!
Wait.... What Is a Microcontroller?
A microcontroller is a "simple computer" that runs one program in a loop. They are designed to perform a single, specific task.
In this guide, we'll be focusing on microcontrollers that have breakout boards, or a board that makes it easier to connect to and program the microcontroller.
On a breakout board, the microcontroller pins are soldered to a printed circuit board ("PCB"), headers or other connectors are added to the PCB, and some basic firmware, or permanent software, is loaded to prep the microcontroller to receive signals.
What's the Difference Between the Raspberry Pi and a Microcontroller?
The Raspberry Pi is not only small and adorable, it is also a full-fledged computer!
Computers have microprocessors AND microcontrollers that work together to perform many tasks at once.
The microprocessor is what does the “heavy lifting” in a computer. It performs the instructions and calculations that make the computer work. Microprocessors are much faster than microcontrollers, but they need external resources like RAM, Input/Output ports, etc., whereas a microcontroller is typically self-contained.
Computers (which have inputs and outputs, storage, and processing) can run multiple programs at a time -- you can surf the Internet, reminisce with old photos, write a paper, and have like 1000 tabs open all at the same time! Microcontrollers... not so much. You can do one of those things, but not all.
Arduino (Uno)
-
A robust, open-source microcontroller and programming environment designed for beginners with some knowledge of circuits.
Recommended Ages: 12+ (or kids comfy with programming and algebra)
Difficulty: Intermediate
Average Cost: 500 Rs
Buy : https://www.tomsonelectronics.com/products/buy-arduino-uno-smd-r3-online-india
There are lots of different types of Arduino boards. This is the Arduino Uno, the best fit for beginners! There are boards that are larger, smaller, wearable, and for specialty use cases like robotics.
Being familiar with Arduino boards and programming maps well to projects and careers in computer science, engineering, and design.
Hardware Features
- The Arduino Uno has 14 Digital Input & Output ("I/O") pins, 6 Analog I/O pins, 2 Power Out pins (3.3V and 5V), and 3 Ground (GND) pins.
- Power input can be anywhere from 5 to 12 VDC
- The ICSP headers allow you to connect a ton of different add-on boards called "shields".
- For example, you can add a WiFi shield to connect your Arduino to the 'net!
Programming Language: Wiring (Combo of C++/Processing)
Micro:Bit
A friendly lil’ microcontroller handy for kids and folks just getting started with coding and hardware.
Recommended Ages: 8+ (or kids comfy with circuits and simple tools)
Difficulty: Beginner
The Micro:Bit is a great tool to start learning how to code, teaching others, particularly elementary school students, how to code, and making simple and quick electronic prototypes.
The Micro:Bit is a collaboration between Microsoft and the BBC to bring educational computers into classrooms around the world.
Hardware Features:
- The Micro:Bit has 3 Digital and Analog I/O pins, 1 Power Out pin (3.3V), and 1 Ground (GND) pin
- Power input should be 3 - 5 VDC via micro USB cable or battery pack connector.
- It also has lots of onboard inputs, outputs, and sensors!
- 5x5 (25) LED matrix
- Two (2) Pushbuttons (A, B)
- Radio Transmitter and Receiver
- Accelerometer
- Compass
- Light and Temperature Sensors
- For more I/O pins, grab a Micro:Bit breakout!
Programming Language: Block-Based or Javascript can also use CircuitPython
Circuit Playground Express
A versatile microcontroller great for kids and folks just getting started with coding and hardware.
Note: There is also the Circuit Playground Classic -- the hardware is nearly identical, but this board is programmed in the Arduino IDE.
Recommended Ages: 8+ (or kids comfy with circuits and simple tools)
Difficulty: Beginner
The Circuit Playground Express, or CPX, is a helpful tool to learn how to code, teach others how to code, and make quick prototypes for beginners to experts alike.
The Circuit Playground Express is a powerful and versatile microcontroller created by Adafruit Industries.
Hardware Features
- The CPX has 7 Digital/Analog Input & Output ("I/O") rings that are also capacitive touch!
- 1 "true" Analog I/O ring
- 2 Power out ring (3.3V)
- 3 Ground (GND) pins
- Power input should be 3 - 5 VDC via micro USB cable or battery pack connector.
- There are also tons of onboard inputs, outputs, and sensors!
- 10 Mini Neopixels (can be all colors)
- 2 Pushbuttons (A, B)
- 1 Slide Switch
- Infrared Transmitter and Receiver
- Can receive/transmit remote control codes, send message between CPXs, and act as a distance sensor
- Accelerometer
- Sound sensor and mini speaker
- Light and Temperature Sensors
Programming Language: Block-Based or Javascript (www.MakeCode.org); can also use CircuitPython and Wiring (Arduino IDE)
Raspberry Pi 3
The Raspberry Pi, or Pi for short, is a credit-card sized computer* that runs a special version of Linux and can be programmed to control hardware.
Recommended Ages: 12+
Or kids comfy with coding and algebra
Difficulty: Intermediate (easy as a computer)
Average Cost: ~29999
The Raspberry Pi computer, or Pi for short, can be used as a “standard” computer or as a controller for all sorts of hardware projects. It is a great first computer for kids to use and learn to code on, and is widely used by hardware experts to build all sorts of electronic projects, from robots to 3D printers to home automation systems!
The Raspberry Pi has changed the way we build electronics! There are a few different versions, the most recent is the Raspberry Pi 3 and the Pi Zero, a miniature version of the Pi 3 for just $10.
Hardware Overview
- The recommended Operating System (“OS”) is a special version of Linux called Raspbian.
- The Pi has 40 General Purpose Input and Output (“GPIO”) pins.
- 26 Digital I/O pins (no Analog I/O)
- 4 Power Out pins (two 3.3V and two 5V)
- 8 Ground (GND) pins
- 2 Specialty Pins (I2C ID EEPROM, advanced use only)
- The Pi also has most standard computer features:
- 4 USB Ports
- 1 Ethernet port
- 1 HDMI port
- 1 Audio Jack
- 1 Camera Module Port
Programming Language (for GPIO pins): Python or C++
Since this is a full computer, you can program in whatever language you want, including programming other microcontrollers!
Final Thoughts
If you are just getting started and want to build all sorts of projects, I'd recommend https://www.tomsonelectronics.com. It's super easy to get All components and parts
If you are super interested in computer networking, AI, or connecting things to the Internet (e.g. making a "Smart Home"), I'd suggest the Raspberry Pi.
If you want a sturdy, stable, and reliable board to build a wide variety of projects, go with an Arduino.
The best advice I can give you is to find a project you are passionate about and build it! There are tons of tutorials online so search around for someone who has built the same or similar project. Build off of their findings and adjust as you please!
And of course, leave any related questions in the comments and I'll do my best to help!