Arduino is an open source prototype electronics platform. It made interacting with electronics very easy with easy to use hardware and software. If we go back few years back when Arduino as not present then knowing electronics include having a great knowledge of electronics. But then a few decades revolutionized the field of electronics. Now we don’t need a high level physics and math to work with electronics. We can work with electronics regardless of our background and this is possible because of “Arduino”.
It is basically a microcontroller prototyping board and it is been using to design digital devices. It can read digital and analog input and can give us digital or analog (PWM) output. There are variations in Arduino boards. Let’s first see how they look?
This is most used Arduino board called “Arduino UNO” as you can see on labeled on board. Arduino UNO has the “Atmega328P” microcontroller from Atmel Corporation on board. Atmega328P is a 28 pin DIP microcontroller (it is also available in surface mount (SMD) packages). It has 32K Bytes flash program memory, 1K Bytes EEPROM (electrically erasable programmable read only memory) and 2K Bytes of internal SRAM (static random access memory). It can work at clock frequency up to 20 Mega Hertz. For more information please read its datasheet.
Arduino UNO hardware information
Let’s take a look at hardware of Arduino board. Arduino UNO is available in two variant: DIP through-hole type and surface mount type. We will see the hardware of through-hole type. Hardware is almost same for SMD version except microcontroller is SMD in SMD version board.
There are following parts in the Arduino UNO hardware.
- It has Atmega328P on its board.
- It has 14 digital pin which can take or provide digital inputs or outputs.
- Pin 0 and 1 are used to communicate serially between Arduino and other devices.
- 6 pins (3, 5, 6, 9, 10 and 11) of those 14 pin can be used to take analog output as 8-bit (0-255) PWM signal. Where 0 represents 0 volts and 255 represents 5 volts. So, we can have 253 different voltage levels between 0 to 5 volts.
- Pin 2 and 3 can be used as external interrupt based on any external event such as button press. Interrupt triggering can be set on any change in signal, rising edge or falling edge of signal.
- Pin 13 has a built in LED connected to it. We can turn it on and off by turning pin 13 on and off.
- 6 pin (A0-A5) can read analog voltage values from sensors such as potentiometer. By default Arduino can measure analog voltages from ground to 5 volts. But we can change its upper range of voltage by providing a voltage reference on “AREF” pin.
- Pins A4 and A5 are used in I2C communication.
- SS (pin 10), MOSI (pin 11), MISO (pin 12) and SCK (pin 13) are used in SPI communication.
- It has a reset button on the board which reset the Arduino on pressing during execution.
- USB port is used to connect Arduino to computer and program it. It is also used in serial communication between Arduino and computer. Arduino takes power computer through this port.
- External power jack is used to power the Arduino when it is not connected to computer. That is why a 5 volt regulator is used to regulate the power supply.
- 16 MHZ crystal oscillator is used to provide the clock pulses to the microcontroller.
Microcontroller that Arduino UNO uses
Arduino UNO uses Atmega328p to execute programs. It is a 28 pin IC and comes with DIP and SMD versions. It has 32K bytes of In-system Self-Programmable flash program memory, 1K bytes of EEPROM and 2K bytes of internal SRAM. It can operate on frequency up to 20MHZ.
It has four 8-bit ports in which pins of some ports are programmable and some are not. So overall it have 23 programmable input output lines. It has two 8-bit and one 16 bit timer/counter with separate prescaler. Using this we can perform any timing and counting related operation. And based on our timing or counting requirement, we can set an interrupt.
Six PWM channels allow us to take analog output from it and 6-channel 10 bit ADC allows us to give analog input to it. This IC has serial USART and master/slave SPI serial interface.
It can operate on 1.8V to 5.5V power supply. We can operate it in low power consumption mode at 1MHZ and 1.8V. Current consumption in active mode is 0.2mA, power-down mode is 0.1µA and power-save mode is 0.75µA.
Software for Arduino programming
We saw the basic the hardware of an Arduino UNO and now it comes to program it.
For programming the microcontroller an IDE called “Arduino” is used. In this IDE code is written which is similar to C programming language. These Arduino board can be programmed to do almost everything that a modern embedded system can do.
After code is written, it needs to compile. After compilation that code is converted into machine language that a microcontroller can read. Then it is uploaded to microcontroller using USB port. For that Serial to UART chip is interfaced between USB port and microcontroller. In Arduino pro mini this chip is not available on board so we use an external Serial to UART converter to program it.
User interface of Arduino IDE looks like this. Here we write codes for Arduino and then upload it on Arduino using that arrow button on top left corner. In the black area at bottom, compilation logs are displayed.
Types of Arduino
There are many types of Arduino board. Most frequently used are Arduino UNO, Arduino Nano, Arduino Mega, Arduino Micro (Mini) and Lilypad.
This is the Arduino Nano. It is the Atmega328P SMD version and smaller than Arduino UNO. But all features are same. It is best for experimenting on breadboards.
And these are some other popular types of Arduino. This was the basic introduction to Arduino.
Arduino buying links
|Amazon link for India||Amazon link for other countries|