Let's Make Robots!

Light seeker (and loves walls...)

Seeks light, then bangs into a wall
IMG_0650.jpg125.44 KB
IMG_0648.jpg116.34 KB
IMG_0646.jpg133.5 KB
photovore_code.html30.24 KB


A update of the bot put up here :



Just to save reading two similar posts, i'll brief what i've done:


This is my 1st bot, built using some Vex hardware, tamiya plates and stuff off an old cd drive/music system. I've used an arduino for the mcu, two cheap 12v motors(ebay) and a polulu mc33887 motor driver. wheels are from servocity. the arduino is powered with a 9v battery, while the bot has a 6v (five 1.2v AA) source. Two photoresistors provide sensor information. Entire research took about a month. Built it up over a week.

I made this bot slightly narrower than the one posted in the blog, coz it was forever crashing into furniture (coz of wider turning angle).


1. Read left and right sensors

2. If left > right, then 

    a. speed of right motor = pwm value based on left sensor reading..ie right turns faster

    b. speed of left motor = pwm value based on (right sensor reading / 2) ... ie left turns much slower

3. if right > left, then exact opposite of above

4. if right and left almost equal, then turn both motors at same speed


 Code attached as .htm btw. Probably if i made the sensors a little longer, it would have reacted faster and avoided the nasty wall bang. The ambient light in the room provides almost uniform light throughout, hence there seems to be very little variation in the direction. As i dont have a torch (yes, i dont have one!) to test it at night, i must assume that it will follow a light source. Two videos attached; the 1st is set with a 'limit = 5' value in the code, the 2nd video is set with 'limit = 3'. The higher the number, the more the bot will ignore the variation between left and right sensors, making it go straight.


Things i've learnt so far (Quite possibly, almost everyone is aware of this, but this is my experience and i would like to share it anyway):

1. When you post in a forum, you dont come up with requests asking others to show how a wiring/schematic/circuit is done from scratch. Chances are, no one will. Instead, do a bit of research, look up what others have done, note down whatever tiny bit of info you have,  analyze, think, swear, get some caffeine, draw it up, post it and then ask if its good to go. Most likely, you'll get some response. Try in multiple sites as well.

2. Buying from the internet is sometimes more feasible, but always consider the shipping factor when calculating expenses. The entire price of the components may well be doubled just including the shipping charges. Some ebay sellers have a reputation of charging a few cents for the product, while tagging exorbitant shipping rates; beware.

3. You dont connect a multimeter in parallel to test current > connect it in series, or enjoy the scent of a burnt fuse.

4. Blinking an LED will give you astounding satisfaction. Best done before trying to learn some complicated code.

5. Spend enough time with your wife/girlfriend/boyfriend and not just the bot. One fine it day, it may be just you and your bot sitting outside coz she wont open the door...


Special thanks to Ben in polulu, robologist and others here who helped me get this far :)

Learning how to work the sharp ir next...

cheers :)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Good stuff, keep working on it, will be great!