CHAPTER be connected by plugging a 2.1mm center-positive



We Will Write a Custom Essay Specifically
For You For Only $13.90/page!

order now


Arduino Uno is a microcontroller predicated on the ATmega328. It has 14 digital
input/output pins in which 6 can be utilized as PWM, 6 analog inputs, a 16 MHz
ceramic resonator, a USB port, a puissance jack, an ICSP header, and a reset
button. It contains everything needed to fortify 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 commenced.11

Uno differs from all preceding boards in that it does not utilize the FTDI
USB-to-serial driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to
version R2) programmed as a USB-to-serial converter.

“Uno” designates one in
Italian and is designated to mark the upcoming relinquishment of Arduino
1.0.13 The Uno and version 1.0 will be the reference versions of Arduino,
moving forward. The Uno is the latest in a series of USB Arduino boards, and
the reference model for the Arduino platform.

Fig 4.0 schematic diagram of Arduino

4.0.1 Pin configuration:

The Arduino reference design can utilize
an Atmega8, 168, or 328, Current models use anATmega328, but an Atmega8 is
shown in the diagram for reference. The pin configuration is identicalon all
three processors.12



The Arduino Uno can be powered via the
USB connection or with an external power supply. The puissance source is culled
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 center-positive plug into the board’s potency 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 utilizing 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


The input voltage to the arduino board
when it is utilizing 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 puissance jack, access it through
this pin.


This pin outputs a regulated 5V from the
regulator on the board. The board can be supplied with power either from the DC
power jack (7 – 12V), the USB connector (5V), or the VIN pin of the board
(7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and
can damage your board. We don’t advise it.



3.3 volt supply engendered by the on-board regulator. Maximum current draw is
50 mA.


Ground pins.



The ATmega328 has 32 KB (with 0.5 KB
used for the boot loader). It also has 2 KB of SRAM and 1 KB of EEPROM (which
can be read and write with the EEPROM library).


Input Output:

Each of the 14 digital pins on the Uno
can be utilized as an input or output, utilizing pinMode(),digitalWrite(), and digitalRead()
functions. They operate at 5 volts. Each pin can provide or receive amaximum of
40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 k
Ohms. In addition, some pins have specialized functions:13

•           Serial:
0 (RX) and 1 (TX).

Used to receive (RX) and transmit (TX)
TTL serial data. These pin sare 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 elevating or falling edge, or a vicissitude in
value. Optically discern the attach Interrupt() 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 sing the
SPI library.


•           LED:

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
quantify from ground to 5 volts, though is it possible to change the upper
terminus of their range utilizing the AREF pin and the analog Reference ()
function. Some pins have specialized functionality 14

There are a couple of other pins on the

•           AREF.
Reference voltage for the analog inputs.

Utilized with analog Reference ().

•           Reset.

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

Optically discern supple mentally the
mapping between Arduino pins and ATmega328 ports. The mapping for the
Atmega8,168, and 328 is identical.



The IR Sensor-Single is a general
purport proximity sensor. Here we utilize it for collision detection. The
module consists of an IR emitter and IR receiver pair. The high precision IR
receiver always detects an IR signal.

The module consists of 358 Comparator
IC. The output of sensor is high whenever it IR frequency and low otherwise.
The on-board LED bespeaker avails utilizer to check status of the sensor
without utilizing any supplemental hardware. The potency consumption of this
module is low. It gives a digital output.15

Fig 4.1 IR module



PIN Configuration:

The figure to the right is a top view of
the IR Sensor module. The following table gives its pin description.

Pin No





Digital output high or low



Connected to circuit supply



Connected to circuit ground

Table 4.0 Pin configuration



Application Area:

Obstacle detection

Shaft encoder

Fixed frequency detection

Count RPM

Overview of Schematic:

Fig 4.2 schematic overview


The sensitivity of the IR Sensor is
tuned utilizing the potentiometer. The potentiometer is tune able in both the
directions. Initially tune the potentiometer in clockwise direction such that
the Designator LED commences glowing. Once that is achieved, turn the
potentiometer just enough in anti-clockwise direction to turn off the Bespeaker
LED. At this point the sensitivity of the receiver is maximum. Thus, it sensing
distance is maximum at that point. If the sensing distance (i.e., Sensitivity)
of the receiver is needed to be reduced, then one can tune the potentiometer in
the anti-clockwise direction from this point. Further, if the orientation of
both Tx and Rx LED’s is parallel to each other, such that both are facing
outwards, then their sensitivity is maximum. If they are moved away from each
other, such that they are inclined to each other at their soldered end, then
their sensitivity reduces.

 Tuned sensitivity of the sensors is inhibited
to the circumventions. Once tuned for a particular circumventing, they will
work impeccably until the IR illumination conditions of that region proximately
constant. For example, if the potentiometer is tuned inside room/building for
maximum sensitivity and then taken out in open sunlight, it will require
retuning, since sun’s rays withal contain Infrared (IR) frequencies, thus
acting as a IR source (transmitter). This will perturb the receiver’s sensing
capacity. Hence it requires to be returned to work impeccably in the incipient

The output of IR receiver goes low when
it receives IR signal. Hence the output pin is customarily low because, though
the IR LED is perpetually transmitting, due to no obstruction, nothing is
reflected back to the IR receiver. The designation LED is off. When an
impediment is encountered, the output of IR receiver goes low, IR signal is
reflected from the obstruction surface. This drives the output of the
comparator low. This output is connected to the cathode of theLED, which then
turns ON.

Tuned sensitivity of the sensors is
constrained to the circumventions. Once tuned for a particular circumventing,
they will work impeccably until the IR illumination conditions of that region
proximately constant. For example, if the potentiometer is tuned inside
room/building for maximum sensitivity and then taken out in open sunlight, it
will require retuning, since sun’s rays withal contain Infrared (IR)
frequencies, thus acting as a IR source (transmitter). This will perturb the
receiver’s sensing capacity. Hence it requires to be returned to work
impeccably in the incipient circumventions.16

Fig4.3 Example of IR sensor as
pulse oximeter


A tachometer (revolution-counter, tach,
rev-counter, RPM gauge) is an instrument quantifying the rotation speed of a
shaft or disk, as in a motor or other machine. The contrivance conventionally
exhibits the revolutions per minute (RPM) on a calibrated analogue dial, but
digital exhibits are increasingly mundane. The word emanates from Greek (tachos
“celerity”) and metron (“measure”). Essentially the words
tachometer and speedometer have identical meaning: a contrivance that measures
celerity. It is by arbitrary convention that in the automotive world one is
utilized for engine and the other for conveyance haste. In formal engineering nomenclature,
more precise terms are habituated to distinguish the two.17


The first mechanical tachometers were
predicated on quantifying the centrifugal force, akin to the operation of a
centrifugal governor. The inventor is postulated to be the German engineer
Dietrich Uh lhorn; he utilized it for quantifying the celerity of machines in
1817. Since 1840, it has been used to quantify the celerity of locomotives.

Tachometers or revolution counters on
cars, aircraft, and other conveyances show the rate of rotation of the engine’s
crankshaft, and typically have markings betokening a safe range of rotation
speeds. This can avail the driver in culling congruous throttle and gear
settings for the driving conditions. Perpetuated use at high speeds may cause
inadequate lubrication, overheating (exceeding capability of the cooling
system), exceeding speed capability of sub-components of the engine (for
example spring retracted valves) thus causing exorbitant wear or sempiternal
damage or failure of engines. This is more applicable to manual transmissions
than to automatics. On analogue tachometers, speeds above maximum safe
operating speed are typically designated by an area of the gauge marked in red,
giving elevate to the expression of “redlining” an engine — revving
the engine up to the maximum safe limit. The red zone is superfluous on most
modernspecify cars, since their engines typically have a revolution limiter
which electronically limits engine speed to obviate damage. Diesel engines with
traditional mechanical injector systems have an integral governor which
obviates over-speeding the engine, so the tachometers in conveyances and
machinery fitted with such engines sometimes lack a redline.


In conveyances such as tractors and
trucks, the tachometer often has other markings, conventionally a green arc
exhibiting the haste range in which the engine engenders maximum torque, which
is of prime interest to operators of such conveyances. Tractors fitted with a
potency take-off (PTO) system have tachometers exhibiting the engine speed
needed to rotate the PTO at the standardized speed required by most PTO-driven
implements. In many countries, tractors are required to have a speedometer for
use on a road. To preserve fitting a second dial, the conveyances tachometer is
often marked with a second scale in units of haste. This scale is only precise
in a certain gear, but since many tractors only have one gear that is practical
for use on-road, this is adequate. Tractors with multiple ‘road gears’ often
have tachometers with more than one speed scale. Aircraft tachometers have a
green arc exhibiting the engine’s designed cruising speed range.18


In older conveyances, the tachometer is
driven by the RMS voltage waves from the low tension (LT) side of the ignition
coil while on others (and proximately all diesel engines, which have no
ignition system) engine haste is tenacious by the frequency from the alternator
tachometer output. This emanates from a special connection called an “AC
tap” which is a connection to one of the stator’s coil output, afore the
rectifier. Tachometers driven by a rotating cable from a drive unit fitted to
the engine (customarily on the camshaft) subsist – customarily on simple
diesel-engine machinery with rudimentary or no electrical systems. On recent
EMS found on modern conveyances, the signal for the tachometer is
conventionally engendered from an ECU which derives the information from either
the crankshaft or camshaft speed sensor.

Fig 4.4 Tachometer













4.3 Potentiometer:

A potentiometer is a manually adjustable
variable resistor with 3 terminals. Two terminals are connected to both
cessations of a resistive element, and the third terminal connects to a sliding
contact, called a wiper, moving over the resistive element. The position of the
wiper determines the output voltage of the potentiometer. The potentiometer
essentially functions as a variable voltage divider. The resistive element can
be optically discerned as two resistors in series (potentiometer resistance),
where the wiper position determines the resistance ratio of the first resistor
to the second resistor.

A potentiometer is withal commonly
kenned as a potmeter or pot. The most mundane form of potmeter is the single
turn rotary potmeter. This type of pot is often utilized in audio volume
control (logarithmic taper) as well as many other applications. Different
materials are habituated to construct potentiometers, including carbon
composition, cermet, wire wound, and conductive plastic or metal film.19


“A potentiometer is a manually
adjustable, variable resistor with three terminals. Two terminals are connected
to a resistive element; the third terminal is connected to an adjustable wiper.
The position of the wiper determines the output voltage”

Fig 4.5 potentiometer




A wide variety of potmeters subsist.
Manually adjustable potmeters can be divided in rotary or linear kineticism
types. The tables below list the available types and their applications.
Besides manually adjustable pots, additionally electronically controlled
potentiometers subsist, often called digital potmeters.20




Single-turn pot

Single rotation of approximately 270
degrees or 3/4 of a full turn

For single channel control or
measurement of distance

Dual-slide pot

Dual slide potentiometer, single
slider controlling two potentiometers in parallel.

Often used for stereo control in professional
audio or other applications where dual parallel channels are controlled.

Multi-turn slide

Constructed from a spindle which
actuates a linear potentiometer wiper. Multiple rotations (mostly 5, 10 or
20), for increased precision.

Used where high precision and
resolution is required. The multi turn linear pots are used as trimpots on
PCB, but not as common as the worm-gear trimmer potentiometer.

Motorized fade

Fader which can be automatically
adjusted by a servo motor

Used where manual and automatic
adjustment is required. Common in studio audio mixers, where the servo faders
can be automatically moved to a saved configuration

Table 4.1 types of potentiometers


Digital potentiometer:

Digital potentiometers are
potentiometers which are controlled electronically. In most cases they subsist
of an array of diminutive resistive components in series. Every resistive
element is equipped with a switch which can accommodate as the tap-off point or
virtual wiper position. A digital pot meter can be controlled by for example
up/down signals or protocols like I²C and SPI



A potentiometer can also be wired as a
rheostat, or single variable resistance. The best way to wire a potentiometer
as a rheostat is to connect the wiper and one end terminal together, this
prevents infinite resistance if the wiper occasionally loses contact. More
information can be found on the dedicated page about rheostats




The potentiometer taper is the
relationship between the mechanical position and resistance ratio. Linear taper
and logarithmic (audio) taper are the most mundane forms of taper. For more
information visit the dedicated page about potentiometer taper.

Marking codes

Potentiometers values are often marked
with a readable string denoting the total resistance, such as “100k” for a 100
k Ohm potentiometer. Sometimes a 3 digit coding system homogeneous to smd
resistor coding is utilized. In this system the first digits denote the value
and the last digit betokens the multiplier. 
For example a 1 k Ohm would be coded as 102, designating 10? x 102 = 1

The taper of a potentiometer is
customarily designated with a letter. The following table lists the used coding
for potentiometer taper, different standards utilizes the same letters which
can be perplexing. It is always a good conception to double check the taper by

The resolution of a potentiometer is the
the smallest possible change in resistance ratio. Wirewound resistors often
have a lower resolution because the wire turns introduce discrete steps in
resistance. Conductive plastic potmeters have the best resolution. The
resolution can be influenced by the wiper configuration, a wiper consisting of
several spread contact points increases the potentiometer resolution.

Hop-on and Hop-off resistance

At the start and end of travel, the
resistive track of a potentiometer is connected to low resistance metal parts
which connect the resistive element to the end terminals. The change in
resistance when the wiper enters or exits the resistive track is known as the
hop-on and hop-off resistance.


Heart Rate Sensor

Pulse Sensor is a well-designed
plug-and-play heart-rate sensor for Arduino. It can be utilized by students,
artists, athletes, makers, and game & mobile developers who want to
facilely incorporate live heart rate data into their projects. The sensor clips
onto a fingertip or earlobe and plugs right into Arduino with some jumper
cables. It withal includes an open-source monitoring app that graphs your pulse
in authentic time.


Fig 4.6 heart rate sensor


The Pulse Sensor Kit includes:

1) A 24-inch Color-Coded Cable, with
(male) header connectors. You’ll find this makes it facile to embed the sensor
into your project, and connect to an Arduino. No soldering is required.

2) Velcro Dots. These are ‘hook’ side
and are withal impeccably sized to the sensor. You’ll find these velcro dots
very utilizable if you optate to make a velcro (or fabric) strap to wrap around
a finger tips.

3) Velcro strap to wrap the Pulse Sensor
around your finger.

4) 3 Transparent Stickers. These are
utilized on the front of the Pulse Sensor to bulwark it from oily fingers and
sweaty earlobes.

5) The Pulse Sensor has 3 apertures
around the outside edge which make it facile to sew it into virtually anything.


The front of the sensor is the pretty
side with the Heart logo. This is the side that makes contact with the skin. On
the front you optically discern a diminutive round aperture, which is where the
LED shines through from the back, and there is withal a little square just
under the LED. The square is an ambient light sensor, consummately homogeneous
to the one utilized in cellphones, tablets, and laptops, to adjust the screen
effulgence in different light conditions. The LED shines light into the
fingertip or earlobe, or other capillary tissue, and sensor reads the light
that bounces back. The back of the sensor is where the rest of the components
are mounted. We put them there so they would not obstruct the sensor on the
front. Even the LED we are utilizing is a inversion mount LED. For more about
the circuit functionality, check out the Hardware page.

Fig 4.7 visualizer

The immensely colossal main window shows
a graph of raw sensor data over time. The Pulse Sensor Data Window can be
scaled utilizing the scrollbar at the bottom if you have a prodigiously and
sizably voluminous or minutely diminutive signal. At the right of the screen, a
more diminutive data window graphs heart rate over time. This graph advances
every pulse, and the Beats Per Minute is updated every pulse as a running
average of the last ten pulses. The astronomically immense red heart in the
upper right additionally pulses to the time of your heartbeat. When you hold
the Pulse Sensor to your fingertip or earlobe or (fill in body part here) you
should visually perceive a nice heartbeat waveform like the one above. If you
don’t, and you’re sure you’re not a zombie, endeavor the sensor on different
components of your body that have capillary tissue. We’ve had good results on
the side of the nasal discerner, middle of the forehead, palm, and lower lip.
We’re all different, pristine organisms. Play around and find the best spot on
you and your friends. As you are testing and getting utilized to the sensor.
You may find that some fingers or components of fingers are better than others.
For example, I find that when I position the sensor so that the edge of the PCB
is at the bottom edge of my earlobe I get an awe-inspiring signal. Withal,
people with arctic hands or poor circulation may have a more arduous time
reading the pulse. Run your hands under warm dihydrogen monoxide, or do some