Sunday 14 August 2016

Arduino UNO

Introduction

The Arduino Uno is the most common version of Arduino family.The Arduino Uno is a micro controller board based on the ATmega328.It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button.The Arduino Uno is great choice for beginners.It contains everything needed to support the micro controller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.The Arduino Uno is a good choice for beginners since it is easy to start with.

Arduino UNO

A newbie to the Arduino environment may not know much about Arduino Uno board.Take a look into the following image which gives basic details about the Arduino Uno board.
ArduinoParts.png

  • USB: The USB port is used to power the board from the computer's USB port and also to transfer the program code from computer into the Arduino microcontroller.
  • External Power: It is used to power the board if the USB connector is not used.An AC adapter(9 volts,2.1mm barrel tip,center positive) could be used for providing external power.If there is no power at the power socket,then the Arduino will use power form the USB socket.But it is safe to have power at both the power socket and USB socket.
  • Digital Pins(I/O): The Arduino Uno has 14 digital pins(0 to 13) of which the 6 are PWM(~).This pins can be either inputs or outputs.But we need to mention it in the Arduino sketch(Arduino programming).The PWM(Pulse Width Modulated) pins acts as normal digital pins and also used to control some functions.Say for example,control the dimming of LED and control the direction of servo motor.Both digital inputs and digital outputs can read one of the two values either HIGH or LOW.
  • Analog Pins: The Analog pins(0 to 5) acts as inputs which is used to read the voltage in analog sensors such as temperature sensor,gas sensor,etc.Unlike digital pins which can only read one of the two values(HIGH or LOW),the analog inputs can measure 1024 different voltage levels.
  • ATmega Microcontroller: The Arduino uses ATmega328 microcontroller. It is a single chip microcontroller created by Atmel. This chip works well with Arduino IDE.If damaged,this controller can be easily replaced.The Atmega328 has 32 KB of flash memory for storing code (of which 0,5 KB is used for the bootloader).It has also 2 KB of SRAM and 1 KB of EEPROM.
  • 3.3V Pin: A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
  • 5V Pin: The regulated power supply used to power the microcontroller and other components on the board. This can come either from an on-board regulator, or be supplied by USB or another regulated 5V supply.
  • Reset Button: It is used to reset the microcontroller. Pushing this button will temporarily connect the reset pin to ground and restart any code that is loaded on the Arduino.

Technical Specifications

  1. Microcontroller- ATmega328
  2. Operating Voltage- 5V
  3. Input Voltage (recommended) - 7to12V
  4. Input Voltage(limit) - 6to20V
  5. Digital I/O Pins-14 (of which 6 provide PWM output)
  6. Analog Input Pins-6
  7. DC Current per I/O Pin-40 mA
  8. DC Current for 3.3V Pin-50 mA
  9. Flash Memory-32 KB (ATmega328) of which 0.5 KB used by boot loader
  10. SRAM-2 KB (ATmega328)
  11. EEPROM-1 KB (ATmega328)
  12. Clock Speed-16 MHz

How to program Arduino Uno?

Hardware and Software Required

  • Arduino Uno
  • Arduino IDE

Arduino IDE

A sketch is the name that Arduino uses for a program.It is the unit of code that is uploaded to and run on an Arduino board to execute the function like blinking a Led. To write a sketch,we need to install the Arduino Software known as Integrated Development Environment(IDE).

Program to turn on the Led

The Arduino Uno has on board LED.The program given below turns the led on and off with one second time delay.You can find this program under the built-in examples of Arduino IDE.Before uploading the sketch to the Arduino board,make sure that you have selected the correct board and serial port under the tools menu.
Output for the program
void setup() 
{
pinMode(13, OUTPUT);// initialize digital pin 13 as an output.
}
void loop()// the loop function runs over and over again forever
{
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

No comments:

Post a Comment