Advertisement
Electronics

Arduino: An Introduction

by

DIY electronics is a hot topic right now! With so many different technologies available, such as Wi-fi, touch screens, accelerometers and gyroscopes, it is easy to wonder what different ways they could be put together to make something fun.

I like to think of ways to improve objects around me and make them more interesting. Using electronics is one way of turning static objects into useful gadgets, and in this article I want tell you all about a tool that will help you do exactly that. Let’s meet Arduino!


Arduino

Official Arduino Leonardo Board

An official Arduino Leonardo board

My personal experience with Arduino began when I was building a hobby grade drone. As I tried to understand how they worked, I realized that many of these drones were controlled with nothing more than a few sensors and a microcontroller board such as Arduino. I researched further on Arduino and became impressed by what I learned.

Official Arduino with logo

Official Arduino boards sometimes have part of the Arduino logo painted on their back surfaces

Arduino is a fully Open Source and free platform for physical computing. It can be programmed to behave in a certain way, perform tasks, interact with sensors and lights, operate motors, interface with high voltage using relay switches and a whole lot more! Arduino has a standard way of exposing its connectors, thus allowing it to work with a variety of interchangeable modules, called Shields. More about shields later.

You can program an Arduino board using a computer with a USB port and the freely available Arduino IDE. Almost the entire stack of technologies used to make Arduino is also Open Source.

The Arduino project began some 7 years ago by Massimo Banzi and David Cuartielles during their time at the Interaction Design Institute in Ivrea, Italy. They needed something to help with teaching their design students ways of using electronics in their projects. This was basically a two-fold problem: they had to come up with a tool easy enough to be used without prior background in electronics and it had to be affordable enough for students.

Experimenting with different designs ultimately led to the development of the Arduino prototyping board, which is now available for about $25 dollars.


Micro Controller Boards

Different Arduino boards

From left: Uno R3, Leonardo, Due and Micro

Since the release of the first Arduino board there have been multiple revisions. The many improvements have made the original board more usable for different applications. Currently there are more than ten different official Arduino boards, four of which are shown in the picture above.

Arduino boards

From top: MultiWii Nano, EtherTen and Arduino Mega 2650

Aside from the official Arduino boards, there are numerous copies or compatible boards produced by different manufacturers. Some of these third party boards may sometimes be identical to an official Arduino board, but others may have additional features such as an onboard Ethernet port, Accelerometer or Gyroscope just like the ones in the above photo.


Code

Arduino programs can be written in C or C++. The most basic program can be expressed with just a few lines of code:

 void setup() {}
 void loop() {}

These two functions, setup() and loop(), are required in every Arduino program. Of course, it is possible to define your own functions. The Arduino website contains a number of articles which nicely describe the control structure of a valid Arduino program.

Code

Code

Much of the inspiration for Arduino and its development environment comes from Processing, which is a tool for creating images and interactive animations. Processing has an effective way of teaching non-programmers the skills of programming through immediate and visual feedback. The same principles are at the heart of the Arduino project itself, which closely follows the Processing environment.

In fact, Arduino has inherited its handy Development Environment from Processing, and for those reasons, many refer to Arduino as its hardware equivalent. Although the two are separate projects, it is useful to know they can be used together.


Shields

Arduino Shields stacked on top of one another

Arduino Shields stacked on top of one another

Arguably, the killer feature of Arduino is its interchangeable Shields. Shields are other boards that can be directly plugged on top of some of the Arduino boards and thus extend their base capabilities. This design is similar to the expansion slots in PCs, but unlike PCs, which can run out of slots, Arduino lets you connect as many Shields as you could arrange to work together.

The picture, above, shows various Arduino Shields stacked on top of one another. Different Shields may enable Arduino to connect to various other interfaces and/or could include a GPS, WIFI, Bluetooth or other useful modules.


I/O Interfaces

Arduino connects to different sensors through its I/O (Input/Output) interfaces. Sensors usually output their values via analog or digital signals. Different sensors present different interfacing options. For instance, some sensors need to be used with resistors, while others need lower or higher power to operate.

Freetronic EtherTen

Freetronic EtherTen has an onboard ethernet and Micro SD card reader

Depending on the specific board, Arduino may provide support for popular IO interfaces such as SPI, I2C, PWM or CAN. Other interfaces may be supported through using an appropriate Shield. More often, third party boards include extra onboard interfaces like the EtherTen board in the above photo, which includes an onboard Ethernet port and a Micro SD card reader.

It is the same as having an Arduino board, an Ethernet Shield and a Micro SD Card Reader Shield.


Closing Thoughts

There is still much more that can be said about the Arduino project. Not surprisingly, many schools are already using Arduino to help with the teaching of electronics and programming. We can expect the next wave of school kids to be as comfortable with programming as they are with Mathematics and English.

To sum up, here are my six simple reasons for why you too should consider learning Arduino:

  1. It is cheap.
  2. If you already know some programming, then Arduino development is only one step away.
  3. Arduino has a thriving community of users which is very helpful when you are starting out.
  4. There are plenty software libraries and even more selection of Shields readily available to integrate with your project.
  5. You can use the Arduino IDE on your platform of choice.
  6. It is Open Source and can be easily used in commercial projects.

I’ve barely touched the surface of what Arduino can do. Check back soon for more information and step-by-step tutorials for building your own awesome Arduino projects. We’ll also be diving into other related products like Raspberry Pi, so even if Arduino isn’t your thing, we’ve got you covered.

Related Posts
  • Computer Skills
    Electronics
    Controlling DC Motors Using Python With a Raspberry PiPi motor
    In this tutorial I will show you how to connect some motors to your Raspberry Pi. Doing so will allow your Raspberry Pi to interact in the real world, making it possible to build a robot, turn on a fan on a hot day or even drop a treat for your cat or dog while your away.Read More…
  • Computer Skills
    Electronics
    Building a Wireless Sensor Network in Your HomeSensors
    Your environment is full of all sorts of fun and useful data, but getting it all together can be a challenge. In this tutorial you will learn how to use Arduino and Raspberry Pi technology to create inexpensive, wireless sensor nodes that report their data back to the Internet of Things. Read More…
  • Computer Skills
    Electronics
    How to Clone Raspberry Pi SD Cards Using the Command Line in OS XClonesd400
    The Raspberry Pi runs from an operating system stored on a Secure Digital (SD) card and many different operating systems may be employed. Storage is relatively inexpensive, can be created (flashed), recreated, written to and overwritten with ease. On the one hand, this is an advantage of the Pi. On the other, the experimental nature of the Pi means more time flashing SD cards. This tutorial shows you how to use a Mac to clone any Raspberry Pi SD card which is particularly useful when you have your OS set up just as you want it.Read More…
  • Computer Skills
    Electronics
    Your First Raspberry Pi: A Buyer's GuideRpi icon 2x
    If you've taken a look at some of our Raspberry Pi tutorials and have decided you'd like to take the plunge and get involved, knowing exactly what purchase can be somewhat daunting. There are different models and cases to consider, various methods of connectivity and storage options to factor in - not to mention planning what you're going to do with it. It's a lot of work for something that's the size of a deck of cards. In this guide, I explore the wide number of options there are when it comes to selecting the right Raspberry Pi kit so that you're ready to take on any project.Read More…
  • Computer Skills
    Electronics
    How to Read Temperatures With ArduinoArduino temp 400
    Reading the temperature with an Arduino is an extremely useful function. It's the sort of function that is essential in many projects ranging from building your own home thermostat to creating a weather station. In addition it's simple enough to be implemented in a few minutes with any Arduino and just two simple components. In this tutorial, I will show you how to use an Arduino to read temperature from a thermistor and print it on the serial port.  A thermistor is a simple electronic component that changes resistance based on the temperature. This tutorial focuses on the simplest and least expensive means for reading temperature. Along the way you will learn a simple, core building block of electronics that enables you to explore a whole world of sensors with your Arduino.Read More…
  • Computer Skills
    Electronics
    Arduino 101: Making a LED Blink With a ButtonArduino400
    In my last tutorial, I explained why it is easy to work on electronic projects with Arduino. In this tutorial I will be using an Arduino board to make a simple circuit, one that can turn on a LED light. Using some more basic code I will make the same LED light blink. Finally, I will add a push-button and use it to speed up the blinking. Some of the diagrams in this article were developed using the Fritzing program.Read More…