Microcontroller Based Automatic Vehicle

In this project I am going to discuss a project in which a microcontroller, 89c52, is used to generate PWM signals. These signals are then used to control a DC motor and hence indirectly contributes to controlling the speed. Thus this article is all about a device for controlling speeds of any moving object. The base of thinking behind making it is to stop or minimize the speed of the moving object if any hindrance comes in front of the moving object. Although the concept is not mine, it is already been implemented in many projects, but through this article another implementation is being discussed. Here we are using PWM waves to control speed of moving object and for this we are using microcontroller 89c52. Although we can use any other device as well to generate the PWM waves like 555 timer. The DC motor which is used in the whole circuitry is actually controlled Power supply. The power can be supplied either by battery or AC power supply can also be used. The switching 'on' and 'off' of the power causes the motor to move or change speed. What actually happens is the DC motor starts from zero and then gradually increases its speed. When we switch on the button the DC motor turns on and starts movement and on switching it off, the motor stops. It depends on the time duration for which the power supply is given to this DC motor. If the intervals of switching on and off is small, the motor gets less time to increase its speed and hence the vehicle will move at a slower speed. Hence it depends on the system to control the speeds. We have divided our circuit in three major parts, IR transceiver, multivibrator circuit and microcontroller based DC motor speed. What happens in the circuit is that the IR sensor detects if there is any hindrance in front of the moving device. On sensing the obstacle it activates a relay driver and with that a multivibrator output is connected with the down speed connectivity of the circuit. The power supply which we provide can be AC.

Now we will take a look about the circuit and its arrangement.


We provide an AC power source to step down using a step down transformer. The 230V AC is stepped down and converted into 9V with the help of this transformer. This step down voltage is rectified by a bridge rectifier and then this voltage is regulated by the regulator. The capacitors are used as a filter and to bypass the DC component. We have also used LED as an indicator and its turning on indicates that we are getting a power supply. It is to be noted that a resistor is also connected just before the LED; this is to limit the current which flows through it. We have also used a diode so as to make a drop of about 0.4V in voltage. Now you must be thinking that out of 9V we are getting only 5.4 of total voltage; actually to drive our motor and for proper functioning we need only this much of voltage as it satisfies our specifications. Microcontroller 89c52 is used to generate PWM waves; therefore out of 9V from the step down transformer, nearly 3V has been consumed by the bridge rectifier and regulator. And then the diode made some drop and then out of 6v we finally got 5.4v of voltage which is then used by te DC motor for proper functioning.

The microcontroller 89c52 is actually a low power, CMOS 8-bit microcontroller with 8Kb of flash memory which can be programmed as much as we want to. The working of the DC motor is based on the PWM waves. The advantage with the system is that DC motor's speed decreases when it gets the directions from the relay and then according to those directions the PWM signals are generated. On removal of that hindrance the sensor again detects the position of that obstacle and then sends the signals according to which PWM waves generated which increases the speed of the DC motor. The resistors preferred here are carbon resistors. We have used a seven segment display to show the speed of vehicle in the form of digits, it actually displays one tenth value of the duty-cycle. Duty cycle is a very important factor, it is a measurement of power given by any emitter or something may be a radar. It tells us that out of the total time, for how much time our device is on. Like if a motor is on twice in 60 seconds. Then its duty cycle would be 2/60 i.e.,1/30.

Conclusion : This is a very simple and economic implementation of some hardware devices which can be used with the help of some general logics. The above implementation shows the use of  simple combinations of some hardware components. which is resulted into a useful implementation. This device can be used in our automobile engines which can help in reducing accidents. This can be very effective and more useful if some extra work in some on this field.


Microcontroller 89c51 used in robotics

Microcontrollers for robotics