Wall Following Robot Using 555 Timer

 by hasn0life
Contest Winner

Step 3: Electronics

IMG_0004.JPG
Circuit for Analog Robot.JPG
This is where the magic happens. The circuit is mainly a modification of the servo controlling PWM circuit shown in this video . (thanks Roboanalogtom!!)  However, instead of the photo resistive voltage divider, you hook up the IR distance sensor running through an op-amp buffer (though I'm not sure if the buffer is really necessary.) You need two PWM circuits, one for each servo motor, hence the use of the 556. The schematic uses different capacitor values for each wheel, you can experiment with various values as well.

Any analog Sharp IR distance sensor will do, but I used the long range one because it was more convenient for the firefighting competition. If your robot is smaller, you can use one with shorter range. However, you should consider the dead zone of the distance sensors when picking and mounting them. Try to keep about half the dead zone inside the robot frame, since it will allow you more range. However, if it runs into a wall, it might not recover. Once again, feel free to experiment.

In the picture there are a few resistors which I did not include in the parts list or schematic, because they do not add functionality.

Also, in the schematic, it doesn't show how to wire the IR sensor sensor. There are 3 wires on it. The red wire (power) goes to the 5V after the regulator., the yellow (signal) wire goes to the input of the Op amp buffer, and the black wire (ground) goes to ground.

There is also a 1000uF cap across the 5V supply.

Finally, the servo motors are powered by the unregulated voltage straight from the battery. If you are using different servos and a different battery, you may have to power them from the 5V supply if they are not rated for the voltage your battery provides. Regular servo wires have different colors then Vex servo wires, so it is up to you to wire them.
 
Remove these adsRemove these ads by Signing Up
vn465768 says: Mar 3, 2013. 6:13 PM
Can you please post a video of how does it work?
hasn0life (author) in reply to vn465768Mar 5, 2013. 6:11 PM
Done.
HarveyH44 says: Mar 2, 2011. 1:53 PM
I think there is a slight flaw in your schematic. The signal from the IR receiver goes to the opamp, the output of the opamp, feeds both halves of the 556. Both motors should basically do the same thing, only difference would be from variance in part tolerances. The trim pots should cover that. This bot, doesn't exactly move in a straight line, does it?

I have watch the video, I use FireFox, which doesn't like YouTube for some reason...
hasn0life (author) in reply to HarveyH44Mar 2, 2011. 8:45 PM
I tried to explain this in the last section. The motors do the same thing, but because one of them is upside down, it moves backwards, so the robot wants to turn. You have to bias the motors using the trimpots so that they both move forward when the distance sensor sees a certain distance.

The robot can move in a straight line if its following a straight wall and you calibrate it in a specific way. In my video I adjusted it to do wide turns because I didn't have much time to tune it. It can actually run even better than that and not do the twitching in the video.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!