Let's Make Robots!

Robot navigating by visible light alone


Your browser is not able to display this multimedia content.

Your browser is not able to display this multimedia content.




To make FritsLDR stand the ultimate test, I wanted it to navigate with light only.. but using a standard old fashionable light bulb instead of a smart & fast display of super bright LED's to track in front..

.. and then it had to navigate at a kitchen table.. where all lights in the cieling was florescent lamps :)

And it can be done. Quite easily actually! So this concludes this for me; It CAN be done - you can navigate by visible light, and you can make your own sensors with just some source of light and a cheap LDR!

I may upload some code for the filtering of florescent light if I have time or someone asks. However, it is very easy to do; Look at the "how to", use the code attached. Instead of "Pause P", use the time to measure perhaps 4 times, and let this be the result that you subtract from the other result (light on / off) and get difference from these two averaged variables instead. That does the trick.

FYI; In the video with the light bulb, I am reading 40 times on / 40 times off, and get the average.. But that is because I have to spend the time it takes the darn thing to start glowing on something :D


You may not think much of it, but to me it is sensational :D

The worlds first robot navigating by the reflection of visible light - does not care if it is driving in day or night, artificial or natural light :)

(And yes, it is also a Joystick)

Instructions on how is found here: http://letsmakerobots.com/node/1833

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I like it, and have an interest, for sure.  I have a sunken (down 2 steps) Living room.  I have to ccnstantly be alert to prevent my robot from driving "over the edge".  :(  There have been 2 times that the robot tumbled because I was distracted.  Can hardly wait for the walk through.

It's a good thing that you included the video, because otherwise someone might tell you that you are doing something impossible.  ;)

Duane S

Wilson, NC  USA 


Hey so you should try using night vision(IR) on the camera (if you have it of course) to see if that has any affect on the edge avoidance....could be interesting.


btw, is there anything that you don't use to make a robot out of????  :)  I now waiting for a nintendo bot...

The only thing that affects it is light so bright that it is over the max of the LDR.. :) Does no matter if it is Ultra Violet or Infra Red or whatever.

Out standing! Not to be a downer, doesn't this already exiest? Does anyone remember "Lego Mindstorms", it came with a IR sensor. I am probably just missing something... I AM new to the wonderful world of robotics!


That was excactly "IR" - this can be any color, which is why I chose green to show :)

And the LEGO-things are extremely sensitive to the distance from the sensor to the object; Within 1 centimeter. This can vary at least 5 centimeters in any condition with any color LED. At best I have made it work on 30 cm distance!

Very damn clever, and cool! I am a bit confused about how it works though, is it using two imputs, and then judging the distance, like eyes? Sorry, just a bit confused!

so lets see some code and a simple wire schematic...  :)

I'm curius on one thing, since there are varying sizes of ldr's,  have you tried different sizes to see how differently they react? I bought a pack of them recently, from big penny sized surface to as little as the width of an average LED....

The bigger the more sensitive, the better!

Same goes for LED; The bigger, the more light - or even the more - the better!

Ehi it definitely seems to work :) Can it be used for obstacle avoidance? IE pointing it forward instead of downward and checking the distance ?

Yes and no:

If you like to program in a way that you know excactly (measured in human-distance like CM's) how far away things are.

If you like to program a robot that has a very "subjective" measuring to distance; You know when something is close, but if it is further away you may not see it, or just know that it is out there. (Like a person driving a car; distance can only be relyed on when the objects are really close - else it is quite subjective)

If you are just using one LED and a small LDR. This is what I do on this bot (so far) and this can only be used at a distance of some 5 CM.

If you are using multiple and powerfull LED's, specially the red ones, and the biggest LDR(s) you can find. That way you can make it react to objects up to 30 CM away (as far as I have made it, but that was actually before I made some optimazation in the code that has proved to make much better results, so it may be that even my setup can look further) Indoor is of course best, some 30% off distance in bright sunlight outside.

- I am going to make one that navigates this way myself :)