HERE YOU WILL GET A VERY USEFUL INFORMATION , TIPS TRICKS ABOUT MICRO-CONTROLLERS I WILL UPLOAD EVERY INFORMATION ABOUT MCS_8051 WHENEVER I WILL GET... THANK YOU.
WELOCME TO 8051 INFORMATION BLOG
HERE YOU WILL GET ALL INFORMATION ABOUT MC51 PROJECTS , INTERFACING ETC...under one roof...HENCE NO SEARCHING FOR HERE & THERE...
Friday, April 30, 2010
Intelligent Train Engine:
We know that the railway network of India is the biggest in south Asia and perhaps the most complicated in all over the world. There are so many different types of trains local, fast, super fast, passenger, goods…. etc. and their so many multiple routs. Although the time table is perfect it is not at all possible to maintain it. And that’s why the train accidents are becoming more and more usual. So why not we add a kind of intelligence to the train engines itself so that it tries to avoid accidents.
The idea is whenever any engine observes a red signal on its track it will start decreasing its speed gradually and stops automatically at some distance from the signal pole. After then when it gets green signal the driver can manually start the train and go on. In the mean time when train has not stopped yet and a red signal becomes green then it crosses the signal pole with low speed and then driver can slowly increase the speed.
How the project works?
Initially when you switch on the supply 89C51 will switch all the relays RL1- RL4 one by one. So motor will get 9-12-15-18 V supply in steps and gradually increases its speed reaches max speed indicated by first red LED (P0.0).
Now if the signal is green then train will cross the pole with same pole
But if signal becomes red in between then IR sensor will detect IR beam and interrupts the 89C51
Getting first interrupt 89C51 will switch off RL4 and switch on RL3 so now motor will get 15 V supply and its speed will be decreased. That’s indicated by second red LED (P0.1)
Now 89C51 will wait for some time (2 to 3 sec) and train goes on with same speed. Again if still red signal is on 89C51 will be interrupted and this time it will switch on RL2. so now motor gets 12V supply and again its speed will be decreased indicated by third red LED (P0.2)
The same procedure repeats if 89C51 is interrupted third times. Now motor runs at min speed (9 V) indicated by fourth red LED (P0.3)
After same delay on receiving fourth interrupt all the relays will be switched off and motor is now stop so the train is also stopped. This is indicated by green LED.
After this interrupts will be disabled. So now when red signal becomes green driver must reset the controller to start the train again.
this is very beautiful project & very useful..
I provide the ckt diagram & program for this project..
It is as follows..
Program:
ORG 00H
MOV R0,#01H ; INITIALIZE THE COUNTER TO COUNT NO. OF INTERRUPTS
SJMP OVER ; JUMP ABOVE THE INTERRUPT SUBROUTINE
ORG 0013H ; INTERRUPT 1 SUBROUTINE LOCATION
MOV IE,#00H ; DISABLE INTERRUPT FIRST
CLR P0.0 ; INTERRUPT INDICATION ON GREEN LED
INC R0 ; INCREMENT COUNTER
ACALL DELAY ; CALL 0.1 SEC DELAY
SETB P0.0 ; RESET GREEN LED
CJNE R0,#02H,NXT2 ;IF COUNTER IS 2 THEN DECREASE SPEED BE ONE STEP (15 V)
MOV P0,#0FBH
MOV P1,#04H ; GIVE INDICATION ON SECOND RED LED
SJMP OUT
NXT2: CJNE R0,#03H,NXT3 ; IF COUNTER IS 3 THEN DECREASE SPEED BE TWO STEP (12 V)
MOV P0,#0F7H
MOV P1,#02H ; GIVE INDICATION ON THIRD RED LED
SJMP OUT
NXT3: CJNE R0,#04H,NXT4 ; IF COUNTER IS 4 THEN DECREASE SPEED BE THREE STEP (9 V)
MOV P0,#0EFH
MOV P1,#01H ; GIVE INDICATION ON FOURTH RED LED
SJMP OUT
NXT4: CJNE R0,#05H,OUT ; IF COUNTER IS 5 THEN STOP THE TRAIN
MOV P0,#0FEH
MOV P1,#00H ; INDICATE IT BY GREEN LED.
OUT: ACALL DELY ; CALL 2 SEC DELAY EVERY TIME WHEN SPEED IS CHANGED
MOV IE,#84H ; ENABLE INTERRUPT AGAIN
RETI ; RETURN FROM INTERRUPT
OVER:MOV P1,#01H ; MAIN PROGRAM STARTS FROM HERE STARTS TRAIN WITH MIN SPEED
ACALL DELY ; AND GRADUALLY INCREASE IT TO MAX IN FOUR STEP
MOV P1,#02H ; WITH 2 SEC DELAY IN BETWEEN
ACALL DELY
MOV P1,#04H
ACALL DELY
MOV P1,#08H
MOV P0,#0FDH
MOV IE,#84H ; ENABLE THE INTERRUPT
HERE: SJMP HERE ; CONTINUE LOOP
DELAY:
MOV R6,#64H ; 0.1 SEC DELAY
LOP2:MOV R5,#0FAH
LOP1:NOP
NOP
DJNZ R5,LOP1
DJNZ R6,LOP2
RET
DELY:
MOV R7,#15H ; 2 SEC DELAY
LOP5:MOV R6,#64H
LOP4:MOV R5,#0FAH
LOP3:NOP
NOP
DJNZ R5,LOP3
DJNZ R6,LOP4
DJNZ R7,LOP5
RET
END
TRY THIS PROJECt......
GANDHAR
Wednesday, April 28, 2010
Thursday, April 1, 2010
INTRO TO BLOG
HI FRIENDS...
I M HAPPY TO PRESENTING MY BLOG HERE.
I AM EXTREMELY EXCITED TO MAKE MY BLOG FULLY INFORMATIONAL.
HERE YOU WILL GET ALL INFORMATION ABOUT 8051uC.
FOR ANY HELP , YOU CAN POST OR MAIL ME AT gandhar.music@gmail.COM
KEEP VISITING...
THANK YOU
I M HAPPY TO PRESENTING MY BLOG HERE.
I AM EXTREMELY EXCITED TO MAKE MY BLOG FULLY INFORMATIONAL.
HERE YOU WILL GET ALL INFORMATION ABOUT 8051uC.
FOR ANY HELP , YOU CAN POST OR MAIL ME AT gandhar.music@gmail.COM
KEEP VISITING...
THANK YOU
Subscribe to:
Posts (Atom)