Introduction: Cheap 4WD Object Avoiding Robot Using Four IR Proximity Sensors...

Picture of Cheap 4WD Object Avoiding Robot Using Four IR Proximity Sensors...

This is a cheap basic four motors, four sensors, programmable 8051 object avoiding robot using breadboad. This robot can also be used as a line following robot just changing the program. I installed two batteries for more power, but it can also be use with a single battery. 7805 is used as a voltage regulator IC. 7805 gives the constant +5V DC output. The μC used is Atmel's AT89S52. The LM324 is a quad operational amplifier which I used to amplify the IR and Photodiode signals. The output of this is then given to the AT89S52. The output of AT89S52 is then given to the L293DE. L293DE is a four channel amplifier driver which is used to drive the four gear motors.

Step 1: Getting the Materials:

Now lets see the materials needed:

For mechanics-
1. One chassis (you can use any as of your convenience).
2. Four gear motors (I used 200 rpm motor).
3. Four wheels.
4. Female bolt (comes with gear motor).

For circuit-
1. Two batteries- 6V 1.2A maintenance-free lead acid battery (you can use Li-Po too or only one cell, but it shoud be greater than 5V and have high current).
2. Wire stripper and cutter
3. Nose plier
4. Single threaded (hook-up) wires (multi colors).
5. One breadboard (174mm x 67mm).
6. LEDs.
7. IR-Photodiode sensor (if you can't find it, the ckt is discussed in this instructable).
8. Resistors- 270Ω, 10kΩ.
9. Capacitors- 10μF electrolytic, 33pF ceramic.
10. 11.0592MHz oscillator .
11. A burner for programing AT89S52. I have used ZF-007 ISP Programmer.

1. 7805
2. LM324
3. AT89S52
4. L293DE 

For IR proximity sensor:

1. Resistors- four 10kΩ, four 270Ω.
2. Potentiometers- four 10kΩ.
3. LEDs- four IR, four photodiode.
4. Copper clad board or blank PCB.

Step 2: Building the Chassis

Picture of Building the Chassis

It's the easiest part. First insert the motors inside the wheel holes, then connect the female bolts and tight it up. It is necessary to tight it well  because it gets loosen after times. After it, tight the wheels with screws to the shaft of the gear motor. Now take out the eight wires of motor out of the chassis at the upper side via the holes provided in the chassis. Now properly arrange the wires as it should not mess up with breadboard and batteries. Level the wheels with surface.

Step 3: Placing the Batteries

Picture of Placing the Batteries

the batteries can be placed at upper or lower side of the chassis as per your convenience. Placing the battery depends upon the dimension difference between the battery and the chassis. I used double sided tape to stick it with chassis. The terminals of battery should be at the inner side of the chassis. The batteries should not interrupt the motor wires. 

Step 4: Making the IR and Photodiode Sensor

Picture of Making the IR and Photodiode Sensor

It;s very easy to build IR sensor and it is lot cheaper than the ultrasonic sensor. If you cannot find this sensor, you can make it by your own. You can use ordinary IR and photodiode LEDs to make this circuit. The circuit diagram is shown, and the PCB layout file (if you want to make PCB for it) is given below. You have to remember that photodiode connects in reverse bias and at forward bias it works as a normal diode, so always connect it in reverse bias. 270Ω resistor is use to limit current for IR-LED and the 10kΩ resistor is used to limit the photodiode. potentiometer is used to vary the wavelength of LEDs by changing its voltage. The circuit uses +5V supply for is operation. more voltage can burn the circuit.
You can use blank pcb or copper clad board to make this. The pcb layout file and circuit diagram is given below.

Step 5: Getting Circuit Ready

Picture of Getting Circuit Ready

Connect the whole circuit, as shown in the schematic diagram. Refer to pics if needed. Remember, all wires should be connected properly, as any wrong wire may burn components.
Note: L293D will provide the same output voltage that is given to pin no. 8. so check the motor specification and select appropriate battery.

Step 6: Connecting Proximity Sensors

Picture of Connecting Proximity Sensors

Connect the proximity sensors as shown, and better if u place it over a cardboard or other material. check the sensors and change the resistance so that the range of all the sensors must be matched. 

The connection of proximity sensors are very easy. We need to connect the data terminals to INPUT- of LM324 (please refer to datasheet for perfect understanding. Now we need to connect the variable resistor terminal to INPUT+ of LM324. The positive and negative terminals of proximity sensors are connected to the +5V supply. Always take care while inserting the leads into the breadboard as if it's not inserted properly, it won't work.

Now let's see the programming part.

Step 7: Programming Your IC

For programming, I've used ZF-007 ISP programmer. You can use arduino as well as the programming of arduino is far easy. I don't have the programming  for arduino but if you are familiar with arduino, you can build it on your on by observing the algorithms. 
NOTE: The programming softwares i used are crac*ed softwares so you have to download those softwares first and then install as the instruction says. i've uploaded the c file and the hex file. Download it.

Step 8: Check Everything and Start Playing...

Picture of Check Everything and Start Playing...

So, now i guess everything is completed... Now all you have to do is check the connections, batteries, battery capacity, motor connection, etc.
If everything is right, start playing.
I've uploaded a video of this.
NOTE: The video is with 5 IR sensors. You can also do it by adding extra IR sensor at the middle, a LM324 and changing some programming.
The robot still have some bugs because of those cheap IR sensors. These bugs can be removed by using good quality IR sensors like sharp, etc.

Happy playing...

My next instructables will be Cheap solder hands with magnifine glass, fume extractor (picture below) 



jbrandonms (author)2013-11-05

hi man,, could you post another pictures, i don;t now how you are using the 7805 , is not working, and where is the 33 pf condensor?

SaurIMX (author)jbrandonms2013-11-06

the 7805 connection is shown on the picture. and 33pf capacitor is from 18 and 19 of AT89S52 to ground

Mattney (author)2013-09-02

Very nice! I am especially intrigued by your idea for soldering gloves

About This Instructable




Bio: A normal person, with little bit knowledge about electronics and robotics, n want to know a little bit from others...
More by SaurIMX:Cheap 4WD object Avoiding Robot using four IR proximity sensors...
Add instructable to: