If you like to play with an electronic toys and you are curious to know the backend, how is it working? What components they use? What makes toy so reliable and fast? Then I am sure you are familiar with a micro controller named an Arduino.
According to Wikipedia, in 2013, 700,000 boards have been sold to users worldwide. Arduino is quite well-known among students because it facilitates you to grip on your programming through micro controllers and opens a gate to enter into the programming world.
You are sitting on a couch and scrolling up and down on the Youtube to kill your boredom and you see a guy making different robots using arduino. You have just ordered it and you have no idea what to do next? , how do I start it? , how it works?
Do not worry, this guide would help you how to get started, software installation and a few examples.
If you are a novice, this guide was written in the simplest way so you could learn as effectively as possible and to know everything about it. Do not worry, if you are a student, hobbyist or a beginner. You could still learn about it moreover you will also do some projects using arduino in future.
What is an Arduino?
In the simplest way, it is an open source hardware board, use to control motors, sensors, relays, LEDs and to design different projects. Arduino is an open source hardware and software company, which designs and manufactures microcontrollers boards also they have shared everything related to arduino like PCB designs and layout, and anybody could use it, make it and sell it, but they cannot name them ARDUINO.
These microcontrollers are licensed under GNU General Public License which allows anyone to create their own board using local components. If you explore it on search web you will find many locally manufactured arduino boards and this license permits anyone to make their own boards but no one can use its trademark “arduino”.
Many of the students are taking advantages of this open source hardware board and making this a heart of their projects from LED blinking to complex projects.
Massimo Banzi introduced the board, back in 2005, in Italy. They wanted to make a way for non-engineers to have easily access inexpensive board for hardware projects.
Arduino is quite famous among the students, hobbyist and designers because it is economical as compared to the other microcontrollers also it is available under $20. Arduino’s software IDE is an open source, easily access to everybody and runs on windows, MAC and Linux operating system where as some other microcontrollers are limited to windows only.
Types of Arduino boards
Arduino is an open source hardware board, used in many designing projects. If you are inexperience then you might find some difficulty in choosing the right board. There are many other competitors who have locally made these boards and they are comparatively at marginal cost than the original arduino boards. All boards are open source and it means anyone in the world can modify it with their own need, according to their projects.
If you are an amateur then there is a slight possibility you have not heard about the other arduino boards. Every board has their own specification also it comes in multiple sizes. Furthermore, they are easily available in the market. There are a few companies like Sparkfun and Adafruint industries sell arduino boards with a little change in functionality and it (original arduino board) was produced by the Italian company Smart projects.
Different types of arduino boards are listed below:
- Arduino UNO (R3)
- Arduino Mega (R3)
- LilyPad Arduino
- Arduino Leonardo
Image credit – sparkfun.com
Arduino UNO (R3)
Arduino UNO would be a great choice if you need to make a good grip on your programming or you need to make electronics projects. I would suggest you to start it with an Arduino UNO (R3). It is an open source hardware board using dual-inline-package (DIP) ATmega328p removable. It has an additional facility that if you somehow burn the microcontroller IC then you don’t need to change the whole board you can only change the ATmega328p and reuse it again. It is the most popular, used, cheap and the toughest board among the arduino family.
Image credit – makerspaces.com
I would highly recommend you if you are new to this, you can get a good grip on basic programming. It has 14 digital input/outputs (6 of which can be PWM pins), 6 analog inputs, and a 16 MHz clock.
Arduino UNO board can be used to control motors, lighting, cameras, or even build a user-friendly robot.
Board distribution
- Reset Button – you might have seen reset button in computers and in video games console. It helps computer to restart your computer forcibly. Reset button is used to restart an arduino board and it clears all the memory.
- AREF – AREF means analog reference.
- Ground – Ground or GND is where the electrical level is at 0 volts.
- Digital input/output – Arduino UNO (R3) has 14 digital pins and 6 analog pins. Pin number 0 and 1 are used for transmitting and receiving serial data.
Pin 3, 5,6,9,10,11 are PWM pins you could control voltage; adjust the brightness of LED, control the speed of motors.
Analog pins are used for reading the data which coming from the analog sensors.
- PWM – PWM stands for Pulse Width Modulation and it is used to convert the digital signal into an analog.
- USB connection – It needs a power source to start an arduino and there are only two ways to start it. Firstly, through barrel jack (11) and other is USB connection (6). USB port is used to give power to the arduino also used to load program onto it but if you do not want your arduino to plug it with your computer all the time there is a barrel jack present next to the board. You can simply use it to power your arduino.
- TX RX LEDs – TX is short for transmitting and RX is short for receiving. These led starts blinking when it receiving or transmitting the data.
RX led starts blinking when you will be loading your program onto it and TX led starts blinking when your program starts running.
- ATmega Microcontroller – It
- Power LED Indicator – Power LED indicator is used to indicate that the arduino has been powered.
- Voltage Regulator
- DC power barrel jack – DC power barrel jack is used to power an arduino and it is a jack where you plug in your AC to DC adapter.
- 3.3V pin – it gives your 3.3V at the output.
- 5V pin – it gives you 5V at the output.
- Ground Pins
- Analog pins
Arduino Mega
Arduino UNO is designed for simple and basic projects with lesser number of digital input and output pins but you could also use it in complex projects. Arduino Mega is designed for robotics projects with 54 digital input and output pins. When you are working on a complex project and you need more number of digital I/O pins so they have created the technology arduino Mega with more number of pins. Each board of arduino family runs on the IDE software and you don’t need to plug additional for coding. You just have to plug the USB cable into jack and you can have fun, doing coding and make yourself a great programmer through arduino mega. It would be a wonderful technology if you want to learn about programming.
Microcontroller Atmega2560 has been used in arduino for storing the data, 8KB of SRAM and 4KB of EEPROM also it is a recommended board for 3D printing and robotics projects with an additional facility of digital I/O pins.
Image credit – adafruit.com
Board Distribution
It has everything that supports microcontroller atmega2560 and a lot more pins than UNO. It has 54 digital I/O pins where 14 pins are used for PWM output, 16 pins are analog inputs, using pinmode(), digitalread(), digitalwrite() function. There are three ways to power up this board. Firstly, use AC-DC adapter and plug into barrel jack. Secondly, connect printer cable to your computer. Lastly, a battery.
You have divided this board into small components so you can make a good grip what makes this board unique in arduino family.
Reset – Reset button is placed next to the microcontroller and it resets your arduino board. It is like you unplug your arduino board from the computer and plug it back but you have a button here in the middle of the board.
Microcontroller atmega2560 – According to the datasheet. It is a high performance, low power Atmel AVR 8-bit microcontroller. For more read, I am attaching a datasheet of atmega2560 you can read it.
Power pins – Power pins include Vin, 5V, 3.3V and GND pins. When external power source applies through an adaptor, a battery or a printer cable. You can supply voltage and you can light up your LED with power pins. This pin gives you 5V, 3.3V at the output.
Digital input/output pins – 54 pins can be used for both input and output. A few pins are considered as digital pins and remaining pins are considered as analog pins. Using digitalwrite () command you can use these pins as high or low (According to our need and requirement).
Rx and Tx – These pins are used for receiving and transmitting the data; Rx is used for receiving the data and TX is used for transmitting the data.
PWM pins – 14 pins put of 54 can be used for PWM outputs.
Lilypad Arduino
Just like other boards, it is also a type from arduino family called Lilypad Arduino. Sparkfun Electronics and Leah Buechley first introduced this Arduino-programmed microcontroller (Atmega168 or Atmega328) board, designed for wearable applications and e-textiles. Round shape, approximately 2 inches in diameter Lilypad board can be attached to fabrics, fixed at your hand, sensors and actuator with conductive threads.
Just like other Arduino boards, which are widely used for robotics, server and automation also it is famous for its open source hardware and software, cheap and easy to use.
Power
One wrong move can damage your arduino, your Lilypad arduino can be powered through various ways. Firstly, through an AC-DC adapter but you have to keep this thing in your mind that you don’t give voltage more than 5.5V, it will harm your board. Secondly, through battery. Lastly, through USB connection. Note: Do not give power more than 5.5V.
Features
Operating voltage 2.2V to 5V
Microcontroller – Atmega168 or Atmeaga 324V
PWM – 6
Clock Speed – 8 MHz
Digital I/O pins – 14
Flash Memory – 16KB (boot loader uses 2KB flash memory)
EEPROM – 512 bytes
Arduino Leonardo
Every other arduino board is unique in its own way and uses a microcontroller. Arduino Leonardo is a microcontroller based board which uses Atmega32U4 and here U stands for USB communication. Built in USB communication makes this board differ from the previous ones like UNO and mega.
Arduino Leonardo
What are the differences between Arduino Leonardo and UNO?
Until Leonardo hasn’t designed, UNO is the king for all the beginners who want to get into this microcontroller designed board. Arduino Leonardo and UNO are the pretty much same and it also works on the same software but there are differences which makes Leonardo a special from UNO.
Image credit – speeli.com
There are pretty obvious differences can be seen with our naked eyes.
- Microcontroller – They both use the same series microcontroller but Leornardo uses a surface mounted Atmega32U4 while UNO uses a microcontroller Atmega328p which can be replaced when it got burnt.
- FTDI chip – There is no FTDI chip in UNO which is used to translate a USB signal into a serial communication. Microcontroller Atmega32U4 has serial ports and native USB.
- USB B-class connector – They have also replaced the USB b-class connector with a micro USB connection.
- Paint job – Leonardo has a smooth and dark paint so you can see clearly what has written on the board or the pin numbers.
- Input/Output pins – They have more pins than UNO. Leonardo has 20 pins and each pin can be used as input or output.
- Price – Leonardo is cheaper than the UNO board.
- USB support – It gives an additional facility of USB for the students and hobbyist who want to create more projects with USB.
Features
Microcontroller – Atmega32U4
Operating voltage – 5V
Input voltage – 7-12V
Digital I/O pins – 20 pins
PWM – 7
Analog input channels – 12
Flash Memory – 32KB
Clock Speed – 16MHz
Length – 68.6 mm
Width – 53.5 mm
Weight – 20 g
Power Pins
Power pins play an essential role in Arduino which can be used to power the Arduino, sensors, motor drivers and shields. The Arduino can be powered through many ways; AC-DC adaptor, from an external source supply that is battery or from USB cable.
Power pins
VIN – VIN pin can be used to power Arduino if you supply an external power source that is a battery, to GND and VIN. I would prefer you to use 9V to 12V battery because the voltage dropout would be 1.2V, maker of this board has already fixed a built-in regulator so it would only allow fixed 5V to Arduino.
You can use this pin to power other components, such as, motor drivers, shields, Arduino and sensors if you supply power through barrel jack or from USB cable.
5V – Most of the time, 5V pin is used to power up the shields like RFID, sensors, Bluetooth.
3.3V – Regulated output, can be used to power components which run at 3.3V.
GND – Ground pin
Digital Pins
Digital input and output pins can be used in both ways either input or output using pinmode(), digitalread(), digitalwrite() functions. Each of the 20 pins operate at 5v, provide or receive the maximum amount of 40mA current. Moreover, some pins are used due to its specialized function:
Digital pins
0(RX) and 1(TX) are used for receiving the data and transmitting data.
SDA and SCL – SDA and SCL stands for serial data and serial clock respectively. They both support two- wire interface (TWI) communication using the wire library. TWI and I2C are quite similar.
Two wire interface read http://ww1.microchip.com/downloads/en/DeviceDoc/90003181A.pdf
PWM – 3, 5, 6, 9, 10, 11 and 13 analogWrite() function is used to provide 8 bit PWM output.
LED 13 – built-in LED is fixed at pin number 13.
Arduino starter kit
Choosing the right path is crucial to reach at your destination. In the same way, choosing the right Arduino is an essential part when you are doing the Arduino based projects. Beginners might face difficulty in selecting the right Arduino but this guide would help you to choose the right one.
Arduino UNO is one of the most used, standard, unique board among all the boards. Flexible microcontroller (Atmega 328) is used and it supports shields as well. The best thing about Arduino UNO is a flexible microcontroller, if you somehow burn the atmega328 you can change it with the new one also it is magnificent for the beginners, if you want to learn the basic programming.
Arduino Mega is slightly altered with the UNO. It has more number of digital I/O pins, and it is famous for robotics projects. Arduino Mega is the best for complex robotics projects also it is recommended for 3D printer.
Every Arduino board is unique in its own way and has made for special use. Now you have chosen the right microcontroller but it is only a microcontroller and you also need some basic components to work on your project. Before you start downloading the software you need to know what basic things you will need for your Arduino projects:
- Breadboard
- Jumper wire
- Resistors
- LED
- Capacitors
What is a Breadboard?
You might have pictured about a board which you chop vegetables on it but it is a special board which allows you to test your components, prototypes and experiments with circuit design before you start soldering your components on Vero board or on your PCB.
A solder less board has come in your life to make it easier. Prior to the days of 1960s when this board didn’t exist at all how difficult were their lives to test prototypes and components. Wire-wrap was a technique, people used it to test their projects.
What Are The Uses of Breadboard
Breadboard is an essential tool for electronic engineers when you are not sure about the project how is it going to work? Then breadboard could be the premier tool for you. It could help you in testing the most straight forward project as well as the most complex one.
Another prime use of breadboard is; you could test your components and intergrade circuits (ICs) when you are not sure about the pins and you are disoriented after reading the pin diagram. You can’t just solder your components every time.
If you are a beginner and a hobbyist then breadboard could be generous in learning new things. You could also attach other boards as well if your project is a bit complex and can’t be completed on one breadboard.
Later, you would need a breadboard kit; breadboard, jumper wires, and components. It allows you to test temporary prototype, which makes electronics engineer’s life easy, reusable and doesn’t need any soldering.
Breadboard comes an ultimate savior when you only need to test your components, prototypes, and you are confused which pin is ground or which pin is power pin. For example: you cannot test your potentiometer on PCB (printed circuit board), for that you need a breadboard for testing. It comes in various sizes but the concept behind it doesn’t vary. If you are new to electronics you might not know how to use a breadboard? You don’t have to worry. This guide will teach you how to use it.
How to use a breadboard
At first, you might face difficulty in decoding the breadboard and a few question will surely arise in your mind that. Why there are so many holes on the breadboard? And why these alphabets are written on the side of the board? What is inside the board? What is the function of this board? Don’t worry these questions are the reasons that you are willing to learn about the board and it has been explained in the simplest way.
It is a special board which helps student to test their circuits and components. The horizontal lines are called power rails and these holes are internally connected which means you can use it for powering the circuit when you have connected the power source in one of these holes.
Red line and pink lines are indicating that the holes are internally connected. Jumper wires are used to connect different components on the breadboard.
These alphabets and numbers show the exact hole on the breaadboard
Breadboard connections
You might have understood the layout and design, and why do we use breadboard? Why it is so popular among students? Let’s discuss the connection of breadboard and how to set up a designed project on it.
I would suggest you to use different color wires for wiring your circuit. It would help you in troubleshooting your project later.
Buses on each sides are not connected with each other. Black and red jumper wires are used to connect it with each other so either bus can be used as a ground or a power source.
ICs need to be placed between the central divider because the horizontal terminal strips are connected to each other and this could damage your IC. So you place your IC between the central divider.
These horizontal lines/holes are internally connected to each other so you don’t have to wire your components to components. But make sure you have put the component’s leg into the hole which is internally connected.
You can use jumper wires to connect the vertical lines.
What cool projects you can do with your breadboard?
You have understood the layout and connections of breadboard and now you are ready to play with it.
Let’s start with the basic, so you can have a better grip on the breadboard connections. If you are still not so very sure about the breadboard, let us know your problem in the comment section.
Here, a picture of a short project and you are going to implement it on the breadboard.
You don’t have to worry about the picture what are these symbols? What is this all about?
These straight lines represent a connection; you can either connect it with a jumper wire or you can also use component’s legs to connect it on the breadboard. R1 is a resistor with a resistance of 330 ohm; resistor is used for protection when current flows more than the required, it could damage your LED.
JUMPER WIRES
Jumper wires are extremely important when you are playing on breadboard with some components in hand and trying to make a circuit from it. You will need jumper wires to connect two points. I will highly recommend you to use different colors wires as it will help you in debugging and changing the right wire on time.
Colored jumper wires
Different colors of jumper wires mean nothing, but these different color wires are to bring an ease in your life. You can use one color wire in your circuit but it will be difficult to identify a mistake. Just like black color wire uses as a ground and red color wire uses as a power source. You can either use yellow for ground and black for power. It totally depends on you.
Picture of different color jumper wire in the circuit
Types of jumper wire
As you have now understood what is jumper wire? And why they are colored? Now you will learn about different types of jumper wires.
There are mainly three types of jumper wires which use in electrical world. Following are the types of jumper wire:
- Male-to-male
- Female-to-female
- Female-to-male
Resistors
You might have seen this in every electrical circuit and you cannot deny the importance of a resistor in electrical network. A passive electrical component that is resistor whose basic function is to limit the flow of electrical current. Its resistance is measured in ohms.
For what purpose resistors are used in electrical circuits. A few examples like voltage divider, limit electrical current, control gains, etc.
Resistance value and tolerance can be measured through different colors embossed on resistors. These color stripes on resistors are called bands and resistors could be up to 6 color bands.