Automatic lighting control is not only convenient but also energy-efficient. A dark sensor allows you to automatically turn on the light when it gets dark and turn it off when there is sufficient illumination. In this article how to assemble a simple dark sensor on a breadboard using minimal components. This is an ideal project for those who want to dive into the world of electronics and create something useful with their own hands.
Required components for making LDR darkness sensor circuit:
Before you start assembling the dark snsor, make sure you have all the necessary components:
- Transistor BC547 — 1 pc.
- General-purpose NPN transistor.
- Resistor 100 kΩ — 1 pc.
- Used to form a voltage divider with the photoresistor.
- Resistor 300 Ω — 1 pc.
- Limits the current through the LED.
- Photoresistor (LDR) — 1 pc.
- Changes resistance based on light levels.
- LED — 1 pc.
- Turns on in the absence of light.
- Breadboard — 1 pc.
- Allows you to connect components without soldering.
- Jumper Wires — several pieces.
- For connecting components on the breadboard.
- Power Supply 5V or 9V — 1 pc.
- Battery or power adapter.
Circuit Description:
- Photoresistor (LDR) and resistor 100 kΩ form a voltage divider.
- Base of the BC547 transistor is connected to the point between the photoresistor and the 100 kΩ resistor.
- Emitter of the transistor is connected to the ground (GND).
- Collector of the transistor is connected through the 300 Ω resistor to the anode of the LED.
Dark sensor - Circuit Diagram:

How the dark censor circuit works
High Illumination:
- The photoresistor's resistance is low.
- The voltage at the transistor's base is low.
- The transistor is off; the LED is off.
Low Illumination:
- The photoresistor's resistance is high.
- The voltage at the transistor's base increases.
- The transistor turns on; current flows through the LED, and it lights up.
After assembly, the circuit of the darkness sensor should look like this:

Testing and Troubleshooting the Dark Sensor circuit
Check Connections:
- Ensure all components are correctly connected according to the circuit diagram.
Test Operation:
- Turn on the power supply.
- When the photoresistor is illuminated, the LED should be off.
- When you cover the photoresistor (e.g., with your hand), the LED should light up.
Step-by-step video of assembling and testing the darkness sensor circuit on a breadboard:
Adjust Sensitivity:
- If necessary, replace the 100 kΩ resistor with a different value or use a potentiometer to adjust sensitivity.
Enhancements:
- Instead of an LED, a relay can be added to control more powerful lighting.