Basic Stamp help CDS
Seven71ne
Posts: 4
Hey everybody, well in my electronics class were working on the Basic Stamp (2)
ive been playing around with it lately, and i have messed around with bargraph LED's and the (9?) segment display.
what i want to do now is use a CDS cell with a led. Now i tried it using output 15, it lit up and worked, but its extremely dim, what do you guys think i should do? (running on 5vdd) i also have ULN2803's
thanks for the help guys!
ive been playing around with it lately, and i have messed around with bargraph LED's and the (9?) segment display.
what i want to do now is use a CDS cell with a led. Now i tried it using output 15, it lit up and worked, but its extremely dim, what do you guys think i should do? (running on 5vdd) i also have ULN2803's
thanks for the help guys!
Comments
{BS2 blabla} 'indecating that its a bs2
OUTPUT 15 'output
topp:
out15 = 1
goto topp
but i dont know. any help would be great!
if you can find a project with a photocell bs2 and a LED thatd be perfect!
····· But before you go with your code you should make sure that any of your PINS do not send or receive more than safe amperage...
····· About 20 mA...
····· Go back to formula E = I * R
·
····· call it a photocell...or thermistor or icecream...
····· that's a resistor...
····· go read about resistors...
Usually when you use a CDS photo resistor you use a capacitor and the RCTIME command to measure the resistance
of the CDS cell.
Do you have it wired with a capacitor? Or do you have it like this:
Stamp pin 15 -> CDS -> LED -> VSS/Ground
If you have it like the above, then the CDS cell is acting like a current limiting resistor which means, the light level in the
room will affect how bright the LED is. A bright room will make the LED glow brightly, a dark room will make it go dark.
This is usually not the result you want so you have to either use something called a Voltage divider (kinda complex and
requires a lot of math to get exact results) or you have to use RCTIME like I said above.
If you've got it wired right using a capacitor, then you simply need to write the correct code.
NOTE: If you have it wired incorrectly like I've described, and hold it up to an EXTREMELY bright light, you may burn out
both the LED and the stamp pin due to too much current flow. This is another reason why this configuration isn't desired.
If you need help wiring it up with a capacitor then let us know [noparse]:)[/noparse]