0% found this document useful (0 votes)
58 views67 pages

Minor Last

This document describes a smart mobile-based robot that can be controlled via an Android app. The robot uses an Arduino microcontroller and Bluetooth module to communicate wirelessly with the Android device. The robot's movement and direction can be controlled in real-time from the mobile app. The system allows for potential applications in fields like military robotics and automotive automation.

Uploaded by

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

Minor Last

This document describes a smart mobile-based robot that can be controlled via an Android app. The robot uses an Arduino microcontroller and Bluetooth module to communicate wirelessly with the Android device. The robot's movement and direction can be controlled in real-time from the mobile app. The system allows for potential applications in fields like military robotics and automotive automation.

Uploaded by

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

SMART MOBILE BASED ROBOT MOVEMENT AND

DIRECTION BY ANDROID APP

1
Technical Specifications:
Title of the project : SMART MOBILE BASED ROBOT MOVEMENT AND DIRECTION
CONTROL BY ANDROID APP

Domain : Robotics, Wireless Communication


Software : Embedded C, Arduino IDE
Microcontroller : ARDUINO

Power Supply : +12V, 500mA Regulated Power Supply

Crystal : 16MHz

Communication Device : Bluetooth Module

Applications : Military, auto motives

2
BLOCK DIAGRAM:

4
INTRODUCTION

2.1 Embedded Systems:


An embedded system is a combination of software and hardware to perform a
dedicated task. Some of the main devices used in embedded products are Microprocessors
and Microcontrollers. Microprocessors are commonly referred to as general purpose
processors as they simply accept the inputs, process it and give the output. In contrast, a
microcontroller not only accepts the data as inputs but also manipulates it, interfaces the
data with various devices, controls the data and thus finally gives the result.

An embedded system can be defined as a computing device that does a specific


focused job. Appliances such as the air-conditioner, VCD player, DVD player, printer, fax
machine, mobile phone etc. are examples of embedded systems. Each of these appliances
will have a processor and special hardware to meet the specific requirement of the
application along with the embedded software that is executed by the processor for meeting
that specific requirement. The embedded software is also called “firm ware”. The
desktop/laptop computer is a general purpose computer. You can use it for a variety of
applications such as playing games, word processing, accounting, software development
and so on. In contrast, the software in the embedded systems is always fixed listed below:

Embedded systems do a very specific task they cannot be programmed to do


different things. Embedded systems have very limited resources, particularly the memory.
Generally, they do not have secondary storage devices such as the CDROM or the floppy
disk. Embedded systems have to work against some deadlines. A specific job has to be
completed within a specific time. In some embedded systems, called real-time systems, the
deadlines are stringent. Missing a deadline may cause a catastrophe-loss of life or damage
to property. Embedded systems are constrained for power. As many embedded systems
operate through a battery, the power consumption has to be very low. Some embedded
systems have to operate in extreme environmental conditions such as very high
temperatures and humidity.

5
2.1.1 Categories of Embedded System.

2.1.1.1 Application specific systems.


Embedded systems are not general-purpose computers. Embedded system designs
are Optimized for a specific application. Many of the job characteristics are known before
the hardware is designed. This allows the designer to focus on the specific design
constraints of a well defined application. As such, there is limited user reprogram ability.
Some embedded systems, however, require the flexibility of reprogrammability.
Programmable DSPs are common for such applications.

2.1.1.2 Distributed Systems


A common characteristic of an embedded system is one that consists of
communicating processes executing on several CPUs or ASICs which are connected by
communication links. The reason for this is economy. Economical 4 8-bit microcontrollers
may be cheaper than a 32-bit processors. Even after adding the cost of the communication
links, this approach may be preferable. In this approach, multiple processors are usually
required to handle multiple time-critical tasks. Devices under control of embedded systems
may also be physically distributed.

2.1.1.3. Reactive Embedded systems.


A typical embedded systems model responds to the environment via Sensors and
control the environment using actuators. This requires embedded systems to run at the
speed of the environment. This characteristic of embedded system is called “reactive”.
Reactive computation means that the system (primarily the software component) executes
in response to external events.

External events can be either periodic or aperiodic. Periodic events make it easier
to schedule processing to guarantee performance. Aperiodic events are harder to schedule.

6
The maximum event arrival rate must be estimated in order to accommodate worst case
situations. Most embedded systems have a significant reactive component.
2.1.1.4. Heterogeneous
Embedded systems often are composed of heterogeneous architectures (Figure 4).
They may contain different processors in the same system solution. They may also be
mixed signal systems. The combination of I/O interfaces, local and remote memories, and
sensors and actuators makes embedded system design truly unique. Embedded systems
also have tight design constraints, and heterogeneity provides better design flexibility.

2.1.2. Requirements
Embedded systems are unique in several ways, as described above. When designing
Embedded systems, there are several categories of requirements that should be Considered:
• Functional Requirements
• Temporal Requirements (Timeliness)
• Dependability Requirements.

Functional Requirements
Functional requirements describe the type of processing the system will perform. This
Processing varies, based on the application. Functional requirements include the
Following;
• Data Collection requirements
• Sensor requirements
• Signal conditioning requirements
• Alarm monitoring requirements
• Direct Digital Control requirements
• Actuator control requirements
• Man-Machine Interaction requirements
(Informing the operator of the current state of a controlled object for example. These
interfaces can be as simple as a flashing LED or a very complex GUI-based system. They
include the ways that embedded systems assist the operator in controlling the object/system.

7
2.1.2.2. Temporal Requirement
Embedded systems have many tasks to perform, each having its own deadline.
Temporal requirements define the stringency in which these time-based tasks must
complete.
Examples include;
Minimal latency jitter
Minimal Error-detection latency
Temporal requirements can be very tight (for example control-loops) or less stringent
(for example response time in a user interface).

2.1.2.3. Dependability Requirements


Most embedded systems also have a set of dependability requirements. Examples
of dependability requirements include;
Reliability: this is a complex concept that shoulda always be considered at the System
rather than the individual component level. There are three dimensions to Consider when
specifying system reliability;

Hardware reliability: Probability of a hardware component failing


Software reliability: Probability that a software component will produce an Incorrect
result
Operator reliability: How likely that the operator of a system will make an Error.

2.1.3.Processor selection.

8
2.1.3.1. General factors that govern the selection are:
• Complexity of overall design
• Design reuse.
• Performance
• Power size
• Cost tools.
• OS Support and availability.
The design's complexity helps determine the CPU to use. If the design calls for the
deployment of a single state machine with interrupts from a small set of peripherals, then
a small CPU and/or micro controller such as the MCS51 or the Z80 could be the best choice.
Many systems such as industrial timer may fit this category, as the memory footprint is
small, the signal is slow and battery consumption must be extremely low. The application
and its interaction will dictate the design's complexity and may also determine whether it
requires a real-time operating system (RTOS).

Typically, as the application complexity increases, the need for a greater bit-width
processor increases. The selection of the CPU will greatly impact performance of the
overall system. Specifically, features like 8 / 16 / 24 / 32 bit architecture, RISC / CISC /
DSP architecture, cache, MMU, pipelining, branch prediction and super-scalar architecture,
all affect the speed of a system.Depending on system needs, these features may be
necessary to achieve peak performance of the system.

There are various benchmarking threshold data available for various 8/16/32 bit
processors like MIPS (Million Instructions per Second), EEMBC, Dhrystone, MIPS/MHz
etc, which can be taken as reference or comparison base.
CISC Vs RISC.

CISC is an acronym for Complex Instruction Set Computer and are chips that are
easy to program and which make efficient use of memory. Since the earliest machines were
programmed in assembly language and memory was slow and expensive, the CISC
philosophy made sense, and was commonly implemented in such large computers as the

9
PDP-11 and the DECsystem 10 and 20 machines. Most common microprocessor designs
such as the Intel 80x86 and Motorola 68K series followed the CISC philosophy. But recent
changes in software and hardware technology have forced a re-examination of CISC and
many modern CISC processors are hybrids, implementing many RISC principles.

The design constraints that led to the development of CISC (small amounts of slow
memory and fact that most early machines were programmed in assembly language) give
CISC instructions sets some common characteristics:
• A 2-operand format, where instructions have a source and a destination. Register to
register, register to memory, and memory to register commands. Multiple addressing
modes for memory, including specialized modes for indexing through arrays
• Variable length instructions where the length often varies according to the
addressing mode
• Instructions which require multiple clock cycles to execute.
• Most CISC hardware architectures have several characteristics in common:
• Complex instruction-decoding logic, driven by the need for a single instruction to
support multiple addressing modes.
• A small number of general purpose registers. This is the direct result of having
instructions which can operate directly on memory and the limited amount of chip
space not dedicated to instruction decoding, execution, and microcode storage.
• Several special purpose registers. Many CTSC designs set aside special registers
for the stack pointer, interrupt handling, and so on. This can simplify the hardware
design somewhat, at the expense of making the instruction set more complex.
• A 'Condition code" register which is set as a side-effect of most instructions. This
register reflects whether the result of the last operation is less than, equal to, or greater
than zero and records if certain error conditions occur.

At the time of their initial development, CISC machines used available technologies
to optimize computer performance.
• Microprogramming is as easy as assembly language to implement, and much less
expensive than hardwiring a control unit.

10
• The ease of microcoding new instructions allowed designers to make CISC
machines upwardly compatible: a new computer could run the same programs as earlier
computers because the new computer would contain a superset of the instructions of
the earlier computers.
• As each instruction became more capable, fewer instructions could be used to
implement a given task. This made more efficient use of the relatively slow main
memory.
• Because microprogram instruction sets can be written to match the constructs of
high-level languages, the compiler does not have to be as complicated.

Designers soon realized that the CISC philosophy had its own problems, including:
• Earlier generations of a processor family generally were contained as a subset in
every new version - so instruction set & chip hardware become more complex with
each generation of computers.
• So that as many instructions as possible could be stored in memory with the least
possible wasted space, individual instructions could be of almost any length - this
means that different instructions will take different amounts of clock time to execute,
slowing down the overall performance of the machine.
• Many specialized instructions aren't used frequently enough to justify their
existence -approximately 20% of the available instructions are used in a typical
program.
• CISC instructions typically set the condition codes as a side effect of the instruction.
Not only does setting the condition codes take time, but programmers have to
remember to examine the condition code bits before a subsequent instruction changes
them.

As memory speed increased, and high-level languages displaced assembly


language, the major reasons for CISC began to disappear, and computer designers began
to look at ways computer performance could be optimized beyond just making faster
hardware.
One of their key realizations was that a sequence of simple instructions produces the same

11
results as a sequence of complex instructions, but can be implemented with a simpler (and
faster) hardware design. (Assuming that memory can keep up.) RISC (Reduced Instruction
Set Computers) processors were the result. CISC and RISC implementations are becoming
more and more alike. Many of today’s RISC chips support as many instructions as
yesterday's CISC chips. And today's CISC chips use many techniques formerly associated
with RISC chips.

2.2 SCOPE OF EMBEDDED SYSTEMS


Nearly 99 per cent of the processors manufactured end up in embedded systems.
The embedded system market is one of the highest growth areas as these systems are used
in very market segment- consumer electronics, office automation, industrial automation,
biomedical engineering, wireless communication, data communication,
telecommunications, transportation, military and so on.

2.2.1 Consumer appliances:


At home we use a number of embedded systems which include digital camera,
digital diary, DVD player, electronic toys, microwave oven, remote controls for TV and
air-conditioner, VCO player, video game consoles, video recorders etc. Today’s high-tech
car has about 20 embedded systems for transmission control, engine spark control, air-
conditioning, navigation etc. Even wrist watches are now becoming embedded systems.
The palmtops are powerful embedded systems using which we can carry out many general-
purpose tasks such as playing games and word processing.

2.2.2 Office automation:


The office automation products using embedded systems are copying machine, fax
machine, key telephone, modem, printer, scanner etc.

2.2.3 Industrial automation:


Today a lot of industries use embedded systems for process control. These include
pharmaceutical, cement, sugar, oil exploration, nuclear energy, electricity generation and

12
transmission. The embedded systems for industrial use are designed to carry out specific
tasks such as monitoring the temperature, pressure, humidity, voltage, current etc., and then
take appropriate action based on the monitored levels to control other devices or to send
information to a centralized monitoring station. In hazardous industrial environment, where
human presence has to be avoided, robots are used, which are programmed to do specific
jobs. The robots are now becoming very powerful and carry out many interesting and
complicated tasks such as hardware assembly.

2.2.4 Medical electronics:


Almost every medical equipment in the hospital is an embedded system. These
equipments include diagnostic aids such as ECG, EEG, blood pressure measuring devices,
X-ray scanners; equipment used in blood analysis, radiation, endoscopy etc. Developments
in medical electronics have paved way for more accurate diagnosis of diseases.

2.2.5 Computer networking:


Computer networking products such as bridges, routers, Integrated Services Digital
Networks (ISDN), Asynchronous Transfer Mode (ATM), X.25 and frame relay switches
are embedded systems which implement the necessary data communication protocols. For
example, a router interconnects two networks. The two networks may be running different
protocol stacks. The router’s function is to obtain the data packets from incoming pores,
analyze the packets and send them towards the destination after doing necessary protocol
conversion. Most networking equipments, other than the end systems (desktop computers)
we use to access the networks, are embedded systems.

2.2.6 Telecommunications:
In the field of telecommunications, the embedded systems can be categorized as
subscriber terminals and network equipment. The subscriber terminals such as key
telephones, ISDN phones, terminal adapters, web cameras are embedded systems. The
network equipment includes multiplexers, multiple access systems, Packet Assemblers

13
Dissemblers (PADs), sate11ite modems etc. IP phone, IP gateway, IP gatekeeper etc. are
the latest embedded systems that provide very low-cost voice communication over the
Internet.

2.2.7 Wireless technologies:


Avances in mobile communications are paving way for many interesting
applications using embedded systems. The mobile phone is one of the marvels of the last
decade of the 20’h century. It is a very powerful embedded system that provides voice
communication while we are on the move. The Personal Digital Assistants and the
palmtops can now be used to access multimedia services over the Internet. Mobile
communication infrastructure such as base station controllers, mobile switching centers are
also powerful embedded systems.

2.2.8 Insemination:
Testing and measurement are the fundamental requirements in all scientific and
engineering activities. The measuring equipment we use in laboratories to measure
parameters such as weight, temperature, pressure, humidity, voltage, current etc. are all
embedded systems. Test equipment such as oscilloscope, spectrum analyzer, logic analyzer,
protocol analyzer, radio communication test set etc. are embedded systems built around
powerful processors. Thank to miniaturization, the test and measuring equipment are now
becoming portable facilitating easy testing and measurement in the field by field-personnel.

2.2.9 Security:
Security of persons and information has always been a major issue. We need to
protect our homes and offices; and also the information we transmit and store. Developing
embedded systems for security applications is one of the most lucrative businesses
nowadays. Security devices at homes, offices, airports etc. for authentication and

14
verification are embedded systems. Encryption devices are nearly 99 per cent of the
processors that are manufactured end up in~ embedded systems.

Embedded Systems find applications in every industrial segment consumer


electronics, transportation, avionics, biomedical engineering, manufacturing, process
control and industrial automation, data communication, telecommunication, defense,
security etc used to encrypt the data/voice being transmitted on communication links such
as telephone lines. Biometric systems using fingerprint and face recognition are now being
extensively used for user authentication in banking applications as well as for access
control in high security buildings.

2.2.10 Finance:
Financial dealing through cash and cheques are now slowly paving way for
transactions using smart cards and ATM (Automatic Teller Machine, also expanded as Any
Time Money) machines. Smart card, of the size of a credit card, has a small micro-
controller and memory; and it interacts with the smart card reader! ATM machine and acts
as an electronic wallet. Smart card technology has the capability of ushering in a cashless
society. Well, the list goes on. It is no exaggeration to say that eyes wherever you go, you
can see, or at least feel, the work of an embedded system.

Overview of Embedded System Architecture


Every embedded system consists of custom-built hardware built around a Central
Processing Unit (CPU). This hardware also contains memory chips onto which the software
is loaded. The software residing on the memory chip is also called the ‘firmware’.

15
Fig 2.1 The building blocks diagram
The operating system runs above the hardware, and the application software runs
above the operating system as shown in figure. The same architecture is applicable to any
computer including a desktop computer. However, there are significant differences. It is
not compulsory to have an operating system in every embedded system. For small
appliances such as remote control units, air conditioners, toys etc., there is no need for an
operating system and you can write only the software specific to that application.

For applications involving complex processing, it is advisable to have an operating


system. In such a case, you need to integrate the application software with the operating
system and then transfer the entire software on to the memory chip. Once the software is
transferred to the memory chip, the software will continue to run for a long time you don’t
need to reload new software.

Now, let us see the details of the various building blocks of the hardware of an embedded
system.
As shown in Fig. the building blocks are;
· Central Processing Unit (CPU)
· Memory (Read-only Memory and Random Access Memory)
· Input Devices
· Output devices

16
· Communication interfaces
.Application-specific circuitry

Fig 2.2 Working of cpu in arm7

Central Processing Unit (CPU):


The Central Processing Unit (processor, in short) can be any of the following:
microcontroller, microprocessor or Digital Signal Processor (DSP). A micro-controller is
a low-cost processor. Its main attraction is that on the chip itself, there will be many other
components such as memory, serial communication interface, analog-to digital converter
etc. So, for small applications, a micro-controller is the best choice as the number of
external components required will be very less. On the other hand, microprocessors are
more powerful, but you need to use many external components with them. D5P is used
mainly for applications in which signal processing is involved such as audio and video
processing.

17
Memory:
The memory is categorized as Random Access 11emory (RAM) and Read Only
Memory (ROM). The contents of the RAM will be erased if power is switched off to the
chip, whereas ROM retains the contents even if the power is switched off. So, the firmware
is stored in the ROM. When power is switched on, the processor reads the ROM; the
program is program is executed.

Input devices:
Unlike the desktops, the input devices to an embedded system have very limited
capability. There will be no keyboard or a mouse, and hence interacting with the embedded
system is no easy task. Many embedded systems will have a small keypad-you press one
key to give a specific command. A keypad may be used to input only the digits. Many
embedded systems used in process control do not have any input device for user interaction;
they take inputs from sensors or transducers 1’fnd produce electrical signals that are in turn
fed to other systems.

Output devices:
The output devices of the embedded systems also have very limited capability.
Some embedded systems will have a few Light Emitting Diodes (LEDs) to indicate the
health status of the system modules, or for visual indication of alarms. A small Liquid
Crystal Display (LCD) may also be used to display some important parameters.
Interfaces:
The embedded systems may need to, interact with other embedded systems at they
may have to transmit data to a desktop. To facilitate this, the embedded systems are
provided with one or a few communication interfaces such as RS232, RS422, RS485,
Universal Serial Bus (USB), IEEE 1394, Ethernet etc.

18
Application-specific circuitry:
Sensors, transducers, special processing and control circuitry may be required fat
an embedded system, depending on its application. This circuitry interacts with the
processor to carry out the necessary work. The entire hardware has to be given power
supply either through the 230 volts main supply or through a battery. The hardware has to
design in such a way that the power consumption is minimized.

Wireless Communication:
Wireless communication, as the term implies, allows information to be
exchanged between two devices without the use of wire or cable. A wireless keyboard
sends information to the computer without the use of a keyboard cable; a cellular telephone
sends information to another telephone without the use of a telephone cable. Changing
television channels, opening and closing a garage door, and transferring a file from one
computer to another can all be accomplished using wireless technology. In all such cases,
information is being transmitted and received using electromagnetic energy, also referred
to as electromagnetic radiation. One of the most familiar sources of electromagnetic
radiation is the sun; other common sources include TV and radio signals, light bulbs and
microwaves. To provide background information in understanding wireless technology,
the electromagnetic spectrum is first presented and some basic terminology defined.

19
ARDUINO
Overview:

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 ceramic resonator, 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 Atmega16U2 (Atmega8U2 up to version R2)
programmed as a USB-to-serial converter.
The Uno board has a resistor pulling the 8U2 HWB line to ground, making it easier to put
into DFU mode.

The board has the following new features:

1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two other new
pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the
voltage provided from the board. In future, shields will be compatible with both the
board that uses the AVR, which operates with 5V and with the Arduino Due that
operates with 3.3V. The second one is a not connected pin, that is reserved for future
purposes.

• Stronger RESET circuit.


• Atmega 16U2 replace the 8U2.

"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0.
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

20
Arduino platform; for a comparison with previous versions, see the index of Arduino
boards.

Summary
Microcontroller ATmega328
Operating Voltage 5V
InputVoltage
7-12V
(recommended)
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
32 KB (ATmega328) of which 0.5 KB used by
Flash Memory
bootloader
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
Clock Speed 16 MHz
Length 68.6 mm
Width 53.4 mm
Weight 25 g

21
Schematic & Reference Design

Note: The Arduino reference design can use an Atmega8, 168, or 328, Current models use
an ATmega328, but an Atmega8 is shown in the schematic for reference. The pin
configuration is identical on all three processors.

22
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 center-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.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.
• 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.
• GND. Ground pins.
• IOREF. This pin on the Arduino board provides the voltage reference with which the
microcontroller operates. A properly configured shield can read the IOREF pin voltage and
select the appropriate power source or enable voltage translators on the outputs for working
with the 5V or 3.3V.

23
Memory

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

Input and Output

Each of the 14 digital pins on the Uno can be used as an input or output,
using pinMode(), digitalWrite(), anddigitalRead() 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:

• TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire
library.

24
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 ATmega16U2 on
the board channels this serial communication over USB and appears as a virtual com port
to software on the computer. The '16U2 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).

25
You can also bypass the bootloader and program the microcontroller through the ICSP (In-
Circuit Serial Programming) header using Arduino ISP or similar; see these
instructions for details.

The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available
. The ATmega16U2/8U2 is loaded with a DFU bootloader, which can be activated by:

• On Rev1 boards: connecting the solder jumper on the back of the board (near the map of
Italy) and then resetting the 8U2.
• On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to ground,
making it easier to put into DFU mode.

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 theATmega8U2/16U2 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

26
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 Over current 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.

SWITCHES AND PUSHBUTTONS

There is nothing simpler than this! This is the simplest way of controlling appearance of
some voltage on microcontroller’s input pin. There is also no need for additional
explanation of how these components operate.

27
Nevertheless, it is not so simple in practice... This is about something commonly
unnoticeable when using these components in everyday life. It is about contact bounce- a
common problem with m e c h a n i c a l switches. If contact switching does not happen so
quickly, several consecutive bounces can be noticed prior to maintain stable state. The
reasons for this are: vibrations, slight rough spots and dirt. Anyway, whole this process
does not last long (a few micro- or miliseconds), but long enough to be registered by the
microcontroller. Concerning pulse counter, error occurs in almost 100% of cases!

3.3 Embedded C language


Embedded C is a set of language extensions for the C Programming language by
the C Standards committee to address commonality issues that exist between C extensions
for different embedded systems. Historically, embedded C programming requires
nonstandard extensions to the C language in order to support exotic features such as fixed-
point arithmetic, multiple distinct memory banks, and basic I/O operations.

28
The C programming language is perhaps the most popular programming language
for programming embedded systems. We mentioned other popular programming
languages).
Most C programmers are spoiled because they program in environments where not only
there is a standard library implementation, but there are frequently a number of other
libraries available for use. The cold fact is, that in embedded systems, there rarely are many
of the libraries that programmers have grown used to, but occasionally an embedded
system might not have a complete standard library, if there is a standard library at all. Few
embedded systems have capability for dynamic linking, so if standard library functions are
to be available at all, they often need to be directly linked into the executable. Oftentimes,
because of space concerns, it is not possible to link in an entire library file, and
programmers are often forced to "brew their own" standard c library implementations if
they want to use them at all. While some libraries are bulky and not well suited for use on
microcontrollers, many development systems still include the standard libraries which are
the most common for C programmers.

C remains a very popular language for micro-controller developers due to the code
efficiency and reduced overhead and development time. C offers low-level control and is
considered more readable than assembly. Many free C compilers are available for a wide
variety of development platforms. The compilers are part of an IDEs with ICD support,
breakpoints, single-stepping and an assembly window. The performance of C compilers
has improved considerably in recent years, and they are claimed to be more or less as good
as assembly, depending on who you ask. Most tools now offer options for customizing the
compiler optimization. Additionally, using C increases portability, since C code can be
compiled for different types of processors.

29
Figure. 3.4 Embedded System Development Environment

Android

30
Android is an operating system based on the Linux kernel, and designed primarily for
touch screen mobile devices such as smart phones and tablet computers. Initially developed
by Android, Inc., which Google backed financially and later bought in 2005, Android was
unveiled in 2007 along with the founding of the Open Handset Alliance—a consortium of
hardware, software, and telecommunication companies devoted to advancing open
standards for mobile devices. The first publicly available smart phone running Android,
the HTC Dream, was released on October 22, 2008.

The user interface of Android is based on direct manipulation, using touch inputs that
loosely correspond to real-world actions, like swiping, tapping, pinching and reverse
pinching to manipulate on-screen objects. Internal hardware such as accelerometers,
gyroscopes and proximity sensors are used by some applications to respond to additional
user actions, for example adjusting the screen from portrait to landscape depending on how
the device is oriented. Android allows users to customize their home screens with shortcuts
to applications and widgets, which allow users to display live content, such as emails and
weather information, directly on the home screen. Applications can further send
notifications to the user to inform them of relevant information, such as new emails and
text messages.

Android's source code is released by Google under the Apache License; this permissive
licensing allows the software to be freely modified and distributed by device
manufacturers, wireless carriers and enthusiast developers. Most Android devices ship with
a combination of open source and proprietary software. As of July 2013, Android has the
largest number of applications ("apps"), available for download in Google Play store which
has had over 1 million apps published, and over 50 billion downloads. A developer survey
conducted in April–May 2013 found that Android is the most used platform among
developers: it is used by 71% of the mobile developers population.

Android is popular with technology companies which require a ready-made, low-cost and
customizable operating system for high-tech devices Despite being primarily designed for
phones and tablets, it also has been used in televisions, games consoles, digital cameras
and other electronics. Android's open nature has encouraged a large community of

31
developers and enthusiasts to use the open-source code as a foundation for community-
driven projects, which add new features for advanced users or bring Android to devices
which were officially released running other operating systems.

As of May 2012, Android became the most popular mobile OS, having the largest installed
base, and is a market leader in most countries including the United States; there it has had
the highest installed base of mobile phones for years In the third quarter of 2013, Android's
share of the global smartphone shipment market—led by Samsung products—was 81.3%,
the highest ever.[22][23][24] In most markets Android-powered phones are the most popular
comprising more than half of the overall smartphone sales, including the United States
market starting with the September–November 2013 period. The operating system's
success has made it a target for patent litigation as part of the so-called "smartphone wars"
between technology companies. As of September 2013, one billion Android devices have
been activated

HC-03/05 Embedded Bluetooth Serial


Communication Module AT command set
32
Description: HC-05 is a class-2 bluetooth module with Serial Port Profile, which can
configure as either Master or slave. a Drop-in replacement for wired serial connections,
transparent usage. You can use it simply for a serial port replacement to establish connection
between MCU, PC to your embedded project and etc.

HC-05 Specification:

• Bluetooth protocal: Bluetooth Specification v2.0+EDR

• Frequency: 2.4GHz ISM band

• Modulation: GFSK(Gaussian Frequency Shift Keying)

• Emission power: ≤4dBm, Class 2

• Sensitivity: ≤-84dBm at 0.1% BER

• Speed: Asynchronous: 2.1Mbps(Max) / 160 kbps, Synchronous: 1Mbps/1Mbps

• Security: Authentication and encryption

• Profiles: Bluetooth serial port

• Power supply: +3.3VDC 50mA

• Working temperature: -20 ~ +75Centigrade

• Dimension: 26.9mm x 13mm x 2.2 mm

HC-05 embedded Bluetooth serial communication module (can be short for


module) has two work modes: order-response work mode and automatic connection work
mode. And there are three work roles (Master, Slave and Loopback) at the automatic
connection work mode. When the module is at the automatic connection work mode, it
will follow the default way set lastly to transmit the data automatically. When the module

33
is at the order-response work mode, user can send the AT command to the module to set
the control parameters and sent control order. The work mode of module can be switched
by controlling the module PIN (PIO11) input level. Serial module PINs:

1. PIO8 connects with LED. When the module is power on, LED will flicker. And
the flicker style will indicate which work mode is in using since different mode has
different flicker time interval.

2. PIO9 connects with LED. It indicates whether the connection is built or not.
When the Bluetooth serial is paired, the LED will be turned on. It means the connection is
built successfully.

3. PIO11 is the work mode switch. When this PIN port is input high level, the work
mode will become order-response work mode. While this PIN port is input low level or
suspended in air, the work mode will become automatic connection work mode.

4. The module can be reset if it is re-powered since there is a reset circuit at the
module.

RS-232 Interfaces:
The RS-232 interface is the Electronic Industries Association (EIA) standard for the
interchange of serial binary data between two devices. It was initially developed by the
EIA to standardize the connection of computers with telephone line modems. The standard
allows as many as 20 signals to be defined, but gives complete freedom to the user. Three
wires are sufficient: send data, receive data, and signal ground. The remaining lines can be

34
hardwired on or off permanently. The signal transmission is bipolar, requiring two voltages,
from 5 to 25 volts, of opposite polarity.

FIG.5.1 DB9 CONNECTOR

Pin description
1 Data carrier detect ( -DCD)

2 Received data (RXD)

3 Transmitted data (TXD)

4 Data Terminal Ready (DTR)

5 Ground(GND)

6 Data Set Ready (-DSR)

7 Request To Send (-RTS)


8 Clear To Send (-CTS)
9 Ring Indicator (RI)

Table 6.1 RS-232 DB9 Pins

Communication Standards:

The industry custom is to use an asynchronous word consisting of: a start bit, seven
or eight data bits, an optional parity bit and one or two stop bits. The baud rate at which
the word sent is device-dependent. The baud rate is usually 150 times an integer power of
2, ranging from 0 to 7 (150, 300, 600, and 19,200). Below 150 baud, many system-unique
rates are used. The standard RS-232-C connector has 25 pins, 21 pins which are used in

35
the complete standard. Many of the modem signals are not needed when a computer
terminal is connected directly to a computer, and Figure 1 illustrates
How some of the "spare" pins should be linked if not needed. Figure1 also
illustrates the pin numbering used in the original DB-25 connector and that now commonly
used with a DB-9 connector normally used in modern computers Specifying compliance
to RS-232 only establishes that the signal levels in two devices will be compatible and that
if both devices use the suggested connector, they may be able to be connected. Compliance
to RS-232 does not imply that the devices will be able to communicate or even
acknowledge each other's presence.

Fig 5.2 DIRECT-TO-COMPUTER RS-232 INTERFACE


Table 5.2 shows the signal names, and functions of the RS-232 serial port pin out, Table 5.3 shows
a complete pin description.

Table 6.3 RS-232 Interface Signals

36
Range:
The RS-232-C standard specifies that the maximum length of cable between the
transmitter and receiver should not exceed 100 feet, although in practice many systems are
used in which the distance between transmitter and receiver exceeds this rather low figure.
The limited range of the RS-232C standard is one of its major shortcomings compared
with other standards which offer greater ranges within their specifications. One reason why
the range of the RS-232C standard is limited is the need to charge and discharge the
capacitance of the cable connecting the transmitter and receiver.

Table 6.4 Summary of RS-232

37
38
MAX-232:

The MAX232 is a dual driver/receiver that includes a capacitive voltage generator


to supply EIA-232 voltage levels from a single 5-V supply. Each receiver converts EIA-
232 inputs to 5-V TTL/CMOS levels.

Fig 6.3 Schematic diagram of MAX-232

These receivers have a typical threshold of 1.3 V and a typical hysteresis of 0.5 V,
and can accept ±30-V inputs. Each driver converts TTL/CMOS input levels into EIA-232
levels. The driver, receiver, and voltage-generator functions are available as cells in the
Texas Instruments Lin ASIC library.

IR SENSOR

39
IR the same principle in ALL Infra-Red proximity sensors. The basic idea is to send infra
red light through IR-LEDs, which is then reflected by any object in front of the sensor.
Then all you have to do is to pick-up the reflected IR light. For detecting the
reflected IR light, we are going to use a very original technique: we are going to use
another IR-LED, to detect the IR light that was emitted from another led of the exact same
type. This is an electrical property of Light Emitting Diodes (LEDs) which is the fact that
a led produce a voltage difference across its leads when it is subjected to light. As if it was
a photo-cell, but with much lower output current. In other words, the voltage generated by
the leds can't be - in any way - used to generate electrical power from light, It can barely
be detected. that's why as you will notice in the schematic, we are going to use a Op-Amp
(operational Amplifier) to accurately detect very small voltage changes.

40
The sender is composed of an IR LED (D2) in series with a 470 Ohm resistor,
yielding a forward current of 7.5mA. The receiver part is more complicated, the 2 resistors
R5 and R6 form a voltage divider which provides 2.5V at the anode of the IR LED (here,
this led will be used as a sensor). When IR light falls on the LED (D1), the voltage drop
increases, the cathode's voltage of D1 may go as low as 1.4V or more, depending on the
light intensity. This voltage drop can be detected using an Op-Amp (operational Amplifier
LM358).
You will have to adjust the variable resistor (POT.) R8 so the the voltage at the
positive input of the Op-Amp (pin No. 5) would be somewhere near 1.6 Volt. if you
understand the functioning of Op-Amps, you will notice that the output will go High when
the volt at the cathode of D1 drops under 1.6. So the output will be High when IR light is
detected, which is the purpose of the receiver.
If the +ve input's voltage is higher than the -ve input's voltage, the output goes
High (5v, given the supply voltage in the schematic), otherwise, if the +ve input's
voltage is lower than the -ve input's voltage, then the output of the Op-Amp goes to
Low (0V). It doesn't matter how big is the difference between the +ve and -ve inputs, even

41
a 0.0001 volts difference will be detected, and the the output will swing to 0v or 5v
according to which input has a higher voltage.

L293D

▪ 600mA OUTPUT CURRENT CAPABILITY PER CHANNEL


▪ 1.2A PEAK OUTPUT CURRENT (non repetitive) PER CHANNEL
▪ ENABLE FACILITY
▪ OVERTEMPERATURE PROTECTION
▪ LOGICAL "0" INPUT VOLTAGE UP TO 1.5 V
▪ (HIGH NOISE IMMUNITY)
▪ INTERNAL CLAMP DIODES

5.1 DESCRIPTION

The Device is a monolithic integrated high voltage, high current four channel driver
designed to accept standard DTL or TTL logic levels and drive inductive loads (such as
relays solenoids, DC and stepping motors) and switching power transistors.

To simplify use as two bridges each pair of channels is equipped with an enable
input. A separate supply input is provided for the logic, allowing operation at a lower
voltage and internal clamp diodes are included.

This device is suitable for use in switching applications at frequencies up to 5 kHz.


The L293D is assembled in a 16 lead plastic package which has 4 center pins connected
together and used for heat sinking. The L293DD is assembled in a 20 lead surface mount
which has 8 center pins connected together and used for heat sinking.

42
BLOCK DIAGRAM

43
PIN CONNECTIONS

ASSEMBLY INSTRUCTIONS

▪ Check the components supplied in the Kit against the Component list and identify
all the components.
▪ It is generally best to solder the lowest height components first. Solder the
components in the following order:
▪ Jumpers, resistors, diodes, IC base, transistors and other components.
▪ Take care of terminals polarity while soldering diodes, LED s and electrolytic
capacitors.
▪ Identify the terminals of transistors and solder them in correct direction.
▪ Connect the LCD with the help of 16-pin male-female work-strip connector.
▪ Use flux cored lead to avoid dry solderability.
▪ Inspect the solder points against dry solder / excess solder
▪ Now insert the preprogrammed microcontroller in the IC base firmly.
▪ Adjust the 10K preset (near LCD) to correct contrast display level of LCD.
▪ Ensure that the ac voltage to the kit is 12V. For this, use 230/12V step down
transformer with 500mA or more current rating.
▪ Use heat sink for voltage regulator, if required.

ADVANTAGES AND DISADVANTAGES OF L293D

ADVANTAGES

▪ Efficient way of speed control of DC motor.


▪ Produces more torque.
▪ Produces less noise.

44
DC MOTOR
WORKING PRINCIPLE OF A DC MOTOR

A DC motor is an electric motor that runs on DC electricity. It works on the


principle of electromagnetism. A current carrying conductor when placed in an external
magnetic field will experience a force proportional to the current in the conductor.

OPERATION OF A DC MOTOR
There are two magnetic fields produced in the motor. One magnetic
field is produced by the permanent magnets and the other magnetic field is produced by
the electrical current flowing in the motor windings. These two fields result in a torque
which tends to rotate the rotor. As the rotor turns, the current in the windings is commutated
to produce a continuous
Torque output this makes the motor to run.

6.3: SPEED CONTROL METHODS OF DC MOTOR


They are various methods used to control the speed of a DC motor. Some
of them are:
1. Armature control method
2. Flux control method
3. Ward Leonard system.
Armature control method: Speed can be controlled by varying the voltage. As speed is
directly proportional to the voltage. As voltage increases speed increases and vice-versa.
A simple voltage regulation would cause lots of power loss on control circuit. So we are
going for PWM. In this method the duty cycle determines the speed of the DC motor.
Required speed can be attained by changing the duty cycles. PWM also allows smooth
speed variation without reducing the torque. It also eliminates harmonics.

45
Dc motor is an electric motor converts electrical energy into mechanical motion. The
reverse task that of converting mechanical motion into electrical energy, is accomplished
by a generator or dynamo. In many cases the two devices are identical except for their
application and minor construction details.

DC motors are used when there is positioning requirement and also changes in load and
torque. DC motors can be conveniently interfaced to Bipolar DAC, or MPUs can generate
PWMs to control them.

The classic DC motor has a rotating legature in the form of an electromagnet. A rotary
switch called a commutator reverses the direction of the electric current twice every cycle,
to flow through the armature so that the poles of the electromagnet push and against the
permanent magnets on the outside of the motor. As the poles of the armature electromagnet
pass the poles of the permanent magnets, the commutator reverses the

polarity of the armature electromagnet. During that instant of switching polarity, inertia
keeps the classical motor going in the proper direction. (See the diagrams below.)

A simple DC electric motor. When the coil is powered, a magnetic field is generated around
the armature. The left side of the armature is pushed away from the left magnet and drawn
toward the right, causing rotation

46
The armature continues to rotate.

When the armature becomes horizontally aligned, the commutator reverses the direction of
current through the coil, reversing the magnetic field. The process then repeats.
Wound field DC motor

The permanent magnets on the outside (stator) of a DC motor may be replaced by


electromagnets. By varying the field current it is possible to alter the speed/torque ratio the
motor. Typically the field winding will be placed in series (series wound) with the armature
winding to get a high torque low speed motor, in parallel (shunt wound) the armature to
get a high speed low torque motor, or to have a winding partly in parallel, and partly in
series (compound wound) for a balance that gives steady speed over a range of loads.
Further reductions in field current are possible to gain even higher speed but
correspondingly lower torque, called "weak field" operation.

47
Therefore, the active system means that rear wheels are possible to be turned either
coincidently or non-coincidently.

The increase of the maneuverability when parking the vehicle is achieved by means of 4
wheel steering, meanwhile the increase of the driving stability at higher speeds is achieved
through concordant steering front wheels. Nevertheless, such a turn of rear wheels is very
small and driver will independent. A disadvantage of this so-called passive steering system
is that it operates even when driving in straight direction when single wheel of an axle hits
surface irregularity. Contemporary rear axles allows for coincidental steering through the
influence of variation of elasto-kinematic steering; rear wheels rotate, due to an influence
of variation of vertical load of wheels (tilting), in the same direction as in a typical front
wheel steering system, the rear wheels do not turn in the direction of the curve, and thus
curb on the efficiency of the steering. Normally, this system has not been the preferred
choice due to the complexity of conventional mechanical four wheel steering systems.

However, a few cars like the Honda Prelude, Nissan Skyline GT-R have been available
with four wheel steering systems, where the rear wheels turn by a small angle to aid the
front wheels in steering. However, these systems had the rear wheels steered by only 2 or
3 degrees, as their main aim was to assist the front wheels rather than steer by themselves.
With advances in technology, modern four wheel steering systems boast of fully electronic
steer-by-wire systems, equal steer angles for front and rear wheels, and sensors to monitor
the vehicle dynamics and adjust the steer angles in real time. Although such a complex
4WS model has not been created for production purposes, a number of experimental
concepts with some of these technologies have been built and tested successfully. Two
modes are generally used in these 4WS models:

1. Tires are Rotating in Opposite Direction

48
At slow speeds, the rear wheels turn in the direction opposite to the front wheels. This
mode becomes particularly useful in case of pick-up trucks and buses, more so when
navigating hilly regions. It can reduce the turning circle radius by 25% and can be equally
effective in congested city conditions, where U-turns and tight streets are made easier to
navigate.

2. Tires are Rotating in Same Direction

In high speeds, turning the rear wheels through an angle opposite to front wheels might
lead to vehicle instability and is thus unsuitable. Hence, at speeds above 80 kmph, the rear
wheels are turned in the same direction of front wheels in four wheel steering systems. For
a typical vehicle, the vehicle speed determining the change of phase has been found to be
80kmph. The steering ratio, however can be changed depending on the effectiveness of the
rear steering mechanism, and can be as high as 1:1.

B. Methods used for 360° Rotation

To facilitate turning of the vehicle the rear tires of the car should rotate at least 25-30 ° in
the opposite direction of the front tires. To rotate tires in the opposite direction a dc motor
is used as shown in the fig. 7. It also shows the steering motor. This motor helps in rotating
tires to the prescribed angle necessary for the driver. Switches for both the steering motor
will be in the hands of the driver so he can rotate the rear tires to the prescribed rotation
angle. The steering motor configuration includes; voltage -6v, speed – 1200 rpm, power –
52 w.

For front tires, a rack and pinion arrangement is used for rotation of the tires. Normal
rotation of rack and pinion arrangement ranges between 25-35° [2] , to increase the rotation
of the tires the length of the rack is increased keeping in mind the relation ( θ = 8 t/l , where

49
t= track width and l = wheelbase) [2] . This relation is used in the Ackerman steering system
which facilitates the rotation of the outer tires more than the inner tires as they have
to cover a larger distance as compared to the inner tires. Power or simple Steering could be
used as per the needs of the driver.

The drive to the vehicle is provided by a dc series motor. The configuration includes;
voltage-24 v, speed-1200 rpm and power-150 w.

BATTERY

An electrical battery is a combination of one or more electrochemical cells, used to convert


stored chemical energy into electrical energy. The battery has become a common power
source for many household and industrial applications.

Batteries may be used once and discarded, or recharged for years as in standby
power applications. Miniature cells are used to power devices such as hearing aids and
wristwatches; larger batteries provide standby power for telephone exchanges or computer
data centers.

WORKING OF BATTERY:

A battery is a device that converts chemical energy directly to electrical energy.


It consists of a number of voltaic cells; each voltaic cell consists of two half cells connected
in series by a conductive electrolyte containing anions and cat ions. One half-cell includes
electrolyte and the electrode to which anions (negatively-charged ions) migrate, i.e. the
anode or negative electrode; the other half-cell includes electrolyte and the electrode to
which cat ions (positively-charged ions) migrate, i.e. the cathode or positive electrode. In
the red ox reaction that powers the battery, reduction (addition of electrons) occurs to cat
ions at the cathode, while oxidation (removal of electrons) occurs to anions at the anode.
The electrodes do not touch each other but are electrically connected by the electrolyte.
Many cells use two half-cells with different electrolytes. In that case each half-cell is

50
enclosed in a container, and a separator that is porous to ions but not the bulk of the
electrolytes prevents mixing.
Each half cell has an electromotive force (or emf), determined by its ability to
drive electric current from the interior to the exterior of the cell. The net emf of the cell is
the difference between the emfs of its half-cells. Therefore, if the electrodes have emfs and,
in other words, the net emf is the difference between the reduction potentials of the half-
reactions.

The electrical driving force or across the terminals of a cell is known as the
terminal voltage (difference) and is measured in volts. The terminal voltage of a cell that
is neither charging nor discharging is called the open-circuit voltage and equals the emf of
the cell. Because of internal resistance, the terminal voltage of a cell that is discharging is
smaller in magnitude than the open-circuit voltage and the terminal voltage of a cell that is
charging exceeds the open-circuit voltage. An ideal cell has negligible internal resistance,
so it would maintain a constant terminal voltage of until exhausted, then dropping to zero.
If such a cell maintained 1.5 volts and stored a charge of one Coulomb then on complete
discharge it would perform 1.5 Joule of work. In actual cells, the internal resistance
increases under discharge, and the open circuit voltage also decreases under discharge. If
the voltage and resistance are plotted against time, the resulting graphs typically are a curve;
the shape of the curve varies according to the chemistry and internal arrangement employed.
An electrical battery is one or more electrochemical cells that convert stored chemical
energy into electrical energy. Since the invention of the first battery (or "voltaic pile") in
1800 by Alessandro Volta, batteries have become a common power source for many
household and industrial applications. According to a 2005 estimate, the worldwide battery
industry generates US$48 billion in sales each year, with 6% annual growth. There are two
types of batteries: primary batteries (disposable batteries), which are designed to be used
once and discarded, and secondary batteries (rechargeable batteries), which are designed
to be recharged and used multiple times. Miniature cells are used to power devices such as
hearing aids and wristwatches; larger batteries provide standby power for telephone
exchanges or computer data centers.

51
Principle of operation

A battery is a device that converts chemical energy directly to electrical energy. It consists
of a number of voltaic cells; each voltaic cell consists of two half cells connected in series
by a conductive electrolyte containing anions and cations. One half-cell includes
electrolyte and the electrode to which anions (negatively charged ions) migrate, i.e., the
anode or negative electrode; the other half-cell includes electrolyte and the electrode to
which cations (positively charged ions) migrate, i.e., the cathode or positive electrode. In
the redox reaction that powers the battery, cations are reduced (electrons are added) at the
cathode, while anions are oxidized (electrons are removed) at the anode. The electrodes do
not touch each other but are electrically connected by
the electrolyte. Some cells use two half-cells with different electrolytes. A separator
between half cells allows ions to flow, but prevents mixing of the electrolytes.

Each half cell has an electromotive force (or emf), determined by its ability to drive electric
current from the interior to the exterior of the cell. The net emf of the cell is the difference
between the emfs of its half-cells, as first recognized by Volta. Therefore, if the electrodes
have emfs and , then the net emf is ; in other words, the net emf is the
difference between the reduction potentials of the half-reactions. The electrical driving
force or across the terminals of a cell is known as the terminal voltage (difference)
and is measured in volts. The terminal voltage of a cell that is neither charging nor
discharging is called the open-circuit voltage and equals the emf of the cell. Because of
internal resistance, the terminal voltage of a cell that is discharging is smaller in magnitude
than the open-circuit voltage and the terminal voltage of a cell that is charging exceeds the
open-circuit voltage. An ideal cell has negligible internal resistance, so it would maintain
a constant terminal voltage of until exhausted, then dropping to zero.
If such a cell maintained 1.5 volts and stored a charge of one coulomb then on complete
discharge it would perform 1.5 joule of work. In actual cells, the internal resistance
increases under discharge, and the open circuit voltage also decreases under discharge. If
the voltage and resistance are plotted against time, the resulting graphs typically are a

52
curve; the shape of the curve varies according to the chemistry and internal arrangement
employed.
As stated above, the voltage developed across a cell's terminals depends on the energy
release of the chemical reactions of its electrodes and electrolyte. Alkaline and carbon-zinc
cells have different chemistries but approximately the same emf of 1.5 volts; likewise NiCd
and NiMH cells have different chemistries, but approximately the same emf of 1.2 volts.
On the other hand the high electrochemical potential changes in the reactions of lithium
compounds give lithium cells emfs of 3 volts or more.

SOFTWARE
SOFTWARE SPECIFICATIONS
THE ARDUINO INTEGRATED DEVELOPMENT ENVIRONMENT

53
Arduino Software (IDE) - contains a text editor for writing code, a message area, a text
console, a toolbar with buttons for common functions and a series of menus. It connects to
the Arduino and Genuino hardware to upload programs and communicate with them.
WRITING SKETCHES
Programs written using Arduino Software (IDE) are called sketches. These sketches are
written in the text editor and are saved with the file extension .ino. The editor has features
for cutting/pasting and for searching/replacing text. The message area gives feedback while
saving and exporting and also displays errors. The console displays text output by the
Arduino Software (IDE), including complete error messages and other information. The
bottom righthand corner of the window displays the configured board and serial port. The
toolbar buttons allow you to verify and upload programs, create, open, and save sketches,
and open the serial monitor.
NB: Versions of the Arduino Software (IDE) prior to 1.0 saved sketches with the
extension .pde. It is possible to open these files with version 1.0, you will be prompted to
save the sketch with the .ino extension on save.
Verify
Checks your code for errors compiling it.
Upload
Compiles your code and uploads it to the configured board. See uploading below for
details.
Note: If you are using an external programmer with your board, you can hold down the
"shift" key on your computer when using this icon. The text will change to "Upload using
Programmer"
New
Creates a new sketch.

54
Open
Presents a menu of all the sketches in your sketchbook. Clicking one will open it within
the current window overwriting its content.
Note: due to a bug in Java, this menu doesn't scroll; if you need to open a sketch late in the
list, use the File | Sketchbookmenu instead.
Save
Saves your sketch.

55
SerialMonitor
Opens the serial monitor.
Additional commands are found within the five menus: File, Edit, Sketch, Tools, Help.
The menus are context sensitive, which means only those items relevant to the work
currently being carried out are available.

FILE
● New
Creates a new instance of the editor, with the bare minimum structure of a sketch already
in place.
● Open
Allows to load a sketch file browsing through the computer drives and folders.
● OpenRecent
Provides a short list of the most recent sketches, ready to be opened.

● Sketchbook
Shows the current sketches within the sketchbook folder structure; clicking on any name
opens the corresponding sketch in a new editor instance.
● Examples
Any example provided by the Arduino Software (IDE) or library shows up in this menu
item. All the examples are structured in a tree that allows easy access by topic or library.

56
● Close
Closes the instance of the Arduino Software from which it is clicked.
● Save
Saves the sketch with the current name. If the file hasn't been named before, a name will
be provided in a "Save as.." window.
● Saveas...
Allows to save the current sketch with a different name.
● PageSetup
It shows the Page Setup window for printing.
● Print
Sends the current sketch to the printer according to the settings defined in Page Setup.
● Preferences
Opens the Preferences window where some settings of the IDE may be customized, as the
language of the IDE interface.
● Quit
Closes all IDE windows. The same sketches open when Quit was chosen will be
automatically reopened the next time you start the IDE.

57
EDIT
● Undo/Redo
Goes back of one or more steps you did while editing; when you go back, you may go
forward with Redo.
● Cut
Removes the selected text from the editor and places it into the clipboard.
● Copy
Duplicates the selected text in the editor and places it into the clipboard.
● Copy for Forum
Copies the code of your sketch to the clipboard in a form suitable for posting to the
forum, complete with syntax coloring.
● Copy as HTML
Copies the code of your sketch to the clipboard as HTML, suitable for embedding in web
pages.
● Paste
Puts the contents of the clipboard at the cursor position, in the editor.
● Select All
Selects and highlights the whole content of the editor.
● Comment/Uncomment
Puts or removes the // comment marker at the beginning of each selected line.
● Increase/Decrease Indent
Adds or subtracts a space at the beginning of each selected line, moving the text one
space on the right or eliminating a space at the beginning.
● Find
Opens the Find and Replace window where you can specify text to search inside the
current sketch according to several options.
● Find Next
Highlights the next occurrence - if any - of the string specified as the search item in the
Find window, relative to the cursor position.

58
● Find Previous
Highlights the previous occurrence - if any - of the string specified as the search item in
the Find window relative to the cursor position.

SKETCH
● Verify/Compile
Checks your sketch for errors compiling it; it will report memory usage for code and
variables in the console area.

● Upload -
Compiles and loads the binary file onto the configured board through the configured Port.

59
● Upload Using Programmer
This will overwrite the bootloader on the board; you will need to use Tools > Burn
Bootloader to restore it and be able to Upload to USB serial port again. However, it
allows you to use the full capacity of the Flash memory for your sketch. Please note that
this command will NOT burn the fuses. To do so a Tools -> Burn Bootloader command
must be executed.
● Export Compiled Binary
Saves a .hex file that may be kept as archive or sent to the board using other tools.
● Show Sketch Folder
Opens the current sketch folder.
● Include Library
Adds a library to your sketch by inserting #include statements at the start of your code.
For more details, see libraries below. Additionally, from this menu item you can access
the Library Manager and import new libraries from .zip files.
● Add File...
Adds a source file to the sketch (it will be copied from its current location). The new file
appears in a new tab in the sketch window. Files can be removed from the sketch using
the tab menu accessible clicking on the small triangle icon below the serial monitor one
on the right side o the toolbar.

TOOLS
● Auto Format
This formats your code nicely: i.e. indents it so that opening and closing curly braces line
up, and that the statements inside curly braces are indented more.
● Archive Sketch
Archives a copy of the current sketch in .zip format. The archive is placed in the same
directory as the sketch.
● Fix Encoding & Reload
Fixes possible discrepancies between the editor char map encoding and other operating
systems char maps.

60
● Serial Monitor
Opens the serial monitor window and initiates the exchange of data with any connected
board on the currently selected Port. This usually resets the board, if the board supports
Reset over serial port opening.
● Board
Select the board that you're using. See below for descriptions of the various boards.
● Port
This menu contains all the serial devices (real or virtual) on your machine. It should
automatically refresh every time you open the top-level tools menu.
● Programmer
For selecting a harware programmer when programming a board or chip and not using
the onboard USB-serial connection. Normally you won't need this, but if you're burning a
bootloader to a new microcontroller, you will use this.
● Burn Bootloader
The items in this menu allow you to burn a bootloader onto the microcontroller on an
Arduino board. This is not required for normal use of an Arduino or Genuino board but is
useful if you purchase a new ATmega microcontroller (which normally come without a
bootloader). Ensure that you've selected the correct board from the Boards menu before
burning the bootloader on the target board. This command also set the right fuses.
Help
Here you find easy access to a number of documents that come with the Arduino
Software (IDE). You have access to Getting Started, Reference, this guide to the IDE and
other documents locally, without an internet connection. The documents are a local copy
of the online ones and may link back to our online website.
● Find in Reference
This is the only interactive function of the Help menu: it directly selects the relevant page
in the local copy of the Reference for the function or command under the cursor.

SKETCHBOOK
The Arduino Software (IDE) uses the concept of a sketchbook: a standard place to store
your programs (or sketches). The sketches in your sketchbook can be opened from the File

61
>Sketchbook menu or from the Open button on the toolbar. The first time you run the
Arduino software, it will automatically create a directory for your sketchbook. You can
view or change the location of the sketchbook location from with the Preferences dialog.
Beginning with version 1.0, files are saved with a .ino file extension. Previous versions use
the .pde extension. You may still open .pde named files in version 1.0 and later, the
software will automatically rename the extension to .ino.
Tabs, Multiple Files, and Compilation
Allows you to manage sketches with more than one file (each of which appears in its own
tab). These can be normal Arduino code files (no visible extension), C files (.c extension),
C++ files (.cpp), or header files (.h).

UPLOADING
Before uploading your sketch, you need to select the correct items from the Tools >
Board and Tools > Port menus. The boards are described below. On the Mac, the serial
port is probably something like /dev/tty.usbmodem241 (for an Uno or Mega2560 or
Leonardo) or /dev/tty.usbserial-1B1 (for a Duemilanove or earlier USB board),
or /dev/tty.USA19QW1b1P1.1 (for a serial board connected with a Keyspan USB-to-Serial
adapter). On Windows, it's probably COM1 or COM2 (for a serial board)
or COM4, COM5, COM7, or higher (for a USB board) - to find out, you look for USB
serial device in the ports section of the Windows Device Manager. On Linux, it should
be /dev/ttyACMx , /dev/ttyUSBx or similar. Once you've selected the correct serial port
and board, press the upload button in the toolbar or select the Upload item from
the Sketch menu. Current Arduino boards will reset automatically and begin the upload.
With older boards (pre-Diecimila) that lack auto-reset, you'll need to press the reset button
on the board just before starting the upload. On most boards, you'll see the RX and
TX LEDs blink as the sketch is uploaded. The Arduino Software (IDE) will display a
message when the upload is complete, or show an error.
When you upload a sketch, you're using the Arduino bootloader, a small program that has
been loaded on to the microcontroller on your board. It allows you to upload code without
using any additional hardware. The bootloader is active for a few seconds when the board
resets; then it starts whichever sketch was most recently uploaded to the microcontroller.

62
The bootloader will blink the on-board (pin 13) LED when it starts (i.e. when the board
resets).

LIBRARIES
Libraries provide extra functionality for use in sketches, e.g. working with hardware or
manipulating data. To use a library in a sketch, select it from the Sketch > Import
Library menu. This will insert one or more #include statements at the top of the sketch and
compile the library with your sketch. Because libraries are uploaded to the board with your
sketch, they increase the amount of space it takes up. If a sketch no longer needs a library,
simply delete its #includestatements from the top of your code.
There is a list of libraries in the reference. Some libraries are included with the Arduino
software. Others can be downloaded from a variety of sources or through the Library
Manager. Starting with version 1.0.5 of the IDE, you do can import a library from a zip file
and use it in an open sketch. See these instructions for installing a third-party library.
To write your own library, see this tutorial.
Third-Party Hardware
Support for third-party hardware can be added to the hardware directory of your
sketchbook directory. Platforms installed there may include board definitions (which
appear in the board menu), core libraries, bootloaders, and programmer definitions. To
install, create the hardware directory, then unzip the third-party platform into its own sub-
directory. (Don't use "arduino" as the sub-directory name or you'll override the built-in
Arduino platform.) To uninstall, simply delete its directory.
For details on creating packages for third-party hardware, see the Arduino IDE 1.5 3rd
party Hardware specification.

63
SERIAL MONITOR
Displays serial data being sent from the Arduino or Genuino board (USB or serial board).
To send data to the board, enter text and click on the "send" button or press enter. Choose
the baud rate from the drop-down that matches the rate passed to Serial.begin in your
sketch. Note that on Windows, Mac or Linux, the Arduino or Genuino board will reset
(rerun your sketch execution to the beginning) when you connect with the serial monitor.
You can also talk to the board from Processing, Flash, MaxMSP, etc (see the interfacing
page for details).

PREFERENCES
Some preferences can be set in the preferences dialog (found under the Arduino menu on
the Mac, or File on Windows and Linux). The rest can be found in the preferences file,
whose location is shown in the preference dialog.

LANGUAGE SUPPORT

64
Since version 1.0.1 , the Arduino Software (IDE) has been translated into 30+ different
languages. By default, the IDE loads in the language selected by your operating system.
(Note: on Windows and possibly Linux, this is determined by the locale setting which
controls currency and date formats, not by the language the operating system is displayed
in.)
If you would like to change the language manually, start the Arduino Software (IDE) and
open the Preferences window. Next to the Editor Language there is a dropdown menu of
currently supported languages. Select your preferred language from the menu, and restart
the software to use the selected language. If your operating system language is not
supported, the Arduino Software (IDE) will default to English.
You can return the software to its default setting of selecting its language based on your
operating system by selecting System Default from the Editor Language drop-down. This
setting will take effect when you restart the Arduino Software (IDE). Similarly, after

65
changing your operating system's settings, you must restart the Arduino Software (IDE) to
update it to the new default language.
BOARDS
The board selection has two effects: it sets the parameters (e.g. CPU speed and baud rate)
used when compiling and uploading sketches; and sets and the file and fuse settings used
by the burn boot loader command. Some of the board definitions differ only in the latter,
so even if you've been uploading successfully with a particular selection you'll want to
check it before burning the boot loader. You can find a comparison table between the
various boards here.
Arduino Software (IDE) includes the built in support for the boards in the following list,
all based on the AVR Core. The Boards Manager included in the standard installation
allows to add support for the growing number of new boards based on different cores like
Arduino Due, Arduino Zero, Edison, Galileo and so on.

66
CONCLUSION

The project “SMART MOBILE BASED ROBOT MOVEMENT AND


DIRECTION CONTROL BY ANDROID APP” been successfully
designed and tested. It has been developed by integrating features of all the
hardware components used. Presence of every module has been reasoned out
and placed carefully thus contributing to the best working of the unit.

Secondly, using highly advanced IC’s and with the help of growing
technology the project has been successfully implemented.
Advantages:
➢ Easy to use and reduces man power.
➢ Safe and secured
➢ Low maintenance

Applications:
➢ Industrial applications
➢ Military applications
➢ Target estimation

67
BIBLOGRAPHY

1]. Control of an Autonomous Industrial Fire Fighting Mobile Robot by HP SINGH,


Department of Mathematics, Sri Venkateswara College, University of Delhi
[2]. An Autonomous Firefighting Robot Real Time Man-Robot Control of a Group of
Specialized Mobile Robots VassilSgurev, StanislavDrangajov, LyubkaDoukovska
Institute of Information and Communication Technologies, 1113 Sofia
[3]. A System Architecture of Wireless Communication for FireFighting Robot by Korea
Advanced Institute of Science and Technology (KAIST), 335 Gwahangno, Yuseong-gu,
Daejeon 305-701, Republic of Korea
[4]. Develop a Multiple Interface Based Fire Fighting Robot by 1Department of Electronic
Engineering WuFeng Institute of Technology Ming-Hsiung
[5]. FIRE FIGHTING ROBOT Sahil S.Shah1 , Vaibhav K.Shah2 , Prithvish Mamtora3
and Mohit Hapani4 1,2,3,4D.J.Sanghvi College of Engineering, Vile Parle – West,
Mumbai, India
[6]. Development of a Firefighting Robot for Educational Competitions by Taiser T. T.
Barros and Walter Fetter Lages Electrical Engineering Department Federal University of
Rio Grande do Sul Porto Alegre.
[7]. https://www.arduino.cc/en/Main/ArduinoBoardUno
[8]. http://www.slideshare.net/maastech/robotics-projects-abstractfirefighting-robot-with
[9]. https://en.wikipedia.org/wiki/Arduino
[10].http://eprints.uthm.edu.my/5529/1/NOR_AYUNI_BINTI_ABD_M AJID.
[11]. Joga D. Setiawan, MochamadSubchan, and AgusBudiyono “Virtual Reality
Simulation of Fire Fighting Robot. Dynamic and Motion.” ICIUS, October 24-26 2007.
[12]. Gerald Weed, Michael Schumacher, Shawn McVay, Jack Landes “Pokey the Fire-
Fighting Robot. A Logical Design Using Digital and Analog Circuitry”, May 11 1999.
[13]. Chris Flesher, Devona Williams, Sean Benbrook, Somendra Sreedhar “Fire
Protection Robot. Final Report” p. 1-78, 2004.

68

You might also like