Академический Документы
Профессиональный Документы
Культура Документы
CHAPTER 1
1.1 INTRODUCTION
Power Supply
RF Module
Decoder (HT12D)
Motor driver (L293D)
Motor's (100 rpm)
AT89S52
RF TX
HT12E
ENCODER
MAX 232
LAPTOP
MOTOR
RF RX
AT89S52
L293D
MOTOR
HT12D
DECODER
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.
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
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.
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
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.
1
2
11.
12.
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.
20
1
19.
WHEELS
KEIL VISION 4
13
14
PIN DESCRIPTION:
VCC : Supply voltage.
GND : Ground.
Port 0 :
14
15
Port 0 also receives the code bytes during Flash programming and
outputs the code bytes 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 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 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.
16
Port Pin
Alternate Functions
P3.0
P3.1
P3.2
P3.3
P3.4
P3.5
P3.6
P3.7
RST :
Reset input. A high on this pin for two machine cycles while the
oscillator is running resets the device.
ALE/PROG :
This pin is also the program pulse input (PROG) during Flash
Programming.
PSEN :
EA/VPP :
16
17
XTAL1 :
internal clock operating circuit.
XTAL2 :
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
18
19
FEATURES:
PIN DIAGRAM:
19
20
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:
FUNCTION TABLE:
LOGIC DIAGRAM:
21
22
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:
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
FEATURES:
Operating voltage:
2.4V~12V for the HT12E
A (typ.) at VDD=5V
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:
26
27
DESCRIPTION:
27
28
BLOCK DIAGRAM:
FEATURES:
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.
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:
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
5V supply voltage
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:
LOGIC DIAGRAM:
33
34
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:
35
The transmitter outputs and receiver inputs are protected to 15kV Air ESD
APPLICATION
Terminals
Modems
Computer
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.
PIN DIAGRAM:
36
37
Fig.26 Pin Diagram of LM7805
CIRCUIT DIAGRAM:
PIN DESCRIPTION:
Pin No
Function
Name
Input
Ground (0V)
Ground
Output
FEATURES:
Output Current up to 1 A
37
38
2.2(h) DC MOTOR:
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.
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
// wait to receive
// save the value
if(tcx== 'w')
{
enc1 = 0;
enc2 = 1;
enc3 = 1;
enc4 = 1;
}
if(tcx== 'z')
{
enc1 = 1;
enc2 = 0;
enc3 = 1;
enc4 = 1;
}
if(tcx== 'a')
{
enc1 = 1;
enc2 = 1;
enc3 = 0;
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;
}
}
}
42
43
P1=0xff;
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:
Geographical exploration
Security system
Advantages:
46
Not blocked by common materials: It can penetrate most solids and pass through
Walls.
Longer range
Disadvantages:
Lower speed: data rate transmission is lower than wired and infrared transmission
The practical application domains where robotic technology is most likely to be used are:
47
War Machines
FRONT VIEW
SIDE VIEWS
47
48
TRANSMITTER MODULE
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
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:
51
13
14
18
19
20
21
21
22
23
24
25
26
27
28
29
30
32
33
35
38
52
MAGAZINES:
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