Can a small robot detect objects by flicking a light on and off? If so, then all I need to do in order to add object detection capability is add a small lamp to my robot at a cost of just over a dollar.
Here’s a schematic of the circuit (connections refer to Arduino pins):
Again,the idea is to flash the lamp on and off. The photocell compares the on/off readings and if there’s a ‘significant’ (TBD) difference in brightness caused by the lamp light reflecting off an object, the LED will flash to indicate that an object has been detected.
Here’s the test rig:
(You’ll notice the photocell and lamp are in different physical positions than shown on the schematic. Kind of confusing, but it makes no difference in how the circuit operates.)
And here’s the test rig in action, in both dim and bright ambient light conditions:
If I can funnel the light using a foil cone or dish, it might be possible to detect the object at a distance of several centimeters. Also, when the beam is focused, the direction of the object might be determined with greater accuracy.