Saturday 25 February 2012

Burglar Alert through SMS

The main purpose of this project is to design a system that would automatically send SMS to a predefined number up on the Infrared beam is broken between transmitter and receiver.


It consists of 3 modules

1. Infrared transmitter and receiver
It consists of 38kHz Infrared transmitter and TSOP1738 Infrared receiver. The transmitter has 40 burst cycles and 40 gap cycles that satisfies the requirement of TSOP1738 that between 10 to 70 burst cycles, there has to be atleast 14 gap cycles. Complete design can be found here : Infrared Beam Break Detector circuit

2. Microcontroller
The microcontroller used here is 89c51. When the Infrared beam is broken, there is a high to low signal in the Infrared Beam Break Detector circuit. The micrcontroller is initialized to received edge triggered external interrupt (EXT0). When a interrupt is triggered, the micrcontroller sends the necessary AT commands to send an SMS to a predefined phone number.

3. GSM modem
The microcontroller sends AT commands to GSM module to send an SMS to the predefined number. Below are the AT commands used. The AT commands are

AT+CMGF=1 and Enter
AT+CMGS="+919449xxxxxx"
and Enter
"Burglar Alert!" and CTRL+Z

Complete explanation and C-code can be found here : Sending SMS using AT commands

Friday 24 February 2012

Light Following Robot

The main purpose of this project is to design a robot which would follow the path of higher luminescence across all directions.It is based on the principle that resistance of a LDR changes with the amount of light falling on it.


It consists of 3 modules

Sensor Circuit


It consists of 4 LDRs' arranged at each side of the robot (front, back, left, right). The resistance of an LDR will decrease with the increase in the luminescence. This variation is fed to a comparator with a reference voltage set. We use LM324 IC which conveniently has 4 comparators on a single chip. In our case we found that each LDR was having different response the same luminescence. For example, for the same indoor daylight the LDR resistances were respectively 6k, 8k, 9k, 10k. To offset this variation, we are using seperate pot for reference voltage for each LDR. You can use a single pot and use the same reference voltage for all 4 LDR's if you find that LDR's are having the same response (i.e shorting pins 3,5,10,12 in LM324). The 4 outputs of comparator is fed to a port of Microcontroller 8051 via port P0.
Light Detection Circuit

Microcontroller


The microntroller used here is 89c51. The microcontroller gets the sensor inputs via port P0. The micrcontroller will drive the robot only when one of the LDR's resistance (i.e one of front, back, left, right) is below the threshold and consequently the output of the comparator is logic HIGH. The microcontroller will send the signal for the robot to drive in specific direction via port P1. One thing to note is that the robot can move either forward or backward. In case it moves forward and then right, the robot turns right looking into forward direction. Similarly, if the robot moves in the opposite direction i.e reverse and then right, the robot needs to move right looking into reverse direction (or left looking into forward direction).


DC motors with H-Bridge


The DC motor driver or H-bridge IC used here is L293D. The H-bridge converts the logic voltage 5v into DC motor specific 9v and also takes care of back emf when the DC motor direction reverses. The microcontroller send the signals to H-bridge via P1 based on which the robot moves in the specific direction (or stops). The DC motors used here is 150RPM, considering that there is not much load, higher RPM motors can be used to get higher speed.

8051 Microcontroller Interface with H-Bridge L293D



Path Following Robot with Obstacle Detection


The main aim of this project is to design a robot that can follow a black path without collisions detect the end of the path and turn back. The black path below the car can be determined using the principle that black color absorbs all radiations and the presence of an obstacle is detected using ultrasonic waves.





The project comprises of four main blocks

Infrared Transmitter and Receiver


IR transmitter consists of a IR led while the receiver used is IR transistors L14G2. When the Infrared rays fall over base of the IR Led, it is turned on. To catch this variation, the collector of IR transistor is fed to a comparators in LM324 IC  as shown in the circuit diagram. We use 4 such Tx Rx modules each at the corner of a rectangle. When the robot reaches the end of the path, only the forward Tx Rx detect white path while the backward Tx Rx module still detect the black path. This case is used to turn around the robot until the forward Tx Rx modules detect black path. In other cases, the robot turns left if one/both of the right Tx Rx module detect a white path. Similarly, the robot turns right if one/both of the left Tx Rx module detect white path. If all of the Tx Rx module detect a black path the robot moves forward.
Black Line Detection Circuit
Black Line Detection Circuit

Ultrasonic Transmitter and Receiver

Ultrasonic signals are used to detect obstacles in the path of the robot. Ultrasonic signals scores over Infrared signals in that they can detect obstacles of irregular shape as well as that of black color. Complete design of the circuit can be found here :  Ultrasonic Transmitter and Receiver

Microcontroller


The  microcontroller used here is 89c51. It is interfaced with DC motor driver H-Bridge IC L293D. The pins P0.0 to P0.3 receive the 4 IR signals indicating weather they are on black or white path. The microcontroller is programmed to drive the robot in either forward, left or right direction. The   microcontroller also continuously monitors the pin P0.4 which is connected to the output of ultrasonic obstacle detection circuit. When the pin P0.4 detects a obstacle, the microcontroller stops the robot. On reaching the end of the path, the microntroller rotates the robot until it encounters the black path and then continues foward. 



Microcontroller Interface to H-Bridge
Microcontroller interface to H-Bridge

H-Bridge and DC motors


The robot is driven by DC motors. To drive the motors we use an H-bridge-L293d which boosts the microcontroller logic voltage to 9v that is required to drive these motors. In our case, we used a 9v, 100rpm DC motor. To achieve higher speeds, DC motors of higher torque and voltage can be used.