logo

Byte-Sized Bits

KISS Series: Introduction to Microcontrollers & Arduino

What is a microcontroller?

In the world of electronics and programming, microcontrollers have revolutionized how we interact with, and control, devices. Whether it's the heart of a smart home, the brain behind a robotic arm, or the controller for a DIY project, microcontrollers are found EVERYWHERE in our modern lives.

So now we know where microcontrollers are used (almost EVERYWHERE!), what exactly are they and how do they work?

Okay.. WHAT are they, exactly?

While it's not exactly a one-to-one representation, you can think of a microcontroller as a single-purpose, compact computer. Just like a laptop, a desktop, or even the tiny computers we carry around in our pockets every day (smart phones)!

While microcontrollers are similar to that of a computer, there are a few key differences:

So, what makes microcontrollers different from computers?

Okay... Get ready! Don't be afraid to re-read this section multiple times. A bit of note-taking is also highly suggested!

Computers

We'll start by hitting on the one that is most widely known. We all know that computers (e.g. desktop/laptops/smart phones) are general purpose computing devices. This means that each has the ability to browse the internet, run arbitrary applications (e.g. Microsoft Word or even games), has a user interface and an underlying operating system where you can manage folders & files, and much more.

With a general purpose computer, there are a lot of potential moving parts. You will have an operating system like Android/Windows/MacOS/iOS. These devices also abstract a lot of these moving parts so you don't really ever have to think about them during your day-to-day.

In the context of a desktop computer, you can even swap out your processor when you're ready for more power. Or, if you need more memory you can add in or swap out your old memory for higher capacity RAM. Want to play the latest game, but running on an old graphics card? You can swap that right out too!

Computers make it simple to upgrade (or downgrade, if you really wanted to!). They also provide immense power in the way of getting out of our way, but enabling us to do almost everything that makes this world work.

Even in the context of a server. Most servers are rented or purchased/built piece-meal like a computer. They can be used to help run a cluster of systems at Facebook, run a game server for your favorite online game, or sit in someone's home as a storage server. They are general purpose, and pretty much enable you to do what you want.

Microcontrollers

A microcontroller is generally tailored towards a single (or a small handful) of circumstances. While you could technically build out an entire (very low-powered) computer using a microcontroller and other components, that's generally not advisable or feasible. Instead, microcontrollers are meant to be programmed and tuned around the project you are actively attempting to work on.

A microcontroller is essentially a Processor, Memory (Flash & RAM), and Input/Output (I/O) capabilities on a single chip. And, these chips are usually even smaller than the processor you would find in a desktop, laptop, or server.

Microcontroller vs Computer

In essence, a computer is built for general purpose work. The components you would find in a computer are usually a bit more expensive, more powerful, & a bit bulkier.

In contrast, a microcontroller is lower powered, far cheaper, and provided in a smaller, compact single chip.

What Is Arduino?

Arduino is an open-source platform that simplifies working with microcontrollers. This means that an Arduino board has a microcontroller, but NOT all microcontrollers are found on Arduino boards.

Arduino the platform provides simplification in two forms:

  1. Hardware: Arduino development boards come in various shapes and sizes, each equipped with a microcontroller.
  2. Software (IDE): The Arduino Integrated Development Environment (IDE) is a user-friendly application where you can write, edit, and upload code to your Arduino board.

Why Arduino?

Arduino's key appeal lies in its simplicity. It abstracts much of the complexity of programming and hardware design, enabling users of all skill levels to build electronic projects. Which is exactly why it's perfect for what we will be doing here at Byte-Sized Bits!

Put plainly, Arduino stands out for several reasons: cost-effective, accessibility, & capability.

Why should I care?

Microcontrollers (and the Arduino platform) provide the capability to read inputs and write outputs. Inputs and writes have many possibilities.

Imagine you have (or built!) a lighting control system in your house. You have it setup to listen for claps (1 clap means turn on, 2 claps means turn off). You have a microphone sensor that you have your Arduino board passively listening (reading inputs). Once the microcontroller detects a clap (or two!), you then turn on/off the lights (writing outputs).

Or, you could have the input of the lighting system be time. Maybe you want lights on during a specific timeframe, otherwise they stay off. The flow is the same, but the inputs & programmed logic are slightly different.

Microcontrollers (and Arduino boards) can be used to help automate repetitive tasks, to automatically communicate with other devices over WiFi/Bluetooth, can write to a screen, and MANY other possibilities.

You should care because you can invent solutions to problems you have, you can create entertainment, or just because you want to understand the world around you a bit better! Any reason is a good enough reason.

That's all, folks!

In summary, microcontrollers form the backbone of countless electronic systems, while Arduino makes harnessing their power straightforward and accessible to all.

Whether you're a curious beginner or a seasoned developer, exploring Arduino and microcontrollers can open up a world of innovation and creativity!