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

I did this project for my 5th semester for "Microcontroller based Systems".

It w as done on an 89C51 microcontroller which belongs to 8051 family, using a sony e ricsson T290i mobile inter-connected with a serial cable. It was implemented on my Honda Civic. The user could control some functions of the vehicle by sending specific sms commands to the T2920i. Some of doors) these functions were: start and stop the engine (without using the key) stop the engine if somebody starts it with a key ( by cutting off ignition) lock and unlock the doors send a text message to the owner if an intruder is detected (by monitoring the switch the heater/air conditioner on and off

DESCRIPTION SMS is checked by monitoring the phone memory by using AT+CPMS command which set s the preferred phone memory location for storing sms and returns status of phon e memory. When an SMS is received its text is dumped into microcontroller's RAM using a ve ry calibrated approach. Therefore the 7th character(7th was chosen randomly) alw ays lands at location 57H of RAM. This was determined by connecting the phone to PC's serial port and debugging using the Proteus Simulation. The RAM was monito red as the phone sent the SMS text and it was dumped. So the 7th character is compared using the below table and the appropriate funct ion is called for performing the action using relays.

############## SMS COMMANDS ################### SMS COMMAND start engine 65h stop engine 6eh car lock 63h car unlock 6ch on heater 74h off heater 61h panic mode 6dh m a t l 7TH CHARACTER e n c HEX EQUIVALENT

Two Interrupts are used, Timer 0 overflow interrupt and External interrupt. The program checks for sms every time Timer 0 overflows. External Interrupt is conne cted to door switch for detecting intrusion and sending sms to owner. If externa l interrupt happens while sms is being checked, the program will get stuck due t o unexpected reply from mobile. To avoid this situation, both interrupts are set to high priority using IT0 bit in TCON register. Now if one Interrupt occurs wh ile the other is being serviced, it will have to wait until control returns from

first interrupt. Here are the Hardware connections. P0.0 = for locking car (attached to security sys remote) P0.1 = for unlocking car (attached to security sys remote) P0.2 = for switching on heater P0.3 = connected to IGNITION RELAY 1 (CRANK or START engine) P0.4 = connected to IGNITION RELAY 2 (ON) P0.5 = connected to IGNITION RELAY 3 (ACC) P0.6 = connected to IGNITION CUT RELAY (Used for switching off engine when some one is running with your car!! i.e PANIC MODE) P3.2(INT0) = Door switch relay(for detecting if door is opened) Download Section Here are the project files: -Source code (Assembly language-Compiler: Keil uVision 3) -Proteus Simulation (works with Proteus 7.4 and above) -Sony Ericsson AT command manual Hardware: -PCB Layout 8051 board (works with Proteus 7.4 and above) -Relay board demo (simulation) (works with Proteus 7.4 and above) -Custom Serial adapter (The custom serial adapter as seen in the last picture; connected between the mo bile phone serial cable and 8051 board, is used to provide power to the MAX232 I C present inside the mobile phone serial cable by giving +5V at pins 7(RTS) and 4(DTR) of the phone serial cable. The cable won't work without this custom adapt er) Some snapshots of the hardware. From the pictures it may seem that the project i s incomplete or something but I actually drove the car around for a couple of mo nths with the system working!

The setup was placed in the dashboard

The relays connected to the ignition

The microcontroller board with the serial port and the relay board. The 8051 board connected to the phone through serial cable. The code has been tidied before uploading so if you can interpret it, it can be ported easily to an AVR or PIC. If anybody wants any help with this stuff, just drop a comment or "Contact me". I'll be happy to help.

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