Introduction: Dark Sensor With LDR, Transistor and a LED

Picture of Dark Sensor With LDR, Transistor and a LED

You wan't do a dark sensor with a LDR, one transistor and one LED and you don't know how to do it? In this small tutorial I will explain to you how you can do that even if you know only the basics of electronic.

Parts you need:

1 Breadboard;
1 Power source of 12v;
1 Transistor (in this case we use the BC547);
1 Resistor of 1KOhm;
1 Resistor of 680KOhm;
1 LED (in this case blue);
1 LDR:
Some condutor cables to connect the parts.

Step 1: Connecting Parts in the Breadboard

Picture of Connecting Parts in the Breadboard

In the above image we can see the circuit we will construct. It's a simple electronic circuit and if you know how to do something on a breadboard, you should be able to do that dark sensor.

Step 2: Connect Everything

Picture of Connect Everything

Just do the circuit like this and all should be working fine.

Remember, the LDR resistance depends on the light you have on the room or where you are constructing that. If you have light, the LDR resistance is low so, the LED should be turned off. When you obstruct the light that focus on the LDR, the LED should light up. 

If for any reason your LED is always lighted up, try to chance the transistor. Switch the Emissor and the Collector. If the problem persist, increase the resistor you have in the base.

Step 3: All Should Be Working

Picture of All Should Be Working
Connect the power source you have to the breadboard. The positive pole in the red line and the negative in the blue line. 

Try your circuit and see what happens.

Here's the video of my circuit working:

If you have any questions feel free to ask in the coments. If you think I should improve something, let me know. It's my first guide so it's normal I made some mistakes.

Kind regards,
Ricardo Silva


LeeD40 (author)2016-04-21

Hi, How can I use a power supply of only 5v?

Alex Kabz (author)LeeD402017-03-17

you can use ordinary batteries

AvinashC15 (author)2016-07-21

why only bc547 type of transistor is used why cant we try with anyother one?

WoldieK (author)2016-04-28

use npn transister what you want it makes you job ,like 2n23904,2n2222,bc547,bc548,bc550,mbs8090,2n2369 ,etc

to check use protuse software

WoldieK (author)2016-04-28

no more 680k is used use only 680k===10-50k;1k,or less than that

skumar231 (author)2016-04-19

arduino with ldr

WyrdPrincess (author)2016-04-03

Hello. I just wanna ask, what are the use of every component in this circuit. Like why it has to be a 1k and 680k resistor? I need this for my finals. Thank you.

mariateresa.fumia (author)2015-04-10

i made a very very basic circuit with just a led, a battery and e ldr but the leds turns on when ther's light and turns off in the dark? what could i possibly done wrong?

interchange the LDR and resistor

peoplespk (author)2015-12-03

Is this can be used as study lamp or light house with some modification , basically I want to know how it can be modified for some other purpose, can you suggest some ? I do not have a good idea of all these things, just want learn and play, I am not from a electrical background .

EdwinS27 (author)peoplespk2016-03-25

use a relay

trinitty (author)2016-03-04

It works very nice. Though I'd like to know if there is any way to switch the LED on and off suddenly and not just gradually, depending the amount of light. Hope it makes sense.


SOHAM96 (author)2016-02-16

what's the use of transistor in this actually???

Manoj SuryaK (author)SOHAM962016-02-29

it acts like a switch (as in like a mechanical switch).

SuchibrataM (author)2015-07-25

can we use laser light instead of normal light

JibinL (author)SuchibrataM2016-02-08


AngeloA17 (author)2016-02-05

Uhgh. Can someone help me? Instead of LED, i want to use a motor(that dynamo thing.) Is it possible? Can u show me how?

PragatiK (author)2016-01-28

how can i make this circuit more sensitive? please reply fast as much as u can becoz i have to give my model on 30 jan

DanishA6 (author)2016-01-12

The circuit works but the led is extremely dim.

M AliN (author)2016-01-02

I have made my project but the thing i wanna add is i want to switch my leds upon the intensity of light

i.e if there is low light two leds would on or if there is high then 4

how it is possible ?

rshacker86 (author)2015-10-20

Good work... can you please give its working...means how it works

chihiro_tange (author)rshacker862015-12-19

The transistor is like a switch here. When it's dark, the LDR will have a very high resistance, so current will flow through R2, through the base and emitter of the transistor, thus "turning on" the transistor. Because of that current can flow through R1, the LED, the transistor and in to its collector and out through the emitter. That's why the LED will light.

When it's light, the LDR's resistance drops (that's how it works). The current destined for the base of the transistor will be diverted throught the LDR, preventing the transistor from turning on thus the LED will not light.

I hope that's not too difficult to understand :).

WalidM (author)2015-03-30

I wnt to use dc motor instead of led . wht hv I need to do ?

RohanT4 (author)WalidM2015-11-30

You'll need to connect the Collector of the Transistor to a of motor driver circuit. That has an independent power supply.

tao6258 (author)WalidM2015-11-22

My motor is YAMAHA not a SUZUKI

NanasoS (author)2015-03-13

In case of Breadboard we used General purpose board.

What is difference between

1 Resistor of 1KOhm;
1 Resistor of 680KOhm;

GabrielK5 (author)NanasoS2015-06-09

680 ohm is less than 1k ohm. R2 with ldr are in series so they gather and form total rezistanc eof roughly 680 ohm. The thing is that the less the rezistance the more current will flow. So when light is up on ldr its rezistance is low so R2 + R of Ldr will be 680 ohm , less than 1 k phm which means that current will flow to R2 and not R1

Electrify (author)GabrielK52015-09-05

hey that's not 680, its 680k

lilypadhoper (author)2013-09-26

I have a solar powered waterfall pump that I want to shut off when no power is coming from the solar panel. How could I hook this up to make that work?

IshanFdo1 (author)lilypadhoper2015-09-02

But it will automatically turn off if there is no current from solar panel right ?

ShubhamP11 (author)2015-07-27

What are the applications of this device ?

Please answer my question , I am making this for my project so I want the applications.

nandu.subash.3 (author)2015-02-05

Can i use BC 548 instead of BC 547

WalidM (author)nandu.subash.32015-05-13

Bc 548 and BC547 are almost same

DexterE1 (author)2015-05-08

SiddharthK (author)2015-04-17

Can we use 2 resistors of resistance 1 Kilo ohms ???

NanasoS (author)2015-03-13

In case of Breadboard we used General purpose board.

What is difference between

1 Resistor of 1KOhm;
1 Resistor of 680KOhm;

Imetomi (author)NanasoS2015-03-29

1st resistor is 1 ohm and 1k resistor is 1000 ohm. k means kilo, (1000)

theallanmachakanja1 (author)2015-02-17

What's the purpose of the transistor on the circuit and how does it function

pirah.sikandar.7 (author)2015-01-30

LED blow in dark and light both'....please help me out

pirah.sikandar.7 (author)2015-01-30

LED blow in dark and light both'....please help me out

RiyaJ (author)2015-01-22

can you give an explanation for this as i need to present this in my project

thank you

mthesmokemachine (author)2015-01-16

Hi, how can I make a relay with the above circuit which can power a LED strip of 12v and 1A ? Please let me know if its possible. Thank you.

pirah.sikandar.7 (author)2015-01-08

is it working on transducer principle? m confused.. plz help as soon as possible

bjoshi3 made it! (author)2014-12-19

ricardo silva u r a great and truth man , i am Bj from India , i was searching for this projects from a month and didn't got the perfect results and i lost hope that how will i pass in my school exams without the project . i was in depression i left the project thinking that i can't do this , my teachers refused to help me ......... but today just before a day of examinations i tried with Instructables and got success ............. thank ya man ......... obliged really .......... i did this with a 224ohm resistor with a 9v power supply

normelb (author)2014-12-10

if i use 12v led or relay what resistor value i need to use??? Thanks in advance

harisankar12111999 (author)2014-11-29

itz a nice project

Rohan_Xperiment made it! (author)2014-11-28

Thanx...its working great. made a security project with ur system :D :)

nitishdash2010 (author)2014-11-01

Guys, I only have a 3.7v battery. what are the resistor values that i need to change with??

HariniS (author)2014-09-29

how does this circuit work? can u explain pls?

also can i use this for my cbse project?

davkjw (author)2014-09-23

Working absolutely fine. Thank you! :)

About This Instructable




Bio: 21 years old electronics student who loves all the things about electricity.
More by Ricardo Tech:Dark Sensor with LDR, transistor and a LED
Add instructable to: