You are on page 1of 32

WALL FOLLOWER USING ARDUINO

CHAPTER 1
INTRODUCTION
Autonomous robots are electromechanical devices that are programmed to achieve
several goals. They are involved in a few tasks such as moving and lifting objects,
gathering information related to temperature and humidity, and follow walls. From a
systems engineering point of view, a well designed autonomous robot has to be adaptable
enough to control its actions. In addition, it needs to perform desired tasks precisely and
accurately.
The overall objective of this project is to follow a wall on its left and maintain a constant
distance with it. (Left sides and right sides are considered from robots point of view
unless it is specified.) In general, the robotic chassis are designed carefully, so that they
are balanced. After loading this chassis with the battery packs and other electronics, the
chassis become unbalanced. In addition, the plane on which the robot is moving could
also be uneven. These result in a veering of the robot. This may cause the robot either to
run into a wall, or go farther away form the wall. Therefore, a decent control technique is
required to tackle this problem.

1.1 Embedded System


An embedded system is a computer system with a dedicated function within a
larger mechanical or electrical system, often with real-time computing constraints. It
is embedded as part of a complete device often including hardware and mechanical parts.
Embedded systems control many devices in common use today. 98 percent of
all microprocessors are manufactured as components of embedded systems.
Examples of properties of typically embedded computers when compared with
general-purpose counterparts are low power consumption, small size, rugged operating
ranges, and low per-unit cost. This comes at the price of limited processing resources,
which make them significantly more difficult to program and to interact with. However,
by building intelligence mechanisms on top of the hardware, taking advantage of possible
existing sensors and the existence of a network of embedded units, one can both
optimally manage available resources at the unit and network levels as well as provide
1

WALL FOLLOWER USING ARDUINO


augmented functions, well beyond those available. For example, intelligent techniques
can be designed to manage power consumption of embedded systems.
Modern embedded systems are often based on microcontrollers (i.e. CPUs with
integrated memory or peripheral interfaces), but ordinary microprocessors (using external
chips for memory and peripheral interface circuits) are also common, especially in morecomplex systems. In either case, the processor(s) used may be types ranging from general
purpose to those specialized in certain class of computations, or even custom designed for
the application at hand. A common standard class of dedicated processors is the digital
signal processor (DSP).
Embedded systems range from portable devices such as digital watches and MP3
players, to large stationary installations like traffic lights, factory controllers, and largely
complex systems like hybrid vehicles, MRI, and avionics. Complexity varies from low,
with a single microcontroller chip, to very high with multiple units, peripherals and
networks mounted inside a large chassis or enclosure.

1.2 Characteristics of an Embedded System


The important characteristics of an embedded system are

Speed (bytes/sec) : Should be high speed


Power (watts) : Low power dissipation
Size and weight : As far as possible small in size and low weight
Accuracy (% error) : Must be very accurate
Adaptability : High adaptability and accessibility.
Reliability : Must be reliable over a long period of time.

So, an embedded system must perform the operations at a high speed so that it can be
readily used for real time applications and its power consumption must be very low and
the size of the system should be as for as possible small and the readings must be accurate
with minimum error. The system must be easily adaptable for different situations.

1.3 Categories of Embedded Systems


2

WALL FOLLOWER USING ARDUINO


Embedded systems can be classified into the following 4 categories based on their
functional and performance requirements.

Stand-Alone Embedded Systems

Real-Time Embedded Systems -- Hard Real-Time Systems & Soft Real-Time


Systems

Networked Embedded Systems And

Mobile Embedded Systems.

Based on the performance of the Microcontroller they are also classified into
(i) Small scaled embedded system
(ii) Medium scaled embedded system and
(iii) Large scaled embedded system.
Stand Alone Embedded Systems : A stand-alone embedded system works by itself. It
is a self-contained device which do not require any host system like a computer.. It takes
either digital or analog inputs from its input ports, calibrates, converts, and processes the
data, and outputs the resulting data to its attached output device, which either displays
data, or controls and drives the attached devices. Temperature measurement systems,
Video game consoles, MP3 players, digital cameras, and microwave ovens

are the

examples for this category.


Real-Time Embedded Systems : An embedded system which gives the required output
in a specified time or which strictly follows the time deadlines for completion of a task is
known as a Real time system. i.e., a Real Time system, in addition to

functional

correctness, also satisfies the time constraints .


There are two types of Real time systems.
(i) Soft real time system
(ii) Hard real time system.
Soft Real-Time System : A Real time system in which ,the violation of time constraints
will cause only the degraded quality, but the system can continue to operate is known as
a Soft real time system. In soft real-time systems, the design focus is to offer a guaranteed
bandwidth to each real-time task and to distribute the resources to the tasks.
Ex: A Microwave Oven, washing machine, TV remote etc.

WALL FOLLOWER USING ARDUINO


Hard Real-Time System : A Real time system in which ,the violation of time constraints
will cause critical failure and loss of life or property damage or catastrophe is known as a
Hard Real time system.
These systems usually interact directly with physical hardware instead of through a
human being. The hardware and software of hard real-time systems must allow a worst
case execution (WCET) analysis that guarantees the execution be completed within a
strict deadline. The chip selection and RTOS selection become important factors for hard
real-time system design.
Ex: Deadline in a missile control embedded system , Delayed alarm during a Gas
leakage , car airbag control system, A delayed

response in pacemakers, Failure in

RADAR functioning etc.


Networked Embedded Systems : The networked embedded systems are related to a
network with network interfaces to access the resources. The connected network can be
a Local Area Network (LAN) or a Wide Area Network (WAN), or the Internet. The
connection can be either wired or wireless.
The networked embedded system is the fastest growing area in embedded systems
applications. The embedded web server is such a system where all embedded devices are
connected to a web server and can be accessed and controlled by any web browser.
Ex: A home security system is an example of a LAN networked embedded system where
all sensors (e.g. motion detectors, light sensors, or smoke sensors) are wired and running
on the TCP/IP protocol.
Mobile Embedded Systems : The portable embedded devices like mobile and cellular
phones , digital camaras,MP3 players, PDA (Personal Digital Assistants) are the example
for mobile embedded systems. The basic limitation of these devices is the limitation of
memory and other resources.
Small Scaled Embedded System : An embedded system supported by a single 816 bit
Microcontroller with on-chip RAM and ROM designed to perform simple tasks is a Small
scale embedded system.
Medium Scaled Embedded System : An embedded system supported by 1632 bit
Microcontroller/Microprocessor with external RAM and ROM that can perform more
complex operations is a Medium scale embedded system.
Large Scaled

Embedded System: An embedded system supported by 32-64 bit

multiple chips which can perform distributed jobs is considered as a Large scale
embedded system.
4

WALL FOLLOWER USING ARDUINO


1.4 Application Areas of Embedded Systems
The embedded systems have a huge variety of application domains which varies
from very low cost to very high cost and from daily life consumer electronics to industry
automation equipments, from entertainment devices to academic equipments, and from
medical instruments to aerospace and weapon control systems. So, the Embedded systems
span all aspects of our modern life.
S. No
1
2
3
4
5
6
7
8
9
10
11
12
13
14

Embedded System
Home Appliances

Application
Dishwasher, Washing Machine, Microwave, Set-Top
Box, Security System, HVAC System, DVD,
Answering Machine, Garden Sprinkler Systems Etc..
Office Automation
Fax, Copy Machine, Smart Phone System, Modem,
Scanner, Printers.
Security
Face Recognition, Finger Recognition, Eye
Recognition, Building Security System , Airport
Security System, Alarm System.
Academia
Smart Board, Smart Room, OCR, Calculator, Smart
Cord.
Instrumentation
Signal Generator, Signal Processor, Power Supplier,
Process Instrumentation
Telecommunication
Router, Hub, Cellular Phone, IP Phone, Web Camera
Automobile
Fuel Injection Controller, Anti-Locking Brake System,
Air-Bag System, GPS, Cruise Control.
Entertainment
MP3, Video Game, Mind Storm, Smart Toy.
Aerospace
Navigation System, Automatic Landing System, Flight
Attitude Controller, Space Explorer, Space Robotics.
Industrial automation
Assembly Line, Data Collection System, Monitoring
Systems on Pressure, Voltage, Current, Temperature,
Hazard Detecting System, Industrial Robot.
Personal
PDA, iPhone, Palmtop, Data Organizer.
Medical
CT Scanner, ECG , EEG , EMG ,MRI, Glucose
Monitor, Blood Pressure Monitor, Medical Diagnostic
Device.
Banking & Finance
ATM, Smart Vendor Machine, Cash Register ,Share
Market
Miscellaneous
Elevators, Tread Mill, Smart Card, Security Door etc.
Table 1.4 Applications of Embedded Systems

Recent trends in Embedded systems


With the fast developments in semiconductor industry and VLSI technology, one
can find tremendous changes in the embedded system design in terms of processor speed,
power, communication interfaces including network capabilities and software
developments like operating systems and programming languages etc.

WALL FOLLOWER USING ARDUINO


Processor Speed and Power : With the advancements in processor technology ,the
embedded systems are now days designed with 16,32 bit processors which can work in
real time environment. These processors are able to perform high speed signal processing
activities which resulted in the development of high definition communication devices
like 3G mobiles etc. Also the recent developments in VLSI technology has paved the way
for low power battery operated devices which are very handy and have high longevity.
Also

, the present day embedded systems are provided with higher memory

capabilities ,so that most of them are based on tiny operating systems like android etc.
Communication Interfaces : Most of the present day embedded systems are aimed at
internet based applications. So, the communication interfaces like Ethernet, USB,
wireless LAN etc. have become very common resources in almost all the embedded
systems. The developments in memory technologies also helped in porting the TCP/IP
protocol stack

and the HTTP server software on to the embedded systems. Such

embedded systems can provide a link between any two devices anywhere in the globe.
Operating Systems: With recent software developments ,there is a considerable growth
in the availability of operating systems for embedded systems. Mainly new operating
systems are developed which can be used in real time applications. There are both
commercial RTOS like VX Works , QNX,WIN-CE

and open source

RTOS

like

RTLINUX etc. The Android OS in mobiles has revolutionized the embedded industry.
Programming Languages: There is also a remarkable development in the programming
languages. Languages like C++, Java etc. are now widely used in embedded application
programming. For example by having the Java virtual machine in a mobile phones ,one
can download Java applets from a server and can be executed on your mobile.
In addition to these developments, now a days we also find new devices like ASICs and
FPGAs in the embedded system market. These new hardware devices are popular as
programmable devices and reconfigurable devices.

WALL FOLLOWER USING ARDUINO

CHAPTER 2
BLOCK DIAGRAM DESCRIPTION

WALL FOLLOWER USING ARDUINO

Figure 1:Block Diagram


The Block diagram of Wall follower using Arduino is as shown above. The block diagram
shows overview of the system. The blocks that are connected here are Arduino
(ATMEGA328 Microcontroller), Motor Driver(L293D),Robot chasis with DC Motors
and IR sensors.

2.1 Block Diagram Description:


The project is proposed to design an embedded system which is used for
following the wall and avoiding the obstacles using IR sensors In this project Arduino
(Atemga328 microcontroller) embedded system development board is used for
interfacing various hardware modules that are IR sensors and motor driver module as
shown in Fig 2.1
The ATmega328 is a single chip micro-controller created by Atmel and belongs to the
megaAVR series. The microcontroller receives the data from IR sensor process it and the
robot moves according to the code. For doing so ATMEGA328 microcontroller is serially
interfaced to IR module. IR module is used to detect the wall or any other obstacle and
make the robot to move. ATMEGA328 microcontroller is interfaced to motor driver
module. This motor driver is interfaced to motor which is connected to wheel. When any
wall or obstacle is detected by IR sensor then it avoids the obstacle and moves along the
wall.
8

WALL FOLLOWER USING ARDUINO

CHAPTER 3
ARDUINO
3.1 Introduction to Arduino Microcontroller
9

WALL FOLLOWER USING ARDUINO


Arduino is an open-source prototyping platform based on easy-to-use hardware
and software. Arduino boards are able to read inputs - light on a sensor, a finger on a
button, or a Twitter message - and turn it into an output - activating a motor, turning on an
LED, publishing something online. You can tell your board what to do by sending a set of
instructions to the microcontroller on the board. To do so you use the Arduino
programming language (based on Wiring), and the Arduino Software (IDE), based
on Processing.
Over the years Arduino has been the brain of thousands of projects, from everyday
objects to complex scientific instruments. A worldwide community of makers - students,
hobbyists, artists, programmers, and professionals - has gathered around this open-source
platform, their contributions have added up to an incredible amount of accessible
knowledge that can be of great help to novices and experts alike.
Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast
prototyping, aimed at students without a background in electronics and programming. As
soon as it reached a wider community, the Arduino board started changing to adapt to new
needs and challenges, differentiating its offer from simple 8-bit boards to products
for IoT applications, wearable, 3D printing, and embedded environments. All Arduino
boards are completely open-source, empowering users to build them independently and
eventually adapt them to their particular needs. The software, too, is open-source, and it is
growing through the contributions of users worldwide.

10

WALL FOLLOWER USING ARDUINO


3.2 Why Arduino?
Thanks to its simple and accessible user experience, Arduino has been used in
thousands of different projects and applications. The Arduino software is easy-to-use for
beginners, yet flexible enough for advanced users. It runs on Mac, Windows, and Linux.
Teachers and students use it to build low cost scientific instruments, to prove chemistry
and physics principles, or to get started with programming and robotics.
Designers and architects build interactive prototypes, musicians and artists use it
for installations and to experiment with new musical instruments. Makers, of course, use
it to build many of the projects exhibited at the Maker Faire, for example. Arduino is a
key tool to learn new things. Anyone - children, hobbyists, artists, programmers - can start
tinkering just following the step by step instructions of a kit, or sharing ideas online with
other members of the Arduino community.
There are many other microcontrollers and microcontroller platforms available for
physical computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's
Handyboard, and many others offer similar functionality. All of these tools take the messy
details of microcontroller programming and wrap it up in an easy-to-use package.
Arduino also simplifies the process of working with microcontrollers, but it offers some
advantage for teachers, students, and interested amateurs over other systems:

Inexpensive - Arduino boards are relatively inexpensive compared to other


microcontroller platforms. The least expensive version of the Arduino module can be
assembled by hand, and even the pre-assembled Arduino modules cost less than $50

Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX,


and Linux operating systems. Most microcontroller systems are limited to Windows.

Simple, clear programming environment - The Arduino Software (IDE) is easy-touse for beginners, yet flexible enough for advanced users to take advantage of as well.
For teachers, it's conveniently based on the Processing programming environment, so
students learning to program in that environment will be familiar with how the Arduino
IDE works.
11

WALL FOLLOWER USING ARDUINO

Open source and extensible software - The Arduino software is published as open
source tools, available for extension by experienced programmers. The language can be
expanded through C++ libraries, and people wanting to understand the technical details
can make the leap from Arduino to the AVR C programming language on which it's
based. Similarly, you can add AVR-C code directly into your Arduino programs if you
want to.

3.3 Technical Specification

1.8-5.5V operating range


Up to 20MHz
Part: ATMEGA328P-AU
32kB Flash program memory
1kB EEPROM
2kB Internal SRAM
2 8-bit Timer/Counters
16-bit Timer/Counter
RTC with separate oscillator
6 PWM Channels
8 Channel 10-bit ADC
Serial USART
Master/Slave SPI interface
2-wire (I2C) interface
Watchdog timer
Analog comparator
23 IO lines
Data retention: 20 years at 85C/ 100 years at 25C
Digital I/O Pins are 14 (out of which 6 provide PWM output)
Analog Input Pins are 6.
DC Current per I/O is 40 mA

3.4 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, an *.inf file is
12

WALL FOLLOWER USING ARDUINO


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-toserial 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
support I2C (TWI) and SPI communication. The Arduino software includes a Wire library
to simplify use of the I2C bus; see the documentation for details. To use the SPI
communication, please see the ATmega328 datasheet.
3.5 USB Over current Protection
The Arduino Uno has a resettable polypus that protects your computer's USB
ports from shorts and over current. 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.

3.6 Programming
The Arduino Uno can be programmed with the Arduino software (download).
Select "Arduino Uno w/ ATmega328" 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 boot loader 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.
13

WALL FOLLOWER USING ARDUINO

14

WALL FOLLOWER USING ARDUINO

15

WALL FOLLOWER USING ARDUINO


CHAPTER 4
L293D Motor Driver
The L293D motor driver is available for providing User with ease and user
friendlyinterfacing for embedded application. L293D motor driver is mounted on a good
quality, single sided non-PTH PCB. The pins of L293D motor driver IC are connected to
connectors for easy access to the driver ICs pin functions. The L293D is a Dual Full
Bridge driver that can drive up to 1Amp per bridge with supply voltage up to 24V. It can
drive two DC motors, relays, solenoids, etc. The device is TTL compatible. Two H
bridges of L293D can be connected in parallel to increase its current capacity to 2 Amp.

Features

Easily compatible with any of the system

Easy interfacing through FRC (Flat Ribbon Cable)

External Power supply pin for Motors supported

Onboard PWM (Pulse Width Modulation) selection switch

2pin Terminal Block (Phoenix Connectors) for easy Motors Connection

Onboard H-Bridge base Motor Driver IC (L293D)

Technical Specification:

Power Supply : Over FRC connector 5V DC

External Power 9V to 24V DC

Dimensional Size : 44mm x 37mm x 14mm (l x b x h)


16

WALL FOLLOWER USING ARDUINO

Temperature Range : 0C to +70 C

4.1 Hardware Description of L293D Motor Driver

4.2 L293D IC
The driver IC L293D is quad push-pull drivers capable of delivering output
currents to 1A per channel respectively. Each channel is controlled by a TTL-compatible
logic input and each pair of drivers (a full bridge) is equipped with an inhibit input
available at pin 1 and pin 9. The motor will run only when chip inhibit is at high logic i.e.
chip inhibit is enabled. The connection diagram is shown below:

17

WALL FOLLOWER USING ARDUINO


Motor Driver Input
The input to the motor driver IC is controlled by the controller through its motor
driver input connector. Pin Headers with plastic guide box around them are known as
Box Headers or Shrouded Headers and are normally only used in combination with a
Flat Ribbon Cable (FRC) connector. A notch (key) in the guide box normally prevents
placing the connector the wrong way around. Box Header (denoted as J1 on board)can be
connected using FRCs and also Single Berg Wires for individual pin connections. It has
following configuration:

18

WALL FOLLOWER USING ARDUINO


CHAPTER 5
WHEELS, MOTORS AND BATTERY
5.1 Wheels
Wheelchair has four wheels, two rear wheels and two castor wheels, the two
caster wheel are fixated in wheelchair base in front all wheels have the same diameter
.The drive wheels are in rear on either side of the base, allowing the chair to turn
according to voice command, wheels engages directly to a gear train that transmit torque
form motor to wheels by two grooves in each wheel and nut.

19

WALL FOLLOWER USING ARDUINO

5.2 Motors
Motors are arguably one of the most important parts of a mobile robotics platform.
Overpowered motors cause inefficiency and waste the already limited supply of power
from the on-board batteries, while undersized motors could be short on torque at critical
times. The optimal rotation speed and the available speed range of the motor must also be
taken into consideration. Too high of an output rpm from the motor shaft will cause the
robot to operate at a fast, uncontrollable speed. Too low of an output and the robot will
not be able to attain a suitable speed to meet the users needs. The torque output of the
motor also plays a role in the performance because if the torque is not sufficient,
locomotion may not occur in certain situations. Therefore, much consideration was put
into the selection of the proper motor for the platform.
Motors come in many shapes and sizes. There are electromagnetic direct current
(DC) motors and electromagnetic alternating current (AC) motors and a number of
variations of each. AC motors are typically used for large applications, such as machine
tools, washers, dryers, etc., and are powered by an AC power line. Since the typical
power supply for mobile robotic is a DC battery, and technology for transforming DC to
AC is very expensive in both terms of monetary cost and power cost, AC motors where
ruled out as an option for the robot.DC motors are commonly used for small jobs and
suited the purposes of the platform very well. Figure shows the 12V DC motor use in
wheelchair.

20

WALL FOLLOWER USING ARDUINO

5.3 Battery
This batterys are used to run the dc motors of 150 rpm which we use for the
moment and they are connected to the arduino board as well as l293d ic circuit which we
use in the project.

21

WALL FOLLOWER USING ARDUINO

CHAPTER 6
IR SENSORS
Infrared is a energy radiation with a frequency below our eyes sensitivity, so we cannot
see it. Even that we can not "see" sound frequencies, we know that it exist, we can listen
them.

Even that we can not see or hear infrared, we can feel it at our skin temperature sensors.
When you approach your hand to fire or warm element, you will "feel" the heat, but you
can't see it. You can see the fire because it emits other types of radiation, visible to your
eyes, but it also emits lots of infrared that you can only feel in your skin.
6.1 INFRARED IN ELECTRONICS
Infra-Red is interesting, because it is easily generated and doesn't suffer electromagnetic
interference, so it is nicely used to communication and control, but it is not perfect, some

22

WALL FOLLOWER USING ARDUINO


other light emissions could contains infrared as well, and that can interfere in this
communication. The sun is an example, since it emits a wide spectrum or radiation.
The adventure of using lots of infra-red in TV/VCR remote controls and other
applications, brought infra-red diodes (emitter and receivers) at very low cost at the
market.
From now on you should think as infrared as just a "red" light. This light can means
something to the receiver, the "on or off" radiation can transmit different meanings.Lots
of things can generate infrared, anything that radiate heat do it, including out body, lamps,
stove, oven, friction your hands together, even the hot water at the faucet.
To allow a good communication using infra-red, and avoid those "fake" signals, it is
imperative to use a "key" that can tell the receiver what is the real data transmitted and
what is fake. As an analogy, looking eye naked to the night sky you can see hundreds of
stars, but you can spot easily a far away airplane just by its flashing strobe light. That
strobe light is the "key", the "coding" element that alerts us.
Similar to the airplane at the night sky, our TV room may have hundreds of tinny IR
sources, our body and the lamps around, even the hot cup of tea. A way to avoid all those
other sources, is generating a key, like the flashing airplane. So, remote controls use to
pulsate its infrared in a certain frequency. The IR receiver module at the TV, VCR or
stereo "tunes" to this certain frequency and ignores all other IR received. The best
frequency for the job is between 30 and 60 KHz, the most used is around 36 KHz
6.2 IR GENERATION
To generate a 36 KHz pulsating infrared is quite easy, more difficult is to receive and
identify this frequency. This is why some companies produce infrared receives, that
contains the filters, decoding circuits and the output shaper, that delivers a square wave,
meaning the existence or not of the 36kHz incoming pulsating infrared.
It means that those 3 dollars small units, have an output pin that goes high (+5V)
when there is a pulsating 36kHz infrared in front of it, and zero volts when there is not
this radiation.

23

WALL FOLLOWER USING ARDUINO

A square wave of approximately 27uS (microseconds) injected at the base of a transistor,


can drive an infrared LED to transmit this pulsating light wave. Upon its presence, the
commercial receiver will switch its output to high level (+5V).If you can turn on and off
this frequency at the transmitter, your receiver's output will indicate when the transmitter
is on or off.

Those IR demodulators have inverted logic at its output, when a burst of IR is sensed it
drives its output to low level, meaning logic level = 1.
The TV, VCR, and Audio equipment manufacturers for long use infra-red at their remote
controls. To avoid a Philips remote control to change channels in a Panasonic TV, they
use different codification at the infrared, even that all of them use basically the same
transmitted frequency, from 36 to 50 KHz. So, all of them use a different combination of
bits or how to code the transmitted data to avoid interference.
RC-5

24

WALL FOLLOWER USING ARDUINO


Various remote control systems are used in electronic equipment today. The RC5
control protocol is one of the most popular and is widely used to control numerous home
appliances, entertainment systems and some industrial applications including utility
consumption remote meter reading, contact-less apparatus control, telemetry data
transmission, and car security systems. Philips originally invented this protocol and
virtually all Philips remotes use this protocol. Following is a description of the RC5.
When the user pushes a button on the hand-held remote, the device is activated and sends
modulated infrared light to transmit the command. The remote separates command data
into packets. Each data packet consists of a 14-bit data word, which is repeated if the user
continues to push the remote button. The data packet structure is as follows:

2 start bits,

1 control bit,

5 address bits,

6 command bits.

The start bits are always logic 1 and intended to calibrate the optical receiver automatic
gain control loop. Next, is the control bit. This bit is inverted each time the user releases
the remote button and is intended to differentiate situations when the user continues to
hold the same button or presses it again. The next 5 bits are the address bits and select the
destination device. A number of devices can use RC5 at the same time. To exclude
possible interference, each must use a different address. The 6 command bits describe the
actual command. As a result, a RC5 transmitter can send the 2048 unique commands. The
transmitter shifts the data word, applies Manchester encoding and passes the created onebit sequence to a control carrier frequency signal amplitude modulator. The amplitude
modulated carrier signal is sent to the optical transmitter, which radiates the infrared light.
In RC5 systems the carrier frequency has been set to 36 kHz. Figure below displays the
RC5 protocol.
The receiver performs the reverse function. The photo detector converts optical
transmission into electric signals, filters it and executes amplitude demodulation. The
receiver output bit stream can be used to decode the RC5 data word. This operation is
25

WALL FOLLOWER USING ARDUINO


done by the microprocessor typically, but complete hardware implementations are present
on the market as well. Single-die optical receivers are being mass produced by a number
of companies such as Siemens, Temic, Sharp, Xiamen Hualian, Japanese Electric and
others. Please note that the receiver output is inverted.

6.3 IR Transmitter
Infrared Transmitter is a light emitting diode (LED) which emits infrared radiations.
Hence, they are called IR LEDs. Even though an IR LED looks like a normal LED, the
radiation emitted by it is invisible to the human eye.

Fig 10 IR transmitter
There are different types of infrared transmitters depending on their wavelengths, output
power and response time. A simple infrared transmitter can be constructed using an
infrared LED, a current limiting resistor and a power supply. The schematic of a typical
IR transmitter is shown below.

Fig 11: schematic of IR transmitter


When operated at a supply of 5V, the IR transmitter consumes about 3 to 5 mA of
current. Infrared transmitters can be modulated to produce a particular frequency of
infrared light. The most commonly used modulation is OOK (ON OFF KEYING)
modulation.

26

WALL FOLLOWER USING ARDUINO


IR transmitters can be found in several applications. Some applications require
infrared heat and the best infrared source is infrared transmitter. When infrared emitters
are used with Quartz, solar cells can be made.
6.4 IR Receiver
Infrared receivers are also called as infrared sensors as they detect the radiation
from an IR transmitter. IR receivers come in the form of photodiodes and
phototransistors. Infrared Photodiodes are different from normal photo diodes as they
detect only infrared radiation. The picture of a typical IR receiver or a photodiode is
shown below.

Fig 12: IR receiver

Different types of IR receivers exist based on the wavelength, voltage, package, etc.
When used in an infrared transmitter receiver combination, the wavelength of the
receiver should match with that of the transmitter.
A typical infrared receiver circuit using a phototransistor is shown below.

27

WALL FOLLOWER USING ARDUINO

Fig 13 schematic of IR receiver

It consists of an IR phototransistor, a diode, a MOSFET, a potentiometer and an LED.


When the phototransistor receives any infrared radiation, current flows through it and
MOSFET turns on. This in turn lights up the LED which acts as a load. The potentiometer
is used to control the sensitivity of the phototransistor.

28

WALL FOLLOWER USING ARDUINO

Fig 14: IR sensor

CHAPTER 7
WORKING
Here our mini project we have designed a wall follower which detects the walls and
moves along the wall. The components which we use in our project are ir sensors,
29

WALL FOLLOWER USING ARDUINO


Arduino, Wheels and motors .The working procedure is as follows, The ir sensors are
present at three sides of the robot .This ir sensors will play a major role in the moment of
the robot. Here if the sensor which is present on the front is activated it moves towards
the right side this is the first case where the the collision may be prevents. In the second
case the ir sensor which is present at the right and front is activated then the moment is
changed here the bot will start moving towards right side .In the third case the sensors
which are present at the front and the left are activated then the moment of the bot will be
changed towards right side in order to avoid the collision. This prototype is mainly used
for movement of the robot.

CONCLUSIONS
Wall-Follower achieved its target on demo day. When approaching the wall, it is working
fine. After it gets closer to a wall and starts to follow it, due to the slow response of ir
sensor, the speed of the robot is a little bit slow. However, it works pretty good to detect
the wall and then follow it. A comprehensive introduction to the hardware and software
30

WALL FOLLOWER USING ARDUINO


design of a car robot, the Wall - Follower is shown in this report. The robot works pretty
well and shows a great potential for future uses.

REFERENCES
[1] Out Of The Box robotics, http://ootbrobotics.pixelgeko.com/store/products/epiphanydiy/
[2] ATMEGA 328 microcontroller
http://www.atmel.com/Images/doc8067.pdf
31

WALL FOLLOWER USING ARDUINO


[3] Arduino Module
www.arduino.cc
[4] http://www.androiderode.com/wall-follower-robot-using-atmega8/
[5] http://www.instructables.com/id/Wall-Following-Robot
[6]http://library.utem.edu.my/index2.php?
option=com_docman&task=doc_view&gid=4888&Itemid=113

32

You might also like