AT89C52 based Robo-Car (involves programming AT89C52, source code provided).
The robotic car or Robo Car employs the micro controller AT89C52 to detect obstacles and manipulate its direction as per the inputs from three infra-red sensors mounted atop of the car.
Description -
When the RoboCar is powered on, the micro-controller (IC4) fetches the code from its internal memory and sets its pin 10 high and pin 11 low. This signal is fed to pin 2 and pin 7 of IC3 (motor driver), which drives the DC motor in one direction. This enables the car to move forward. IC5 (NE555 timer) is wired as an astable multi-vibrator to generate a 38 KHz pulse. The 38 KHz pulses are amplified by transistor T1 to drive five IR LEDs. The IR sensors and LEDs are arranged in such a way that the output of the sensors is high where there is no obstacle near the car. But if there is any obstacle, the transmitted IR signals from the IR LED are reflected back from the obstacle that comes in the way. This makes the sensor output go low. This low output signal is fed to port 0 of the micro-controller. The output of sensor Q1 is connected to P0.0, Q2 to P0.1 and Q3 to port P0.2. As soon as the output of the left sensor Q1 is pulled low to P0.0=0, the controller alters the spin of the DC motor, makes port P3=0 and stops the DC motor, thereby stopping the car for a moment. Then it drives port 1 in such a way that the stepper motor is rotated to the right, and the front steering wheels are also turned right, while the car continues to move forward. After a few seconds, the controller drives the stepper motor in the reverse direction (turning it left), which brings the steering wheels to the straight position and moves the car forward. Similar is the case when an obstacle is detected at the right sensor Q2. In case there is an obstacle in the front, the centre sensor Q3 sends a low signal to port pin P0.2. This makes port P3=0 and the car stops. The steering wheels are turned left making port P3.0=0 and P3.1=1, which moves the car in backward direction with the steering still turned. After a few seconds, the DC motor is stopped by making port P3=0. The steering is set in the straight position and the car moves forward by making the port P3.0=1 and P3.1=0. Thus, when the port P3.0=0 and P3.1=1, the car moves in the reverse direction; when P3.0=1 and P3.0=0, the car moves in the forward direction and when P3.0=0 and P3.1=0, the car stops.
Parts required -
Semiconductors:
- IC1 - 7805, 5V regulator
- IC2, IC3 - L293D motor driver
- IC4 - AT89C52 microcontroller
- IC5 - NE555 timer
- T1 - 2N2222 npn transistor
- IRL1-IRL5 - 5mm IR LED
- LED1 - 5mm red LED
- Q1-Q3 - TSOP1738 IR sensor
Resistors (all ¼-watt, ±5% carbon unless
stated otherwise):
- R1 - 3.9-ohms, 2W
- R2 - 10-kilo-ohms
- R3, R4 - 3.3-kilo-ohms
- R5 - 470-ohms
- R6-R10 - 22-ohms
- R11-R13 - 100-ohms
- R14-R21 - 82-kilo-ohms or resistor
- network
- R22 - 1-kilo-ohms
- VR1 - 5.1-kilo-ohms preset
Capacitors:
- C1, C10 - 0.1μF/25V electrolytic
- C2 - 10μF/25V electrolytic
- C3, C4 - 33pF ceramic
- C7-C9 - 4.7μF/25V electrolytic
Miscellaneous:
- BATT - 4V×3 rechargeable battery
- Xtal 1 - 14Mhz crystal
- S1 - SPDT on/off switch
- S2 - Tactile switch
- M1 - 12V DC motor
- M2 - 12V bipolar stepper motor,
- 7.5°/step
- - Four wheels each of
- 75mm diameter
- - Chassis 265×150mm
- - Heat sink for 7805
- - Pulley and belt
- - Connectors and wires
http://rapidshare.com/files/404142562/AT89C52_based_RoboCar.pdf.html
No password.
i want 2 know more about its programming....please
ReplyDeleteYou can download the pdf file. It has all the programming details you need to know.
ReplyDelete