Calculating Resistors for a Photocell Dark Switch Circuit

2 replies · 3K views · last reply
Jaron Wiley
Messages
4
Reaction score
0
Hi I am trying to make an LED 3.5V 0.02A run in a circuit that will turn it off when visible light comes on. I have a cadmium sulfide photocell I took out of a night light. The power input is 12V 250mA. I understand I need to use a transistor as a switch for the LED and I know how to calculate the resistor for the LED. I am having trouble figuring how to calculate and place resistors for the photocell parallel so that the current turns on the transistor to the LED. Any tips on where to start or formulas? I am getting about 4V on after the photocell when lights are on if that helps. Thank you!
 
The photocell's resistance changes an awful lot depending on the incoming light. You light find some clues in its datasheet, but it's better to experiment in the real situation. Ah, and don't hope two photocells to be identical.

Once you've measured the resistance at the desired light threshold, compute how much current flows through it from 12V, check it exceeds what the transistor's base needs (take a Darlington if needed, like BC517, or a MOS like BSS170), add a resistor between base and emitter that gives 0.65V at this curernt.