Introduction: Light Detector, No Microprocessors, Just Simple Electronics :)

Picture of Light Detector, No Microprocessors, Just Simple Electronics :)

I will show you two circuits, one turns an LED off when theres no light, and the other turns an LED on when theres no light.

for the first one you will need:
-R1(LDR) 10K
-R2 (1.2K) colour code: brown, red, red.
-R3(10 ohms) colour code: brown black black.
-T1 almost any low voltage NPN transistor will do.
-L1 LED i used a red one.
-jump wires
-2 1.5 volt bateries and pack for them

for the second one you will need:
-R1 (LDR) 10K
-R4 (10K) colour code: brown, black, orange.
-R3(100 0hms) colour code: brown, black, black.
-T1 any low voltage NPN transistor
-L1 LED i used a red one.
-jump wires
-2 1.5 volt bateries and pack for them

it cost me under 1€ to make this, everything was salvadged from old radios, etc...
exept the LDR, but you can easiy get one from those light switch thingies at the dollar shop, or from the internet very cheap... add some more stuff if you get it from the net though... you dont wanna pay 10 cents for the part and 8 dollars for shipping =|

Step 1: Turn LED Off When Theres No Light

Picture of Turn LED Off When Theres No Light

the 1.2 K resistor goes in the middle pin of the transistor and to - on battery
dont forget the round part of the transistor is facing you!


Step 2: Turn LED on Whe Theres No Light

Picture of Turn LED on Whe Theres No Light

it's basically the same circuit but the LDR now goes to - and the R4(10K resistor) goes to plus.
all you have to do is this small change and the whole purpose of the circuit changes!

dont forget the round part of the transistor is facing you!


if you have any doubts/problems plz tell me.

Step 3: Apendix

Now i'm going to try to explain what some parts do.
on the first circuit the 1.2K resistor controls the sensitivity, go ahead change it! if it's 10K you will need total darkness to turn the LED off, so change it betwen 1K and 10K less than 1K will be way sensitive and wont work, and over 10K you will need something darker than total darkness, wich i dont think exists, maybe outer space :P

the second circuit the 10K resistor also controls the sensitivity, if you put 150K you will need total darkness to turn the LED on, so go ahed change it aswell! but only betwen 1K and 150K.

If it doesnt work:
check the polarities of the LED, and see if the transistor is the right way in, if the LED doesnt go on, on the first circuit, dont be sad, that circuit is tuned so it works in my room, just grab a potenciometer and tune it the way you want to, then with a multimeter read the resistance of the pot, and put the closest resistor you can find to that resuslt, thats how i got 1.2K and 10K

best of luck!

Now a video of what you should expect:


Sports_Nut_ (author)2015-04-25

awesomevicky (author)2015-02-04

Please tell me.can i make a touch sensor circuit without using any microprocessor ?if yes how?

jamesricedesign (author)2013-02-12

Thank you for this, sometimes you just need your mind jogged.

rohanbansal (author)2012-12-31

it works very nice.good images and explanations.thanks!!!

McBlaise (author)2009-04-28

could I connect a motor on that two wires on the right? please answer...........

amando96 (author)McBlaise2009-04-30

yes you could, although it has to be a small motor, very small, like a pager motor, i actually did that lol heres a pic of the bot:

i only have one motor yet though xD

but yea if its a small motor, its fine, if you want to use bigger rmotor, you'll have to put another transistor

wooohhhoooo9 (author)amando962012-05-04

yeah it worked. i add a BC547 NPN and it worked using a regular motor!!

jules15 (author)amando962009-11-01

or you could use a smal 5volt reed relay to power a bigger(like over 5 volt) motor

robot1398 (author)2011-02-20

i used a 2n2222 transistor and it works great.

cool project

imakethings (author)2010-10-10

i used a 2n 2904 transistor.. in this case the first circuit works for the purpose of second and vice a versa why so??

imakethings (author)2010-10-10

hey thank you very much you have helped me a lot...!!

ARJOON (author)2010-10-08

for the transistor i used a 2n2222. works great

souichi (author)2010-09-29

i did exactly the same thing but it doesn't work

akhile1996 (author)2010-01-25

 where's the LDR

akhile1996 (author)2010-01-25

can i add a 3 volt buzzer

cybertron (author)2009-10-29

In the first circuit...
 Turn LED off when there's no light!

 If i use 5VDC for the power supply do i need to change the resistor on the base of the transistor if so, at what value. Also the led resistor needs to change to compensate for the leds current. BUT i have that covered.

Does any other components need to change at 5VDC. This will be tested in a circuit to detect, very bright light.

Reply would be appreciated. 

amando96 (author)cybertron2009-10-30

if you wanna detect very bright light, then i think you have to get a smaller value resistor at the base of the transistor, also you need a 220 ohm resistor to not burn the led, instead of the 10 ohm, i have there.

try using a potenciometer, to find the resistance you need for the light you want to detect.

cybertron (author)amando962009-10-30

OK. BUT. I  Already changed the LED resistor for the led at 5v.
 as stated, Got this covered..  Thanks for pointing that out.

So you're saying to use a potentiometer at the base of the transistor for base current to find the resistance i need for the light i need to detect.

How will that deterrmine the resistance of the light I'm detecting.

And what vulue would the pot need to be 1k, 5k. 20k. or Higher.

So the LDR dose not need to be replaced. i just need too lower the base current.
Reply Thanks.


DRM_MX (author)2009-09-29

Hello Armando96: I'm new in electronic. I follow your instructions but led always is turn on. Can you please tell me what is exactly values that you uses with transitor. You mention that uses any NPN transistor but led allways is turn on. Please let me know. Thank you.

amando96 (author)DRM_MX2009-10-30

ok, i know for sure that a BC546 works, try using this one, if it still doesnt work, try changing the light drastically, say from a dark room, to puting lamp very close to the ldr.

sharlston (author)2009-07-30

i thought at first it sayed a lie dtector

mhkabir (author)sharlston2009-09-04

It did'nt

sharlston (author)mhkabir2009-09-05

yes i know but i mistaked it for "lie detector" not "light detector"

mhkabir (author)sharlston2009-09-05


mhkabir (author)2009-08-24

could the circuit run on 12v and light 30 - 40 LEDs in paralell???????

amando96 (author)mhkabir2009-08-24

umm i thinkt he transistor would burn, i'm not used to working on higher voltages just the regulated 5v for most IC's... i think you can try, but i'm pretty sure the transistor would burn, maybe a MOSFET?

mhkabir (author)amando962009-08-25

Which MOSFET??Any ideas?

amando96 (author)mhkabir2009-09-03

any that can withstand 12v i guess, IRF520?

mhkabir (author)amando962009-09-04

Thanks. I'll try.

amando96 (author)amando962009-09-03

i know how you could do that, you'll need two power sources though, the 3v for this to work, and then the 12 volts, the plus connected to source on the mosftet, the leds connected to drain, and gate connected to where the LED is. has to work. i did the same but with a NE555 for a speed controller

joasan18 (author)2009-09-02

hey bro i did it but it did not work can you put pics for step by step like you did in the other one? please thank you god bless u

amando96 (author)joasan182009-09-03

all you have to do is: the resistor and the ldr are connected to the middle pin of the transistor right? the LDR goes to +3v(positive) and the resistor goes to 0v(negative), just switch order, so the LDR goes to 0v(negative) and the ressitor goes to +3v(positive) should work if the rest is right

joasan18 (author)amando962009-09-03

i got it solve. thank you for your help all i did was i changed the rsistence of resistor that goes in the middle pin. thank you

comodore (author)2009-07-02

Nice Project! I really like it! I have 2 question! 1. Can you give me some examples of Low Voltage Transistors...a couple so I know witch one to buy... 2. Where does the potenciometer, variable resistor located? Where should I connect it? Thank you!

amando96 (author)comodore2009-09-03

about the transistors, i am not sure wich i used here, it had the letters erased, i know a C945 will work, coz i have a few The pot goes from the base of the transistor to either positive, or negative, depending on the curcuit. if the LDR is on positive, the pot will be on the negative, and vice versa. just use the middle pin of the pot, and one of the side pins. the pot will control when the led will go on/off, you can also try diferent resistors. sorry for the late reply, i didnt get an email for this reply :-s

imakethings (author)2009-06-19

very good project for beginners

imakethings (author)2009-06-19

recreate this wont work with the second type of circuit

ReCreate (author)2009-05-22

This Could Be made Much Simpler,The Photo Transistor In series to the Led and Resistor,Done. Though This Is Documented Well and All.

batista0 (author)2009-05-10

nice Instructable... I want to adapt it to another project, it works with different voltages or i have to change resistances?? please answer

amando96 (author)batista02009-05-10

you'll have to change the LED resistor, or it will burn... as for the other resistors, tiz fine... but what voltage? coz i think you'll have to do something with the transistor...

batista0 (author)amando962009-05-16

I have two 9v batteries, so 18v...

amando96 (author)batista02009-05-17

umm that'll burn the transistor me thinks :S i dont know how to make it work... i might find out though.

amando96 (author)2009-04-30

wait, the wires on the right? those go to the battery...

AndyGadget (author)2009-03-29

For the sake of anyone trying to build this, I suggest you tidy up the component references a bit. They don't tie up with the circuits at the moment. Also, not all low voltage NPN switching transistors use the same pinouts. Whatever you're using, find the pinouts by googling, for example, "BC109C datasheet".

AndyGadget (author)AndyGadget2009-03-31

Neat little tip: Cut the top off any high-gain metal can transistor and you've got a pretty good photodiode (BC109C is perfect for this).

amando96 (author)AndyGadget2009-03-31

what are those? googled them but nothing related came to the search...

AndyGadget (author)amando962009-03-31

A photodiode is like a light dependent resistor (LDR) only more responsive.
HERE are a couple of simple circuits which are very similar to the one in this Instructable. R1 is an LDR and could be replaced by a photo-diode (collector at the top, emitter at the bottom). In the first circuit, light shining on the LDR drops its resistance and causes a current to flow into the base of the transistor. The base current causes a larger current to flow from the collector to the emitter, through the relay, so the relay is turned on. This is a transistor operating in its simplest switching mode.

HERE is a super-simple description of how a transistor works.

(For the more advanced, these circuits would work OK for large changes in light, but would behave strangely mid-range as the transistor would be in its linear range and behaving as an amplifier.)

amando96 (author)AndyGadget2009-03-31

ohh i meant what a high-gain metal can transistor was xD but those circuits are kinda cool though!

AndyGadget (author)amando962009-03-31

Without getting too technical, a high-gain transistor is one with a gain (amplification) of 250 or more, i.e. a 1mA change in the base current will give you a 250 mA change of collector current. A metal can transistor (TO18 package) looks like THIS. You're right though, they do seem pretty rare nowadays, and everything seems to be plastic encapsulated. When I first started in electronics they were all over the place, and I still have a few in my component box.

amando96 (author)AndyGadget2009-04-01

ohh i have seen some before, but yea... everything is plastic nowadays...
wow $1.87 for one of those :S

so that has a photo diode inside of it? cool lol, i oinly have the IR transistors, like the TV's have, made some proximity detectors with 'em :D

About This Instructable




Bio: I will try my best to provide cheap and easy intructables!
More by amando96:How to make custom and strong tank tracks for very cheap.Using the sparkfun 12 Button keypad, with the arduinoMini drill press for free.
Add instructable to: