CDS photocell
Archiver
Posts: 46,084
I need to save on input pins. I have a contact button with a 10 k
pullup. Then I parrallel a 10k-100k CDS photocell with the pullup and
add a 10k pot to ground to complete a voltage divider. Then adjust
the pot in low light condition to just below the input pin threshold
voltage. Will this give a low input in the dark or did I miss
something or should I use a comparator and quit trying to lower the
chip count?
Rick
pullup. Then I parrallel a 10k-100k CDS photocell with the pullup and
add a 10k pot to ground to complete a voltage divider. Then adjust
the pot in low light condition to just below the input pin threshold
voltage. Will this give a low input in the dark or did I miss
something or should I use a comparator and quit trying to lower the
chip count?
Rick
Comments
the dark.
You would need to invert the signal to do what you want.
Normally you would use a comparator. The CDS photocells I use are mostly
about 100k in the dark.
So I would run a photocell in series with a 100k resistor to VCC from
ground.
Then I connect one input from the comparator to the point between the
photocell and the resistor.
Next I run a 5k pot (or 10k or 1k or whatever you happen to have actually,
most any pot would work)
to the other input to the comparator. You adjust the pot for your threshold
or sensitivity as tio
when it causes then comparator to switch between a 1 or a 0.
The two comparator inputs are mariked as a + or -, thus you get a inverted
or a non inverting output
by swapping your signals on the inputs.
The output of a LM339 comparator or equivalent are all open collector, so
you need a pullup resistor on the output going to the I/O input pin on the
Stamp. A LM339 is quad comparator and a LM393 is a dual comparator.
Simply put your pushbutton switch there at that point. As you now have a
"OR" gate in the makings there.
Original Message
From: androbot1 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ApWmr0Qqp0LXAP5o7YM8Al17XgVxjISnF4z92uzGTDlvtuaLlPk1epYndYFiOrHc0hNN1NingFV4Zrwv]smallrobot@h...[/url
Sent: Saturday, July 06, 2002 12:46 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] CDS photocell
I need to save on input pins. I have a contact button with a 10 k
pullup. Then I parrallel a 10k-100k CDS photocell with the pullup and
add a 10k pot to ground to complete a voltage divider. Then adjust
the pot in low light condition to just below the input pin threshold
voltage. Will this give a low input in the dark or did I miss
something or should I use a comparator and quit trying to lower the
chip count?
Rick
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/