All of our MakeCrate electronics subscription kits use an Arduino microcontroller as well as a variety of digital and analog sensors and displays to create nightlights, calculators, room alarms, and more. Because the microcontroller is a fundamental part of every project, let’s take a look at exactly what a microcontroller is and where they are used.
What is a microcontroller?
A microcontroller is a small, single-chip computer used to connect to and control another device. A typical microcontroller consists of some or all of these parts:
- Central processing unit (CPU): The CPU is the brains of the microcontroller. Its job is to find the instructions in memory and decode them to make them usable by the microcontroller.
- Memory: the microcontroller instructions as well as variables and their changing values get stored in memory and accessed by the CPU when needed.
- Ports: Microcontrollers generally have both input and output ports where devices like sensors, LEDs, and displays can be attached.
- Timers and Counters: Most microcontrollers have built in timers that provide clock functionality and can control the timing of internal and external events, like the length of time an LED blinks.
- Interrupt Controls: microcontrollers have systems called interrupt controllers in place that allow the CPU to check which devices might need attention while another program is executing.
- Analog to digital converters: a microcontroller’s analog to digital converter allows it to take analog data, like temperatures or light readings, and convert them to digital values that the CPU can handle. (See https://learn.sparkfun.com/tutorials/analog-vs-digital for an explanation of analog vs digital.)
- Digital to analog converters: Similarly, digital info from the microcontroller may need conversion to run an analog device like a DC motor, so microcontrollers have converters to perform this function.
Where are microcontrollers used?
Microcontrollers are used in many electronics devices today including devices that measure, store, calculate, or display information. Some places you are likely to come across a microcontroller on a daily basis are:
- In your kitchen, running the timer in your microwave or controlling the temperature in your oven or refrigerator.
- In your living room, controlling your tv.
- On your phone, to control the touchscreen.
- In your car. Most modern cars contain at least 25 different microcontrollers!