go to main index know about us who we are and what we are provide ? we provide training on how to reach us send e-mail us





In this project we show that how we use automation system in train  ,

 By using this system in any vehicle , it is possible to move the vehicle on  predefined track with auto stop I provision. In this project we try to stop the train on minimum five stoppage and give a auto reverse logic for then end of path. By adding this logic with train we move the train for long time with out changing the direction,



In this project we use ic 89c51 microcontroller to control all the logic , movement of vehicle, stoppage of vehicle, and reverse action of vehicle with the help of this microcontroller and different sensor’s.


In this project we use dc gear motor  to run the vehicle to and fro automatically. We use slow speed dc motor to increase the  torque and slow the speed of vehicle, this DC motor is  run by a 5 volt to 12 volt dc voltage. We use additional gear box if we want to slow down the speed.


In this project we use infra red sensor to stop the train and infra red sensor to reverse  and again forward the train.

So we use three pair of infra red reflective sensor in this project. One at the bottom of this train, second in the front of this train and third at the reverse of this train.

By using three sensor  we not only stop the train but also reverse the train.


As per logic in concern we use three  inputs in this project,  one from the  ground sensor and two from the front and back sensor.. Three input and one motor.


Here in this project we use dc motor to run the vehicle, for the dc motor we use H bridge  circuit in this project. H bridge circuit not only drive a sufficient power to dc motor but also provide a  forward and reverse logic to the motor .










What is Open SYSTEM?

   An open system is the normal desktop computer where you can use it for any tasks. If you want to process text documents you can install Ms-word if you want to send mail you can use outlook express and counts on.

What is Embedded System ?

 An embedded system is the system where you can use it for a specific task.


A microcontroller (often abbreviated MCU) is a single computer chip that executes a user program, normally for the purpose of controlling some device hence the name microcontroller.

 A microcontroller is differed from microprocessor in many ways. Basically microprocessors are the devices which can process huge amount of data. A microprocessor can’t do anything on it own. Even to light a led a microprocessor needs minimum of a ROM, RAM, Latch, Address decoders, PORT controllers. But for the same application if you take a microcontroller you barely need a crystal and some capacitors.

 So from this you can understand how versatile the microcontroller is.


It is always good to know the market scenario before learning any thing. The following will explain the whole scenario of the embedded industry. This will make you to choose the best one for you.

Different microcontrollers in market.

·        PIC             One of the famous microcontrollers used in the industries. It is based on RISC Architecture which makes the microcontroller process faster than other microcontroller.


·        INTEL                  These are the first to manufacture microcontrollers. These are not as sophisticated other microcontrollers but still the easiest one to learn.


·        Atmel                Atmel’s AVR microcontrollers are one of the most powerful in the embedded industry. This is the only microcontroller having 1kb of ram even the entry stage. But it is unfortunate that in India we are unable to find this kind of microcontroller.


Intel 8051


Intel 8051 is CISC architecture which is easy to program in assembly language and also has a good support for High level languages.


The memory of the microcontroller can be extended up to 64k.


This microcontroller is one of the easiest microcontrollers to learn.


The 8051 microcontroller is in the field for more than 20 years. There are lots of books and study materials are readily available for 8051.





The best thing done by Intel is to give the designs of the 8051 microcontroller to everyone. So it is not the fact that Intel is the only manufacture for the 8051 there more than 20 manufactures, with each of minimum 20 models. Literally there are hundreds of models of  8051 microcontroller available in market to choose.  Some of the major manufactures of 8051 are


Ø     Atmel


Ø     Philips


Ø     Dallas




          The Philips‘s 8051 derivatives has more number of features than in any microcontroller. The costs of the Philips microcontrollers are higher than the Atmel’s which makes us to choose Atmel more often than Philips



          Dallas has made many revolutions in the semiconductor market. Dallas’s 8051 derivative is the fastest one in the market. It works 3 times as fast as a 8051 can process. But we are unable to get more in India.



          These people were the one to master the flash devices. They are the cheapest microcontroller available in the market. Atmel’s even introduced a 20pin variant of 8051 named 2051. The Atmel’s 8051 derivatives can be got in India less than 70 rupees. There are lots of cheap programmers available in India for Atmel. So it is always good for students to stick with 8051 when you learn a new microcontroller.



Architecture is must to learn because before learning new machine it is necessary to learn the capabilities of the machine. This is some thing like before learning about the car you cannot become a good driver. The architecture of the 8051 is given below.

The 8051 doesn’t have any special feature than other microcontroller. The only feature is that it is easy to learn. Architecture makes us to know about the hardware features of the microcontroller. The features of the 8051 are


§        4K Bytes of Flash Memory

§        128 x 8-Bit Internal RAM

§        Fully Static Operation: 1 MHz to 24 MHz

§        32 Programmable I/O Lines

§        Two 16-Bit Timer/Counters

§        Six Interrupt Sources (5 Vectored)

§        Programmable Serial Channel

§        Low Power Idle and Power Down Modes



The 8051 has a 8-Bit CPU that means it is able to process 8 bit of data at a time. 8051 has 235 instructions. Some of the important registers and their functions are






All logical & arithmetical operations


Mainly used in Multiplication & Division

Program Status Word (PSW)

Keeps current status of ALU

Stack Pointer (SP)

Points the Stack

Program Counter (PC)

Location of the next instruction

Data Pointer (DPTR)

Points the Location of the Data



Every microprocessor & microcontroller uses clock signals. The clock signals are used to synchronize CPU with other peripherals in the CPU. Clock signals are very much important for a time critical jobs. If the oscillator used is not of good quality we will be surely loosing lots of data in serial communication.


Tools for Development.


For developing embedded application we are having two options.


§        Assembler


§        C Compiler




Using assembler can reduce them memory used abundantly. You can have a good control over the code. When you use assembly language you are directly programming the microcontroller. The process time can be easily calculated. Atmel itself gives a free assembler called asm51.


But making a application in assembly language will take many man hours. Porting is not at all possible in assembly language. Even to port the code into another derivative we need to tweak a lot.

Debugging is really tough. A simple application’s code may range from 400 to 500 lines. It is really tough to map the mistake and rectify it.


C Compiler


This is an universal language and so every one know C. The application can be rapidly developed in C Compiler. The code can be ported into other microcontroller just like that. Debugging is really easy in C.


On the other hand when we use C we don’t have the control over the code. The “ printf ” is a single statement which takes around 1.2 Kb of code memory. The 8051 it self has only 4Kb of memory. The C Compilers are memory hungry. Even the best compilers fix bugs after its release. The compilers use the ram just like that. The cost of the compiler is very high.


We can still use C Compiler because we can make the applications rapidly. We don’t want to learn another new language. We even don’t want to learn the whole architecture of the 8051!


The 8051 has only 127 bytes of ram. The enhanced version 8052 even has only 256 bytes of ram. So while programming microcontroller we should take care a lot in the usage of the variables.


A view of the C Compilers available in the market


§         SDCC – Small Device C Compiler open source Compiler started in India.


§        RIDE – yet another famous C Compiler but ram hungry


§        Hitech – Famous in Dev. PIC Micro compilers


§        Micro C –  Rather new compiler


§        Keil – Very Nice Compiler


We will be using Keil in our development because it is one of the most used in Embedded Industry. It has a good IDE helps in Rapid Development. Produced Code is smaller than other 8051 Cross compilers. Uses Ram (8051) Very little. Effective debugging with integrated simulator


Let us see some basics of the 8051.


Pin diagram








Power supply:


8051 can handle power supply of 3.5 volts to 7 volts with no problem. Always use a Decoupling Capacitor between the Power supply and the Ground. Decoupling capacitors are used to avoid the spikes. Pin 40 is for VCC and Pin 20 is for Gnd.














































Sensor detail: