Top Banner
1. PROJECT PRINCIPLE In this project, the robot is controlled by a mobile phone that makes a call to the mobile phone attached to the robot and robot will traverse according to the command given through the keys of mobile phone, also robot will detect the obstacle with the help of analog LDR sensors used which will response to a particular color of particular range of frequency. The detection of the obstacle will be in such a way that after detecting the obstacle it will not traverse further but will stop at that point and no further command will execute. The obstacle may be in the form of a dig, wall, or any object which is in the path of the robot. If any button is pressed, a tone corresponding to the button pressed is heard at the other end of the call. This tone is called DTMF (dual-tone- multiple-frequency). The robot receives this DTMF tone with the help of the phone attached to the robot using DTMF decoder. The received tone is processed by the (ATmega16) microcontroller with 1
29

Project MAIN NEW

Nov 28, 2014

Download

Documents

Shashank Mishra
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Project MAIN NEW

1. PROJECT PRINCIPLE

In this project, the robot is controlled by a mobile phone that makes a call

to the mobile phone attached to the robot and robot will traverse

according to the command given through the keys of mobile phone, also

robot will detect the obstacle with the help of analog LDR sensors used

which will response to a particular color of particular range of frequency.

The detection of the obstacle will be in such a way that after detecting the

obstacle it will not traverse further but will stop at that point and no

further command will execute. The obstacle may be in the form of a dig,

wall, or any object which is in the path of the robot.

If any button is pressed, a tone corresponding to the button pressed is

heard at the other end of the call. This tone is called DTMF (dual-tone-

multiple-frequency). The robot receives this DTMF tone with the help of

the phone attached to the robot using DTMF decoder. The received tone

is processed by the (ATmega16) microcontroller with the help of DTMF

decoderMT8870. The decoder decodes the DTMF tone into its equivalent

binary digit and this binary number is sent to the microcontroller. The

microcontroller is programmed to take a decision for any given input and

outputs its decision to the motor drivers in order to drive the motors in

forward direction or backward direction or turn left or right. The mobile

phone that makes a call to mobile phone attached to the robot act as a

remote and the LDR sensors placed on the front end of the robot will be

used for the detection of the obstacle. So this robotic project does not

require the construction of receiver and transmitter units.

1

Page 2: Project MAIN NEW

2. BLOCK DIAGRAM

As shown in above block diagram the main part of the robot is the

ATMEGA 16 microcontroller. Other supporting components required in

the project are connected to the microcontroller. Here we have a GSM

mobile phone attached to the microcontroller, So it acts as a DTMF

generator with tone depending upon key pressed. DTMF decoder, i.e., IC

CM8870 decodes the received tone and gives binary equivalent of it to

the micro-controller.the controller is programmed such that appropriate

output is given to motor driver IC L293D which will drive the 2 dc

motors connected to it. The concept used for driving is DIFFERENTIAL

DRIVE. So ultimately the 2 motors rotate according to the key pressed on

keypad of the cell phone.

2

DTMF DECODER

DTMF DECODER

GSMMOBILE PHONE

GSMMOBILE PHONE

A/D CONVERTOR

ATMEGA

16 µC

ATMEGA

16 µCREGULATED POWER SUPPLY

REGULATED POWER SUPPLY

LDRSENSORS

MOTORS CONNECTED via IC-L298

16*2 LCD

Page 3: Project MAIN NEW

3. PROBLEMS RELATED TO PROJECT

IMPLEMENTATION

1. Sub problem 1

The first sub problem is to establish (produce) a conceptual design based

on the original idea and then develop a detailed design of each of the

different constituents of the system.

2. Sub problem 2

The second sub problem is to develop and build all the components of the

robot and finally integrate them so as to produce the final prototype.

3. Sub problem 3

The third sub problem is to write a code for the functioning of the the

robot in the basic C language with the supporting software

4. Sub problem 4

The fourth sub problem is to test the operation of the built prototype and

assess its performance and limitations.

3

Page 4: Project MAIN NEW

4. GSM CONTROLLED ROBOT

4.1 WORKING

Main function of project is to detect the obstacles like walls , any

unwanted object placed in the path of robot, and controlled using a GSM

mobile phone connected via DTMF(dual tone multiple frequency)

decoder. The mobile phone gives the instruction by pressing the key of

phone .the pressed key will generate a frequency tone which is

transmitted to the microcontroller through DTMF decoder.

When the power is given to the microcontroller, LCD, sensors, motors,

DTMF decoder, are initializes, The robot will traverse in forward,

backward, left, and right direction. The forward command is given by

pressing the ‘2’ key of mobile. Backward command is given by pressing

the ‘8’ key of mobile . Left command is given by pressing the ‘4’ key of

mobile. Right command is given by pressing the ‘6’ key of mobile. The

robot will stop whenever there is an obstacle in the path of robot.

Microcontroller is the central component which controls all the activities

like GSM communication, MOTORS control using pwm techniques,

working of sensors via analog to digital convertors.

In order to do these activities a program (sequence of instructions) must

be written for the microcontroller. This program is called firmware. In

order to execute the program, Microcontroller requires basic

configuration like 5V regulated power supply, clock, and reset circuit.

Microcontroller and IC’s requires 5V regulated power supply, which is

obtained from 230V AC by using step down transformer.

According to the program in the microcontroller, the robot starts moving.

When we press the key '2' (binary equivalent 00000010) on the mobile

4

Page 5: Project MAIN NEW

phone, the microcontroller outputs '10001001' binary equivalent. Port

pins PD0, PD3 and PD7 are high. The high output at PD7 of the

microcontroller drives the motor driver (L293D). port pins PD0 and PD3

drive motors M1 and M2 in forward direction. Similarly, motors M1 and

M2 can move for left turn, right turn, backward motion and stop

conditions.

5

Page 6: Project MAIN NEW

5. COMPONENTS DESCRIPTION

5.1. HT9710 DTMF DECODER IC

The M-8870 is a full DTMF Receiver that integrates both bandsplit filter

and decoder functions into a single18-pin DIP or SOIC package.

Manufactured using CMOS process technology, the M-8870 offers low

power consumption (35 mW max) and precise data handling. Its filter

section uses switched capacitor technology for both the high and low

group filters and for dial tone rejection. Its decoder uses digital counting

techniques to detect and decode all 16 DTMF tone pairs into a 4-bit code.

External component count is minimized by provision of an on-chip

differential input amplifier, clock generator, and latched tri-state interface

bus. Minimal external components required include a low-cost 3.579545

MHz color burst crystal, a timing resistor, and a timing capacitor. The M-

8870-02 provides a “power-down” option which, when enabled, drops

consumption to less than 0.5mW. The M-8870-02 can also inhibit the

decoding of fourth column digits

6

Page 7: Project MAIN NEW

5.2. ATMEGA16 MICROCONTROLLER (HEART OF

PROJECT)

FEATURES OF ATMEGA 16:-

1. High-performance, Low-power AVR® 8-bit Microcontroller

2. Advanced RISC Architecture

a. 131 Powerful Instructions – Most Single Clock Cycle

Execution

b. 32 x 8 General Purpose Working Registers

c. Fully Static Operation

d. Up to 16 MIPS Throughput at 16 MHz

e. On-chip 2-cycle Multiplier

3. Nonvolatile Program and Data Memories

7

Page 8: Project MAIN NEW

a. 16K Bytes of In-System Reprogrammable Flash Endurance:

10,000 Write/Erase Cycles

b. Optional Boot Code Section with Independent Lock Bits

c. In-System Programming by On-chip Boot Program

d. True Read-While-Write Operation

e. 512 Bytes EEPROM

f. 1K Bytes Internal SRAM

g. Programming Lock for Software Security

4. JTAG (IEEE std. 1149.1 Compliant) Interface

a. Boundary-scan Capabilities According to the JTAG

Standard

b. Extensive On-chip Debug Support

c. Programming of Flash, EEPROM, Fuses and Lock Bits

through the JTAG Interface

5. Peripheral Features

a. Two 8-bit Timer/Counters with Separate Prescalers and

Compare Modes

b. One 16-bit Timer/Counter with Separate Prescaler, Compare

Mode, and Capture Mode

c. Real Time Counter with Separate Oscillator

d. Four PWM Channels

e. 8-channel, 10-bit ADC

f. Byte-oriented Two-wire Serial Interface

g. Programmable Serial USART

h. Master/Slave SPI Serial Interface

i. Programmable Watchdog Timer with Separate On-chip

Oscillator

j. On-chip Analog Comparator

6. Special Microcontroller Features

8

Page 9: Project MAIN NEW

a. Power-on Reset and Programmable Brown-out Detection

b. Internal Calibrated RC Oscillator

c. External and Internal Interrupt Sources

d. Six Sleep Modes: Idle, ADC Noise Reduction, Power-save,

Power-down, Standby, and Extended Standby

7. Operating Voltages

a. 2.7 - 5.5V for ATmega16L

b. 4.5 - 5.5V for ATmega16

8. Speed Grades

0 - 16 MHz for ATmega16

5.3. L293D IC (MOTOR DRIVER)

9

Page 10: Project MAIN NEW

5.3.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 application 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.

5.3.2 H-Bridge

Let's start with the name, H-bridge. Sometimes called a "full bridge" the

H-bridge is so named because it has four switching elements at the

"corners" of the H and the motor forms the cross bar.

The basic bridge is shown in the figure.

FIG 5.4: BASIC H- BRIDGE

10

Page 11: Project MAIN NEW

Of course the letter H doesn't have the top and bottom joined together,

but hopefully the picture is clear. The key fact to note is that there are, in

theory, four switching elements within the bridge. These four elements

are often called, high side left, high side right, low side right, and low

side left (when traversing in clockwise order).

The switches are turned on in pairs, either high left and lower right, or

lower left and high right, but never both switches on the same "side" of

the bridge. If both switches on one side of a bridge are turned on it creates

a short circuit between the battery plus and battery minus terminals. This

phenomenon is called shoot through in the Switch-Mode Power Supply

(SMPS) literature. If the bridge is sufficiently powerful it will absorb that

load and your batteries will simply drain quickly. Usually however the

switches in question melt.

To power the motor, you turn on two switches that are diagonally

opposed. In the picture to the right, imagine that the high side left and low

side right switches are turned on. The current flow is shown in green.

The current flows and the motor begin to turn in a "positive" direction.

What happens if you turn on the high side right and low side left

11

Page 12: Project MAIN NEW

switches? You guessed it, current flows the other direction through the

motor and the motor turns in the opposite direction.

The last two rows describe a maneuver where you "short circuit" the

motor which causes the motors generator effect to work against itself.

The turning motor generates a voltage, which tries to force the motor to

turn the opposite direction. This causes the motor to rapidly stop spinning

and is called "braking" on a lot of H-bridge designs. Of course there is

also the state where all the transistors are turned off. In this case the

motor coasts if it was spinning and does nothing if it was doing nothing.

5.4 LDR SENSORS (ANALOG SENSORS)

LDR (light dependent resistor) sensors are basically analog sensors which

are used to detect a light of particular frequency. Here in the project we

used these sensors to detect the obstacles.

The analog IR sensor consists of:-

Transmitter: An infra red emitting diode.

Receiver: A phototransistor (also called as photo diode)

12

Page 13: Project MAIN NEW

Working: When the light level is low the resistance of the LDR is high.

This prevents current from flowing to the base of the transistors.

Consequently the LED does not light. However, when light shines onto

the LDR its resistance falls and current flows into the base of the first

transistor and then the second transistor. The LED lights. The preset

resistor can be turned up or down to increase or decrease resistance, in

this way it can make the circuit more or less sensitive.

13

Page 14: Project MAIN NEW

6. SOFTWARE:

1. BASCOM- AVR

2. UNIVERSAL ATMEL Programmer

The program for the project would be written in BASCOM-AVR

software in basic C language.

Features of BASCOM-AVR:-

Structured BASIC with labels.

Structured programming with IF-THEN-ELSE-END IF, DO-

LOOP, WHILE-WEND, SELECT- CASE.

Fast machine code instead of interpreted code.

Variables and labels can be as long as 32 characters.

Bit, Byte, Integer, Word, Long, Single, DOUBLE and String

variables. 

 Date & Time calculation functions.

Compiled programs work with all AVR microprocessors that

have internal memory.

Statements are highly compatible with Microsoft’s VB/QB.

Special commands for LCD-displays , I2C chips, PC keyboard,

matrix keyboard, software UART, SPI , graphical LCD.

Few steps to start the programming :

14

Page 15: Project MAIN NEW

Programme:

$regfile = "m16def.dat"$crystal = 1000000

Config Lcd = 16 * 2Config Lcdpin = Pin , Db4 = Portb.4 , Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7 , E = Portb.3 , Rs = Portb.2

Config Adc = Single , Prescaler = Auto , Reference = Avcc

Config Timer1 = Pwm , Pwm = 8 , Prescale = 1 , Compare A Pwm = Clear Down , Compare B Pwm = Clear Down

Dim R As ByteDim L As Integer , Lm As Integer

Start AdcClsStart Timer1DoClsR = PincLcd R

LowerlineSelect Case R

Case 2 : Pwm1a = 200 Portd.3 = 0 Pwm1b = 200 Portd.6 = 0 Lcd "FORWARD"

Case 8 : Pwm1a = 0 Portd.3 = 1 Pwm1b = 0 Portd.6 = 1 Lcd "BACKWARD"

Case 4 : Pwm1a = 200 Portd.3 = 0 Pwm1b = 50

15

Page 16: Project MAIN NEW

Portd.6 = 0 Lcd "LEFT"

Case 6 : Pwm1a = 50 Portd.3 = 0 Pwm1b = 200 Portd.6 = 0 Lcd "RIGHT"

Case 5 : Pwm1a = 0 Portd.3 = 0 Pwm1b = 0 Portd.6 = 0 Lcd "STOP"

If L < 980 And Lm < 880 Then

Pwm1a = 0 Portd.3 = 0 Pwm1b = 0 Portd.6 = 0 Lcd "STOP"

Elseif L < 980 Then

Pwm1a = 0 Portd.3 = 0 Pwm1b = 0 Portd.6 = 0 Lcd "STOP"

Elseif Lm < 880 Then

Pwm1a = 0 Portd.3 = 0 Pwm1b = 0 Portd.6 = 0 Lcd "STOP" End If

16

Page 17: Project MAIN NEW

Case Else : Lcd "NO USE"

End Select

Waitms 250

Loop

End

17

Page 18: Project MAIN NEW

7. ADVANTAGES

1. This is wireless controller robot hence the limitation of wired

robots is completely overcome by using latest technology of

mobile phones.

2. In this project we have used RF circuitry hence the limitation of a

controlled range is no more a constraint of this model.

3. Limitless area coverage is the main advantage of this land rover

DISADVANTAGE

1. This land rover has only one disadvantage that is it can be operated

in area where mobile network is available and if mobile network is

not available it cannot be operated.

18

Page 19: Project MAIN NEW

8. APPLICATION

1. SCIENTIFIC:

Remote control vehicles have many scientific uses including hazardous

environments, working in the deep oceans and space exploration. The

majority of the probes to the other planets in our solar system have been

remote controlled vehicles, although some of the more recent ones were

partially autonomous. Sophistication of these devices has fueled greater

debate on the need for manned space flight and exploration. The voyager-

1 spacecraft is the first craft of any kind of leave in the solar system.

The Martian explorers Spirit and Opportunity have provided continuous

data about the surface of mars since January 3, 2004.

2. MILITARY AND LAW ENFORCEMENT

Remote control vehicle are used in law enforcement and military

engagements for some of the same reason. The exposure to hazards is

mitigated to the person who operates the vehicle from a location of

relative safety. Remote controlled vehicles are used by many police

departments, bomb squad to diffuse and detonate explosives.

3. SEARCH AND RESCUE

UAVs will play an increasingly important role in search and rescue in the

United States. This was demonstrated by the successful use of UAVs

during the 2009 hurricane that struck Louisiana and Texas

19

Page 20: Project MAIN NEW

9. CONCLUSION

In this project, the robot is controlled by a mobile phone that makes a call

to the mobile phone attached to the robot and robot will traverse

according to the command given through the keys of mobile phone, also

robot will detect the obstacle with the help of analog LDR sensors used

which will response to a particular color of particular range of frequency.

If any button is pressed, a tone corresponding to the button pressed is

heard at the other end of the call. This tone is called DTMF (dual-tone-

multiple-frequency). The robot receives this DTMF tone with the help of

the phone attached to the robot using DTMF decoder. The received tone

is processed by the (ATmega16) microcontroller with the help of DTMF

decoderMT8870. The decoder decodes the DTMF tone into its equivalent

binary digit and this binary number is sent to the microcontroller. The

microcontroller is programmed to take a decision for any given input and

outputs its decision to the motor drivers in order to drive the motors in

forward direction or backward direction or turn left or right. The mobile

phone that makes a call to mobile phone attached to the robot act as a

remote and the LDR sensors placed on the front end of the robot will be

used for the detection of the obstacle. So this robotic project does not

require the construction of receiver and transmitter units.

20

Page 21: Project MAIN NEW

10. REFERECNCE

We collect our require information from following websites:

http://en.wikipedia.org/wiki/H-bridge#General

http://www.electronicsforyou.com

ATMEGA 16 Datasheet.

21