Electrical – Use of transistor for switching the led

ldrtransistors

I have been trying a lot to get my circuit work. I want the led to light up when the LDR receives no light and vice versa. I have found that the LDR offers the resistance of approximately 6k ohms when light is exposed on it and 66k ohms when light is not exposed to it. So I have used the resistors with those value. But I am not being able to achieve it enter image description herein the simulator. Also there is glowing of the led in which lesser current is flowing but there is no glowing when more current is flowing. Please point out my mistakes and suggest me to get my circuit work.
I want the current to flow through the transistor "only" when there is light exposed to the LDR (possibly by keeping the low resistance for this path compared to the closed path of the LED). And when there is darkness, the current should not flow through the transistor leaving only a single path for the current to pass i.e. through the LED. Thanks for the help.

edit: The source in the collector circuit needs a ground return. Why is it so?

Best Answer

You should not disconnect your powersupply's ground connection with the transistor. The way you draw it the LED is connected to a closed loop that is not really affected by the state of the transistor. So schematic wise you're probably looking for something like this.

Component values give roughly 15 mA LED current.

Idrive ~= (V2 - Vbe_Q1)/R1 ~= (1.5-0.6)/1000 = 0.9 mA.
I_LED ~= (V1 - V_D1)/R1 = (9-3)/390 = 15 mA.
Use lower value of R1 for more current.

schematic