Problem with photoresistors
Hello all,
My friend and I decided to advance our BOE-bot, from tactile navigation, to light sensing.
We hooked everything up according to the manual, and then we ran the first program in the chapeter, TestPhotoresisterDividers.bs2. It didn't work!
We had the sensors directly facing a 60W bulb, and they still registered 0, and then suddenly one value would change randomly, (and correctly) then it would all go to 0.
The manual said if there is low lighting, upgrade the resistors from 2k ohm to 4.7k ohm. We did... and still the same erratic behavior.
Any ideas?
Thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Robotics
ro-bot-ics (noun)
the science or technology of robots, their design, manufacture, application, use, etc.
My friend and I decided to advance our BOE-bot, from tactile navigation, to light sensing.
We hooked everything up according to the manual, and then we ran the first program in the chapeter, TestPhotoresisterDividers.bs2. It didn't work!
We had the sensors directly facing a 60W bulb, and they still registered 0, and then suddenly one value would change randomly, (and correctly) then it would all go to 0.
The manual said if there is low lighting, upgrade the resistors from 2k ohm to 4.7k ohm. We did... and still the same erratic behavior.
Any ideas?
Thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Robotics
ro-bot-ics (noun)
the science or technology of robots, their design, manufacture, application, use, etc.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Robotics
ro-bot-ics (noun)
the science or technology of robots, their design, manufacture, application, use, etc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Obviously, a breadboard is only a good temporary solution as a trial.
Sometime the 'trial run' becomes a real chore.
I took my photocells and soldered the whole configuration to a small piece of circuit board. In this way, I have two little modules that not only work correctly, but can be pluged and unpluged. It also has adequate structural support so that the photocell stays pointed in the right direction.
I also came across Jon William's circuit that suggested how to make the photocell's photo adjustible in software. While this does add a bit of software overhead, it opens you to having the software sample and determine useful levels of light. I think it is a Nuts & Volts article.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Robotics
ro-bot-ics (noun)
the science or technology of robots, their design, manufacture, application, use, etc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
It is much safer to calculate a circuit and swap the 2k resistor with another value.
If you are having trouble with the 3 component circuit, you need to start by measuring the Photocell's resistance in your ambient light condition and then figure out if that resistance which 'tops out' or 'bottoms out' the voltage divider. If it 'bottoms out', change the 2k to an appropriate value.
The 220 ohm resistor is to protect the BasicStamp if the photocell goes to Zero resistance. It is there to limit the amount of current. Zero resistance would be your 'tops out' condition. You might try limiting the amount of light by a tube or filter.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)
······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
I took everything out, and re-wired the circuit.... and it worked!
What a great idea, thanks! (I think I'll try this next time a circuit doesn't work )
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Robotics
ro-bot-ics (noun)
the science or technology of robots, their design, manufacture, application, use, etc.