Arduino

Arduino

Arduino is a prototype platform (open-source) based on an easy-to-use hardware and software. It consists of a circuit board, which can be programmed (referred to as a microcontroller) and ready-made software called Arduino IDE (Integrated Development Environment), which is used to write and upload the computer code to the physical board. 

Arduino Uno is a microcontroller board based on 8-bit ATmega328P microcontroller. Along with ATmega328P, it consists other components such as crystal oscillator, serial communication, voltage regulator, etc. to support the microcontroller. Arduino Uno has 14 digital input/output pins (out of which 6 can be used as PWM outputs), 6 analog input pins, a USB connection, A Power barrel jack, an ICSP header and a reset button.

The key features are

  • Arduino boards are able to read analog or digital input signals from different sensors and turn it into an output such as activating a motor, turning LED on/off, connect to the cloud and many other actions. 
  • Board functions are controlled by sending a set of instructions to the microcontroller on the board
  • Unlike most previous programmable circuit boards
  • Arduino does not need an extra piece of hardware in order to load a new code onto the board.
  • Simply use a USB cable. 
  • Additionally, the Arduino IDE uses a simplified version of C++, making it easier to learn to program.
  • Finally, Arduino provides a standard form factor that breaks the functions of the micro-controller into a more accessible package.

Board Description

Arduino UNO board is the most popular board in the Arduino board family. In addition, it is the 

best board to get started with electronics and coding. Some boards look a bit different from but most Arduino have majority of these components in common.

1. Power USB: Arduino board can be powered by using the USB cable from the computer. 

2. Power (Barrel Jack): Arduino boards can be powered directly from the AC mains power supply by connecting it to the Barrel Jack.

3. Voltage Regulator: The function of the voltage regulator is to control the voltage given to the Arduino board and stabilize the DC voltages used by the processor and other elements. 

4. Crystal Oscillator: The crystal oscillator helps Arduino in dealing with time issues. How does Arduino calculate time? The answer is, by using the crystal oscillator. The number printed on top of the Arduino crystal is 16.000H9H. It tells us that the frequency is 16,000,000 Hertz or 16 MHz.

5 & 17.Arduino Reset: Arduino board can be reset in two ways. First, by using the reset button (17) on the board. Second, connect an external reset button to the Arduino pin labeled RESET (5). 

6, 7, 8 &9 .Pins (3.3, 5, GND, Vin): 3.3V 

(6): Supply 3.3 output volt 5V 

(7): Supply 5 output volt Most of the components used with Arduino board works fine with 3.3 volt and 5 volt. 

(8)(Ground): There are several GND pins on the Arduino, any of which can be used to ground the circuit.

(9) Vin : This pin also can be used to power the Arduino board from an external power source, like AC mains power supply. 

10. Analog pins: The Arduino UNO board has five analog input pins A0 through A5. These pins can read the signal from an analog sensor like the humidity sensor or temperature sensor and convert it into a digital value that can be read by the microprocessor. 

11. Main microcontroller: Each Arduino board has its own microcontroller (11). Assume it as the brain of Arduino board. The main IC (integrated circuit) on the Arduino is slightly different from board to board. The microcontrollers are usually of the ATMEL Company.

12. ICSP pin: Mostly, ICSP (12) is an AVR, a tiny programming header for the Arduino consisting of MOSI, MISO, SCK, RESET, VCC, and GND. It is often referred to as an SPI (Serial Peripheral Interface), which could be considered as an "expansion" of the output. Actually, slaving the output device to the master of the SPI bus. 

13. Power LED indicator: This LED should light up when you plug your Arduino into a power source to indicate that your board is powered up correctly. If this light does not turn on, then there is something wrong with the connection. 

14. TX and RX LEDs: On Arduino board, there are two labels: TX (transmit) and RX (receive). They appear in two places on the Arduino UNO board. First, at the digital pins 0 and 1, to indicate the pins responsible for serial communication. Second, the TX and RX led (13). The TX led flashes with different speed while sending the serial data. The speed of flashing depends on the baud rate used by the board. RX flashes during the receiving process. 

15. Digital I / O: The Arduino UNO board has 14 digital I/O pins (15) (of which 6 provide PWM (Pulse Width Modulation) output. These pins can be configured to work as input digital pins to read logic values (0 or 1) or as digital output pins to drive different modules like LEDs, relays, etc. The pins labeled ―~‖ can be used to generate PWM. 

16. AREF: AREF stands for Analog Reference. It is sometimes, used to set an external reference voltage (between 0 and 5 Volts) as the upper limit for the analog input pins. 

Arduino connection steps  

  • Connect Arduino using the USB cable. The square end of the USB cable connects to your Arduino and the flat end connects to a USB port on computer 
  • Choose Tools→Board→Arduino Uno to find your board in the Arduino menu.
  • Click the Upload button. This is the button that points to the right in the Arduino environment.

Arduino Uno Technical Specifications

 1.  Microcontroller: ATmega328P - 8 bit AVR family microcontroller

 2. Operating voltage: 5V

 3. Recommend input voltage: 7-12V

 4. Input voltage limits: 6-20V

 5. Analog Input pins: 6 (A0 - 5)

 6. Digital I/O pins: 14 (Out of which 6 provide PWM output)

 7. DC current on I/O pins: 40 mA

 8. DC current on 3.3V pin: 50 mA

 9. Flash Memory: 32 KB (0.5 KB is used for Bootloader) 

10. SRAM: 2 KB

11. EEPROM: 1 KB

12. Frequency (Clock speed): 16 MHZ

How to use Arduino Board

The 14 digital input/output pins can be used as input or output pins by using pinMode(), digitalRead() and digitalWrite() functions in arduino programming. Each pin operate at 5V and can provide or receive a maximum of 40mA current, and has an internal pull-up resistor of 20-50 KOhms which are disconnected by default.  Out of these 14 pins, some pins have specific functions as listed below

  • Serial Pins 0 (Rx) and 1 (Tx): Rx and Tx pins are used to receive and transmit TTL serial data. They are connected with the corresponding ATmega328P USB to TTL serial chip.
  • External Interrupt Pins 2 and 3: These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value.
  • PWM Pins 3, 5, 6, 9 and 11: These pins provide an 8-bit PWM output by using analogWrite() function.
  • SPI Pins 10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK): These pins are used for SPI communication.
  • In-built LED Pin 13: This pin is connected with an built-in LED, when pin 13 is HIGH – LED is on and when pin 13 is LOW, its off.

Along with 14 Digital pins, there are 6 analog input pins, each of which provide 10 bits of resolution, i.e. 1024 different values. They measure from 0 to 5 volts but this limit can be increased by using AREF pin with analog Reference() function.  

  • Analog pin 4 (SDA) and pin 5 (SCA) also used for TWI communication using Wire library.

Arduino Uno has a couple of other pins as explained below

  • AREF: Used to provide reference voltage for analog inputs with analogReference() function.
  • Reset Pin: Making this pin LOW, resets the microcontroller

Communication

Arduino can be used to communicate with a computer, another Arduino board or other microcontrollers. The ATmega328P microcontroller provides UART TTL (5V) serial communication which can be done using digital pin 0 (Rx) and digital pin 1 (Tx). An ATmega16U2 on the board channels this serial communication over USB and appears as a virtual com port to software on the computer. The ATmega16U2 firmware uses the standard USB COM drivers, and no external driver is needed. However, on Windows, a .inf file is required. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the Arduino board. There are two RX and TX LEDs on the arduino board which will flash when data is being transmitted via the USB-to-serial chip and USB connection to the computer (not for serial communication on pins 0 and 1). A SoftwareSerial library allows for serial communication on any of the Uno's digital pins. The ATmega328P also supports I2C (TWI) and SPI communication. The Arduino software includes a Wire library to simplify use of the I2C bus.

Advantages of Arduino

  • its simple programming language
  • Open source in hardware
  • Don’t need to external programmer (Burner)
  • Programming ease
  • Open source in software
  • IDE Software operate on any operating system

Disadvantages of Arduino

  • processing power is weaker than the microcontroller

Applications

  • Prototyping of Electronics Products and Systems
  • Multiple DIY Projects.
  • Easy to use for beginner level DIYers and makers.
  • Projects requiring Multiple I/O interfaces and communications.

Questions and Answers

1. How to Use an Arduino Uno?

Answer: Arduino Uno can detect the surroundings from the input. Here the input is a variety of sensors and these can affect its surroundings through controlling motors, lights, other actuators, etc. The ATmega328 microcontroller on the Arduino board can be programmed with the help of an Arduino programming language and the IDE (Integrated Development Environment). Arduino projects can communicate by software while running on a PC.


2. why we should use Arduino?

Answer: The Arduino software is easy-to-use for beginners, yet flexible enough for advanced users. It runs on Mac, Windows, and Linux. 


3. in which language Arduino programming is written?

Answer: Java, C, C++


4. what is arduino?

Answer: Arduino is an open-source electronics platform based on easy-to-use hardware and software.


5. what are the features of arduino? 

Answer: Arduino boards are able to read analog or digital input signals from different sensors and turn it into an output such as activating a motor, turning LED on/off, connect to the cloud and many other actions. 


6. What is Arduino and its advantages?

Answer: Arduino is an open-source electronics platform based on easy-to-use hardware and software.

Advantages: its simple programming language, Open source in hardware, Don’t need to external programmer (Burner), Programming ease, Open source in software


7. Which Arduino is best?

Answer: Arduino UNO is the most popular and best-selling Arduino board. As mentioned, this board is equipped with an ATMEGA328 microcontroller. It has standard female pin headers with 2.54 mm spacing and is compatible with various shields.


8. Which software is used for Arduino Uno?

Answer: The Arduino Uno is programmed using the Arduino Software (IDE), our Integrated Development Environment common to all our boards and running both online and offline. 


9. What is Arduino vs Raspberry Pi?

Answer: The main difference between them is: Arduino is microcontroller board, while Raspberry Pi is a microprocessor based mini computer (SBC). 


10. What is PWM in Arduino?

Answer: Pulse Width Modulation, or PWM, is a technique for getting analog results with digital means. Digital control is used to create a square wave, a signal switched between on and off.


11. Which microcontroller is used in Arduino?

Answer: Most Arduino boards consist of an Atmel 8-bit AVR microcontroller (ATmega8, ATmega168, ATmega328, ATmega1280, or ATmega2560) with varying amounts of flash memory, pins, and features.


12. What is Arduino Uno full form?

Answer: Arduino Uno means Arduino One.


13. What are the uses of Arduino?

Answer: Boards Aren't Boring, Robotics, Audio,  Internet of Things (IoT), Tools, Data Logging, Networking, Medical


14. What is SPI in Arduino?

Answer: Serial Peripheral Interface (SPI) is a synchronous serial data protocol used by microcontrollers for communicating with one or more peripheral devices quickly over short distances.


15. How many analog pins are used in Arduino Mega board?

Answer: 16 pins 

Arduino Multiple Choice Questions and Answers

1. Which is the software or a programming language used for controlling of Arduino?

a) Assembly Language

b) C Languages

c) JAVA

d) Any Language

Answer: Any Language


2. What is the default bootloader of the Arduino UNO?

a) Optiboot bootloader

b) AIR-boot

c) Bare box

d) GAG

Answer: Optiboot bootloader


3. Arduino IDE consists of 2 functions. What are they?

a) Build() and loop()

b) Setup() and build()

c) Setup() and loop()

d) Loop() and build() and setup()

Answer: Setup() and loop()


4. How many types of arduinos do we have?

a) 5

b) 6

c) 8

d) 6

Answer: 8


5. ___________ are pre built circuit boards that fit on top of Android.

a) Sensor

b) Data types

c) Breadboard

d) Sheilds

Answer: Sheilds


6. What is the microcontroller used in Arduino UNO?

a) ATmega328p

b) ATmega2560

c) ATmega32114

d) AT91SAM3x8E

Answer: ATmega328p


7. How many digital pins are there on the UNO board?

a) 14

b) 12

c) 16

d) 20

Answer: 14


8. What does p refer to in ATmega328p?

a) Production

b) Pico-Power

c) Power-Pico

d) Programmable on chip

Answer: Pico-Power


9. _________ board allows sewn into clothing.

a) UNO

b) RedBoard

c) LilyPad

d) Mega

Answer: LilyPad


10. Arduino shields are also called as _________

a) Extra peripherals

b) Add on modules

c) Connectivity modules

d) Another Arduinos

Answer: Add on modules


11. A program written with the IDE for Arduino is called _________

a) IDE source

b) Sketch

c) Cryptography

d) Source code

Answer: Sketch


12. How many analog pins are used in Arduino Mega board?

a) 16

b) 14

c) 12

d) 8

Answer: 16


13. Which board is first to use microcontroller within build USB?

a) LilyPad

b) UNO

c) RedBoard

d) Leonardo

Answer: Leonardo


14. Do Arduino provides IDE Environment?

a) True

b) False

Answer: True


15. Does the level shifter converts the voltage levels between RS-232 and transistor-transistor logic.

a) True

b) False

Answer: True





Comments