Figure 1. CEMF detector.
While we’re on the topic of op-amps, here is another
question that can be answered with the judicious use of
Q. I was wondering if you could help me with your vast knowledge. I envision a circuit that responds to the amount of light available and
then drives a servo accordingly. I made a set of eyes with
eyelids for my bot. I want a circuit that will adjust the
eyelids depending on the lighting. So, say if I shine a
flashlight at the eyes (hit the sensor), they should squint.
Figure 2. Light level sensor.
14 SERVO 09.2009
Anything you know of or conjure up would be sweet.
Domo arigato, Mr. Roboto.
— Dr. Bosanko
A. Of course! I would use a small micro to handle the details because a program is far easier to tweak than hardware soldered to a board. First, I would create
a circuit to reliably give a reading based upon the light
seen. Figure 2 shows a circuit that uses a photoresistor;
in this case, a PDV-P9200 from Digi-Key. This photoresistor
will go from at least 5M ohm in the dark down to between
10K ohm and 50K ohm in full light. The circuit that I
show is basically using an op-amp as a voltage follower,
which means it does not amplify, it simply buffers the
resistor divider. A2D converters as a rule do not like what
they are measuring to have an impedance of greater
than 10K. Clearly, this resistor divider has much greater
impedance than that. However, op-amps have very low
output impedances, which the A2D converter will be very
To use this circuit, simply connect the reading output to
your A2D input on a small microcontroller. I recommend
the PIC12F675 which is an inexpensive eight-pin part that
has A2D converters in it. To get the best range from this
circuit, I recommend that you use an ohmmeter to see
how low the photoresistor will go in value with the full
light that you’re going to be shining on it. Then, size
resistor R2 to be 10X that value. So, if you can actually get
the photoresistor to drop to 10K ohms, then use a 100K
resistor for R2. When the device is in full dark, your output