[tutorial] Lesson 0: Introduction

Microcontrollers


uC_zps2e2095e8

If you are here, then you are probably interested in microcontrollers or electronics in general. Perhaps, you've heard how prevalent microcontrollers are in everyone's life, from the alarm clock that wakes someone up in the morning to the smartphone that lets you do anything nowadays. And now, you are wondering how you can make things work for you just the way you like them... how you can program a microcontroller yourself!

uC_block_diagram_zps751314d4

A microcontroller (uC) is a small computer on a single integrated circuit (IC). A uC is a complex device that is comprised of a number of units. Each unit has its own purpose. The basic units that you will find on any uC are the Central Processing Unit (CPU) that performs all the computations, some form of non-volatile memory to store the program, and RAM to save any data during the execution of the program. And since calculating anything isn't really useful unless you can do something with the result, a uC also has inputs so that it can sense its environment, outputs so that it can act on that environment, and a number of serial interfaces to be able to communicate with other microcontrollers and devices.

Boards


ArduinoUno_R3_Front

Chances are that you have already heard about Arduino. You might ask, "what's the connection between a uC and an Arduino board"? Well, an Arduino board is microcontroller development platform. Reading behind these fancy words, you see that an Arduino is a board that has a uC on it and all the necessary components to make the uC function. So, you can go buy an Arduino, plug it in your computer, and start programming it right away.

arduinos_zps203c5449

The one thing that can be really overwhelming when deciding to buy an Arduino is the plethora of available boards. Keep in mind that a uC can potentially be used in an infinite number of ways, and each application has its own needs. So depending on what your are trying to accomplish, you buy the board that fits you best. Though, if you are a beginner and you are just interested in messing around with electronics, going with an Arduino Uno or Leonardo is all you need. You can forget about the rest for the time being.

other_boards__zps52e0a7ad

And what about Sparkfun, Adafruit, digiStump, Olympia Circuits, Tiny Circuits, Seeedstudio (and many more) with their respective boards? These are other players in the open source industry offering their own solutions to the community.

Sensors and Actuators


sensors_actuators__zps90b62ef6

As mentioned above, a uC is used to interact with its environment. To do so, it needs ways to sense the environment and act on it. For this reason, we use sensors and actuators. With sensors, we can take measurements of physical variables like light, temperature, humidity, sound, distance, movement, position, orientation, acceleration, and many many more. With actuators and other types of output devices, we can display things, make sound or light, vibrate, rotate, and translate, among others.

The idea here is that we take some measurements, perform the necessary computations, and then make the decision on how to act in response to what was sensed. So we can open a light when our PIR sensor senses movement. We can open the air conditioner when our temperature sensor senses a high temperature. We can make a robot move with a DC motor, and avoid obstacles when an IR sensor senses one in close proximity. We can keep time with an RTC module and display it on an LCD screen. The list is endless... and yours to make ;)

Shields


shields__zps5dd750dc

Some applications are so common that there are even extension boards, called shields, that connect directly on an Arduino. Such shields can provide capabilities like connecting to a Bluetooth, Ethernet, Wifi, or GSM network, controlling a motor, playing MP3 files, displaying on LCD screens, expanding IO ports, and many more.

Conclusion


The world of electronics is a fun and exciting one. If you are up for an adventure, get prepared, and stay tuned!

In the next tutorials, we will present many of the components mentioned above and you will learn how to use them properly, and most importantly, safely. Soon you will be able to build your first project quickly, enjoyably, and with very little effort. Isn't that awesome?

If you haven't already, sign up for an account, and get your computer and uC board ready with the Getting Started Guide.


Images of specific components are courtesy of arduino.cc, sparkfun.com, and adafruit.com. Others are in the public domain.

Images are CC BY-NC-SA 3.0.