Вы находитесь на странице: 1из 53

0

CHAPTER 1

1.1 INTRODUCTION

This project LAPTOP CONTROLLED VEHICLE is based on serial


communication using RF module. This circuit utilizes the RF module (TX/RX) for
making a wireless remote, which could be used to drive an output from a distant place.
RF module, as the name suggests, uses radio frequency to send signals. These signals are
transmitted at a particular frequency and a baud rate. A receiver can receive these signals
only if it is configured for that frequency. A four channel encoder and decoder pair has
also been used in this system. The input signals, at the transmitter side, are taken through
laptop while the outputs are monitored on a set of four LEDs corresponding to
AT89S52.The circuit can be used for designing Remote Appliance Control system. The
outputs from the receiver can drive corresponding microcontroller connected to dc motor
through l293d motor driver.
As we can see in below block diagram the Receiver module can further divided into 5
parts:

Power Supply
RF Module
Decoder (HT12D)
Motor driver (L293D)
Motor's (100 rpm)

1.2 BLOCK DIAGRAM


1.2 (a) TRANSMITTER:

AT89S52

RF TX

HT12E
ENCODER

MAX 232

LAPTOP

Fig. 1 Transmitter Section of Project

1.2 (b) RECEIVER:

MOTOR

RF RX

AT89S52

L293D
MOTOR

HT12D
DECODER

Fig.2 Receiver Section of Project


2

1.3 SCHEMATIC DIAGRAM

1.3 (a) TRANSMITTING SECTION:

Fig.3 Serial Data Transmission from Laptop


3

1.3 (b) RECEIVING SECTION:

Fig. 4 Serial Data Reception through RF Receiver

1.4 CIRCUIT DESCRIPTION

The circuit of this project uses RF module to control DC motors through a motor driver
IC L293D. Transmission is enabled by giving a low bit to pin14 (TE, active low) of
encoder HT12E. The controls for motor are first sent to HT12E. Pins 10 and 11 (D0-D1)
are used to control one motor while pins 12 and 13 (D2-D3) to control another motor.
The data signals of encoder HT12E work on negative logic. Therefore a particular signal
is sent by giving a low bit to the corresponding data pin of encoder. The parallel signals
generated at transmission end are first encoded (into serial format) by HT12E and then
transferred through RF transmitter (434 MHz) at a baud rate of around 1-10 kbps. The
same signals are acquired by RF receiver after which it is decoded by HT12D. For more
details, refer RF remote control. Since the encoder/decoder pair used here works on
negative logic, the decoded signals are fed to microcontroller IC at89s52. The proper
(inverted) signals are then supplied to L293D. L293D contains two inbuilt H-bridge
driver circuits to drive two DC motors simultaneously, both in forward and reverse
direction. The motor operations of two motors can be controlled by input logic at pins 2
& 7 and pins 10 & 15. Input logic 00 or 11 will stop the corresponding motor. Logic 01
and 10 will rotate it in clockwise and anticlockwise directions, respectively. Thus,
depending upon the signals generated at the transmission end, the two motors can be
rotated in desired directions.

1.5 WORKING OF PROJECT


TRANSMISSION OF DATA SERIALLY FROM LAPTOP:

Fig.5 Proteus Simulation of Transmitter Section


We use the computer to send the command's to the controller via serial transmission. The
microcontroller will make decision based on that data and generate a 4 bit data which is
further encoded by the encoder and transmit over an RF channel through an RF module.
Here is a block diagram of the transmitter module: computer is use to send the command
to the microcontroller via serial communication for this purpose we use the usb serial
cable to connect the computer to my circuit. Because in present there is no serial port into
the computer's. Now for connecting my computer to the

serial port we use an

application named BRAYs TERMINAL so that we can send the data and also see what
exactly we are sending to the microcontroller and we can also see what the
microcontroller do after getting the signal from computer. By BRAYs Terminal we send
the ASCII codes and by those command's we easily make the decision those decision will
be further use. The MAX232 is an Integrated Circuit that convert signal from an RS232
serial port to signal suitable for use in TTL compatible digital logic circuits. The
MAX232 is a dual driver and typically converts the RX, TX, CTS and RTS signals.
6

TRANSMISSION AND RECEPTION OF DATA:

Fig.6 Block Diagram of RF Module


This radio frequency (RF) transmission system employs Amplitude Shift Keying (ASK)
with transmitter/receiver (TX/RX) pair operating at 434 MHz The transmitter module
takes serial input and transmits these signals through RF. The transmitted signals are
received by the receiver module placed away from the source of transmission. The
system allows one way communication between two nodes, namely, transmission and
reception. The RF module has been used in conjunction with a set of four channel
encoder/decoder ICs. Here HT12E & HT12D have been used as encoder and decoder
respectively. The encoder converts the parallel inputs from the laptop into serial set of
signals. These signals are serially transferred through RF to the reception point. The
decoder is used after the RF receiver to decode the serial format and retrieve the original
signals as outputs. These outputs can be observed on corresponding LEDs.
Encoder IC (HT12E) receives parallel data in the form of address bits and control bits.
The control signals from remote switches along with 8 address bits constitute a set of 12
parallel signals. The encoder HT12E encodes these parallel signals into serial bits.
7

8
Transmission is enabled by providing ground to pin14 which is active low. The control
signals are given at pins 10-13 of HT12E. The serial data is fed to the RF transmitter
through pin17 of HT12E. Transmitter, upon receiving serial data from encoder IC
(HT12E), transmits it wirelessly to the RF receiver. The receiver, upon receiving these
signals, sends them to the decoder IC (HT12D) through pin2. The serial data is received
at the data pin (DIN, pin14) of HT12D. The decoder then retrieves the original parallel
format from the received serial data.
When no signal is received at data pin of HT12D, it remains in standby mode and
consumes very less current (less than 1A) for a voltage of 5V. When signal is received
by receiver, it is given to DIN pin (pin14) of HT12D. On reception of signal, oscillator of
HT12D gets activated. IC HT12D then decodes the serial data and checks the address bits
three times. If these bits match with the local address pins (pins 1-8) of HT12D, then it
puts the data bits on its data pins (pins 10-13) and makes the VT pin high. An LED is
connected to VT pin (pin17) of the decoder. This LED works as an indicator to indicate a
valid transmission. The corresponding output is thus generated at the data pins of decoder
A signal is sent by lowering any or all the pins 10-13 of HT12E and corresponding signal
is received at receivers end (at HT12D). Address bits are configured by using the by
using the first 8 pins of both encoder and decoder ICs. To send a particular signal, address
bits must be same at encoder and decoder ICs. By configuring the address bits properly, a
single RF transmitter can also be used to control different RF receivers of same frequency
to summarize, on each transmission, 12 bits of data is transmitted consisting of 8 address
bits and 4 data bits. The signal is received at receivers end which is then fed into decoder
IC. If address bits get matched, decoder converts it into parallel data and the
corresponding data bits get lowered which could be then used to drive the LEDs. The
outputs from this system can either be used in microcontroller IC at89s52.

MOVEMENT OF DC MOTOR:

L293D is a motor driver. As its name suggests it can drive a motor (normally DC motors
up-to certain range). Since the output voltage of 8052 is limited to 5V only thus motors
with higher required voltage need some drivers to provide them their desired input
voltage.

Fig.7 DC Motor Interface with Microcontroller


It works on the concept of H-bridge. H-bridge is a circuit which allows the voltage to be
flown in either direction. As you know voltage need to change its direction for being able
to rotate the motor in clockwise or anticlockwise direction, hence H-bridge IC are ideal
for driving a DC motor.

10
There are two Enable pins on l293d. Pin 1 and pin 9, for being able to drive the motor,
the pin 1 and 9 need to be high. For driving the motor with left H-bridge you need to
enable pin 1 to high. And for right H-Bridge you need to make the pin 9 to high. If
anyone of the either pin1 or pin9 goes low then the motor in the corresponding section
will suspend working. Its like a switch.
There are 4 input pins for this l293d, pin 2, 7 on the left and pin 15, 10 on the right. Left
input pins will regulate the rotation of motor connected across left side and right input for
motor on the right hand side. The motors are rotated on the basis of the inputs provided
across the input pins as LOGIC 0 or LOGIC 1.

Lets consider a Motor connected on left side output pins (pin 3, 6). For rotating the
motor in clockwise direction the input pins has to be provided with Logic1 and Logic0.
Pin 2 = Logic 1 and Pin 7 = Logic 0 | Clockwise Direction
Pin 2 = Logic 0 and Pin 7 = Logic 1 | Anticlockwise Direction
Pin 2 = Logic 0 and Pin 7 = Logic 0 | Idle [No rotation] [Hi-Impedance state]
Pin 2 = Logic 1 and Pin 7 = Logic 1 | Idle [No rotation]

10

11

CHAPTER 2

11

12

2.1 COMPONENTS USED


2.1(a) HARDWARE:
S.NO.

NAME OF ITEM

QUANTITY

1.
2.
3.
4.
5.

MICROCONTROLLER AT8952
MOTOR DRIVER L293D
ENCODER HT12E
DECODER HT12D
RF TRANSMITTER

2
1
1
1
1

6.

RF RECEIVER

7.
8.

MAX 232
RS 232 DB9 (FEMALE)

1
1

9.
10.

USB SERIAL CABLE


DC MOTOR

1
2

11.
12.

VOLTAGE REGULATOR 7805,7812


CAPACITORS (10f,1f,33pf)

2,1
3,4,4

13
14.

LED
RESISTORS (1M,10K,33)

2
1,2,1

15.
16.

CRYSTAL OSCILATORS
BATTERIES 9 V

2
4

17.
18.

FEMALE JUMPER WIRES


CHASSIS

20
1

19.

WHEELS

2.2 (b) SOFTWARE TOOLS:

KEIL VISION 4

PROTEUS VERSION 7.6

BRAYs TERMINAL 1.9b

2.2 COMPONENT DESCRIPTION


12

13

2.2(a) MICROCONTROLLER AT89S52:

Fig.8 AT89S52 Atmel IC


The 8052 is an 8-bit microcontroller originally developed by Intel in the late 1970s. It
included an instruction set of 255 operation codes (opcodes), 32 input/output lines, three
user-controllable timers, an integrated and automatic serial port, and 256 bytes of on-chip
RAM. The 8051 is a very similar MCU but it has only two timers and 128 bytes of onchip RAM. The 8052 was designed such that control of the MCU and all input/output
between the MCU and external devices is accomplished via Special Function Registers
(SFRs). Each SFR has an address between 128 and 255. Additional functions can be
added to new derivative MCUs by adding additional SFRs while remaining compatible
with the original 8052. This allows the developer to use the same software development
tools with any MCU that is 8052-compatible. This allowed the 8052-architecture to
become an industry-wide standard. Now, more than 20years later, dozens of
semiconductor companies produce microcontrollers that are based on the original 8052
core. The additional features that each semiconductor-firm offers in their MCUs are
accessed by utilizing new SFRs in addition to the standard and original 8052-SFRs that
are found in all 8052-compatible MCUs.

PIN DIAGRAM OF AT89S52:


13

14

Fig.9 Pin Diagram of Microcontroller

PIN DESCRIPTION:
VCC : Supply voltage.
GND : Ground.
Port 0 :

port 0 is an 8-bit open drain bidirectional I/O port. As an output


port, each pin can sink eight TTL inputs. When 1s are written to port 0
pins, the pins can be used as high impedance inputs.

Port 0 can also be configured to be the multiplexed low order


address/data bus during accesses to external program and data
memory. In this mode, P0 has internal pull ups.

14

15

Port 0 also receives the code bytes during Flash programming and
outputs the code bytes during program verification.

External pull ups are required during program verification.

Port 1 is an 8-bit bidirectional I/O port with internal pull ups. The

Port 1 :
Port 1 output buffers can sink/source four TTL inputs.

When 1s are written to Port 1 pins, they are pulled high by the
internal pull ups and can be used as inputs. As inputs,

Port 1 also receives the low-order address bytes during Flash


programming and verification.

Port 2 :

Port 2 is an 8-bit bidirectional I/O port with internal pull ups. The
Port 2 output buffers can sink/source four TTL inputs. When 1s are
written to Port 2 pins, they are pulled high by the internal pull ups and
can be used as inputs. As inputs, Port 2 pins that are externally being
pulled low will source current (IIL) because of the internal pull ups.

Port 2 emits the high-order address byte during fetches from


external program external data memory that use 16-bit addresses
(MOVX @DPTR). In this application, Port 2 uses strong internal pull
ups

Port 3 :

Port 3 is an 8-bit bidirectional I/O port with internal pull ups. The
Port 3 output buffers can sink/source four TTL inputs. When 1s are
written to Port 3 pins, they are pulled high by the internal pull ups and
can be used as inputs.

Port 3 also serves the functions of various special featuresof the


AT89S52.
15

16

Port Pin

Alternate Functions

P3.0
P3.1
P3.2
P3.3
P3.4
P3.5
P3.6
P3.7

RXD(serial input port)


TXD(serial output port)
INT0(external interrupt 0)
INT1(external interrupt 1)
T0(timer 0 external input)
T1(timer 1 external input)
WR(external data memory write)
RD(external data memory read)

RST :

Reset input. A high on this pin for two machine cycles while the
oscillator is running resets the device.

ALE/PROG :

Address Latch Enable (ALE) is an output pulse for latching the


low

Bytes of the address during accesses to external memory.

This pin is also the program pulse input (PROG) during Flash
Programming.

PSEN :

Program Store Enable (PSEN) is the read strobe to external


program memory.

When the AT89S52 is executing code from external program


memory.

PSEN is activated twice each machine cycle, except that two


PSEN activations.

EA/VPP :

External Access Enable. EA must be strapped to GND in order


to enable

16

17

EA should be strapped to VCC for internal program executions.

Input to the inverting oscillator amplifier and input to the

XTAL1 :
internal clock operating circuit.

XTAL2 :

Output from the inverting oscillator amplifier.

OSCILLATOR CHARACTERISTICS:
XTAL1 and XTAL2 are the input and output, respectively, of an
inverting amplifier, which can be configured for use as an on-chip oscillator. Either a
quartz crystal or ceramic resonator may be used. To drive the device from an external
clock source, XTAL2 should be left unconnected while XTAL1 is driven. There are no
requirements on the duty cycle of the external clock signal, since the input to the
internal clocking circuitry is through a divide-by-two flip-flop, but minimum and
maximum voltage high and low-time specifications must be observed.

OSCILLATOR CONNECTIONS:

17

18

BLOCK DIAGRAM OF AT89S52:

Fig.11 Bus Architecture of AT89S52

18

19

FEATURES:

8K Bytes of In-System Programmable (ISP) Flash Memory

256 x 8-bit Internal RAM

32 Programmable I/O Lines

Three 16-bit Timer/Counters

Eight Interrupt Sources

Full Duplex UART Serial Channel

Interrupt Recovery from Power-down Mode

Watchdog Timer & Dual Data Pointer

Power-off Flag & Fast Programming Time

2.2(b) MOTOR DRIVER L293D:


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.

PIN DIAGRAM:

19

20

Fig.12 Pin Diagram of L293D

DESCRIPTION:
The L293D is high-current half-H driver. It designed to provide bidirectional drive currents
of up to 1 A at voltages from 4.5 V to 36 V and to drive inductive loads such as relays,
solenoids, dc and bipolar stepping motors, as well as other high-current/high-voltage loads
in positive-supply applications. All inputs are TTL compatible. Each output is a complete
totem-pole drive circuit, with a Darlington transistor sink and a pseudo-Darlington source.
Drivers are enabled in pairs, with drivers 1 and 2 enabled by 1,2EN and drivers 3 and 4
enabled by 3,4EN. When an enable input is high the associated drivers are enabled and
their outputs are active in phase with their inputs. When the enable input is low, those
drivers are disabled and their outputs are off and in the high-impedance state.

20

21

BLOCK DIAGRAM:

Fig.13 Block Diagram of L293D

FUNCTION TABLE:

Fig. 2.6 Function Table of L293D

LOGIC DIAGRAM:
21

22

Fig.14 Logic Diagram of L293D

FEATURES:
Wide Supply Voltage from 4.5 V to 36 V
Separate Input-Logic Supply
Output Current 1 A per Channel (600 MA for L293D)
Peak Output Current 2 A per Channel (1.2 A for L293D)
Output Clamp Diodes for Inductive Transient Suppression (L293D)
2.2(c) ENCODER HT 12E:
The encoders are a series of CMOS LSIs for remote control system applications.
They are capable of encoding information which consists of N address bits and N
data bits. Each ad- dress/data input can be set to one of the two logic states. The
programmed addresses/data are transmitted together with the header bits
Via an RF or an infrared transmission medium upon receipt of a trigger signal. The
capability to select a TE trigger on the HT12E further enhances the application
flexibility of the series of encoders
.
22

23

PIN DIAGRAM:

Fig.15 Pin Diagram of HT12E

DESCRIPTION:

23

24
Fig. 16 Timing Diagram
The encoders begin a 4-word transmission cycle upon receipt of a transmission enable (TE
for the HT12E or D8~D11 active low). This cycle will repeat itself as long as the
transmission enable (TE or D8~D11) is held low. Once the transmission enable returns high
the en- coder output completes its final cycle and then stops as shown below. HT12E starts
working with a low signal on the TE pin. After receiving a low signal the HT12E starts the
transmission of 4 data bits as shown in the timing diagram above. And the output cycle will
repeats based on the status of the TE pin in the IC. If the TE pin retains the low signal the
cycle repeats as long as the low signal in the TE pin exists. The encoder IC will be in
standby mode if the TE pin is disabled and thus the status of this pin was necessary for
encoding process. The address of these bits can be set through A0 - A7 and the same
scheme should be used in decoders to retrieve the signal bits.

BLOCK DIAGRAM:

24

25

Fig.17 Internal Architecture of HT12E

FEATURES:

Operating voltage:
2.4V~12V for the HT12E

Low power and high noise immunity CMOS technology

Low standby current: 0.1

A (typ.) at VDD=5V

HT12E with a 38kHz carrier for infrared transmission medium

Minimum transmission word

Built-in oscillator needs only 5% resistor

Data code has positive polarity

Minimal external components

HT12E: 18-pin SOP package

2.2(d) HT 12D DECODER:


25

26

.HT12D converts the serial input into parallel outputs. It decodes the serial addresses and
data received by, say, an RF receiver, into parallel data and sends them to output data pins.
The serial input data is compared with the local addresses three times continuously. The
input data code is decoded when no error or unmatched codes are found. A valid
transmission in indicated by a high signal at VT pin.HT12D is capable of decoding 12 bits,
of which 8 are address bits and 4 are data bits. The data on 4 bit latch type output pins
remain unchanged until new is received.

PIN DIAGRAM:

Fig.18 Pin Diagram of HT12D Decoder

26

27

DESCRIPTION:

Fig.19 Timing Diagram


The decoders receive data that are transmitted by an encoder and interpret the first N bits
of code period as addresses and the last N bits as data, where N is the address code
number. A signal on the DIN pin activates the oscillator which in turn decodes the
incoming ad- dress and data. The decoders will then check the received address three
times continuously. If the received address codes all match the contents of the decoders
local address, the N bits of data are decoded to activate the output pins and the VT pin is
set high to indicate a valid transmission. This will last unless the address code is incorrect
or no signal is received.

27

28

BLOCK DIAGRAM:

Fig. 20 Internal Architecture of HT12D

FEATURES:

Operating voltage: 2.4V~12V

Low power and high noise immunity CMOS technology

Low standby current

Capable of decoding 12 bits of information

Binary address setting

Received codes are checked 3 times

Address/Data number combination

HT12D: 8 address bits and 4 data bits

28

29

2.2(e) RF TRANSCEIVER:
A wireless radio frequency (RF) transmitter and receiver can be easily made using
HT12D Decoder, HT12E Encoder and ASK RF Module. Wireless transmission can be
done by using 434Mhz ASK RF Transmitter and Receiver modules. In these modules
digital data is represented by different amplitudes of the carrier wave, hence this
modulation is known as Amplitude Shift Keying

.
Fig.21 RF Transmitter Interface with HT12E

29

30

DESCRIPTION:
HT12E Encoder IC will convert the 4 bit parallel data given to pins D0 D3 to serial data
and will be available at DOUT. This output serial data is given to ASK RF Transmitter.
Address inputs A0 A7 can be used to provide data security and can be connected to
GND (Logic ZERO) or left open (Logic ONE). Status of these Address pins should
match with status of address pins in the receiver for the transmission of the data. Data
will be transmitted only when the Transmit Enable pin (TE) is LOW. 1.1M resistor will
provide the necessary external resistance for the operation of the internal oscillator of
HT12E.

Fig.22 RF Receiver Interface with HT12D


30

31

DESCRIPTION:
ASK RF Receiver receives the data transmitted using ASK RF Transmitter. HT12D
decoder will convert the received serial data to 4 bit parallel data D0 D3. The status of
these address pins A0-A7 should match with status of address pin in the HT12E at the
transmitter for the transmission of data. The LED connected to the above circuit glows
when valid data transmission occurs from transmitter to receiver. 51K resistor will
provide the necessary resistance required for the internal oscillator of the HT12D.

PIN DIAGRAM:

Fig.23 Pin Diagram of RF Module

31

32

PIN DESCRIPTION:
RF TRANSMITTER
Pin Number

Function

Name

1.
2.
3.
4.

Ground(0V)
Serial Data Input
Supply Voltage(5V)
Antenna Output

GND
DATA
VCC
ANT

RF RECEIVER
Pin Number

Function

Name

1.
2.
3.
4.
5.
6.
7.
8.

GND
DATA
NC
VCC
VCC
GND
GND
ANT

Ground(0V)
Serial Data Output
No Connection
Supply Voltage(5V)
Supply Voltage(5V)
Ground(0V)
Ground(0V)
Antenna Input

FEATURES:

434 MHZ

500ft range (given perfect conditions)

4800bps data rate

5V supply voltage

2.2(f) MAX 232:

32

33
The MAX232 IC is used to convert the TTL/CMOS logic levels to RS232 logic levels
during serial communication of microcontrollers with PC. The controller operates at
TTL logic level (0-5V) whereas the serial communication in PC works on RS232
standards (-25 V to + 25V). This makes it difficult to establish a direct link between
them to communicate with each other.

PIN DIAGRAM:

Fig.24 Pin Diagram of MAX 232

LOGIC DIAGRAM:
33

34

Fig.25 Logic Diagram of MAX 232

RS-232 Transceiver:
DESCRIPTION:
MAX232 is compatible with RS-232 standard, and consists of dual transceiver. Each
receiver converts TIA/EIA-232-E levels into 5V TTL/CMOS levels. Each driver converts
TT- L/COMS levels into TIA/EIA-232-E levels. The MAX232 is characterized for
operation from -40C to +85C for all packages.
MAX232 is purposed for application in high-performance in- formation processing
systems and control devices of wide application.

FEATURES:

Input voltage levels are compatible with standard MOS levels


34

35

Output voltage levels are compatible with EIA/TIA-232-E levels

Single Supply voltage: 5V

Low input current: 0.1A at A= 25

Output current: 24mA Latching current not less than 450mA at A= 25

The transmitter outputs and receiver inputs are protected to 15kV Air ESD

APPLICATION

Battery-Powered RS232 Systems

Terminals

Modems

Computer

USB TO RS232 SERIAL CABLE CONVERTER:


DESCRIPTION:
The USB_RS232 cables are a family of USB to RS232 levels serial UART converter
cables incorporating FTDIs FT232RQ USB to serial UART interface IC device which
handles all the USB signaling and protocols. The cables provide a fast, simple way to
connect devices with a RS232 level serial UART interface to USB. Each USB-RS232
cable contains a small internal electronic circuit board, utilizing the FT232R, which is
encapsulated into the USB connector end of the cable. The FT232R datasheet,
DS_FT232R, is available at http://www.ftdichip.com. The integrated electronics also
include the RS232 level shifter plus TX and Rx LEDs which give a visual indication of
traffic on the cable (if transparent USB connector specified). The other end of the cable is
bare, tinned wire ended connections by default, but can be customized using different
connectors to support various applications. Cables are FCC, CE, and RoHS compliant.
35

36
The USB side of the cable is USB powered and USB 2.0 full speed compatible. Each
cable is 1.8m long and supports a data transfer rate up to 1 Mbaud.

2.2(g) Voltage Regulator:


The LM7805 series of three-terminal positive regulators is available in the TO-220
package and with several fixed output voltages, making them useful in a wide range of
applications. Each type employs internal current limiting, thermal shut-down, and safe
operating area protection. If adequate heat sinking is provided, they can deliver over 1 A
output current. Although designed primarily as fixed voltage regulators, these devices can
be used with external components for adjustable voltages and currents.

PIN DIAGRAM:

36

37
Fig.26 Pin Diagram of LM7805

CIRCUIT DIAGRAM:

Fig.27 Pin Connections of LM7805

PIN DESCRIPTION:

Pin No

Function

Name

Input voltage (5V-18V)

Input

Ground (0V)

Ground

Regulated output; 5V (4.8V-5.2V)

Output

FEATURES:

Output Current up to 1 A

Output Voltages: 5, 6, 8, 9, 10, 12, 15, 18, 24

37

38

Thermal Overload Protection Short-Circuit Protection

Output Transistor Safe Operating Area Protection

2.2(h) DC MOTOR:

DC motors can be applied to movement and locomotion Specifications of most DC


motors show high revolutions per minute (rpm) and low torque. Robotics need low rpm
and high torque. Gearboxes can be attached to motors to increase their torque while
reducing the rpm. The gearbox usually specifies a ratio that describes the rpm in to the
rpm out. For instance, a DC motor with an rpm of 8000 is connected to a 1000:1 gearbox.
What is the output rpm? 8000 rpm/1000 _ 8 rpm. The torque of the motor is substantially
increased. You could estimate that the torque will increase by the same value the rpm
decreased. In reality, no conversion is 100 percent efficient.

38

39

Fig.28 Dc Motor

POWER SUPPLY

A microprocessor based system design has to be activated with a clean power supply of
good regulation characteristics. A transient on the power line could send the
microprocessor wandering, resulting in system failure. Z80 operates on a voltage VCC
5V 10% and as a result of this, the power supply unit designed is 5V DC and is not
affected by variation in the AC voltage serving as input to the transformer.

TRANSFORMER:
A 220/240V transformer is used with output voltage of 12V.

39

40
DIODE 1N4007:
This converts the AC current to DC and satisfies charging current demands of the filter
capacitor. The arrangement of the diodes is called a bridge rectifier. Rectification is done
by the PN junction diodes. The DC voltage varies above and below an average value.
This variation is called ripple voltage. In order to reduce ripple voltage to a very small
value, the DC voltage needs to be filtered.

Fig.29 Circuit Diagram of 5V Power Supply

2.3 SOURCE PROGRAM


A firmware developed in C language is programmed into the microcontrollers code
memory area. The firmware controls the working of the entire hardware part. Usually the
microcontrollers and processors execute their instructions which are in machine code.
In early days the applications were written in assembly language. The development of the
huge application is very difficult by using the normal assembly language, because of their
less readability. Later for the fast developments, the high level languages are introduced
into the embedded system. C language is one of the most commonly used in the
embedded system field.

SERIALLY DATA TRANSMISSION FROM LAPTOP:


40

41

#include<reg52.h>
#include<stdio.h>
sbit enc1 = P2^0;
sbit enc2 = P2^1;
sbit enc3 = P2^2;
sbit enc4 = P2^3;
void main()
{
unsigned char tcx;
TMOD=0x20;
SCON=0x50;
TH1=0xfd;
TR1=1;
while(1)
{
while(RI==0);
RI=0;
tcx=SBUF;

//preprocessor directory
//microcontroller pin for encoder

// use timer 1, 8-bit auto-reload


// set the value of SCON register
// 9600 baud rate
// start timer

// wait to receive
// save the value

if(tcx== 'w')
{
enc1 = 0;
enc2 = 1;
enc3 = 1;
enc4 = 1;
}

// forward direction command

if(tcx== 'z')
{
enc1 = 1;
enc2 = 0;
enc3 = 1;
enc4 = 1;
}

// reverse direction command

if(tcx== 'a')
{
enc1 = 1;
enc2 = 1;
enc3 = 0;

// left direction command

41

42
enc4 = 1;
}
if(tcx== 'd')
{
enc1 = 1;
enc2 = 1;
enc3 = 1;
enc4 = 0;
}
if(tcx== 's')
{
enc1 = 1;
enc2 = 1;
enc3 = 1;
enc4 = 1;
}
}
}

// right direction command

// stop the movement of robot

INTERFACING THE L293D DRIVER WITH MICROCNTROLLER:


#include<reg52.h>
#include<stdio.h>
sbit motor_pin_1 = P2^0;
sbit motor_pin_2 = P2^1;
sbit motor_pin_3 = P2^2;
sbit motor_pin_4 = P2^3;
sbit red=P3^5;
sbit s1=P1^0;
sbit s2=P1^1;
sbit s3=P1^2;
sbit s4=P1^3;
void main()
{
P2=0x00;
while(1)
{

// connect the pin to l293d

// make this port as a output

42

43

P1=0xff;

// make this port as input

if(s1==0)
{
motor_pin_1 = 1;
motor_pin_2 = 0;
motor_pin_3 = 1;
motor_pin_4 = 0;
red=0;
// forward direction
}
if(s2==0)
{
motor_pin_1 = 0;
motor_pin_2 = 1;
motor_pin_3 = 0;
motor_pin_4 = 1;
red=0;
// revers direction
}
if(s3==0)
{
motor_pin_1 = 1;
motor_pin_2 = 0;
motor_pin_3 = 0;
motor_pin_4 = 0;
red=0;
// left direction }
if(s4==0)
{
motor_pin_1 = 0;
motor_pin_2 = 0;
motor_pin_3 = 1;
motor_pin_4 = 0;
red=0;
// right direction
}
if((s1==1)&&(s2==1)&&(s3==1)&&(s4==1))
{
motor_pin_1 = 0;
motor_pin_2 = 0;
motor_pin_3 = 0;
motor_pin_4 = 0;
red=1;
43

44
P2=0x00;
}
}

// stop

CHAPTER 3
44

45

3.1 APPLICATIONS

The product will have higher fidelity and will be versatile. Different fields can use the
product for the various applications. From geological exploration to the security system
this product will have the capability to fulfill the required purpose. In general, the use and
application can be summarized as:

Home security system

Use in the military fields for the information collection

Geographical exploration

Path tracker and exploration beyond human resources

Security system

Other remote control systems

Advantages:

No line of sight is needed.


45

46

Not blocked by common materials: It can penetrate most solids and pass through
Walls.

Longer range

It is not sensitive to the light

It is not much sensitive to the environmental changes and weather conditions

Disadvantages:

Interference: communication devices using similar frequencies - wireless phones,


Scanners, wrist radios and personal locators can interfere with transmission

Higher cost than infrared

Federal Communications Commission(FCC) licenses required for some products

Lower speed: data rate transmission is lower than wired and infrared transmission

3.2 FUTURE ASPECTS

The practical application domains where robotic technology is most likely to be used are:

Transport (public and private)

Exploration (oceans, space, deserts etc.)

Mining (dangerous environments)

Civil Defense (search and rescue, firefighting etc.)

Security/Surveillance (patrol, observation and intervention)

Domestic Services (cleaning etc.)


46

47

Entertainment (robotic toys etc.)

War Machines

Scientific Instrumentation ( synchrotron sample preparation, chemical)

3.3 REAL TIME VIEW OF PROJECT


TOP VIEW

FRONT VIEW

SIDE VIEWS

47

48

TRANSMITTER MODULE

FINAL VIEW OF PROJECT

3.4 CONCLUSION
This project presents a Laptop Controlled Vehicle using RF communication with wireless
data transmission and it is designed and implemented with Atmel AT89S52 MCU in
embedded system domain.
The robot is moved in particular direction using Serial Data Communication.
Experimental work has been carried out carefully. The result shows that higher efficiency
is indeed achieved using the embedded system. The proposed method is verified to be
highly beneficial for the security purpose and industrial purpose.
. On the other hand, however, the tests also clearly indicated areas where
improvement, modification, specification change and additional features to the robot are
required to serve better for the intended purpose. However, the idea always has a lot of
48

49
rooms to make enhancements in the future and the defects can be corrected to make the
idea to be utilized in real practice These issues became identified as a result of our
engineers conducting both the domestic tests and the overseas tests by themselves, and in
this respect the findings were all the more practical.

49

50

APPENDIX

4.1(a) LIST OF FIGURES


Figure No.
1
2
3
4
5
6
7

Name Of Figure
BLOCK DIAGRAM OF TRANSMITTER SECTION
BLOCK DIAGRAM OF RECEIVER SECTION
SERIAL DATA TRANSMISSION FROM LAPTOP
SERIAL DATA RECEPTION THROUGH RF RECEIVER
PROTEUS SIMULATION OF TRANSMITTER SECTION
BLOCK DIAGRAM OF RF MODULE
DC MOTOR INTREFACING WITH AT89S52
50

Page No.

2
2
3
4
6
7
9

51

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

AT89S52 ATMEL IC
PIN DIAGRAM OF MICROCONTROLLER
BUS ARCHITECTURE OF AT89S52
PIN DIAGRAM OF DRIVER L293D
BLOCK DIAGRAM OF L293D
FUNCTION TABLE OF L293D
LOGIC DIAGRAM OF L293D
PIN DIAGRAM OF HT12E
TRANSMISSION TIMING DIAGRAM
INTERNAL ARCHITECTURE OF HT12E
PIN DIAGRAM OF HT12D
DECODER TIMING DIAGRAM
INTERNAL ARCHITECTURE OF HT12D
RF TRANSMITTER INTERFACE WITH HT12E
RF RECEIVER INTERFACE WITH HT12D
PIN DIAGRAM OF RF MODULE
PIN DIAGRAM OF MAX232
LOGIC DIAGRAM OF MAX232
PIN DIAGRAM OF LM7805
CIRCUIT DIAGRAM OF 5V POWER SUPPLY

4.1(b) REFERENCES

TEXT BOOKS:

The 8051 Microcontroller and Embedded systems Muhammad Ali Mazidi

The 8051 Microcontroller Kenneth Ayala

Electronic Devices and Circuit Bolystead & Nahelsky

Beginners Guide to Embedded C Programming Chuck Hellebuyck

51

13
14
18
19
20
21
21
22
23
24
25
26
27
28
29
30
32
33
35
38

52

MAGAZINES:

Electronics For You


Electrikindia

4.1(c) BIBLIOGRAPHY
www.atmel.com

www.allaboutelectronics.hpage.in
www.electrosome.com
www.engineersgarage.com
www.texasinstrument.com
www.efymag.com
www.alldatasheet.com

52

Вам также может понравиться