[Dprglist] Light Sensors, Moth/Anti-Moth Behaviours, and PID steering

Murray Altheim murray18 at altheim.com
Thu Feb 11 20:48:55 PST 2021


On 12/02/21 4:17 pm, Doug Paradis wrote:
> Murray,
> Moth / Anti-Moth (i.e., Cockroach) behavior robots are really fun 
> for children and are very simple to make. All you need for sensors 
> are 2 CdS light sensors and 2 A/D pins. The Build More Robot tutorial
> series had a session devoted to them. They were also demonstrated
> using the Tiny Wander DPRG club robot (see Make Magazine vol 29) 
> which used a Attiny13 8 pin processor.

Hi Doug,

As you suggest, it'll be fun seeing how the robot reacts to the varying
light levels in my house. Thanks for the link to the video, looks like a
CdS photocell robot works just fine. I'm making a more-than-necessarily-
complicated version of the Moth. Seems a lot of what I do is more than
necessarily complicated. Not sure why that is... I just want life to be
simple. (ha!)

I'm also interested in having the bias between a left and right sensor
possibly provide a proportional bias steering the robot towards or away
from the light. It might be possible to do something similar with a
CdS cell, but I understand that photocells work within a more limited
light range and aren't very consistent between individual units, though
as the video suggests, maybe that doesn't matter so much. On the other
hand, being able to measure somewhere between 0 and 65K+ lux (using a
BH1750[1]) or 3 to 55K lux with a logarithmic scale using a GA1A12S202
sounds pretty interesting. And response times are more around 10-20ms.

I was trying to find the specs on a typical CdS cell and it seems their
usable range is more like 10-600 lux and have response times of
somewhere between 50-70ms. The specs (e.g, [2]) usually just say
something like "dark resistance" but don't provide much help about
performance in dark rooms, i.e., provide a helpful notion of the curve
of their response.

This could of course even be done without a microcontroller or some fancy
new sensor, but we gotta advance the science! :-)

Cheers,

Murray

[1] https://www.mouser.com/datasheet/2/348/bh1750fvi-e-186247.pdf
[2] https://www.tme.eu/Document/0b7aec6d26675b47f9e54d893cd4521b/PGM5506.pdf
...........................................................................
Murray Altheim <murray18 at altheim dot com>                       = =  ===
http://www.altheim.com/murray/                                     ===  ===
                                                                    = =  ===
     In the evening
     The rice leaves in the garden
     Rustle in the autumn wind
     That blows through my reed hut.
            -- Minamoto no Tsunenobu



More information about the DPRGlist mailing list