Monday, June 4, 2012

This Project Line Following Autonomous Robot

It is based on 8 bit Microcontroller. This Robot follows the black line which is drawn over the white surface or it follows the white line which is drawn over the black surface. The infrared sensors are used to sense the line. When the infrared signal falls on the white surface, it gets reflected and if it falls on the black surface, it is not reflected this principle is used to scan the Lines for the Robot. All the above systems are controlled by the Microcontroller. Microcontroller gets the signals from the infrared sensors and it drives the motors according to the sensor inputs. Two stepper motors are used to drive the robot.

THEORY OF OPERATION-: How to sense a black line The sensors used for the project are Reflective Object Sensors, 0PB710F that are already ready in the Electronic Lab. The single sensor consists
of an infrared emitting diode and a NPN Darlington phototransistor. When a light emitted from the diode is reflected off an object and back into the phototransistor, output current is produced, depending on the amount of infrared light, which triggers the base current of the phototransistor. In my case, the amount of light reflected off a black line is much less than that of a white background, so we can detect the black line somehow by measuring the current. (This current is converted to voltage.) ii) How to control a DC motor
Instead of applying a constant voltage across a DC motor, we repeat switching on and off the motor with a fixed voltage (Vcc) applied to the motor. This is done by sending a train of PWM (Pulse Width Modulation) pulses to a power MOSFET in order to turn it on and off. Then, the motor sees the average voltage while it depends on duty cycle of PWM pulses. The speed of rotation is proportion to this average voltage.
By PWM method, it's easier to control the DC motor than by directly controlling the voltage across it. All we have to do is to modulate pulse width, in order

Saturday, June 2, 2012

Code for bluetooth based device control.

INCLUDE REG_51.PDF

LOAD1EQUP1.0
LOAD2EQUP1.1
LOAD3EQUP1.2
LOAD4EQUP1.3
LOAD5EQUP1.4
LOAD6EQUP1.5
LOAD7EQUP1.6
LOAD8EQUP1.7

DSEG ; This is internal data memory
ORG 20H ; Bit adressable memory


MOBILE:DS3
COUNTER:DS1


CSEG ; Code begins here
; ---------==========----------==========---------=========---------
; Main routine. Program execution starts here.
; ---------==========----------==========---------=========---------
ORG 00H ; Reset
AJMP MAIN

ORG 0023H
AJMP SERIAL
; ---------==========----------==========---------=========---------

MAIN: MOV SP,#40H
MOV TMOD,#20H;initilize serial port
MOV TH1,#0FDH;Slect 9600 baud rate
MOV SCON,#50H
MOV IE,#10010000B
SETB TR1;start timer
MOV COUNTER,#00H
MOV P1,#00H
AJMP $
;**************************************************************************
SERIAL:
JB TI,TRAS1
MOV A,SBUF
CJNE A,#'A',DOWNW
MOV COUNTER,#00H
AJMP DOWN1
TRAS1:AJMP TRAS
DOWNW:CJNE A,#0AH,DOWNW1
CALL DEVICE_DECODE
AJMP DOWN1
DOWNW1:MOV A,COUNTER
CJNE A,#01H,SD1
MOV MOBILE,SBUF
AJMP DOWN1
SD1:CJNE A,#02H,DOWN1
MOV MOBILE+1,SBUF
DOWN1:INC COUNTER
CLR RI
RETI
TRAS: CLR TI
RETI
;**************************************************************************
DEVICE_DECODE:
MOV A,MOBILE;LOAD 1
CJNE A,#31H,SDF1
MOV A,MOBILE+1
CJNE A,#31H,SDF2
SETB LOAD1
AJMP SDF1
SDF2:CJNE A,#32H,SDF1
CLR LOAD1
SDF1:

MOV A,MOBILE;LOAD 2
CJNE A,#32H,SDF11
MOV A,MOBILE+1
CJNE A,#31H,SDF21
SETB LOAD2
AJMP SDF11
SDF21:CJNE A,#32H,SDF11
CLR LOAD2
SDF11:

MOV A,MOBILE;LOAD 3
CJNE A,#33H,SDF12
MOV A,MOBILE+1
CJNE A,#31H,SDF22
SETB LOAD3
AJMP SDF12
SDF22:CJNE A,#32H,SDF12
CLR LOAD3
SDF12:

MOV A,MOBILE;LOAD 4
CJNE A,#34H,SDF14
MOV A,MOBILE+1
CJNE A,#31H,SDF24
SETB LOAD4
AJMP SDF14
SDF24:CJNE A,#32H,SDF14
CLR LOAD4
SDF14:
MOV A,MOBILE;LOAD 5
CJNE A,#35H,SDF15
MOV A,MOBILE+1
CJNE A,#31H,SDF25
SETB LOAD5
AJMP SDF15
SDF25:CJNE A,#32H,SDF15
CLR LOAD5
SDF15:
MOV A,MOBILE;LOAD 6
CJNE A,#36H,SDF16
MOV A,MOBILE+1
CJNE A,#31H,SDF26
SETB LOAD6
AJMP SDF16
SDF26:CJNE A,#32H,SDF16
CLR LOAD6
SDF16:
MOV A,MOBILE;LOAD 7
CJNE A,#37H,SDF17
MOV A,MOBILE+1
CJNE A,#31H,SDF27
SETB LOAD7
AJMP SDF17
SDF27:CJNE A,#32H,SDF17
CLR LOAD7
SDF17:

MOV A,MOBILE;LOAD 8
CJNE A,#38H,SDF18
MOV A,MOBILE+1
CJNE A,#31H,SDF28
SETB LOAD8
AJMP SDF18
SDF28:CJNE A,#32H,SDF18
CLR LOAD8
SDF18:

MOV A,MOBILE;LOAD 8
CJNE A,#39H,SDF19
MOV P1,#0FFH
SDF19:

MOV A,MOBILE;LOAD 8
CJNE A,#30H,SDF10
MOV P1,#00H
SDF10:
RET

end

Sent from my Nokia phone

Device control using Mobile phone via bluetooth (symbian)

Device control through Bluetooth
from Symbian OS Mobiles
Use your Symbian OS mobiles to control
devices through Bluetooth.
An serial to Bluetooth converter is used
in this project.
The Microcontroller At89C2051 is used
to receive the data from the mobile through bluetooth.
Most of the Nokia smart phone can be
used in this project. Schematic and code is given .

Sent from my Nokia phone

Sent from my Nokia phone
Hi everyone

Sent from my Nokia phone