Introduction to Arduino

Introduction to Arduino

What is an Arduino?

An Arduino is an open-source electronics development platform that consists of hardware and software. When most people talk about an Arduino they are mostly referring to the microcontroller board which is the hardware part of the Arduino. The Arduino microcontroller board is used for prototyping electronics, IoT, and creating electronic devices such as robotic cars, 3D printers, mobile weather stations, alarm systems, and many other embedded electronic devices. 

Why do people use Arduino?

What makes the Arduino powerful and popular is because it is easy to use, open-source relatively cheap, and it has a powerful microcontroller onboard which gives it many powerful electronic functions. The most common Arduino board is the Arduino UNO which is powered by an 8-bit ATmega328P microcontroller with 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, and 8 MHz oscillators. The microcontroller can be seen as the brain of the Arduino board and it is what gives it all the cool features. The Arduino board can easily be programmed by connecting straight to your PC (Windows or Mac) using standard Male A Male B USB cable, once you have connected it you can use the Arduino IDE software to create and load code to your board. The software used is free to download (both Mac and Windows), easy to use, with a pre-installed library of code, and the board itself is circuit ready with no need to worry about voltage regulation or interface for Input/Output pins, everything is laid out already. Another reason why the Arduino is popular is because of the great community it has who contribute tutorials, help and add to its development.


Arduino hardware board description

Arduino hardware board description

There are different types of Arduino boards, for this tutorial we will focus on the common one which is the Arduino UNO (see image above) and explain the important hardware features.

Input/Output (also referred to as I/O pins): 

The Arduino board has 14 I/O pins that are used for reading/write functions. The I/O pins can detect only On/Off state, if there is voltage it will ON if there is no voltage it will read Off. Read function is when the Arduino gets an input signal from an external circuit, for example, a button pressed down can send an input signal to the Arduino by allowing voltage to pass through to the pin and therefore turning it On. The write function is when the Arduino sends a signal to an external circuit, for example, you can connect an LED to the Arduino and when you send a voltage signal on the pin, the LED will turn on. These are the basic functions of the I/O pins.

Analog to Digital Conversion pins (ADC pins):

These pins are still I/O pins but with special abilities. These do not only read On/Off state, but they can also read an analog signal and convert it into a digital signal using the onboard Analog to Digital converter (ADC that has a 10-bit resolution, returning integers from 0 to 1023. Analog signals usually come from sensors, think about a temperature sensor, it has a continuous function of values it can return, the temperature (in degrees Celcius) can be 10, 20, 20.5, 20.003, 20.012, 21.432, 30 and all cannot be converted into two values hence there is a need for a pin that can read more than two states. A simple way to describe how the ADC works is by using a sensor, for example, it takes a temperature sensor voltage range of between 0-3V and divides into 1024 points digitally, if 0 voltage reading corresponds to -10 degrees and 3V corresponds to 40 degrees, that means your Arduino will represent a temperature range 50 degrees using 1024 points equally spaced. It will be 50 degrees divided by the ADC accuracy which 1024 points, so it means you can read any temperature between -10 degrees to 50 degrees, using an accuracy of 0.05. For more information on how ADC works read this article.

PWM pins:

These pins are used to send a digital signal to control analog devices like servo motors. They are different from the normal I/O pins because you can create a “wave” signal using on/off states with delays in between. For example, you can have the pin turn on for 3 seconds and off for 1 second and by doing that you generate a pulse that imitates an analog signal. PWM is very useful when you want to create an analog output but you don’t have a DAC (Digital to Analog Converter).

Special pins:

The other important pins on the Arduino board are the Ground pin (GND), Reset pin, IORef, Vin, TX, RX, Aref. The GND pin is the common reference level to close a circuit, every circuit whether external or within the Arduino needs to have a common ground. The Vin is used to power the Arduino using an external power source between 7-12V. The Reset pin is used to reset the microcontroller configuration to default, for example, if you had a code, the reset button will restore the default settings. The IORef pin is the input/output reference pin used to provide voltage reference for the microcontroller. The TX and RX pins are for serial communication and used for transmitting and receiving TTL serial data. The Aref pin is used to provide an input reference voltage.

Power supply:

The Arduino can be powered using 3 ways:

USB cable: You can power the Arduino using a USB cable connected to your computer, a charger or other power sources that use USB cables.

Barrel Jack: You can power the Arduino using a DC power jack, the voltage supplied should be between 7-12V.

Vin pin: As discussed above the Vin pin can be used to supply power to the Arduino using an external power source, the voltage still needs to be in the range of 7-12V.


The Arduino Uno board size is approximately 69 x 54 mm and weighs about 25g.

USB Port:

This is the main mode of communication between the computer and the microcontroller via serial communication especially during debugging or uploading code to the Arduino.


Arduino IDE

Arduino IDE

The Arduino comes with its own Integrated Development Environment (IDE) which is used to program the Arduino via the USB port and is available for Windows, Mac, and Linux. The IDE is based on a simplified version of C and C++ programming language and uses intuitive syntax for coding, for example, to turn a pin on you can just write pin6 =HIGH which is more intuitive than referencing the pin as AN0=1. This IDE really makes it easy to start programming your microcontroller without having to go on a steep learning curve to understand low-level programming languages like C++. The software is available on Arduino main website here.