Photocells, transistors, capacitors, and IC regulators

I have some questions regarding transistors and capacitors.

First off, photocells/transistors. Transistors basically amplify an electronic signal, cool. But can someone explain what's going on between the photocell, transistor, and resistors in this instructable? https://www.instructables.com/id/ECEKKC1KLOEP2872KE/
Apparently the PC is high resistance when dark. So is most of the current dissipated in the 100K Ohm resistor in the dark, but a good amount still goes through the 470 Ohm resistor, letting the LED light work? If someone could do the math for I and V across the resistors and PC when light/dark and explain how the transistor comes into play that would be awesome and greatly appreciated.

As for capacitors/IC regulators. I know capacitors basically store charge. How does the capacitor work with the regulator in this instructable https://www.instructables.com/id/S4IX41WFAQDX2ZH/ ?
Does the regulator basically feed the capacitor a certain steady voltage, and the LEDs just draw different voltages as they flash or something like that? Why is a capacitor needed, and could a resistor or something be used instead?

Thanks so much for any help :D

sort by: active | newest | oldest
How do you get 15mA in the LED ? The Hfe of the transistor is only 80, and there is only 100uA of base current in the on case. Steve
Assumed 7V across the 470 resistor. The 8.9V is an error though. And I mis read the 100K as something else by deleting the label.
You do it eh?

OK. Here is my version. You can't assume that there is 7V across the 470 - because the transistor, as shown, is not turning on properly. Using a 10K resistor instead of the 100K will increase the current in the transistor to 80mA, in other words then the transistor will be saturated from the point of view of calculating the series resistor. If we assume that Vce will be around 0.4 volts, and the diode forward voltage drop is 3.4 V @25mA then the series resistor should be (9-0.4-3.4)/0.025 or 200 Ohms-ish. If we back calculate, then using an off the shelf 220 Ohms, LED current will be (9-0.4-3.4)/220 or 24mA -nicely driving the LED. So, here is my modded circuit, at the expense of a slightly higher quiescent current in day light !
meissler (author)  steveastrouk7 years ago
Thanks so much both of you
Ah super, it was too early in the morning and then too busy at work for me. L
Phew. You've picked a couple of fairly poor circuits to try ! In the first circuit, the transistor should have been designed to act as essentially used as a switch, but its really only working as a poor amplifier. A Photo cell is NOT used BTW, the circuit uses a light dependent resistor or LDR Just as a matter of definition, Current is not "dissipated" in the 100K resistor - the same current flowing in one end, flows out of the other - but a voltage is developed across it. The higher the resistance, the more voltage are developed across it. If the LDR is dark, its resistance is very high- probably a million Ohms (megaohm), so the the voltage on the junction with the 100K is relatively "high" - close to 9V, it is high enough that a current of about 9/100K or about 0.1mA flows into the base. You can consider the 100K resistor and the photoresistor as separate from the 470 and the diode. For reasons I won't bore you with, in this case, the current flowing into the base of the transistor is amplified by roughly 80 times to drive the LED, so 8mA will flow in the diode - the 470 is not needed, if you use the circuit shown. In the second circuit, the capacitor is IMHO a bit superfluous. It would do more on the other side of the regulator, smoothing the input to the regulator from a cheap wallwart. Its not a good circuit. It would be better to arrange a different regulator to feed a fixed current, not a fixed voltage to the LEDs
meissler (author)  steveastrouk7 years ago
Ah right I did mean voltage, not current. Still a bit confused about it all though. In either case, V across the 100K and 470 resistor is 9V because they're in parallel, right? When the light is off, V across those 2 resistors is till 9V, and V across LDR is 9V too, right? Doesn't some current (9V - LED V)/470 go into the Collector at all times too? Your answer as well as the guy's below me helped me understand it on a basic level, but maybe some math showing what happens across the 100K, 470, and LDR in light/dark would really clarify it. Thanks so much.
Use a water analogy - it does break down, but CURRENT is a flow of electricity, and like a current of water in pipe (resistance) teh resistance makes a pressure drop (voltage) appear. No, the 100K and the 470 are NOT in parallel - the transistor is isolating the two parts. Forget any interaction, the two are effectively separate, for the purposes of unxderstanding, since the transistor is connecting both bits near to the ground rail. Lemonie' explanation shows a bit more - though his "100mA" is a typo - it should be "100K", only approximately 0.1mA will flow in the 100K resistor and LDR
lemonie7 years ago
Blue Bawls: The left-hand feed switches the transistor on/off. When the resistance of the PC is high the potential at the transistor base is high and it switches on. When the resistance is low the potential at the transistor base is low and it is switched off. (Forget about the 470 Ohm resistor, it's distracting you) LED Candles: I don't think a 100uF capacitor is doing much at all here, but see the author's comment Jul 2, 2009 for what they say about it. L
meissler (author)  lemonie7 years ago
Thanks for the reply. I responded to the guy above me and it's addressed to you too :D