How to Make LDR Darkness Sensor Circuit Simple DIY




About: Electrical engineer by profession

Hello Friends

In this post we will see how to use LDR to make a Darkness sensor circuit.

Basically a darkness sensor circuit turn on a light in darkness and turn off light in brightness.

Step 1: VIDEO

Watch the video to know full procedure

Step 2: Component Required

1) LDR—–1No.



4) BC547 TRANSISTOR———1No.

5) 9V BATTERY———1No.

Step 3: Circuit Diagram

Step 4: What Is LDR ?

LDR is a photoresistor is a light-controlled variable resistor.

The resistance of a photoresistor decreases with increasing incident light intensity,

in other words, it exhibits photoconductivity.

A photoresistor can be applied in light-sensitive detector circuits, and light- and dark-activated switching circuits.

Step 5:

A photoresistor is made of a high resistance semiconductor.

In the dark, a photoresistor can have a resistance as high as several megohms (MΩ),

while in the light, a photoresistor can have a resistance as low as a few hundred ohms.

Step 6: BC547 Transistor

BC547 is an NPN bi-polar junction transistor. A transistor, stands for transfer of resistance, is commonly used to amplify current. A small current at its base controls a larger current at collector & emitter terminals.

BC547 is mainly used for amplification and switching purposes. It has a maximum current gain of 800. Its equivalent transistors are BC548 and BC549. data sheet

Step 7: Procedure

Follow the step as shown in the Video

50K ohm resistor one end is connected with Positive (9V) of battery and other end is connected in series with LDR and LDR another point is connected with negative of battery

here in video I have used 2 100Kohm resistor in parallel because i dont have 50K one.

1K OHM resistor one end is connected with Positive (9V) of battery and other end is connected with anode (positive) of LED

Cathode (negative) of LED is Connected with C (collectr) of BC 547 Transistor

Emitter (E) of transistor is connected with the negative of battery

Base (B) is connected Junction point of the 50K resistor & LDR

it is a simple and powerful concept , which uses transistor ( BC 547 NPN) as a switch to switch ON and OFF the LED LIGHT automatically .
It automatically switches ON lights when the light goes below the visible region of our eyes. ( e.g in evening after Sunset ). it automatically switches OFF lights when light fall on it ( e.g in morning ) , by using a sensor called LDR (Light Dependent Resistor) which senses the light just like our eyes.



  • 1 Hour Challenge

    1 Hour Challenge
  • Colors of the Rainbow Contest

    Colors of the Rainbow Contest
  • Pets Challenge

    Pets Challenge

20 Discussions


Answer 10 days ago

The circuit as drawn is a darkness sensor. Swap the position of the 50kohm resistor and LDR and it should light the led when it detects light.


Question 7 months ago

I want to connect a buzzer to the circuit such that when the LED glows the buzzer makes a sound.Where should I connect the buzzer in this circuit?

2 answers

Answer 3 months ago

Listen , led as well as buzzer has both positive and negative pins , so in order to make them turn on at the same time just connect positive leg of the buzzer to where the positive leg of led is connected and do same with the negative leg also. You will get it working .


6 months ago

can i have the block diagram


7 months ago

In the components required please mention LED,Breadboard and connecting wires so that people can use it as a list while buying the components.


Question 1 year ago on Step 4

Photoresistor's resistance get lowered when light of adequate freguency strikes on it.But in this circuit photoresistor is in reverse function.Why and how?

1 answer

Question 10 months ago on Step 7

What is that white one used in which the wires and the resistances are fixed???

1 answer

Answer 8 months ago

its called the bread board


9 months ago on Step 7

Hi. I need to connect this circuit without the breadboard and it is not working. What do you mean by the junction of resistor and ldr joined to transistor? How would I do this without the board?

2 replies

Reply 9 months ago

Not sure what you mean by won't work. You can build this circuit without breadboard by soldering components to each others legs. One leg of the 50k resistor, one leg of the ldr and the B or base terminal of transistor all connect together as one solder joint. Other leg of ldr, E or emitter leg of transistor and the negative lead from battery get soldered together as one solder joint. Than positive lead from battery get soldered to one leg of 1k resistor. Other leg of 1k gets soldered to positive side of LED. Negative leg on LED (LED has flat spot on it indicating negative side) gets soldered to C or collector leg on transistor. Hope this helps. Reply if it doesn't and I will build this circuit the way I explained and upload a picture.


Reply 8 months ago

Thank you very much all sorted.


Tip 9 months ago

This circuit works on the principal that electricity follows the path of lest resistance. When light is hitting the photoresistor its resistance is lower than that of the base of the transistor, therefore the "electricity" will bypass the transistor and flow through the photoresistor, following the least resistance to ground. When no light hits the photoresistor its resistance is higher than that of the transistors base and the electricity will flow into the base of the transistor activating it to turn on the LED.


Question 1 year ago on Step 7

How do transistor and ldr works in this circuit?