In this project we will make project using 89s51. In this project we will sense the accident and our system will automatically send sms of location on our mobile no. In this project we will use GPS to monitor current location. GSM modem to send SMS. Then sensor on that side will detect the car using Reed sensor. When sensor will get signal from car having magnet, then it will give signal to microcontroller 89s51. Mirocontroller will display that station LCD connected with it. So wherever our robotic car will go oursensor will read it and Display ON . We will use 16*2 LCD for this purpose. We will connect REED sensor for car detection. We are using IC89s51 because we studying it in degree. We know about it. We will connect sensors on port 1 and LCD on port0. Register select pin of LCD on p2. 5, READ/WRITE on p2.4, Enable on p2.3. port 0 is open collector port so we will connect 10k register array with it. In this project we will use readymade robot. And use reed sensor for detection of robot.
VARIOUS STEPS OF PROJECT:
1) POWER SUPPLY +5V
2) MICROCONTROLLER AT89S52
3) MAX232 CIRCUIT
4) GSM MODEM
5) GPS Receiver
Pin no 40 is connected to the positive supply. In this project we provide a 5 volt dc power supply. This power supply is truly regulated power supply. Pin no 20 is connected to the negative supply. Here we supply a negative voltage on this pin. Crystal is connected to the pin no 18 and 19 of the microcontroller. Crystal provide a clock signal to run the vehicle and process all the internal requirement of the circuit.. For the regulated power supply we use ic 7805 as a regulator to provide a fix 5 volt power supply.
We will use GSM modem sm300 at 9600 baud rate.
This GSM modem is a highly flexible plug and play quad band GSM modem for direct and easy
integration to RS232. Supports features like Voice, Data/Fax, SMS,GPRS and integrated TCP/IP
Specifications for Fax
· Group 3, class 1
Specifications for data
· GPRS class 10: max 85.6 kbps(downlink)
· PBCCH support
· Coding schemes CS 1,2,3,4
· CSD upto 14.4 kbps
· Non transparent mode
· Quad Band GSM/GPRS
· GPRS multi-slot class 10/8
· GPRS Mobile station class B
· Compliant to GSM Phase 2/2+
o Class 4 (2W@850/900Mhz)
o Class 1(1W@1800/1900Mhz)
· Control via AT commands(GSM 07.07,
07.05 and enhanced AT commands)
· Operation Temperature(-20 deg C to
+55 deg C)
Specifications for SMS
· Point-to-point MO and MT
· SMS cell broadcast
· Text and PDU mode
· Use AC – DC Power Adaptor with following ratings
· DC Voltage : 12V
· DC Current : 1A
· Polarity : Centre +ve & Outside –ve
· Current Consumption in normal operation 250mA, can rise up to 1Amp while transmission.
· RS-232 through D-TYPE 9 pin connector, Serial port baud rate adjustable 1200 to115200
bps (9600 default)
· Stereo connector for MIC & SPK
· Power supply through DC socket
· SMA antenna connector
· Push switch type SIM holder
· LED status of GSM / GPRS module
· Insert SIM card: Press the yellow pin to remove the tray from the SIM cardholder. After
properly fixing the SIM card in the tray, insert the tray in the slot provided.
· Connect Antenna: Screw the RF antenna on the RF cable output provided.
· If voice call is needed, connect the mic and speaker to stereo sockets.
· Connect RS232 Cable: (Cable provided for RS232 communication) Default baud rate is
9600 with 8-N-1, no hardware handshaking. Cable provided has pins 7 and 8 shorted that will
set to no hardware handshaking. In you need hardware handshaking the pins 7-8 can be
taken for signaling.
o Pin 2 is RS232 level TX out
o Pin 3 is RS232 level RX in
o Pin 5 is Ground
o Pin 7 RTS in (shorted to pin 8 in cable for no hardware handshaking)
o Pin 8 CTS out (shorted to pin 7 in cable for no hardware handshaking)
Connect the power Supply (9-12V) to the power jack. Polarity should be Center +ve and
outer –ve DC jack.
Network Led indicating various status of GSM module eg. Power on, network registration &
After the Modem registers the network, led will blink in step of 3 seconds. At this stage you
can start using Modem for your application.
Examples for send and receive SMS
For sending SMS in text Mode:
AT+CMGF=1 press enter
AT+CMGS=”mobile number” press enter
Once The AT commands is given’ >’ prompt will be displayed on the screen.
Type the message to sent via SMS. After this, press ctrl+Z to send the SMS.
If the SMS sending is successful, “ok” will be displayed along with the message number.
For reading SMS in the text mode:
AT+CMGF=1 Press enter
Number (no.) is the message index number stored in the sim card. For new SMS, URC will be received
on the screen as +CMTI: SM ‘no’. Use this number in the AT+CMGR number to read the message.
WELCOME TO THE WORLD OF THE MICROCONTROLLERS.
Look around. Notice the smart “intelligent” systems? Be it the T.V, washing machines, video games, telephones, automobiles, aero planes, power systems, or any application having a LED or a LCD as a user interface, the control is likely to be in the hands of a micro controller!
Measure and control, that’s where the micro controller is at its best.
Micro controllers are here to stay. Going by the current trend, it is obvious that micro controllers will be playing bigger and bigger roles in the different activities of our lives.
So where does this scenario leave us? Think about it……
The world of Micro controllers
What is the primary difference between a microprocessor and a micro controller? Unlike the microprocessor, the micro controller can be considered to be a true “Computer on a chip”.
In addition to the various features like the ALU, PC, SP and registers found on a microprocessor, the micro controller also incorporates features like the ROM, RAM, Ports, timers, clock circuits, counters, reset functions etc.
While the microprocessor is more a general-purpose device, used for read, write and calculations on data, the micro controller, in addition to the above functions also controls the environment.
We have used a whole lot of technical terms already! Don’t get worried about the meanings at this point. We shall understand these terms as we proceed further
For now just be aware of the fact, that all these terms literally mean what they say.
Bits and Bytes
Before starting on the 8051, here is a quick run through on the bits and bytes. The basic unit of data for a computer is a bit. Four bits make a nibble. Eight bits or two nibbles make a byte. Sixteen bits or four nibbles or two bytes make a word.
1024 bytes make a kilobyte or 1KB, and 1024 KB make a Mega Byte or 1MB.
Thus when we talk of an 8-bit register, we mean the register is capable of holding data of 8 bits only.
The 8051 developed and launched in the early 80`s, is one of the most popular micro controller in use today. It has a reasonably large amount of built in ROM and RAM. In addition it has the ability to access external memory.
The generic term `8×51` is used to define the device. The value of x defining the kind of ROM, i.e. x=0, indicates none, x=3, indicates mask ROM, x=7, indicates EPROM and x=9 indicates EEPROM or Flash.
A note on ROM
The early 8051, namely the 8031 was designed without any ROM. This device could run only with external memory connected to it. Subsequent developments lead to the development of the PROM or the programmable ROM. This type had the disadvantage of being highly unreliable.
The next in line, was the EPROM or Erasable Programmable ROM. These devices used ultraviolet light erasable memory cells. Thus a program could be loaded, tested and erased using ultra violet rays. A new program could then be loaded again.
An improved EPROM was the EEPROM or the electrically erasable PROM. This does not require ultra violet rays, and memory can be cleared using circuits within the chip itself.
Finally there is the FLASH, which is an improvement over the EEPROM. While the terms EEPROM and flash are sometimes used interchangeably, the difference lies in the fact that flash erases the complete memory at one stroke, and not act on the individual cells. This results in reducing the time for erasure.
Understanding the basic features of the 8051 core
Let’s now move on to a practical example. We shall work on a simple practical application and using the example as a base, shall explore the various features of the 8051 microcontroller.
Consider an electric circuit as follows,
The positive side (+ve) of the battery is connected to one side of a switch. The other side of the switch is connected to a bulb or LED (Light Emitting Diode). The bulb is then connected to a resistor, and the other end of the resistor is connected to the negative (-ve) side of the battery.
When the switch is closed or ‘switched on’ the bulb glows. When the switch is open or ‘switched off’ the bulb goes off
If you are instructed to put the switch on and off every 30 seconds, how would you do it? Obviously you would keep looking at your watch and every time the second hand crosses 30 seconds you would keep turning the switch on and off.
Imagine if you had to do this action consistently for a full day. Do you think you would be able to do it? Now if you had to do this for a month, a year??