Download - Gps based vehicle monitoring system copy
APROJECT REPORT
ON
GPS BASED VEHICLE MONITORING SYSTEM
Submitted By:
SUMIT VARSHNEY Submitted to the Department of Electronics & Communication
in the partial fulfillment of the requirementsfor the degree of
Bachelor of Technology in
Electronics & Communication
GAUTAM BUDDHA TECHNICAL UNIVERSITY, LUCKNOWJUNE, 2011
TABLE OF CONTENTS
Page No.CERTIFICATE 4DECLARATION 5ACKNOWLEDGEMENT 6ABSTRACT 8LIST OF FIGURES 9LIST OF TABLES 10
12CHAPTER 1. INTRODUCTION 14CHAPTER 3. BLOCK DIAGRAM
3.1 GPS SECTION 17 3.2 COLLISION AVOIDANCE SECTION 18
CHAPTER 4 CIRCUIT DIAGRAM
4.1 INTERFACING WITH MICROCONTROLLER 23 4.2 IR TRANSMITTER/RECEIVER SECTION 24
CHAPTER5. COMPONENT LIST 26CHAPTER 6. DETAILS OF COMPONENTS
6.1 POWER SUPPLY 28 6.2 MICROCONTROLLER AT89C51 29 6.3 IC MAX 232 44 6.4 IC HT12D 45 6.5 IC HT12E 47 6.6 VOLTAGE REGULATOR FOR +5V (7805) 48 6.7 BC547 NPN TRANSISTOR 49 6.8 RESISTOR 50 6.9 CAPACITOR 52 6.10 LCD DISPLAY 52 6.11 RF TRANSCEIVER 53 6.12 GPS MODULE 55 6.13 IC L293D 63 6.14 TSOP 1738 63 6.15 IR TRANSMITTER/RECEIVER 64 6.16 DC MOTOR 65 6.17 LED 66
CHAPTER 7. HARDWARE DESIGN 69CHAPTER 8. SOFTWARE DESIGN
8.1 PROGRAMMING 73 8.2 WORKING WITH µVISION KEIL 83
CHAPTER 9 TESTING 90
2
CHAPTER 10. PROBLEMS FACED 92CHAPTER 11. ADVANTAGES 94CHAPTER12. LIMITATIONS 96CHAPTER13. APPLICATIONS 98CHAPTER14. FUTURE ASPECTS 100CHAPTER 15. CONCLUSION 102CHAPTER 16. REFERENCES 104CHAPTER 17. APPENDIX
17.1 ESTIMATED COST 106 17.2 DATASHEET 107
3
CERTIFICATE
This is to certify that Project Report entitled “GPS Based Vehicle
Monitoring System” which is submitted by Sumit Varshney in partial
fulfillment of the requirement for the award of degree B. Tech. in
Department of Electronics & Communication from JSS ACADEMY
OF TECHNICAL EDUCATION of Engineering & Technology,
Muzaffarnagar of U.P. Technical University, is a record of the
candidate own work carried out by him under my supervision. The
matter embodied in this thesis is original and has not been submitted for
the award of any other degree.
Er. Amit Kumar Chauhan Prof. N.K. Sharma
(Project Guide) (H.O.D., Deptt. Of ECE)
External Examiner Dr. S. N. Chauhan
(Director)
4
DECLARATION
We hereby declare that this submission is our own work and that, to the best of our
knowledge and belief, it contains no material previously published or written by another
person nor material which to a substantial extent has been accepted for the award of any
other degree or diploma of the university or other institute of higher learning, except
where due acknowledgment has been made in the text.
Signature :
Name : Sumit Varshney Date :
5
ACKNOWLEDGEMENT
It gives us a great sense of pleasure to present the report of the B. Tech Project “GPS Based Vehicle Monitoring System” undertaken during B. Tech. Final Year. We owe special debt of gratitude to Mr. Amit Kumar Chauhan (A.P., Department of Electronics & Communication Engineering, JSS Academy of Technical Education NOIDA) for his constant support and guidance throughout the course of our work. His sincerity, thoroughness and perseverance have been a constant source of inspiration for us. It is only his cognizant efforts that our endeavors have seen light of the day.
We also take the opportunity to acknowledge the contribution of Prof. N. K. Sharma (Head, Department of Electronics & Communication, JSS Academy of Technical Education NOIDA) for their full support and assistance during the development of the project.
From the core of my heart, I would also like to express my profound gratitude to reverend Dr. S.N. Chauhan (Executive Director, S.D.C.E.T.) and respected Dr. A.K. Gautam (Principal, S.D.C.E.T.) for providing us the necessary facilities and such a blooming environment to work upon this project.
We also do not like to miss the opportunity to acknowledge the contribution of all faculty members of the department for their kind assistance and cooperation during the development of our project. Last but not the least, we acknowledge our friends for their contribution in the completion of the project.
Signature :Name : Sumit Varshney
Date :
6
ABSTRACT OF
THE PROJECT
ABSTRACT
7
This project present an automotive localization system using GPS. The system
permits localization of robot and display of the position on the LCD in the form of
latitude and longitude. Vehicle can be operated in both autonomous and manual mode.
We can store the position of vehicle by using remote control. Later this stored
information can be viewed by connecting it to PC. For collision avoidance it uses IR
sensors to detect obstacles and make a decision to avoid them.
The conventional mobile robot have used front-steering and rear- wheel driving
mechanism to response all needed robot obvious motions, but the motion restriction is a
major problem in the use of such mechanism. The omnidirectional configuration is a
most suggested mechanism for mobile robot, which to have the capability of changing
directions within the limited space in the indoor environment.
LIST OF FIGURES Page No.
8
17Fig.1 Block Diagram of GPS based vehicle monitoring
system 18Fig.2 Block Diagram of collision avoidance system 23Fig.3 Circuit Diagram of interfacing with AT89C51 24Fig.4 Circuit Diagram of receiver for collision avoidance 24Fig.5 Circuit Diagram of transmitter for collision avoidance 30Fig.6 Pin diagram of AT89C51 34Fig.7 Program Memory of AT89C5 35Fig.8 Program Memory of AT89C52 35Fig.9A Data Memory of AT89C51 36Fig.9B Data Memory of AT89C52 38Fig.10 128 Bytes of Directly and Indirectly Addressable
RAM 44Fig.11 Pin Diagram of MAX232 DIP Package 46Fig.12 Pin Diagram of HT12D 47Fig.13 Pin Diagram of HT12E 49Fig.14 Pin Diagram of IC7805 50Fig.15 BC547 Transistor 53Fig.16 Internal Block diagram of LCD Display 53Fig.17 Pin Configuration of LCD Display 54Fig.18 Pin Configuration of RF Transmitter/Receiver 58Fig.19 Different components of GPSFig.20 GPS Receiver communication with satellite and sending information through the wireless mobile phone 60Fig.21 GPS modem device 61Fig.22 Pin Diagram of L293D 63Fig.23 Pin Diagram of TSOP 64Fig.24 Working of LED 66Fig.25 Soldering Procedure 70
LIST OF TABLES
9
Page No.
Table1. PIN Description of AT89C51 31
Table2. SFRs of AT89C51 39
Table3. SFRs of AT89C51 41
Table4. PIN Description of IC MAX232 45
Table5. PIN Description of IC HT12D 46
Table6. PIN Description of IC HT12E 48
Table7. PIN Description of IC 7805 49
Table8. Ratings of LCD Display 53
Table9. PIN Description of RF Transmitter 54
Table10. PIN Description of RF Receiver 55
10
INTRODUCTION
1. INTRODUCTION
11
In general, we have no correct mechanism to know the parameters like the route
in which a vehicle has travelled, where was it at a particular instant of time, with what
speed did it travel at that place and time and did it go to the desired place or not, we don’t
have a option rather than to believe the driver. The problem arises when the driver
doesn’t give us the exact authentic information.
If we want vehicle to go to certain place, via certain route later when we access
the information about the journey, we have to simply depend up on the driver for the
information of the vehicle and the driver may not give us the exact information about the
journey and could use the (vehicle) for his personal use.
The GPS BASED VEHICLE MONITORING SYSTEM answers to all the
problems raised above. We can know the parameters like latitude and longitude; route
adopted by the driver without being dependent on him.
We make use of a GPS modem, Micro controller and a wireless network (RF
transceiver) and PC.
Data from GPS receiver is sent to the LCD. We can store the position of vehicle
by using remote control. Later this stored information can be viewed by connecting it to
PC.
12
PRINCIPLEOF OPERATION
2. PRINCIPLE OF OPERATION
The vehicle monitoring system deals with the latitude and longitude of vehicle
which is obtained from GPS receiver and display the data on the LCD.
13
As it involves the identification of the vehicle it requires a Global Processing
System (GPS) to know the position of the vehicle. There are 24 satellites revolving
around the earth’s orbit, at least 3 satellites are required for the GPS receiver. When the
GPS receiver is exposed to at least 3 satellites it receives the data from the satellites i.e.
latitude, longitude, distance, speed, time, altitude. The receiver continuously gives the
data until it is switched off. A 5V external power supply is given to the GPS receiver.
The baud rate of the GPS receiver is 4800 bits/sec.
The GPS receiver is interfaced with a Microcontroller (AT 89C51). The 5V
power supply is needed for the micro controller. The GPS receiver is interfaced with the
Microcontroller using a RS-232 protocol.
The data from the GPS RECEIVER is transferred to the PC using a wireless
network i.e. RF transceiver. There are two RF transceivers, one is connected to PC and
other is connected to Microcontroller. The data is presented in the Google Earth map
graphically. For collision avoidance it uses IR sensor to sense the obstacle and send
signal to embedded controller. The embedded controller receives these obstacle detecting
signals and then send signal to motors for taking direction to avoid obstacle. The project
uses µc 80C51 as the controlling element. It uses 3 IR (Infra Red) sensors and 3 IR
transmitting circuitry. When the obstacle comes in path of robot IR beam is reflected
from the obstacle then sensor gives +5V voltage to µc. This +5V voltage is detected then
µc decides to avoid the obstacle by taking left or right turn. If the sensor gives zero to µc
that means there is no obstacle present in its path so it goes straight until any obstacle is
detected.
The three IR transmitter circuits are fitted on front, right and left side of robot.
The three IR sensors are placed near to transmitters’ IR LEDs. The connections can be
given from main circuit to sensors using simple twisted pair cables. Two motors namely
right motor and left motor are connected to driver IC (L293D). L293D is interface with
14
µc. Micro-controller sends logic 0 & logic 1 as per the programming to driver IC which
moves motors forward or reverse direction
15
Block diagram
3. Block Diagram:
3.1 GPS Section:
16
Fig 1: G.P.S Based Vehicle Monitoring System
3.2 Collision Avoidance Section:
17
Fig 2: Collision Avoidance System
The Major Building blocks of this Project
1. Microcontroller (AT89C51)
2. Motor driver IC (L293D)
3. DC Motors
18
4. GPS Receiver
5. RF Transceiver
6. Power supply
7. R.S 232
8. LCD
9. IR Sensors
BLOCK DIAGRAM EXPLANATION:
Overview of each block is given below:
1. Microcontroller
This is the most important block of the system. Microcontroller is the decision making logical device which has its own memory, I/O ports, CPU and Clock circuit embedded on a single chip.
2. Driver
L293D is used as driver IC. Motors are connected to this IC. According to program in µc it drives the left and right motor. 3. Motor
We have used two D.C motors to give motion to the ROBOT. Motors are connected to L293D IC. According to the program in microcontroller, the left and right motor drives.
4. GPS
GPS is the only fully functional GNSS in the world. GPS uses the constellation of
between 24 and 32 Medium Earth Orbit satellites that transmit precise microwave
19
signals, which enable GPS receivers to determine their current location, the time, and
their velocity. Its official name is NAVSTAR GPS.
5. RF Transceiver:
5.1 Transmitter in RF Transceiver:
The base stations and subscriber units include radio frequency transmitters and
RF receivers; together they're called "RF transceivers." RF transceivers service the
wireless links between the base stations and subscriber units.
The RF transmitter receives a base band signal from a base band processor,
converts the base band signal to an RF signal, and couples the RF signal to an antenna for
transmission.
5.2 Receiver in RF Transceiver:
The function of the receiver is to detect signals in the presence of noise and
interference, and provide amplification, down conversion and demodulation of the
detected the signal such that it can be displayed or used in a data processor.
6. Power Supply:
The power supply unit is used to provide a constant 5V supply to different IC’s.
This is a circuit in which external 12VDC Battery is connected to fixed 3-pin voltage
regulator. Diode is added in series to avoid Reverse voltage.
7. RS 232:
Two allow compatibility among the data communication equipment made by
various manufacturers; an interfacing standard called RS232, was set by the electronics
20
industries association (EIA) in 1960. RS 232 is the standard defined for the connection
of "Data Terminal Equipment" (DTE) to "Data Communications Equipment" (DCE).
8. LCD:
A liquid crystal display (LCD) is a flat panel display, electronic visual display,
or video display that uses the light modulating properties of liquid crystals (LCs). LCs
does not emit light directly.
9. IR Transmitter & Receiver
The IR Transmitter block mainly used to generate IR signal. It uses timer IC555
in astable multivibrator mode to generate square wave which have continuous pulses of
50% duty cycle of frequency 38 KHz. This transmitter is so arranged that the IR rays are
focused on the sensor.
IR sensor (TSOP 1738) which gives normally zero volt at output of it. After
receiving infrared light at output of sensor we get +5V
21
Circuit diagram
CIRCUIT DIAGRAM: 4.1 Interfacing With Microcontroller:
22
Fig3: Interfacing with 89C51
4.2 Collision Avoidance Section:
23
Fig 4: Receiver Circuit
Fig 5: Transmitter Circuit
24
Components
LIST
25
COMPONENTS LIST
S. No. COMPONENTS QUANTITYSemiconductors
1 IC-AT89C51 Microcontroller 12 IC-HT12D Decoder 13 IC-HT12E Encoder 14 IC-MAX232 Driver/Receiver 15 IC-7805, 5V Regulator 26 NPN Transistor 37 IC- L293D 18 TSOP 1738 1
Resistors1 R1, R2- 4.7 kΩ 32 R3- 1 kΩ 63 VR1- 10 kΩ preset 7
Miscellaneous1 XTAL- 12MHz Crystal 12 S1- Push-to-On Switch 13 TX1- 38 kHz IR Transmitter 34 RX1- 38 kHz IR Receiver 35 RF Module 16 GPS Module 17 LCD Display 18 DC Motors 2
Capacitors1 C1, C2- 3.3 nF Ceramic Disk 22 C4-10μF, 16V Electrolytic 13 C- 1μF, Electrolytic 44 0.01μF, Polyster 6
26
Details of
components
6.1 POWER SUPPLY
27
Power supply is the major concern for every electronic device. The power supply
unit is used to provide a constant 5V supply to different IC’s. This is a circuit in which
external 12VDC Battery is connected to fixed 3-pin voltage regulator. Diode is added in
series to avoid Reverse voltage.
Since the controller and other devices used are low power devices there is a need
to regulate the output to convert the output to a +5V constant dc. It is accomplished by
using following components.
Voltage Regulator:
The voltage regulator is used for the voltage regulation purpose. We use IC 7805
voltage regulator. The IC number has a specific significance. The number 78 represents
the series while 05 represents the output voltage generated by the IC
Light Emitting Diode:
We employ a light emitting diode for testing the functionality of the power supply
circuit. LED’s are also employed in other areas for many purposes. The following are the
advantages of using LED’s.
It helps us while troubleshooting the device i.e. when the device is malfunctioning
it would be easy to detect where the actual problem arised.
LED employed with microcontroller verifies whether data is being transmitted
28
6.2 MICROCONTROLLER (AT89C51)
The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer
with 4K bytes of Flash programmable and erasable read only memory (PEROM). The
device is manufactured using Atmel’s high-density nonvolatile memory technology and
is compatible with the industry-standard MCS-51 instruction set and pinot. The on-chip
Flash allows the program memory to be reprogrammed in-system or by a conventional
nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a
monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a
highly-flexible and cost-effective solution to many embedded control applications.
Features:
• Compatible with MCS-51™ Products
• 4K Bytes of In-System Reprogrammable Flash Memory
– Endurance: 1,000 Write/Erase Cycles
• Fully Static Operation: 0 Hz to 24 MHz
• Three-level Program Memory Lock
• 128 x 8-bit Internal RAM
• 32 Programmable I/O Lines
• Two 16-bit Timer/Counters
• Six Interrupt Sources
• Programmable Serial Channel
• Low-power Idle and Power-down Modes
29
Description of Microcontroller (AT89C51):
Fig 6: Pin Diagram of Microcontroller AT89C51
30
Pin Description
Pin Description
Pin Number Description
1 - 8 P1.0 - P1.7 - Port 1
9 RST - Reset
10 - 17 P3.0 - P3.7 - Port 3
18 XTAL2 - Crystal
19 XTAL1 - Crystal
20 GND - Ground
21 - 28 P2.0 - P2.7 - Port 2
29 PSEN - Program Store Enable
30 ALE - Address Latch Enable
31 EA - External Access Enable
32 - 39 P0.7 - P0.1 - Port 0
40 Vic - Positive Power Supply
TABLE 1
Pin Description:
VCC: Supply voltage.
GND: Ground.
Port 0:
Port 0 is an 8-bit open-drain bi-directional 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 may 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. 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.
31
Port 1:
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The 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 pins that are
externally being pulled low will source current (IIL) because of the internal pull-ups.
Port 1 also receives the low-order address bytes during Flash programming and
verification.
Port 2:
Port 2 is an 8-bit bi-directional 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 memory and
during accesses to external data memory that uses 16-bit addresses (MOVX @DPTR). In
this application, it uses strong internal pull-ups when emitting 1s. During accesses to
external data memory that uses 8-bit addresses (MOVX @ RI), Port 2 emits the contents
of the P2 Special Function Register.
Port 2 also receives the high-order address bits and some control signals during Flash
programming and verification.
Port 3:
Port 3 is an 8-bit bi-directional 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. As inputs, Port 3 pins that are
externally being pulled low will source current (IIL) because of the pull-ups. Port 3 also
serves the functions of various special features of the AT89C51 as listed below:
P3.0 -RXD (serial input port)
P3.1- TXD (serial output port)
P3.2 -INT0 (external interrupt 0)
P3.3 -INT1 (external interrupt 1)
32
P3.4 -T0 (timer 0 external input)
P3.5 -T1 (timer 1 external input)
P3.6- WR (external data memory write strobe)
P3.7 -RD (external data memory read strobe).
Port 3 also receives some control signals for Flash programming and verification.
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 output pulse for latching the low byte of the address
during accesses to external memory. This pin is also the program pulse input (PROG)
during Flash programming. In normal operation ALE is emitted at a constant rate of 1/6
the oscillator frequency, and may be used for external timing or clocking purposes. Note,
however, that one ALE pulse is skipped during each access to external Data
Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH.
With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise,
the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the
microcontroller is in external execution mode.
PSEN: Program Store Enable is the read strobe to external program memory. When the
AT89C51 is executing code from external program memory, PSEN is activated twice
each machine cycle, except that two PSEN activations are skipped during each access to
external data memory.
EA/VPP: External Access Enable. EA must be strapped to GND in order to enable the
device to fetch code from external program memory locations starting at 0000H up to
FFFFH. However, that if lock bit 1 is programmed, EA will be internally latched on reset.
EA should be strapped to VCC for internal program executions. This pin also
receives the 12-volt programming enable voltage (VPP) during Flash programming, for
parts that require12-volt VPP.
33
XTAL1: input to the inverting oscillator amplifier and input to the internal clock
operating circuit.
XTAL2: Output from the inverting oscillator amplifier.
Memory Organization: Memory Organization Program Memory
The AT89C Microcontroller has separate address spaces for program memory and
data memory. The program memory can be up to 64K bytes long. The lower addresses
may reside on-chip. Figure 8 shows a map of the AT89C51 program memory, and Figure
9 shows a map of the AT89C52 program memory. The AT89C1051/2051 does not have
off-board memory expansion.
Figure 7. AT89C51 Program Memory
34
Figure 8. AT89C52 Program Memory
B) Data Memory:
The AT89C can directly address up to 64K bytes of data memory external to the
chip. The MOVX instruction accesses the external data memory. (Refer to the Instruction
Set section in this chapter for a detailed description of instructions).
The AT89C51 has 128 bytes of on-chip RAM (256 bytes in the AT89C52) plus a
number of Special Function Registers (SFRs). The lower 128 bytes of RAM can be
accessed either by direct addressing (MOV data addr) or by indirect addressing (MOV
@Ri). Figure 10 shows the AT89C51 and the AT89C52 data memory organization.
Figure 9A: The AT89C51 Data Memory
35
Figure 9B: The AT89C52 Data Memory
Indirect Address Area In Figure 3b, the SFRs and the indirect address RAM
have the same addresses (80H through 0FFH). Nevertheless, they are two separate areas
and are accessed in two different ways. For example, the following instruction writes
0AAH to Port0, which is one of the SFRs. MOV 80H, # 0AAH
The following instruction writes 0BBH in location 80H of the data RAM.
MOVR0, # 80H
MOV@ R0, # 0BBH
Thus, after executing both of these instructions, Port 0 contains 0AAH, and
location 80H of the RAM contains 0BBH.The stack operations are examples of indirect
addressing, so the upper 128 bytes of data RAM are available as stack space in devices
that implement 256 bytes of internal RAM.
Direct and Indirect Address Area
The 128 bytes of RAM that can be accessed by both direct and indirect addressing
can be divided into 3 segments as described in this section and as shown in Figure11.
36
1. Register Banks 0-3: Locations 0 through 1FH (32bytes). Reset default is to register
bank 0. To use the other register banks, the user must select them in the software.
Each register bank contains eight 1-byte registers, 0 through 7. Reset initializes
the Stack Pointer to location 07H. The Stack Pointer is then incremented once to start
from location 08H, which is the first register (R0) of the second register bank. Thus, in
order to use more than one register bank, the SP should be initialized to a different
location of the RAM that is not used for data storage (that is, a higher part of the RAM).
2. Bit Addressable Area: 16 bytes have been assigned for this segment, 20H through
2FH. Each of the 128 bits of this segment can be directly addressed (0 through 7FH).
These bits can be referred to in two ways. One way is to refer to their addresses, that is, 0
to 7FH. The other way is with reference to bytes 20H to 2FH. Thus, bits 0 through 7 can
also be referred to as bits 20.0 through 20.7 and bits 8 through FH are the same as 21.0
through 21.7, and so on. Each of the 16 bytes in this segment can also be addressed as a
byte.
37
38
3. Scratch Pad Area: Bytes 30H through 7FH are available to the user as data RAM.
However, if the stack pointer has been initialized to this area, enough bytes should be left
aside to prevent SP data destruction.
Special Function Registers
Table 2 contains a list of all the SFRs and their addresses.
TABLE 2
39
PSW: Program Status Word (Bit Addressable)CY AC F0 RS1 RS1 RS0 OV − P
CY PSW.7 Carry flag.
AC PSW.6 Auxiliary carry flag.
F0 PSW.5 Flag 0 available to the user for general purpose.
RS1 PSW.4 Register Bank selector bit 1.(1)
RS0 PSW.3 Register Bank selector bit 0. (1)
OV PSW.2 Overflow flag.
— PSW.1 User definable flag.
P PSW.0 Parity flag. Set/cleared by hardware each instruction cycle to indicate an
odd/even number of 1’s bit in the accumulator.
RS1 RS0 Register Bank Address
0 0 0 00H-07H
0 1 1 08H-0FH
1 0 2 10H-17H
1 1 3 18H-1FH
PCON: Power Control Register (Not Bit Addressable)
SMOD − − − GF1 GF0 PD IDL
SMOD Double baud rate bi
t. If Timer 1 is used to generate baud rate and SMOD = 1, the baud rate is doubled when
the Serial Port is used in modes 1, 2, or 3.
— Not implemented, reserved for future use.(1)
40
— Not implemented, reserved for future use.(1)
— Not implemented, reserved for future use. (1)
GF1 General purpose flag bit.
GF0 General purpose flag bit.
PD Power Down bit. Setting this bit activates Power Down operation in the AT89C51.
IDL Idle Mode bit. Setting this bit activates Idle Mode operation in the AT89C51.
If 1s are written to PD and IDL at the same time, PD takes precedence.
Interrupts
In order to use any of the interrupts in the Flash microcontroller, take the following three
steps.
1. Set the EA (enable all) bit in the IE register to 1.
2. Set the corresponding individual interrupt enable bit in the IE register to 1.
3. Begin the interrupt service routine at the corresponding Vector Address of that
interrupt. See the following table 3.
Interrupt Source Vector Address
IE0 0003HTF0 000BHIE1 0013HTF1 001BHR1 and T1 0023HTF2 and EXF2(1) 002BH
TABLE 3
IE: Interrupt Enable Register (Bit Addressable)
If the bit is 0, the corresponding interrupt is disabled. If the bit is 1, the corresponding
interrupt is enabled.
EA − ET2 ES ET1 EX1 ET0 EX0
41
EA IE.7 Disables all interrupts. If EA = 0, no interrupt is acknowledged. If EA = 1,
each interrupt source is individually enabled or disabled by setting or clearing its enable
bit.
— IE.6 Not implemented, reserved for future use.(1)
ET2 IE.5 Enables or disables the Timer 2 overflow or capture interrupt (AT89C52
only).
ES IE.4 Enables or disables the serial port interrupt.
ET1 IE.3 Enables or disables the Timer 1 overflow interrupt.
EX1 IE.2 Enables or disables External Interrupt 1.
ET0 IE. 1 Enables or disables the Timer 0 overflow interrupt.
EX0 IE.0 Enables or disables External Interrupt 0.
Assigning Higher Priority to One or More Interrupts
In order to assign higher priority to an interrupt the corresponding bit in the IP register
must be set to 1.While an interrupt service is in progress, it cannot be interrupted by an
interrupt of the same or lower priority.
Priority Within Level
The only purpose of priority within a level is to resolve simultaneous requests of the
same priority level. From high to low, interrupt sources are listed below.
IE0
TF0
IE1
TF1
RI or TI
TF2 or EXF2
IP: Interrupt Priority Register (Bit Addressable)
If the bit is 0, the corresponding interrupt has a lower priority. If the bit is 1, the
corresponding interrupt has a higher priority.
42
− − PT2 PS PT1 PX1 PT0 PX0
— IP. 7 Not implemented, reserved for future use.(1)
— IP. 6 Not implemented, reserved for future use.(1)
PT2 IP. 5 Defines the Timer 2 interrupt priority level (AT89C52 only).
PS IP. 4 Defines the Serial Port interrupt priority level.
PT1 IP. 3 Defines the Timer 1 interrupt priority level.
PX1 IP. 2 Defines External Interrupt 1 priority level.
PT0 IP. 1 Defines the Timer 0 interrupt priority level.
PX0 IP. 0 Defines the External Interrupt 0 priority level.
TCON: Timer/Counter Control Register (Bit Addressable)
TF1 TR1 TF0 TR0 IE1 IT1 IE0 IT0
TF1 TCON. 7 Timer 1 overflow flag. Set by hardware when the Timer/Counter 1
overflows. Cleared by hardware as the processor vectors to the interrupt service routine.
TR1 TCON. 6 Timer 1 run control bit. Set/cleared by software to turn Timer/Counter 1
ON/OFF.
TF0 TCON. 5 Timer 0 overflow flag. Set by hardware when the Timer/Counter 0
overflows. Cleared by hardware as the processor vectors to the service routine.
TR0 TCON. 4 Timer 0 run control bit. Set/cleared by software to turn Timer/Counter 0
ON/OFF.
IE1 TCON. 3 External Interrupt 1 edge flag. Set by hardware when the External
Interrupt edge is detected.
Cleared by hardware when the interrupt is processed.
43
IT1 TCON. 2 Interrupt 1 type control bit. Set/cleared by software to specify falling
edge/low level triggered.
External Interrupt.
IE0 TCON. 1 External Interrupt 0 edge flag. Set by hardware when External Interrupt
edge detected. Cleared by hardware when interrupt is processed.
IT0 TCON. 0 Interrupt 0 type control bit. Set/cleared by software to specify falling
edge/low level triggered.
6.3 IC MAX 232
The MAX232 from Maxim was the first IC which in one package contains the
necessary drivers (two) and receivers (also two), to adapt the RS-232 signal voltage
levels to TTL logic. It became popular, because it just needs one voltage (+5V) and
generates the necessary RS-232 voltage levels (approx. -10V and +10V) internally.
Fig12: MAX232 DIP Package
44
MAX232 DIP PACKAGE LAYOUT
Nbr Name Purpose1 C1+ +Connector for Capacitor C12 V+ Output of Voltage Pump3 C1- -Connector for Capacitor C14 C2+ +Connector for Capacitor C25 C2- -Connector for Capacitor C26 V- Output of Voltage Pump/Inverter7 T2out Driver 2 Output8 R2in Receiver 2 Input9 R2out Receiver 2 Output10 T2in Driver 2 Input11 T1in Driver 1 Input12 R1out Receiver 1 Output13 R1in Receiver 1 Intput14 T1out Driver 1 Output15 GND Ground16 VCC Power Supply
TABLE 4
6.4 IC 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
45
Fig12: PIN Assignment of HT12D
PIN DESCRIPTION
Pin Name
I/O Internal connection Description
A0~A11 I NMOS TRANSMISSIONGATE
Input pins for address A0 ~ A11 settingThey can be externally set to VDD or VSS.
D8 ~D11 O CMOS OUT Output Data PinsDIN I CMOS IN Serial Data Input PinVT O CMOS OUT Valid Transmission ON, Active HighOSC1 I OSCILLATOR Oscillator Input PinOSC2 O OSCILLATOR Oscillator Output PinVSS I − Negative Power SupplyVDD I − Positive Power Supply
TABLE 5
46
6.5 IC HT12E
Features
Operating voltage
2.4V~5V for the HT12A
2.4V~12V for the HT12E
Low power and high noise immunity CMOS technology
Low standby current: 0.1_A (typ.) at VDD=5V
HT12A with a 38kHz carrier for infrared
Fig13: PIN Assignment of HT12E
47
PIN Description
Pin Name I/O Internal Connection DescriptionA0 ~ A7 I CMOS-IN
Pull-High(HT12A)
Input pins for address A0 ~ A7 settingThese pins can be externally set to V or left
open.NMOS TRANSMISSION
GATEPROTECTION DIODE
(HT12E)AD8 ~ AD11 I NMOS TRANSMISSION
GATEPROTECTION DIODE
(HT12E)
Input pins for address/data AD8 ~ AD11 settingThese pins can be externally set to V or left
open.
D8 – D11 I CMOS INPull High
Input pins for data D8 ~ D11 setting and transmission enable, active low
These pins should be externally set to V or left open.
DOUT O CMOS OUT Encoder data serial transmission outputL/MB I CMOS IN
Pull HighLatch/Momentary transmission format
selectionpin:
Latch: Floating or VDD
Momentary: VSS
TABLE 6
6.6 IC 7805
Features
• Output Current up to 1A
• Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V
• Thermal Overload Protection
• Short Circuit Protection
• Output Transistor Safe Operating Area Protection
48
Fig 14: PIN Description
Pin No. Function Name1 Input Voltage (5V-18V) Input2 Ground (0V) Ground3 Regulated Output; 5V (4.8V-5.2V) Output
49
TABLE 7
6.7 BC 547 TRANSISTOR
BC547 is an NPN bi-polar junction transistor. A transistor, stands for transfer of
resistance, is commonly used to amplify current. A small current at its base controls a
larger current at collector & emitter terminals.
BC547 is mainly used for amplification and switching purposes. It has a
maximum current gain of 800. Its equivalent transistors are BC548 and BC549.
For amplification applications, the transistor is biased such that it is partly on for
all input conditions. The input signal at base is amplified and taken at the emitter. BC547
is used in common emitter configuration for amplifiers.
Fig15: BC 547 Transistor
6.8 RESISTOR
6.8.1 RESISTOR:
50
A resistor is a passive two-terminal electrical component that
implements electrical resistance as a circuit element. The current through a resistor is
in direct proportion to the voltage across the resistor's terminals. Thus, the ratio of the
voltage applied across a resistor's terminals to the intensity of current through the circuit
is called resistance. This relation is represented by Ohm's law :
where I is the current through the conductor in units of amperes, V is the potential
difference measured across the conductor in units of volts, and R is the resistance of the
conductor in units of ohms. Practical resistors have a series inductance and a small
parallel capacitance; these specifications can be important in high-frequency applications.
The ohm (symbol: Ω) is the SI unit of electrical resistance, named after Georg Simon
Ohm. An ohm is equivalent to a volt per ampere. Since resistors are specified and
manufactured over a very large range of values, the derived units of milliohm (1 mΩ =
10−3 Ω), kilohm (1 kΩ = 103Ω), and megaohm (1 MΩ = 106 Ω) are also in common usage.
The symbol used for a resistor in a circuit diagram varies from standard to
standard and country to country.
6.8.2 POTENTIOMETER: A common element in electronic devices is a three-
terminal resistor with a continuously adjustable tapping point controlled by rotation of a
shaft or knob. These variable resistors are known as potentiometers when all three
terminals are present, since they act as a continuously adjustable voltage divider. A
common example is a volume control for a radio receiver.
Accurate, high-resolution panel-mounted potentiometers (or "pots") have
resistance elements typically wirewound on a helical mandrel, although some include a
conductive-plastic resistance coating over the wire to improve resolution. These typically
offer ten turns of their shafts to cover their full range. They are usually set with dials that
51
include a simple turns counter and a graduated dial. Electronic analog computers used
them in quantity for setting coefficients, and delayed-sweep oscilloscopes of recent
decades included one on their panels.
6.9 CAPACITOR
The function of the capacitor is to store electric charge or in effect electrical
energy. It is very useful as a filter, and for passing AC and blocking DC.
It consists of two metal plates separated by a dielectric in between. The symbol is-
ELECTROLYTIC CAPACITORS
The important characteristic of electrolytic capacitors is that they have polarity. They
have a positive and a negative electrode. Aluminum is used for the electrodes by using
thin oxidization membrane. Electrolytic capacitors range in value from about 1μF to
thousands of μF. Mainly this type of capacitor is used as a ripple filter in a power supply
circuit, or as a filter to bypass low frequency signals, etc.
POLYESTER FILM CAPACITORS
This capacitor uses thin polyester film as the dielectric. They are not high in tolerance,
but they are cheap and handy. Their tolerance is about ±5% to ±10%.
52
6.10 LCD JHD 162A
A liquid crystal display (LCD) is a flat panel display, electronic visual display, or video
display that uses the light modulating properties of liquid crystals (LCs). LCs do not emit
light directly.
Fig 16: Internal Block Diagram
RATINGS:
Parameter Symbol Testing Criteria Standard Values UnitMin. Typ. Max.
Supply Voltage VD0 –VSS − 4.5 5.0 5.5 VInput High Voltage VIH − 2.2 − VDD VInput Low Voltage VIL − -0.3 − 0.6 VOutput High Voltage VOH -IOH=0.2mA 2.4 − − VOutput Low Voltage VOL IOL =1.2 mA − − 0.4 VOperating Voltage IDD VDD =5.0V − 1.5 3.0 mA
TABLE 8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16VSS VCC VEE RS R/W E DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 LED+ LED-
Fig 17: Pin Configuration
53
6.11 RF TRANSECEIVER
The RF module, as the name suggests, operates at Radio Frequency. The corresponding
frequency range varies between 30 kHz & 300 GHz. In this RF system, the digital data is
represented as variations in the amplitude of carrier wave. This kind of modulation is
known as Amplitude Shift Keying (ASK).
Transmission through RF is better than IR (infrared) because of many reasons. Firstly,
signals through RF can travel through larger distances making it suitable for long range
applications. Also, while IR mostly operates in line-of-sight mode, RF signals can travel
even when there is an obstruction between transmitter & receiver. Next, RF transmission
is more strong and reliable than IR transmission. RF communication uses a specific
frequency unlike IR signals which are affected by other IR emitting sources.
This RF module comprises of an RF Transmitter and an RF Receiver. The
transmitter/receiver (Tx/Rx) pair operates at a frequency of 434 MHz. An RF transmitter
receives serial data and transmits it wirelessly through RF through its antenna connected
at pin4. The transmission occurs at the rate of 1Kbps - 10Kbps.The transmitted data is
received by an RF receiver operating at the same frequency as that of the transmitter.
The RF module is often used alongwith a pair of encoder/decoder. The encoder is used
for encoding parallel data for transmission feed while reception is decoded by a decoder.
Fig 18 : Pin Configuration
Pin Description
54
Pin No
Function Name
1 Ground (0V) Ground2 Serial data input pin Data3 Supply voltage; 5V Vcc4 Antenna output pin ANT
TABLE 9 : RF Transmitter
Pin No
Function Name
1 Ground (0V) Ground2 Serial data output pin Data3 Linear output pin; not connected NC4 Supply voltage; 5V Vcc5 Supply voltage; 5V Vcc6 Ground (0V) Ground7 Ground (0V) Ground8 Antenna input pin ANT
TABLE 10 : RF Receiver
6.12 GPS MODULE
6.12.1 Global Positioning System (GPS):
The Global Positioning System (GPS) is a burgeoning technology, which
provides unequalled accuracy and flexibility of positioning for navigation, surveying and
GIS data capture. The GPS NAVSTAR (Navigation Satellite timing and Ranging Global
Positioning System) is a satellite-based navigation, timing and positioning system. The
GPS provides continuous three-dimensional positioning 24 hrs a day throughout the
world. The technology seems to be beneficiary to the GPS user community in terms of
obtaining accurate data up to about100 meters for navigation, meter-level for mapping,
and down to millimeter level for geodetic positioning. The GPS technology has
tremendous amount of applications in GIS data collection, surveying, and mapping.
55
The Global Positioning System (GPS) is a U.S. space-based radio navigation
system that provides reliable positioning, navigation, and timing services to civilian users
on a continuous worldwide basis -- freely available to all. For anyone with a GPS
receiver, the system will provide location with time. GPS provides accurate location and
time information for an unlimited number of people in all weather, day and night,
anywhere in the world.
The Global Positioning System (GPS) is a satellite-based navigation system made
up of a network of 24 satellites placed into orbit by the U.S. Department of Defense. GPS
was originally intended for military applications, but in the 1980s, the government made
the system available for civilian use. GPS works in any weather conditions, anywhere in
the world, 24 hours a day. There are no subscription fees or setup charges to use GPS.
The GPS is made up of three parts: satellites orbiting the Earth; control and
monitoring stations on Earth; and the GPS receivers owned by users. GPS satellites
broadcast signals from space that are picked up and identified by GPS receivers. Each
GPS receiver then provides three-dimensional location (latitude, longitude, and altitude)
plus the time.
6.12.2 Geo positioning -- Basic Concepts:
By positioning we can understand the determination of stationary or moving
objects. These can be determined as follows:
1. In relation to a well-defined coordinate system, usually by three coordinate values and
2. In relation to other point, taking one point as the origin of a local coordinate system.
The first mode of positioning is known as point positioning, the second as relative
positioning. If the object to be positioned is stationary, we can term it as static
positioning. When the object is moving, we call it kinematics positioning. Usually, the
static positioning is used in surveying and the kinematics position in navigation.
GPS Basic Facts:
56
The GPS uses satellites and computers to compute positions anywhere on earth.
The GPS is based on satellite ranging. That means the position on the earth is determined
by measuring the distance from a group of satellites in space. The basic principles behind
GPS are really simple, even though the system employs some of the high-tech equipment
ever developed. In order to understand GPS basics, the system can be categorized into 5
Logical steps .
They are listed below:
1. Triangulation from the satellite is the basis of the system.
2. To triangulate, the GPS measures the distance using the travel time of the radio
message.
3. To measure travel time, the GPS need a very accurate clock.
4. Once the distance to a satellite is known, then we need to know where the satellite is
in space.
5. As the GPS signal travels through the ionosphere and the earth's atmosphere, the
signal is delayed.
6. To compute a position in the three dimensions, we need to have four satellite
measurements. The GPS uses a trigonometric approach to calculate the positions, The
GPS satellites are so high up that their orbits are very predictable and each of the
satellites is equipped with a very accurate atomic clock.
57
6.12.3 Components of a GPS:
The GPS is divided into three major components:
Fig 19 : Different Components Of GPS
A) The Control Segment:
The DOD monitoring stations track all GPS signals for use in controlling the
satellites and predicting their orbits. Meteorological data also are collected at the
monitoring stations, permitting the most accurate evaluation of tropospheric delays of
GPS signals. Satellite tracking data from the monitoring stations are transmitted to the
master control station for processing. This processing involves the computation of
satellite ephemerides and satellite clock corrections. The master station controls
58
orbital corrections, when any satellite strays too far from its assigned position, and
necessary repositioning to compensate for unhealthy (not fully functioning) satellites.
B) The Space Segment:
The Space Segment consists of the Constellation of NAVASTAR earth orbiting
satellites. The current Defense Department plan calls for a full constellation of 24 Block
II satellites (21 operational and 3 in-orbit spares). The satellites are arrayed in 6 orbital
planes, inclined 55 degrees to the equator. They orbit at altitudes of about 12000, miles
each, with orbital periods of 12 sidereal hours (i.e., determined by or from the stars), or
approximately one half of the earth's periods, approximately 12 hours of 3-D position
fixes. The next block of satellites is called Block IIR, and they will provide improved
reliability and have a capacity of ranging between satellites, which will increase the
orbital accuracy. Each satellite contains four precise atomic clocks (Rubidium and
Cesium standards) and has a microprocessor on board for limited self-monitoring and
data processing. The satellites are equipped with thrusters which can be used to maintain
or modify their orbits.
C) The User Segment:
The user segment is a total user and supplier community, both civilian and military.
It consists of all earth-based GPS receivers. Receivers vary greatly in size and
complexity, though the basic design is rather simple. The typical receiver is composed of
an antenna and preamplifier, radio signal microprocessor, control and display device, data
recording unit, and power supply. The GPS receiver decodes the timing signals from the
'visible' satellites (four or more) and, having calculated their distances, computes its own
latitude, longitude, elevation, and time. This is a continuous process and generally the
position is updated on a second-by-second basis, output to the receiver display device
and, if the receiver display device and, if the receiver provides data capture capabilities,
stored by the receiver-logging unit.
59
6.12.4 How it works:
GPS satellites circle the earth twice a day in a very precise orbit and transmit
signal information to earth. GPS receivers take this information and use triangulation to
calculate the user's exact location. Essentially, the GPS receiver compares the time a
signal was transmitted by a satellite with the time it was received. The time difference
tells the GPS receiver how far away the satellite is. Now, with distance measurements
from a few more satellites, the receiver can determine the user's position and display it on
the unit's electronic map.
GPS receiver must be locked on to the signal of at least three satellites to calculate
a 2D position (latitude and longitude) and track movement. With four or more satellites
in view, the receiver can determine the user's 3D position (latitude, longitude and
altitude). Once the user's position has been determined, the GPS unit can calculate other
information, such as speed, bearing, track, trip distance, distance to destination, sunrise
and sunset time and more.
60
Fig 20: G.P.S receiver communicating with the satellite and sending
information through the wireless mobile phone
6.12.5 G.P.S receiver
Fig 21 : GPS Modem Device(MR-87)
Features:
Low cost
Compact (25. 4 x 25. 4 x 7 mm)
32 Channel Receiver
Low Power Consumption
Built-in Antenna
Standard NMEA protocol USB or Serial
Available baud rate :4800/9600/14400/19200/38400/57600/115200
Frequency :1575. 42 MHz
61
Power Supply :3. 3 ~ 5Vdc
Maximum Altitude :18,000 meter
Maximum Velocity :515 meter/second
6.12.6 GPS Applications:
There are countless GPS applications, a few important ones are covered in the
following passage.
Science:
Archaeology
Environmental
Transportation:
Aviation
Space
Military:
Intelligence and Target Location
Navigation
Weapon aiming and Guidance
Industry:
Mapping
Public safety
Surveying
Telecommunications
62
6.13 IC L293D
Features:
600mA OUTPUT CURRENT CAPABILITY
1.2A PEAK OUTPUT CURRENT
ENABLE FACILITY
OVER TEMPERATURE PROTECTION
LOGICAL ”0” INPUT VOLTAGE UP TO 1.5 V (HIGH NOISE IMMUNITY)
INTERNAL CLAMP DIODES
Fig 22 : Pin Diagram
6.14 TSOP 1738
63
The TSOP 1738 is a member of IR remote control receiver series. This IR sensor
module consists of a PIN diode and a pre amplifier which are embedded into a single
package. The output of TSOP is active low and it gives +5V in off state. When IR waves,
from a source, with a centre frequency of 38 kHz incident on it, its output goes low.
Features:
• Photo detector and preamplifier in one package
• Internal filter for PCM frequency
• Improved shielding against electrical field disturbance
• TTL and CMOS compatibility
• Output active low
• Low power consumption
• High immunity against ambient light
• Continuous data transmission possible (up to 2400 bps)
Fig 23: Pin Diagram
64
6.15 IR Transmitter/Receiver
It consists of 5mm 940 nanometer wave length high power IR LED and
photodiode having peak sensitivity at 940 nanometer wavelength.
Specifications:
• IR TX RX size: 5mm diameter package
• IR LED current rating: 30mA nominal, 600mA pulse loading at 1% duty cycle
• IR LED wavelength: 940Nm
• Photodiode peak response wavelength: 940nMAn IR LED, also known as IR
transmitter, is a special purpose LED that transmits infrared rays in the range of 760
nm wavelength. Such LEDs are usually made of gallium arsenide or aluminium
gallium arsenide. They, along with IR receivers, are commonly used as sensors.
6.16 DC Motor
A DC motor is an electric motor that runs on direct current (DC) electricity. DC
motors were used to run machinery, often eliminating the need for a local steam engine or
internal combustion engine. DC motors can operate directly from rechargeable batteries,
providing the motive power for the first electric vehicles. Today DC motors are still
found in applications as small as toys and disk drives, or in large sizes to operate steel
rolling mills and paper machines. Modern DC motors are nearly always operated in
conjunction with power electronic devices.
65
Two important performance parameters of DC motors are the motor constants
Kv and Km.
6.17 LED
A light-emitting diode (LED) is a semiconductor light source. When a light
emitting diode is forward-biased (switched on), electrons are able to
recombine with electron holes within the device, releasing energy in the form of photons.
This effect is called electroluminescence and the color of the light (corresponding to the
energy of the photon) is determined by the energy gap of the semiconductor. The LED
consists of a chip of semiconducting material doped with impurities to create a p-n
junction. As in other diodes, current flows easily from the p-side, or anode, to the n-side,
or cathode, but not in the reverse direction. Charge-carriers—electrons and holes—flow
into the junction from electrodes with different voltages. When an electron meets a hole,
it falls into a lower energy level, and releases energy in the form of a photon.
The wavelength of the light emitted, and thus its color depends on the band
gap energy of the materials forming the p-n junction. In silicon or germanium diodes, the
electrons and holes recombine by a non-radioactive
transition, which produces no optical emission, because
these are indirect band gap materials. The materials
used for the LED have a direct band gap with
energies corresponding to near-infrared, visible, or near-
ultraviolet light.
LED development began with infrared and red devices made with gallium
arsenide. Advances in materials science have enabled making devices with ever-shorter
66
wavelengths, emitting light in a
variety of colors.
Fig 24: Working of LED
The symbol of LED is:
67
HARDWARE
DESIGN
68
HARDWARE DESIGN:
Firstly, circuit is drawn on multipurpose pub then at appropriate place
components are soldered by following process.
Soldering is a process in which two or more metal items are joined together
by melting and flowing a filler metal (solder) into the joint, the filler metal having a
lower melting point than the work piece.
SOLDERING PROCEDURE
Step 1 Check that your soldering iron tip is suitable for the Project. (No larger than
the diameter of the pad).
Check the tip is clean and shiny. If not, tin it by adding a small amount of
solder to the tip.
Step 2 Adjust the temperature of the soldering station to 3500 C (degrees Celsius )
Step 3 Ensure the solder sponge is damp. A dry sponge will not clean the tip
effectively, and one that is too wet will lower the temperature of the tip
making for an ineffective solder joint.
Step 4 Carefully wipe the tip on the damp sponge until clean. Continually wipe the
tip while soldering a circuit board.
69
Step 5 Bend the lead of the component
using fine pliers so that it easily
slides into the holes of the printed
circuit pad.
Step 5 Insert the component to be soldered into the circuit board and bend the leads
protruding from the bottom of the circuit board at an angle of approx 450.
Step 6 Cut the leads of the component close to the outer edge of the solder pad.
Step 7 When ready, hold the soldering iron at a 45° angle, and heat both the lead and
the pad simultaneously. Touch the solder wire in the space between the iron
tip and the lead.
Step 8
Fig 25: Soldering Procedure
Keep the soldering iron tip still while moving the solder around the joint as it
melts.
Step 9 Remove the solder tip first and the solder wire next, (prevents spiking).
Step 10 Allow to the joint to cool naturally and undisturbed, do not blow on the solder
joint to cool it.
Step 11 When you have completed all solder joints thoroughly clean your board,
using Isopropyl Alcohol, and a bristle brush, to remove the flux residue and
70
other contaminants.
Step 12 Wipe or pat dry with a lint free tissue to remove traces of residue.
Step 13 Inspect for a good solder connection. The solder joint should be clean,
smooth and shiny.
Figure a) the amount of solder applied is minimal and may result in a poor
electrical connection over time.
Figure b) is the ideal solder joint.
Figure c) indicates an excessive amount of solder has been applied to the
connection. This may damage the solder pad due to excessive heat applied.
Step 13 Leave a large blob of solder on the tip when switching the iron off as this will
protect the tip from oxidation and contamination.
71
SOFTWARE
DESIGN
72
73
8.1 PROGRAMMING
GPS SECTION
* Basic program to show latitude and longitude on LCD extracted from GPGGA
statement */
#include<reg51.h>
#define port2 P2
sbit rs = P1^0;
sbit rw = P1^1;
sbit e = P1^2;
char info[70];
char test[6]="$GPGGA";
char comma_position[15];
unsigned int check=0,i;
unsigned char a;
void receive_data();
void lcd_latitude();
void lcd_longitude();
//DELAY FUNCTION
void delay(unsigned int msec)
int i,j
for(i=0;i<msec;i++)
for(j=0;j<1275;j++);
74
// LCD COMMAND SENDING FUNCTION
void lcd_cmd(unsigned char item)
port2 = item;
rs= 0;
rw=0;
e=1;
delay(1);
e=0;
return;
// LCD DATA SENDING FUNCTION
void lcd_data(unsigned char item)
port2 = item;
rs= 1;
rw=0;
e=1;
delay(1);
e=0;
return;
75
// LCD STRING SENDING FUNCTION
void lcd_string(unsigned char *str)
int i=0;
while(str[i]!='\0')
lcd_data(str[i]);
i++;
delay(10);
return;
// SERIAL PORT SETTING
void serial()
TMOD=0x20; //MODE=2
TH1=0xfa; // 4800 BAUD
SCON=0x50 ; // SERIAL MODE 1 ,8- BIT DATA ,1 STOP BIT ,1 START BIT , RECEIVING ON
TR1=1; //TIMER START
void find_comma()
76
unsigned int i,count=0;
for(i=0;i<70;i++)
if(info[i]==',')
comma_position[count++]=i;
void compare()
IE=0x00; //Interrupt disable
find_comma(); //Function to detect position of comma in the string
lcd_latitude(); //Function to show Latitude
lcd_longitude(); //Function to show Longitude
check=0;
IE=0x90; //Interrupt enable
void receive_data() interrupt 4
info[check++]=SBUF; //Read SBUF
if(check<7) //Condition to check the required data
77
if(info[check-1]!=test[check-1])
check=0;
RI=0;
void lcd_shape() //Function to create shape of degree
lcd_cmd(64);
lcd_data(10);
lcd_data(17);
lcd_data(17);
lcd_data(10);
lcd_data(0);
lcd_data(0);
lcd_data(0);
lcd_data(0);
void lcd_latitude() //Function to display Latitude
unsigned int c2=comma_position[1]; //Position of second comma
lcd_shape();
lcd_cmd(0x01); // Clear LCD display
78
lcd_cmd(0x84); //Move cursor to position 6 of line 1
lcd_string("LATITUDE"); //Showing Latitude
lcd_cmd(0xC0); //Beginning of second line
lcd_data(info[c2+1]);
lcd_data(info[c2+2]);
lcd_data(0); //Degree symbol
lcd_data(info[c2+3]);
lcd_data(info[c2+4]);
lcd_data(info[c2+5]);
lcd_data(info[c2+6]);
lcd_data(info[c2+7]);
lcd_data(info[c2+8]);
lcd_data(info[c2+9]);
lcd_data(0x27); //ASCII of minute sign(')
lcd_data(info[c2+10]);
lcd_data(info[c2+11]);
delay(250);
void lcd_longitude()
unsigned int c4=comma_position[3];
lcd_cmd(0x01); //Clear LCD display
lcd_cmd(0x84); //Move cursor to position 4 of line 1
79
lcd_string("LONGITUDE"); //Showing Longitude
lcd_cmd(0xC0); //Begining of second line
lcd_data(info[c4+1]);
lcd_data(info[c4+2]);
lcd_data(info[c4+3]);
lcd_data(0);
lcd_data(info[c4+4]);
lcd_data(info[c4+5]);
lcd_data(info[c4+6]);
lcd_data(info[c4+7]);
lcd_data(info[c4+8]);
lcd_data(info[c4+9]);
lcd_data(info[c4+10]);
lcd_data(0x27); //ASCII of minute sign(')
lcd_data(info[c4+11]);
lcd_data(info[c4+12]);
delay(250);
void main()
serial();
lcd_cmd(0x38); //2 LINE, 5X7 MATRIX
lcd_cmd(0x0e); //DISPLAY ON, CURSOR BLINKING
80
IE=0x90;while(1)
if(check==69)compare();
COLLISION AVOIDANCE SECTION:ALGORITHM-:
1) Start
2) Initialize the input port & output port. 3) Read data from pin 2.0,pin 2.1,pin 2.2.
4) If pin2.0=1, turn right. Else goto step 5.
5) If pin2.1=1, turn right. Else goto step 6.
6) If pin2.2=1, turn left. Else goto step 7.
7) If pin2.0&pin2.1=1, turn right Else goto step 8.
8) If pin2.2&pin2.1=1, turn left Else goto step 9.
9) If pin2.0&pin2.2=1,move forward Else goto step 10.
10) If pin2.0&pin2.1&pin2.2=1, move backward Else goto step 11.
11) Again go to step 3.
12) Stop.
81
PROGRAMMING
#$mod51
org 00h
mov p2,#0ffh
ag: mov a,p2
anl a,#07h
cjne a,#01h,la1
mov p1,#02h
sjmp ag
la1:
mov a,p2
anl a,#07h
cjne a,#02h,la2
mov p1,#02h
sjmp ag
la2:
mov a,p2
anl a,#07h
cjne a,#04h,la3
mov p1,#02h
sjmp ag
la3:
mov a,p2
anl a,#07h
cjne a,#00h,la4
mov p1,#00010100b
sjmp ag
la4:
mov a,p2
anl a,#07h
82
cjne a,#07h,la5
mov p1,#0ah
sjmp ag
la5:
mov a,p2
anl a,#07h
cjne a,#03h,la6
mov p1,#00001100b
sjmp ag
la6:
mov a,p2
anl a,#07h
cjne a,#06h,ag
mov p1,#00010010b
sjmp ag
end
83
8.2 SOFTWARE DESCRIPTION
µVision Keil: µVision Keil provides IDE for 8051 programming & is very easy to
use. When starting a new project, simply select the microcontroller you use from the
Device Database and the µVision IDE sets all Compiler, Assembler, Linker, and Memory
options. It’s device database is large which supports many ICs of the 8051 family. A
HEX file can be created with the help of Keil which is required for burning onto chip. It
has a powerful debugging tool which detects most of the errors in the program.
Working with µVision Keil :
To open keil software click on start menu then program and then select keil2.
Following window will appear on your screen.
You can see three different windows in this screen.
1) Project work space window
2) Editing window
3) Output window
84
Project workspace window is for showing all the related files connected with your
project.
Editing window is the place where you will edit the code.
Output window will show the output when you compile or build or run your project.
Creating new project in d:\keil2\myprojects\first as shown in figure.
Give the name of project as "test". By default it will be saved as *.v2 extension.
Now you will be asked to choose your target device for which you want to write the
program. Scroll down the cursor and select generic from list. Expand the list and
select 8051 (all variants).
When you click OK, you will be asked to add startup code and file to your project
folder. Click yes. Now on your screen expand target1 list fully. You will see
following window:
85
Now click on file menu and select new file. Editor window will open. Now you
can start writing your code.
As you start writing program in C, same way here also you have to first include
the header file. Because our target is 8051 our header file will be "reg51.h".
After including this file. Just right click on the file and select open document
<reg51.h>. The following window will appear:
86
If you scroll down cursor you will see that all the SFRs like P0-P3, TCON, TMOD,
ACC, bit registers and byte registers are already defined in this header file. So one
can directly use these register names in coding.
Now you can write your program same as c language starting with void main().
After completing the code save the file in project folder with ".c" extension.
Now right click on "source group 1" in project workspace window. Select "add files
to source gorup 1".
Select the C file you have created and click add button.
87
You will see that the c file has been added in source group.
Now to compile the program from project menu select "build target". In the
output window you will see the progress.
If there is any compilation error then target will not be created. Remove all the
errors and again build the target till you find "0 Error(s)".
Now you are ready to run your program. From debug menu select "start/stop debug
session".
You will see your project workspace window now shows most of the SFRs as well
as GPRs r0-r7. Also one more window is now opened named "watches". In this
window you can see different variable values.
To add variable in watch window goto "watch#1" tab. Then type F2 to edit and type
the name of your variable.
If you want to see the output on ports go to peripheral menu and select I/O ports.
Select the desire port. You can give input to port pins by checking or unchecking
any check box. Here the check mark means digit 1 and no check mark means 0. The
output on the pin will be shown in same manner.
To run the program you can use any of the option provided "go", "step by step",
"step forward", "step ove" etc.
88
Now after testing your program you need to down load this program on your target
board that is 8051. For this you have to create hex file.
To create hex file first stop debug session. Again you will be diverted to project
workspace window.
Right click on "target 1" and select "option for target 1". Following window will
appear.
Select output tag and check "create hex file" box.
Now when you again build your program, you will see the message in output
window "hex file is created".
In your project folder you can see the hex file with same name of your project as
"test.hex".
This file you can directly load in 8051 target board and run the application on
actual environment.
89
testing
TESTING:-
90
1.Continuity test:-
First of all we checked the PCB that all the tracks are as per the design of PCB and
showing continuity with the help of multimeter and PCB layout.
2. Short circuit test:-
Then we checked the PCB for any unwanted short circuits with the help of
multimeter and PCB layout.
3. Soldering:-
In the next step, we soldered the required components. And then checked that there
are no any unwanted shorts occurred due to soldering without putting IC's and keeping
power supply off.
4. Power supply test:-
In the next step, we put power supply on and checked whether required voltage is
appearing at the required voltage is appearing at the required points i.e. +Vcc and GND at
the respective points. We took care of not connecting IC's in the circuit while performing
this test.
5. Microcontroller test:-
For testing the microcontroller, we wrote the square wave generation program for
generating square wave on each port pin. Then we fed the program in microcontroller and
checked the output with the help of CRO by connecting the microcontroller in the circuit.
We took care of not connecting any other IC in the circuit.
91
ProblemS faced
PROBLEMS FACED:
92
Although the concept & design of the project seemed perfect, there were some
problems faced while actual implementation:
1) Generation of exact 38 KHz Frequency from IC 555 at Transmitter circuit.
Solution: Use variable resistor pot in astable multivibrator. Connect IC 555’s output pin
to C.R.O. & measure frequency pulses generated by IC 555. By varying the resistor pot
we can adjust the frequency of output.
2) Propagation Effects
Solution: The working area for the project should be open and wide so that the
signals can propagate smoothly with least interference.
93
advantages
Advantages:
94
Low cost.
Since there is no requirement for a GSM modem it does not involve any data
transfer charges.
Finds applications in different areas like Tourism, Navigation etc.
It does not contain, or need, a qualified operator on board.
It can enter environments that are dangerous to human life.
Chances of collisions are minimized.
95
limitations
Limitations:
96
1) It is not powered by battery which can be discharged in short duration of operation.
2) Low speed.
3) Software flexibilities difficult to achieve.
4) Incapable of handling user’s command.
Many new applications can be added to it in the future to make it more advance and
accurate.
97
applications
Applications:
98
• Latitude and longitude displayed can be used for location identification.
• Vehicle travel record management.
• Wild life researches.
• In every field to monitoring easily.
• Collision Avoidance logic has been specially designed for vaccum-cleaner. By
using heavy rating motors , strong mechanical structure and using highly sensitive
obstacle sensors, it efficiently work as vaccum-cleaner.
99
Future scope
Future Scope:
100
1. With the use of high end micro controllers and graphical LCD displays we can
expect the data of the micro controller to be used dynamically during the journey
itself to find our position instead of positioning in the Google earths map.
2. Camera can be added to aid the purpose of surveillance.
101
conclusion
CONCULSION:
102
Thus vehicle position logging system using GPS is constructed.
Firstly, 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 advanced components such as GPS and wireless network with the
help of the growing technology, the project has been successfully implemented.
In this project an effort has been made to study monitoring of the vehicle and to
implement it.
103
References
REFERENCES:
1. Global positioning systems inertial navigation, and integration Mohinders, Grewal,
Lawrence, R Weil, Angus p Andrews
2. GPS for DUMMIES BY Joel Mc Namara
104
3. Torsten Baumbach's web site: http://pandora.inf.uni-jena.de/ttbb/
4. 8051 Microcontroller and Embedded Systems by M. A. Mazidi, Janice Gillispie
Mazidi and Rolin D. McKinlay
Web References:
http://en.wikipedia.org/wiki/GPS128*64
http://en.wikipedia.org/wiki/Category:MMC
http://www.microchip.com/wwwproducts/Devices.aspx?
dDocName=en01026
http://www.howstuffworks.com
http://www.8051projects.com
http://www.alldatasheet.com/
http://www.datasheet4u.com/
105
APPENDIX
17.1 ESTIMATED COST
S. No. COMPONENTS COST (Rs.)Semiconductors
106
1 IC-AT89C51 Microcontroller 652 IC-HT12D Decoder 703 IC-HT12E Encoder 704 IC-MAX232 Driver/Receiver 255 IC-7805, 5V Regulator 8 for each6 NPN Transistor 2 for each7 IC- L293D 958 TSOP 1738 20
Resistors1 R1, R2- 4.7 kΩ 1 for each2 R3- 1 kΩ 1 for each3 VR1- 10 kΩ preset 2 for each
Miscellaneous1 XTAL- 12MHz Crystal 102 S1- Push-to-On Switch 153 TX1- 38 kHz IR Transmitter 6 for each4 RX1- 38 kHz IR Receiver 6 for each5 RF Module 1406 GPS Module 22507 LCD Display 1508 DC Motors 175 for each
Capacitors1 C1, C2- 3.3 nF Ceramic Disk 1 for each2 C4-10μF, 16V Electrolytic 1 for each3 C- 1μF, Electrolytic 2 for each4 0.01μF, Polyster 2 for each
TOTAL COST 3388
17.2 DATA SHEETS
1. HT12D
107
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
Built-in oscillator needs only5% resistor
Valid transmission indicator
Easy interface with an RF or an infrared transmission medium
Minimal external components
Applications
Burglar alarm system
Smoke and fire alarm system
Garage door controllers
Car door controllers
Car alarm system
Security system
Cordless telephones
Other remote control systems
General Description
For proper operation, a pair of encoder/decoder with the same number of
addresses and data format should be chosen. They compare the serial input data three
times continuously with their local addresses. If no error or unmatched codes are found,
108
the input data codes are decoded and then transferred to the output pins. The VT pin also
goes high to indicate a valid transmission. Of this series,
the HT12D is arranged to provide 8 address bits and 4
data bits, and HT12F is used to decode 12 bits of address
information.
SELECTION TABLE
Address No. Data VT Oscillator Trigger PackageNo. Type
8 4 L √ RC Oscillator DIN Active ″Hi″ 18DIP/20SOP
Data type: L stands for latch type data output.
VT can be used as a momentary data output.
109
Note: The address/data pins are available in various combinations (see the
address/data table).
PIN DESCRIPTION
Pin Name
I/O Internal connection Description
A0~A11 I NMOS TRANSMISSIONGATE
Input Pins for address A0 ~ A11 settingThey can be externally set to VDD or VSS.
D8 ~D11 O CMOS OUT Output Data PinsDIN I CMOS IN Serial Data Input PinVT O CMOS OUT Valid Transmission ON, Active HighOSC1 I OSCILLATOR Oscillator Input PinOSC2 O OSCILLATOR Oscillator Output PinVSS I − Negative Power SupplyVDD I − Positive Power Supply
ELECTRICAL CHARACTERISTICS
Symbol Parameter Test Conditions Min Typ Max UnitVDD Conditions
VDD Operating Voltage − − 2.4 5 12 VISTB Standby Current 5V Oscillator − 0.1 1 µA
110
stops12V − 2 4 µAIDD Operating Current 5V No Load
F=150 kHz− 200 400 µA
I0 Data Output Source Current (D8-D11)
5V VOH=4.5V -1 -1.6 − mA
IVT VT Output Source Current 5V VOH=4.5V -1 -1.6 − mAVT Output Sink Current 5V VOL=4.5V 1 1.6 − mA
V1H ″H″ Input Voltage 5V − 3.5 − 5 VV1L ″L″ Input Voltage 5V − 0 − 1 VfOSC Oscillator Frequency 5V ROSC=51kΩ − 150 − kHz
Functional Description
Operation
The series of 212 decoders provides various combinations of addresses and data
pins in different packages so as to pair with the same series of encoders.
The decoders receive data that are transmitted by an encoder and interpret the first
N bits of code period as addresses and the last 12-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 address and data. The decoders will then check the received address three times
continuously. If the received address codes all match the contents of the decoder’s local
address, the 12-N bits o f 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 is incorrect or
no signal is received. The output of the VT pin is high only when the transmission is
valid. Otherwise it is always low.
Output type
111
Of the 212 series of decoders, the HT12F has no data output pin but its VT pin can
be used as a momentary data output. The HT12D, on the other hand, provides 4 latch
type data pins whose data remain unchanged until new data are received.
Part No. Data Pins Address Pins Output Type Operating Voltage
HT12D 4 8 Latch 2.4V~12V
HT12F 0 12 − 2.4V~12V
Flowchart
The oscillator is disabled in the standby state and activated when a logic “high”
signal applies to the DIN pin. That is to say, the D IN should be kept low if there is no
signal input.
112
113
2. L293D
Features
600mA OUTPUT CURRENT CAPABILITY PER CHANNEL
1.2A PEAK OUTPUT CURRENT (non repetitive) PER CHANNEL
OVERTEMPERATURE PROTECTION
ENABLE FACILITY
LOGICAL ”0” INPUT VOLTAGE UP TO 1.5 V (HIGH NOISE IMMUNITY)
INTERNAL CLAMP DIODES
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 solenoides, 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.
114
ABSOLUTE M AXIMUM RATINGS
Symbol Parameter Value UnitVS Supply Voltage 36 VVSS Logic Supply Voltage 36 VVi Input Voltage 7 VVen Enable Voltage 7 VI0 Peak Output Current (100 μs non repeatitive) 1.2 APtot Total Power Dissipation at T=90 oC 4 WTstg, Tj Storage and Junction Temperature -40 to 150 oC
115
ELECTRICAL CHARACTERISTICS: (for each channel, VS =24V, VSS =5V, T amb=25 oC, unless otherwise specified)Symbol Parameter Test Conditions Min. Typ. Max. UnitVS Supply Voltage VSS 36 VVSS Logic Supply Voltage 4.5 36 VIS Total Quiscent Supply
Current (PIN 10)V1=L:I0=0:Ven=H 2 6 mAV1=H:I0=0:Ven=H 16 24 mAVen=L 4 mA
ISS Total Quiscent Logic SupplyCurrent (PIN 20)
V1=L:I0=0:Ven=H 44 60 mA
V1=H:I0=0:Ven=H 16 22 mAVen=L 16 24 mA
VIL Input Low Voltage(PIN 2,9,12,19)
-0.3 1.5 V
VIH Input High Voltage (PIN 2,9,12,19)
VSS≤7V 2.3 VSS VVSS>7V 2.3 7 V
IL Low Voltage Input Current(PIN 2,9,12,19)
V1L=1.5V -10 μA
IH High Voltage Input Current(PIN 2,9,12,19)
2.3V≤V1H≤VSS-0.6V
30 100 μA
Ven L Enable Low Voltage(PIN 1,11)
-0.3 1.5 V
Ven H Enable High Voltage(PIN 1,11)
VSS≤7V 2.3 VSS VVSS>7V 2.3 7 V
Ien L Low Voltage Enable Current(PIN 1,11)
VenL=1.5V -30 -100 μA
Ien H High Voltage Enable Current(PIN 1,11)
2.3V≤VenH≤V-0.6V
10 μA
VCE(Sat)H Source Output SaturationVoltage (PINS 3,8,13,18)
I=-0.6A 1.4 1.8 V
VCE(sat)L Source Output SaturationVoltage (PINS 3,8,13,18)
I=+0.6A 1.2 1.8 V
VF Clamp Diode Forward Voltage
I=600 μA 1.3 V
tr Rise-time 0.1 to 0.9V0 250 nstf Fall-time 0.9 to 0.1V0 250 nston Turn-on Delay 0.5V1 to 0.5V0 750 nstoff Turn-off Delay 0.5V1 to 0.5V0 200 ns
116
3. MAX232
The MAX232 from Maxim was the first IC which in one package contains the
necessary drivers (two) and receivers (also two), to adapt the RS-232 signal voltage
levels to TTL logic. It became popular, because it just needs one voltage (+5V) and
generates the necessary RS-232 voltage levels (approx. -10V and +10V) internally.
This greatly simplified the design of circuitry. Circuitry designers no longer need to
design and build a power supply with three voltages (e.g. -12V, +5V, and +12V), but
could just provide one +5V power supply, e.g. with the help of a simple 78x05 voltage
regulator.
The MAX232 has a successor, the MAX232A. The ICs are almost identical,
however, the MAX232A is much more often used (and easier to get) than the original
MAX232, and the MAX232A only needs external capacitors 1/10th the capacity of
what the original MAX232 needs.
It should be noted that the MAX232(A) is just a driver/receiver. All it does is to
convert signal voltage levels. Generating serial data with the right timing and decoding
serial data has to be done by additional circuitry, e.g. by a 16550 UART or one of these
small micro controllers (e.g. Atmel AVR, Microchip PIC) getting more and more
popular.
The MAX232 and MAX232A were once rather expensive ICs, but today they are
cheap.
117
MAX232 DIP Package PIN Layout
Nbr Name Purpose Signal Voltage Capacitor Value
MAX2321 C1+ +Connector for Capacitor
C1Capacitor should standatleast 16V
1μF
2 V+ Output of Voltage Pump +10V, Capacitor should standatleast 16V
1 μF to Vcc
3 C1- -Connector for Capacitor C1
Capacitor should standatleast 16V
1 μF
4 C2+ +Connector for Capacitor C2
Capacitor should standatleast 16V
1 μF
5 C2- -Connector for Capacitor C2
Capacitor should standatleast 16V
1 μF
6. V- Output of Voltage Pump/Inverter
-10V, Capacitor should standatleast 16V
1 μF to GND
7 T2out Driver 2 Output RS-2328 R2in Receiver 2 Input RS-2329 R2out Receiver 2 Output TTL
10 T2in Driver 2 Input TTL11 T1in Driver 1 Input TTL12 R1out Receiver 1 Output TTL13 R1in Receiver 1 Intput RS-23214 T1out Driver 1 Output RS-23215 GND Ground 0V 1 μF to
Vcc16 VCC Power Supply +5V
V+(2) is also connected to VCC via a capacitor (C3). V-(6) is connected to GND via a
capacitor (C4). And GND(15) and VCC(16) are also connected by a capacitor (C5), as
close as possible to the pins.
118
Application
The MAX232(A) has two receivers (converts from RS-232 to TTL voltage levels)
and two drivers (converts from TTL logic to RS-232 voltage levels). This means only
two of the RS-232 signals can be converted in each direction. The old MC1488/1498
combo provided four drivers and receivers.
Typically a pair of a driver/receiver of the MAX232 is used for
TX and RX
and the second one for
CTS and RTS.
There are not enough drivers/receivers in the MAX232 to also connect the DTR, DSR,
and DCD signals. Usually these signals can be omitted when e.g. communicating with a
PC's serial interface. If the DTE really requires these signals either a second MAX232 is
needed, or some other IC from the MAX232 family can be used (if it can be found in
consumer electronic shops at all).
MAX232 DIP Package
119
120