Auto Off LED Night Lamp Using NPN Transistor

Let us build a simple auto off LED lamp circuit using just a few passive components and an NPN transistor.You can use this circuit as a night lamp when going to sleep! When you touch the positive terminal of the 9V battery to the positive pole of the capacitor in the circuit, the LED lights up. It remains on for sometime and then fades away. The time taken for the LED to turn-off is determined by the value of this capacitor.

This circuit demonstrates key properties of two major electronic components, the current amplification property of a transistor and the charge storing property of a capacitor.

Auto Off LED Night Lamp Circuit Diagram

Auto Off LED Night Lamp Using NPN Transistor

Here is the same circuit configured on a Breadboard,

Auto Off LED Night Lamp Using NPN Transistor

How Auto Off LED Night Lamp Circuit Works?

When you touch the positive terminal to the positive pole of the capacitor, it is immediately charged to 9V. The charge stored in the capacitor slowly discharges through the 120K resistor, the base of the capacitor and the emitter of the transistor. This current is approximately 9v/120k = 0.1mA. This triggers a much higher current from collector to emitter determined by the gain of the transistor. For BC547, it is between 100 and 800. Hence the max current that can flow from collector to emitter is around 80mA. However we have limited this current using a 1K resistor to protect the LED from over current, but allowing enough current to light up the LED. The 1K limits the max current less than 10mA.

Auto Off LED Night Lamp Using NPN TransistorWhen capacitor discharges, it gradually loses its charge and hence the voltage across it reduces. This reduces the current in the circuit. This equation on the right shows the current in the circuit at time t where Io is the initial current. The initial current is 0.1mA. We can see that the current reduction is exponential. From this equation, we can see that the current drops to less than 1% of the initial current when time(t) is 5 times the value of R1 multiplied by C1. In this circuit with 120K and 100uF, this duration is around 60 seconds. Hence for 100uF, we get bright light for around 1 minute and then it fades away. To get the LED on for more than 5 minutes, use a 470uF capacitor.

Auto Off LED Night Lamp: Components List

  • 100uF capacitor
  • 120K resistor
  • 1K resistor
  • 5mm LED
  • Breadboard
  • 9V battery with battery connector
  • BC547 NPN transistor
  • Breadboard connectors

How to Build Auto Off LED Night Lamp Circuit: Video

Additional Notes

You can change the capacitor for a different lighting duration. If you use a 1000uF capacitor, you will get the light on for up to 10 minutes. You can use 100K or 150K resistor for the 120K resistor in the circuit. The BC547 transistor can be replaced with any other NPN transistor offering a gain of 100 or more. For example, you can use BC548, BC337, 2N3904 or 2N2222 instead of BC547.

Leave a Reply

Your email address will not be published. Required fields are marked *