A microcontroller is a small integrated circuit that takes in data, processes it, and outputs a specific action. It is essentially a much simpler and user-friendly minicomputer. Most electronic devices that require a basic level of computation to complete their task have microcontrollers embedded inside. This includes smartphones, vending machines, and even some dishwashers. As long as the system needs to think about what you input, it will likely need a microcontroller.
Without getting in the technical details, a microcontroller has three main components that will be important to know: the CPU, RAM, and GPIO pins.
The CPU (Central Processing Unit) is the core of the microcontroller, responsible for executing and interpreting all the instructions that you give it. The RAM or memory is responsible for storing all the data in the microcontroller, and the GPIO (General Purpose Input/Output) pins are the on the microcontrollers which control all its external components. These components are known as peripherals, and they can include LEDs, buttons, sensors, and all the ports attached to the board.
In order to get started in working with microcontrollers, you must have a basic understanding of circuit analysis, as well as some knowledge in coding with C/C++. It is important to understand how to connect power, ground, and peripherals together, while preventing damage to the microcontrollers. In addition, C/C++ is the most common language for microcontroller coding and is essential to creating a functional program. There is another Education Module for C programming, so please check that out for more details on the language.
Once you have a good baseline in circuits and coding, the next step is to pick the right board. The most important factors to consider when picking a microcontroller are cost, ease of programming, and functionality. While some boards may be capable of performing a wide range of functions, their cost and difficulty to program may be overqualified for the project you want to do. It's all about choosing which is most appropriate for the limitations of what you’re trying to create. Below is a table of some popular microcontrollers, as those will often have the most information and support for troubleshooting any issues you may run into.
| Microcontroller | Cost | Features | Programming Language | Common Applications |
|---|---|---|---|---|
| ATMEL ATtiny85 | $3-4 | - 8 Bits |
While not explicitly considered a microcontroller, the Raspberry Pi 3B is a popular board that can handle more complex circuit designs. It has 1 GB of RAM, a 64-Bit ARM processor, as well Ethernet, USB, and HDMI ports. It can also run its own operating system, functioning as a minicomputer.