0% found this document useful (0 votes)
5 views22 pages

Internship Material

The Arduino Uno is a microcontroller board featuring the ATmega328, with 14 digital I/O pins, 6 analog inputs, and a 16 MHz clock speed. It can be powered via USB or an external source and supports various communication protocols including UART, I2C, and SPI. Additionally, it includes features for programming and automatic reset, making it suitable for a wide range of customizable applications.

Uploaded by

nandu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views22 pages

Internship Material

The Arduino Uno is a microcontroller board featuring the ATmega328, with 14 digital I/O pins, 6 analog inputs, and a 16 MHz clock speed. It can be powered via USB or an external source and supports various communication protocols including UART, I2C, and SPI. Additionally, it includes features for programming and automatic reset, making it suitable for a wide range of customizable applications.

Uploaded by

nandu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 22

ARDUINO UNO

The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz
crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It
contains everything needed to support the microcontroller; 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 Uno differs from
all preceding boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it
features the Atmega8U2 programmed as a USB-to-serial converter.

Arduino is selected because it is an open-source platform, inexpensive and provides sufficient


analog/digital I/O pins for customizable applications. It operates at 5V and is powered with
Atmel’s ATmega328 micro-controller with a clock speed of 16 MHz’s It has a flash memory of
32kB and Static Random Access Memory (SRAM) of 2kB. It has 6 analog pins and serial ports.
One of the serial ports is connected internally to Universal Serial Bus (USB) port.
Summary

Microcontroller ATmega328

Operating Voltage 5V

Input Voltage (recommended) 7-9V

Input Voltage (limits) 6-20V

Digital I/O Pins 14 (of which 6 provide PWM output)

Analog Input Pins 6

DC Current per I/O Pin 40 mA

DC Current for 3.3V Pin 50 mA

Flash Memory 32 KB (ATmega328) (0.5 KB used by bootloader)

SRAM 2 KB (ATmega328)

EEPROM 1 KB (ATmega328)

Clock Speed 16 MHz


Power

The Arduino Uno can be powered via the USB connection or with an external power supply. The
power source is selected automatically. External (non-USB) power can come either from an AC-
to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm centre-
positive plug into the board's power jack. Leads from a battery can be inserted in the Gnd and
Vin pin headers of the POWER connector. The board can operate on an external supply of 6 to
20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and
the board may be unstable. If using more than 12V, the voltage regulator may overheat and
damage the board. The recommended range is 7 to 12 volts.

The power pins are as follows:

 VIN. The input voltage to the Arduino board when it's using an external power source (as
opposed to 5 volts from the USB connection or other regulated power source). You can supply
voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.

 5V. The regulated power supply used to power the microcontroller and other components on the
board. This can come either from VIN via an on-board regulator, or be supplied by USB or
another regulated 5V supply.

 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.

 GND. Ground pins.

Input and Output


Each of the 14 digital pins on the Uno can be used as an input or output, using pinMode(),
digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or
receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of
20-50 kOhms. In addition, some pins have specialized functions:
 Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins
are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.

 External Interrupts: 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. See the attachInterrupt() function for details.

 PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.

 SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication using
the SPI library.

 LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the
LED is on, when the pin is LOW, it's off.

The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution
(i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible
to change the upper end of their range using the AREF pin and the analogReference() function.
Additionally, some pins have specialized functionality:

I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire library. There are
a couple of other pins on the board:

AREF. Reference voltage for the analog inputs. Used with analogReference().

Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to
shields which block the one on the board.

Communication
The Arduino Uno has a number of facilities for communicating with a computer, another
Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega8U2 on the
board channels this serial communication over USB and appears as a virtual com port to
software on the computer. The '8U2 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. The RX and TX LEDs on the board will flash when data is being transmitted via the
USB-to-serial chip and USB connection to the computer (but 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 ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software
includes a Wire library to simplify use of the I2C bus; see the documentation for details. For SPI
communication, use the SPI library.

Programming
The Arduino Uno can be programmed with the Arduino software (download). Select "Arduino
Uno from the Tools > Board menu (according to the microcontroller on your board). For details,
see the reference and tutorials. The ATmega328 on the Arduino Uno comes preburned with a
bootloader that allows you to upload new code to it without the use of an external hardware
programmer.

It communicates using the original STK500 protocol (reference, C header files). You can also
bypass the bootloader and program the microcontroller through the ICSP (In-Circuit Serial
Programming) header; see these instructions for details.

The ATmega8U2 firmware source code is available . The ATmega8U2 is loaded with a DFU
bootloader, which can be activated by connecting the solder jumper on the back of the board
(near the map of Italy) and then resetting the 8U2.

You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac OS X and
Linux) to load a new firmware. Or you can use the ISP header with an external programmer
(overwriting the DFU bootloader). See this user-contributed tutorial for more information.

Automatic (Software) Reset


Rather than requiring a physical press of the reset button before an upload, the Arduino Uno is
designed in a way that allows it to be reset by software running on a connected computer. One of
the hardware flow control lines (DTR) of the ATmega8U2 is connected to the reset line of the
ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset line
drops long enough to reset the chip. The Arduino software uses this capability to allow you to
upload code by simply pressing the upload button in the Arduino environment. This means that
the bootloader can have a shorter timeout, as the lowering of DTR can be well-coordinated with
the start of the upload.

This setup has other implications. When the Uno is connected to either a computer running Mac
OS X or Linux, it resets each time a connection is made to it from software (via USB). For the
following half-second or so, the bootloader is running on the Uno. While it is programmed to
ignore malformed data (i.e. anything besides an upload of new code), it will intercept the first
few bytes of data sent to the board after a connection is opened. If a sketch running on the board
receives one-time configuration or other data when it first starts, make sure that the software with
which it communicates waits a second after opening the connection and before sending this data.

The Uno contains a trace that can be cut to disable the auto-reset. The pads on either side of the
trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to
disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see this forum
thread for details.

USB Overcurrent Protection

The Arduino Uno has a resettable polyfuse that protects your computer's USB ports from shorts
and overcurrent. Although most computers provide their own internal protection, the fuse
provides an extra layer of protection. If more than 500 mA is applied to the USB port, the fuse
will automatically break the connection until the short or overload is removed.

Physical Characteristics

The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the
USB connector and power jack extending beyond the former dimension. Four screw holes allow
the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8
is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins.
AT-Mega 328P MICROCONTROLLER

Features:

 The ATmega328P is a high-performance Atmel 8-bit AVR RISC-based microcontroller

combines 32KB flash memory with read-while-write capabilities.

 It has 1024B EEPROM, 23 general purpose I/O lines, 32 general purpose working registers.

 It has three flexible timer/counters with compare modes, internal and external interrupts.

 It has serial programmable, a byte-oriented 2-wire serial interface, serial port.

 It has 6-channel 10-bit A/D, programmable watchdog timer with internal oscillator.

 It has five software selectable power saving modes.

 The device operates between 1.8-5.5 volts. By executing powerful instructions in a single clock

cycle, the device achieves throughputs approaching 1 MIPS per MHz, balancing power

consumption and processing speed.

 Memory: It has 8 Kb of Flash program memory (10,000 Write/Erase cycles durability), 512
Bytes of EEPROM (100,000 Write/Erase Cycles). 1Kbyte Internal SRAM

 I/O Ports: 23 I/ line can be obtained from three ports; namely Port B, Port C and Port D.
 Interrupts: Two External Interrupt source, located at port D. 19 different interrupt vectors
supporting 19 events generated by internal peripherals.

 Timer/Counter: Three Internal Timers are available, two 8 bit, one 16 bit, offering various
operating modes and supporting internal or external clocking.

 SPI (Serial Peripheral interface): ATmega8 holds three communication devices integrated.
One of them is Serial Peripheral Interface. Four pins are assigned to Atmega8 to implement this
scheme of communication.

 USART: One of the most powerful communication solutions is USART and ATmega8 supports
both synchronous and asynchronous data transfer schemes. It has three pins assigned for that. In
many projects, this module is extensively used for PC-Micro controller communication.

 TWI (Two Wire Interface): Another communication device that is present in ATmega8 is Two
Wire Interface. It allows designers to set up a commutation between two devices using just two
wires along with a common ground connection, As the TWI output is made by means of open
collector outputs, thus external pull up resistors are required to make the circuit.

 Analog Comparator: A comparator module is integrated in the IC that provides comparison


facility between two voltages connected to the two inputs of the Analog comparator via External
pins attached to the micro controller.

Analog to Digital Converter: Inbuilt analog to digital converter can convert an analog input
signal into digital data of 10bit resolution. For most of the low end application, this much
resolution is enough.
5.3 L293D IC
L293D is a typical Motor driver or Motor Driver IC which allows DC motor to drive on either
direction. L293D is a 16-pin IC which can control a set of two DC motors simultaneous.The
L293D can drive small and quiet big motors.

Fig 5.4.1: L293D motor driver module

Working of L293D Motor Driver IC


It works on the concept of H-bridge. H-bridge is a circuit which allows the voltage to be flown in
either direction. As you know voltage need to change its direction for being able to rotate the
motor in clockwise or anticlockwise direction. In a single L293D chip there are two h-Bridge
circuit inside the IC which can rotate two dc motor independently. Due its size it is very much
used in robotic application for controlling DC motors.
The circuit diagram of L293D motor driver IC is shown in Fig 5.4.2
Fig 5.4.2: Circuit diagram of L293D motor driver IC

Logic diagram of motor driver IC


There are 4 input pins for L293d. Pin 2, 7 on the left and pin 15 ,10 on the right as shown on the
pin diagram. Left input pins will regulate the rotation of motor connected across left side and
right input for motor on the right hand side. The motors are rotated on the basis of the inputs
provided across the input pins as LOGIC 0 or LOGIC 1. The logical diagram of L293D motor IC
driver is shown in table:5.4

Table 5.4: Logic diagram of L293D motor driver IC

INPUT 1 INPUT 2 OUPUT 1 OUTPUT 2 MOTOR

Logic 0 Logic 0 0 0 STOP

Logic 1 Logic 0 12V 0 CLOCKWISE

Logic 0 Logic 1 0 12V ANTICLOCKWISE

Logic 1 Logic 1 12V 12V BRAKE

Features of L293D
 Can be used to run Two DC motors with the same IC.
 Speed and Direction control is possible
 Motor voltage Vcc2 (Vs): 4.5V to 36V
 Maximum Peak motor current: 1.2A
 Maximum Continuous Motor Current: 600mA
 Supply Voltage to Vcc1(vss): 4.5V to 7V
 Transition time: 300ns (at 5Vand 24V)
 Automatic Thermal shutdown is available
 Available in 16-pin DIP, TSSOP, SOIC packages

5.5ULTRASONIC OBSTACLE SENSOR


HC-SRO4 is an ultrasonic range finder sensor which is used to sense the obstacle occurring in
front of the robotic machine. It is non-contact based distance measurement system. The pin
diagram of ultrasonic sensor is shown in fig 5.5.1 and top view of the sensor is shown in fig 5.2.2

Fig 5.5.1: Pin diagram of sensor

Working of HC-SR04 Ultrasonic Sensor


The module has two eyes like projects in the front which forms the Ultrasonic transmitter and
Receiver. The sensor works with the simple formula: distance=speed * time The
Ultrasonic transmitter transmits an ultrasonic wave, this wave travels in air and when it gets
objected by any material it gets reflected back toward the sensor this reflected wave is observed
by the Ultrasonic receiver module as shown in the picture below

Fig 5.5.2working of ultrasonic sensor


Now, to calculate the distance using the above formulae, we should know the Speed and time.
Since we are using the Ultrasonic wave we know the universal speed of US wave at room
conditions which is 330m/s. The circuitry inbuilt on the module will calculate the time taken for
the US wave to come back and turns on the echo pin high for that same particular amount of
time, this way we can also know the time taken. Now simply calculate the distance using a
microcontroller or microprocessor.
The pin configuration of HC-SR04 ultrasonic sensor is shown in table 5.5

Table 5.5: pin configuration of HC-SRO4 ultrasonic sensor


Pin
Number Pin Name Description

1. VCC The VCC pin powers the sensors typically with


-5V

2. Trigger Trigger pin is an input pin. This pin has to be kept


high for 10us to initialize measurement by
sending US wave.

3. Echo Echo pin is an Output pin. This pin goes high for
a period of time which will be equal to the time
taken for the US wave to return back to the
sensor.

4. Ground This pin is connected to the Ground of the


system.

HC-SR04 Sensor Features


 Operating voltage: +5V
 Theoretical Measuring Distance: 2cm to 450cm
 Practical Measuring Distance: 2cm to 80cm
 Accuracy: 3mm
 Measuring angle covered: <15°
 Operating Current: <15mA
 Operating Frequency: 40Hz

5.6 RELAYS
Relays are electromechanical switches. They have very high current rating and both AC and DC
motors can be controlled through them because motor will be completely isolated from the
remaining circuit. An electromechanical relay contains an electromagnetic coil that moves a
metal arm to make and break an electrical connection. They provide electrical isolation between
the control signal and the load and are relatively low cost. No common ground connection
between the control signal and load is needed. A standard digital logic GPIO output pin does not
supply enough current to drive a relay coil directly. When using logic signals to control a relay, a
driver circuit must be used to boost the current needed to energize the relay’s electromagnetic
coil. The load is switched on and off using the relay’s metal contacts that move when the coil is
energized. Since the metal contacts actually touch, relays will have less of a voltage drop across
the switch point than transistor circuits.

Fig 5.6: Relay motor driver

Specification of relay motor drivers


 Supply input 12V DC at 75 mA
 Power LED
 Relay Output: up to 7 A
 Onboard tactile switch for direction control
 Relay based drive design with diode protection
 LED indicator for direction indication
 Power-On LED indicator
 Terminal pins and screw terminal connector for easy input / output
connection
 Four mounting holes of 3.2 mm each
 PCB dimensions 41 mm x 81 mm

5.7DC MOTORS
The dc motors are plays an important role in this robotic machines.12V DC Geared Motor is
high quality low cost DC geared motor. It has steel gears and pinions to ensure longer life and
better wear and tear properties. The gears are fixed on hardened steel spindles polished to a
mirror finish. The output shaft rotates in a plastic bushing. The whole assembly is covered with a
plastic ring. Gearbox is sealed and lubricated with lithium grease and require no maintenance.
The motor is screwed to the gear box from inside. Although motor gives 1000 RPM at 12V but
motor runs smoothly from 4V to 12V and gives wide range of RPM, and torque.
The different speed of dc motors are used for the various operation in agricultural field are
1000rpm, 60rpm and 3.5rpm.

Fig 5.7.1: 1000 RPM dc motor

Specifications
 DC supply: 4 to 12V
 RPM: 1000 at 12V
 No Load Current: 50mA at 12V
 Load Current = 300mA (max) at 12V
 Torque: 5kg-cm at 12V
Fig 5.7.2: 60 RPM dc motor

Specification
 Voltage: 6 - 12 Volts
 Gear Ratio: 70:1
 Stall Torque: 194.4 oz-in. at 12V
 Speed: 60 RPM at 12V
 No Load Current: 120 mA at 12V
 Stall Current: 1A at 12V
 Insulation Resistance: 20 Mega Ohm
 Dielectric Strength: 250VDC
 High Torque Construction
Fig 7.5.3: 3.5 RPM dc motor

SPECIFICATIONS:
 DC supply: 4 to 12V
 RPM: 3.5 at 12V
 No Load Current: 50mA (max) at 12V
 Load Current = 300mA(max) at 12V
 Torque: 5kg-cm at 12V
 Total length: 46mm
 Motor diameter: 36mm
 Motor length: 25mm
 Brush type: Precious metal
5.8GPRS (GENERAL PACKET RADIO SERVICE)
GPRS is a wireless communication data that provides the exchanging of data and continuous
connection to the internet for mobile and computer customers. GSM-GPRS board has been
interfaced with Rs-232 DB9 connector with other components has also been interfaced to it, a
laptop with USB port i.e. USB to 232(TIL). The output should be in the RS232 voltage range
around 12V which is the output of our dc motor. GPRS board required 0.2 amps supply, terminal
program can be used

Fig5.8.1: GPRS wireless communication module

Specifications
 Nominal voltage:-12V
 Nominal current: - 0.2 amps

5.9 LIQUID CRYSTAL DISPLAY (LCD) 16*2


LCD screen is an electronic display module and find a wide range of applications. A 16*2 LCD
display is very basic module and is very commonly used in various devices and circuits. These
modules are preferred over seven segments and other multi segment LED’s. The reasons being :
 LCD’s are economical.
 Easily programmable.
 Have no limitations of displaying special and even custom characters, animations and
soon.
A 16*2 LCD means it can display 16 character per line and there are 2 such lines, In this LCD
each character is displayed in 5*7 pixel matrix. This LCD has two registers, namely command
and data.
The command register stores the command instructions given to the LCD. A command is an
instruction given to LCD to do predefined task like initializing it,

Fig5.9: GPRS wireless communication module

You might also like