LDR Circuit Diagram

This LDR circuit diagram shows how you can make a light detector. An LDR or “Light Dependent Resistor” is a resistor where the resistance decreases with the strength of the light.

Here is the schematic for the circuit:


LDR Circuit Diagram

Light Dependent Resistors

Light Dependent Resistors (LDR) are also called photoresistors. They are made of high resistance semiconductor material. When light hits the device, the photons give electrons energy. This makes them jump into the conductive band and thereby conduct electricity.

Check out Wikipedia for the physics stuff ;)

How The LDR Circuit Diagram Works

The LDR circuit diagram works like this:

When it’s dark, the LDR has high resistance. This makes the voltage at the base of the transistor too low to turn the transistor ON.

Therefore, no current will go from the collector to the emitter of the transistor. All the current will instead pass through the LDR and the potentiometer.

Light dependent resistor on a bradboard

When it’s light, the LDR has low resistance. This makes the voltage at the base of the transistor higher. High enough to turn the transistor ON.

Because the transistor is turned on, current flows through the transistor. It flows from the positive battery terminal, through R1, the LED, and the transistor down to the negative battery terminal.

This makes the LED light up.

The Components Used In The Light Detector Circuit

The resistor R1 controls the amount of current going through the LED. It’s simple to calculate. I have written an article on how to calculate the resistor value for an LED.

If you are using an LED with 2V voltage drop, you will have a 7V voltage drop over the resistor when the transistor is ON. By using Ohm’s law we can find the current:

I = \frac{V}{R} = \frac{7V}{390 \Omega} = 18 mA

And 18 mA is usually a good current value for common LEDs.

What if you want to power the circuit with something other than a 9V battery? Then you need to change the resistor value to get the right amount of current flowing through the LED.

The variable resistor R2 is used to change the trigger point for the LED. That is, how much light that is needed for the LED to turn ON and OFF.

You can probably get away with a 10k potentiometer. It depends on the resistance of your LDR. But with a 100k potentiometer you will have room for a wider range of LDR values.

Making The LED Turn ON When it’s Dark

You can also make the LED turn ON when it is dark instead of when it is light. To do this, replace the NPN transistor with a PNP transistor like this:

Build It Yourself

Now it’s time for you to build this circuit. It’s very important to build stuff, not just read about it. So get yourself the components you need and build it!

Get the required components from an online electronics shop.

Post your comments or questions below =)

More Circuits & Projects Tutorials

309 thoughts on “LDR Circuit Diagram”

  1. Hi,
    Really cool, thanks a million.
    I am thinking of making a flashing light for my bike, and maybe this could turn them on automatically, but would have to function in reverse… Any ideas on how to make the led light up when it gets dark!?
    Thanks again Oyvind

    Reply
    • Hey Brian! Thanks for your comment. I added a circuit with the reverse function at the end of the article =)

      Cheers!
      Oyvind

      Reply
  2. Simple, fun and effective way of explaining how stuff works. I think the video, even though its simple, still adds great value to the post as it triggers my maker-soul and crave to build something similar my self after watching it.

    As a side note to improve the posts even further: I think additional value could be added by relating the experiment to something what you actually can use it to? How is this particular function useful in our everyday life? E.g relate it to product that turn on the light in the evening when its getting dark outside (would have you to reverse the design, causing the led to be lit when the the LDR is covered).

    Just my $0.02

    Keep up the good work!

    /Tom

    Reply
    • Thanks for your comment Tom!

      I updated the article with a circuit with the reverse function at the end =)

      Cheers!
      Oyvind

      Reply
          • Well, if you want to use NPN transistor as in the 1st shematics but you want the LED to turn ON when it is dark (as in the 2nd schematics), you could just exchange the LDR and R2. When it is dark, the LDR’s resistance would be large compared to the R2 so the NPN transistor would be ON.

        • Dude! the exact same thing you said about swapping the LDR with R2 would end up turning the led ON in dark; I’ve seen the exact thing in another video and i’ve been confused about it since days, how is it possible? Could you elaborate how more resistance in the ldr would result in increasing the current flow into the transistor? I’d really appreciate your reply :)

          Reply
          • That’s true. The LDR and the potentiometer make up a voltage divider:

            https://www.build-electronic-circuits.com/voltage-divider/

            If the LDR is at the bottom, it means that the higher resistance it gets, the higher will the voltage drop across it be.

            The voltage across the LDR is the same as the voltage from base to emitter of the transistor.

            And the transistor turns on (and lets current flow) when the voltage is around 0.7V.

      • Is there a way to combine both circuits?
        Maybe like that:
        With light > Red led ON – Green led OFF
        Without light> Green led ON – Red led OFF

        Reply
  3. I have 12v led lamp and I’m planning to use 12v adaptor to make dark sensor led lamp. Can you help me find the materials that I need? Also the diagram? Thank you

    Reply
      • dear sir please help me
        I am in big trouble.
        i have to make project for my student. I want get 24V DC from LDR to my PLC. Please sir give me or provideme the circuit diagram to how to get 24V DC to my PLC from LDR
        Please Sir Help me……Please……Please Sir

        Reply
      • i want to know the output waveform.but im getting noise when i use the same circuit as above.distortion are more than the actual output.can you tell me how to overcome this

        Reply
    • Hi, yes it is! If your bulb is 9V and works with around 100mA you can just replace the diode and resistor with the bulb.

      If you need more current, then you can replace the transistor with a transistor that has higher Collector-Emitter current rating.

      Or you can use a 9V relay instead of the LED+resistor and connect your bulb through there.

      Many options =)

      Oyvind

      Reply
  4. Hi there ,
    I am interested if You have an idea how to make a simple device ho can worn me when voltage battery (from a RC submarine ) drops below a desire value by making very LOUD SOUNDS . Being in the watter all the time You can’t see the Submarine !!! and the sounds can be heard .Is A VERY IMPORTANT DEVICE because if You can’t bring on surface the model is a DISASTER .

    THANK YOU

    MARIUS

    Reply
  5. I’m very interesting with this topic I also have a quick question i want to make a motion sensor for alarm,and I need your assistance of ideals.
    Thanks for the wonderful work

    Reply
    • The variable resistor R2 is used to change the trigger point for the LED. That is, how much light that is needed for the LED to turn ON and OFF.

      Cheers!
      Oyvind

      Reply
  6. Great information!

    It would be helpful to have more specifics about the components used. Jameco has many different photocells (assume that’s same as LDR) and potentiometers. I am currently too ignorant to make an informed choice.

    Thanks!

    Reply
    • Hey Ron, finally you made it through! ;)

      The potentiometer used is a linear 100k potentiometer. Any linear 100k potentiometer would work.

      The photocell/photoresistor/LDR I just found laying around, so i am not sure which exact one it is. But I had a look at the ones at Jameco, and it looks like all of them will work.

      Cheers!
      Oyvind

      Reply
  7. I’m using a dark detector ckt , I want to glow the led when it is slightly dark but in my experiment model the led is glowing when it is complety dark .I have used two transistors & two 1.2 k ohms & one 10 kilo ohms pls reply fast pls reply

    Reply
    • Hey
      If you have built the circuit according to the schematics, you will have a potentiometer that you can adjust to make it glow when it is slightly dark.

      But you mention two transistors, so I don’t know which circuit you are using….

      Cheers!
      Oyvind

      Reply
  8. heyyy m really very thankful that I got my answe here . actually I was confused n really banging my head on the wall that how to make my led glow when it is dark.. actually iny circuit it was glowing when it was coming in wid contact of light.. now I got to knw the fact of npn and pnp transistors. …
    thanks a lottt

    Reply
  9. Hey!

    Nice video. I’m just wondering, how exactly does changing the potentiometer values change the trigger point of the led? The potentiometer is connected to the power source and photo resistor so how would it change when the transistor is on?

    Thanks!

    Reply
  10. just a suggest. the dark ckt dosnt drive the relay ,it needs to be followed by a current amplifier{using bc547} to drive the relay,since the current is less for bc557.

    Reply
  11. hello sir ! your circuit is great . I have a question …..

    can I replace LED and resistor with a motor to make light follower robot.

    Reply
    • You have to make sure the transistor can provide enough power for your motor (you’ll find this info in the datasheet of your transistor)

      Cheers!
      Oyvind

      Reply
  12. Hello Oyvind! I have followed your circuit and it is working nicely. Thank you for such a simple but interesting project. Also I would like to know if it is possible to replace the led with a 12v led strip i.e. if it is possible to get an out put of 12v or at least 9v from this circuit. If so how should I proceed?

    Thanks,
    Somesh

    Reply
    • Hi, yes you can replace the LED+resistor with whatever you want. You just have to make sure that you have a battery that gives you enough voltage and that the transistor can handle the amount of current that goes through your LED-strip.

      Cheers!
      Oyvind

      Reply
      • Hi Oyvind! First of all I am a newbie at this! What I have figured is that the BC557 transistor is a low current (max 100ma) low voltage (max 65V) transistor, and the max output from your circuit is about 9V and 5mA.
        Now I can still power up a LED strip of 400mA but with very low brightness due to the low current output. I was thinking what if I replace the BC557 with a BC807 which is a high current (max 1A) low voltage (max 45V) transistor, would it be possible? If so what else do we need to change in the circuit?
        Thank again for the project.

        Best
        Somesh

        Reply
        • Hi Somesh,

          I am really happy to see that you did the research and found a transistor that handles more current.

          If your LED strip has a current limiting resistor inside itself (it probably has), then you can just replace the led+resistor with your led strip and use a 12V source instead of 9v source, and you should be good to go.

          Oyvind

          Reply
          • Hi! Do you mean that I should replace the BC557 with the BC807 and then use the 12V power source or that just the 12V would be sufficient without the BC807? Please clarify.
            Thanks a million for your support.

            Best,
            Somesh

          • Yes that is right Somesh.

            You need to use the transistor that can handle the 400mA of your led strip.

            Cheers!
            Oyvind

  13. Hi! Oyvind! First thank you for taking the time to help me with this project. Also keep up the good work. I will work with the BC807 transistor and get back to you with the conclusions.
    Have a great day!

    Cheers!!!

    Reply
  14. thnx for the great info sir, I’m a newbie, What ratings of resistor should I use to apply your circuit using a 220volts, I want to apply in my house, thanks so much

    Reply
    • Hi,

      You need to calculate how much power the resistor will dissipate, then get a resistor that can handle more than this. I don’t have any posts on calculating that at the momentm but I’m sure Google can help you out.

      That said, I don’t recommend messing with the 220V if you don’t know what you are doing. You can hurt yourself and you can potentially craete a fire hazard if you choose wrong components.

      Oyvind

      Reply
      • Sir Oyvind, Ive searched on how to compute the power a resistor will dissipate and I’ve come up on using a 20w resistor, will it work? or do I need to add more components so that I can use the circuit uisng 220v? tnx in advance.. I’m really a newbie, :)

        Reply
  15. Hi! Thank you for the very simple yet clear info. I’m just wondering because from what i read from other books about the flow of electrons in a circuit, the flow would be from negative to positive. Is that correct sir? Thanks in advance.

    Reply
  16. Hello ,
    How are you? I have a good question. The question is that I never see a dependent current or dependent voltage source in any schematic for TV, radio , or computer why teaching them in college course. Please help me understand what they use them for in electronic industry, thank you for your answer and God bless you.

    Reply
    • Hi Jean,

      Thanks fo your question. I don’t remember exactly, but I think these are used to model the behaviour of for example a transistor. So it’s not a real component, it’s a tool for doing calculations.

      Cheers!
      Oyvind

      Reply
  17. Hello Oyvind! Once again thank you for this project! After working with it for quite some time now I am able to light entire LED strips with dark sensors and also I have designed a circuit with three BC547 transistors which when added to a LED 5050 strip powered by 12v supply changes color according to the light! If you’ld like I can share the circuit with you!

    Cheers!
    Somesh

    Reply
  18. Sir,I wan to use an alarm of 3v and 600mAh instead of LED in darkness sensor.
    Please help me and reply me as early as possible.
    Thanks.

    Reply
  19. Hi Oyvind,

    Really happy to find this tutorial. Great website and tutorials, it has been very helpful to me.
    I am trying to build a sound installation based on a DIY 808 bassdrum from Erich Archer (http://www.ericarcher.net/wp-content/uploads/2014/07/tr-808-bass-drum-diy-project.pdf)

    I want to trigger the bass with a LDR. The idea would be that if you hold your hand in front of the LDR the bass is triggered. I have no idea where on the scheme/circuit I would have to install your LDR circuit and what kind of values for resistor etc. I will need to trigger the whole. And if this is even possible.

    The 808bass circuit has to be triggered with a logic signal. So tie ACCENT to +12V (+15V) and connect the logic signal to trigger. The trigger pulse has to be short (like 5ms).

    This is the schematic I built: http://nathanaelreuling.nl/bodil/Kick808-2.jpg

    I would be very greatful if you could help me on this.

    Cheers,

    I.

    Reply
  20. Do I need additional circuitry to add a photocell (LDR) to a 6V DC battery powered strobe light, or can I just tie in. If I need circuitry, can I use the photocell and circuitry from a 110V AC night light?

    Reply
  21. I have 2 questions. The first one is with the set up you have for the light turning on when its dark. Would you still have a power draw with the led off. My project is that i live on a sailboat and my anchor light is at the top of the mast. I want to try and save power and have the light turn on at the right time of im away from the boat. My second question is could i just hook the photocell to a relay when the sun is shining the photocell tells the relay to tuen the light off but when the sun sets the photocell loses power and lets the relay turn the bulb on. Im working with 12v. Its been awile since i have messed around with this stuff so im very rusty

    Reply
  22. how do i get a good multimeter that measure parameters like; voltage, current, resistance, frequency, signals, wave, and other measurable parameters as may be required in electrical/ electronics engineering profession?

    I also books that can guide/ teach me how to build and design different circuits

    Reply
  23. Really like the site. I’m trying to build a circuit where the LED brightness is dependant on the light level over the LDR. so instead of just being 100% on or 100% off, it varies based on the amount of light over the LDR. How do you alter the circuit to make this possible??

    Reply
    • Hi Paul,

      Thanks:)
      The LED brightness is actually dependant on the light level with this circuit. When I demonstrate in the video, I use my finger to make it really bright or really dark on the LDR, that’s why the LED is 100% on or off. But if you gradually change the light-level detected by the LDR, you will see the LED gradually getting more and more bright.

      Cheers!
      Oyvind

      Reply
  24. I need this type of circuit for a bug zapper that I want to turn on after dark. Using a solar rechargeable battery/cells for power. Is there a problem here? It looks to me that during the day, when the photoresister is conducting, that the battery is draining through it and the resister. It’s not powering the LED but it’s still using battery power that I’m trying to replace during the day. Am I reading this right? This circuit seems to choose the path for the electric current either through the LED or through the LDR depending on ambient light but the drain on the battery is there in both cases.
    Thank you!
    Grant

    Reply
    • Hey Grant,

      Yes there will be some current in the circuit all the time. The amount of current will depend on your LDR and potentiometer values. Without having done the proper calculations, I think the amount of current when the transistor is off will be very low. Maybe 1mA or less. But I think you should do some measurements of your own to be sure.

      Best Regards,
      Oyvind

      Reply
    • Hey,

      Just replace the LED and resistor with the motor. Just make sure your motor can handle the battery voltage you use.

      Cheers!
      Oyvind

      Reply
  25. Good day sir, it’s my first time getting to know yr site.im very much interested in building the sound amplifier module for speakers for my pc.i Have a few concern regarding the the cct. I need yr expertise advise.looking at the pcb layout.im a bit confuse how the input is connected as there is A 1 and B1 that connected to the potentiometer. Then A 2n B2. Connected to the ic. Please assist me in explaining how do I connect the input positive n negative wiring.n also the negative supply voltage.connection.as I can’t seem to open tHe the attachment file.as I want to see the
    Layout.iall the ground connected together etc.please I may be asking u silly question as I’m just finding my way in this field.thnk you

    Reply
  26. Hi,
    I’ve been looking at your ‘dark sensor’ circuit and wondered if it would work with a lower voltage battery….such as 1.5v ? What would you suggest for this.
    I think I’m going to need your e-book !!

    Reply
  27. i like this circuit and i try bt136 triac whith on and of light automatically in evening and of in morning in series of lamp

    Reply
  28. hello admin, can i ask a favor? can you make a circuit design for the reverse one using proteus? it is for my project., and what is the code for this… please… thanks….

    Reply
  29. can you give me a circuit of 4 leds, controlled by ldr. no led will light if there’s bright light, and 2 leds will light if the light is dim, and all the 4 leds will light, if its totally dark. help me in my project please.

    Reply
    • Hey,

      Yes that’s possible. But then you need a transistor that can handle the amount of current your motor needs.

      Check the max current of you motor, and make sure the max collector current of your transistor is more than this. Maybe the TIP120 transistor can work for you…

      Cheers!
      Oyvind

      Reply
  30. Dear sir, I am 8th grade student, I am making project of Automatic Railway gate for opening and closing by using LDR and with 9V battery. Kindly give me circuit diagram please. Its very urgent

    Reply
  31. hey! Transistors are of types,codes printed on their bodie and also different voltages, but no specific type is mentioned above to be used,pliz.

    Reply
  32. Hi, i have been trying to make an electric generator using an alternator but, the problem is that an alternator is said to generate 300Volts and 600 Volts, how can i reduce it to generate 220-230 volts. The question is how can i make it & what methods can i use. Thank for all your working. Am always ready to make something that can make someone smile.

    Reply
  33. Thanks for the information. In my case I would like the LDR to activate a 12V solenoid when light is detected, instead of the LED Pleasecould you tell me what changes would have to be made to the components of this circuit diagram.
    Many thanks
    Wayne

    Reply
  34. I’m running a solar system charging a 3.7 volt lithium which power 3.to 4 leds in parallel. Can you suggest a suitable day night circuit for this without reducing the intensity of the leds since the system is low power.

    Reply
  35. hello
    i have a doubt(maybe silly).
    how will the current pass through the ldr when it is dark though tbe ldr has very high resistance when it is dark.

    Reply
  36. Can you please explain how a schmatic drawing is installed on a breadboard .
    As a beginner at 55 years old this is not clear to me . THank you.

    Reply
  37. Oyvind
    Thanks for the breadboard article it is very helpfully
    Can you also explain how you plot out step by step off a schmatic drawing to the breadboard .
    I don’t understand how the schmatic components start and finish on the b-board .

    Reply
    • Hi Tony,
      I’m not able to do that in a comment. But I’ll write it down as a suggestion for a future article. But I would advice you to try to connect a very simple circuit such as an LED and a resistor on a breadboard to get the feeling for it.

      Best,
      Oyvind

      Reply
  38. i am making a smoke detector using your circuit which activates when light goes off the only prob is that i want to put buzzer insted of an led so what changes should i make with resiatance 1 and power suply

    Reply
    • Yes, with modifications that is possible. Instead of the LED+resistor, you can insert a relay that is rated for the voltage and current you need, and connect the street light through that.

      But, I wouldn’t try it out in real life as it’s very dangerous.

      Reply
  39. I have used 470 ohm as current limiting resistor and 2K ohm for the base. Now when I apply 5V, the circuit works fine. But if 9V is given, LED keeps ON irrespective of lights. Even if we remove the base connection wire, the transistor still conducts and LED remain ON. Can’t figure out why it is?

    Reply
  40. please and please I need to no how to differentiate a pnp and npn transistor with a multimeter..Please send it to my email

    Reply
  41. Hey. I recently bought some 12v led strip and set in mu room roof. Now I like to make a circuit to turn them when the dark. I want to make them brighter when the dark is getting high. I think you can understand me. When the darkness is getting high the led strip will be light up slowly. Can you help me to make a circuit for that. The led strip is 12v and 6A . Can you please draw me a circuit. .

    Reply
  42. please I have a small solar panel that produces 9v, so I try to use it to charge my phone. Each time I plug the phone, I firstly connect a multimeter to no if it reduces. So when i plugged the phone to that solar source, it came back to 4v which would not charge my phone but spoil the battery. So please what components can i add to amplify both the current and the voltage. I have tried a transistor, instead it to it back to 2.3v…….thanks

    Reply
  43. Hey i want to make a mini project for my submission so can U please help me in deciding what should i make????
    Related to electronics & communication

    Reply
  44. am doing a mini speed breaker ( roller mechanism)… i have got a 12 v generator dynamo and nokia phone battery 3.6 v and a ldr sensor and four LED … how to design a ldr circuit for this and what type of transistor to use … the generator will be connected to the battery and the electrical energy saved there … then at night or in darkness the ldr will make the LED lights up … can you plz send me a circuit for this …thank you in advance

    Reply
  45. Sir tell me one thing that when you are used the dark condition in LDR ckt
    the resistance become high and voltage become low as u said in vidio.
    But sir i have a doubt when resistance become high than current become low.
    And in this condition the transistor is operated.
    Because u said in your previous vidio that when the small base current flow from base to Emitter the transistor will operate.

    Reply
    • Hi, if you are talking about the first circuit in this article, you are right: In the dark, the resistance is high, the current is low, and the transistor does not turn on.

      Reply
  46. Hello, I have had fun creating the first LDR circuit, thank you for your explanations and teaching.
    I have tried creating the second LDR circuit and my LED wont turn on and cant tell what is wrong with my circuit. Do you have any trouble shooting tips?

    Reply
    • Hi,
      First of all, check that you’re able to turn the LED on and off by turning the potentiometer all the way to one side, the all the way to the other side.

      If not, there’s an error on how your circuit is connected. Maybe you misplaced the transistor legs. Note that this is a PNP transistor and not NPN as in the first example.

      Best,
      Oyvind

      Reply
  47. I see that the collector and emitter terminals are interchanged in case of pnp and npn circuits. Is it that the collector should always be conected to the load? Can you please tell me why these are interchanged?
    And great going sir. You break down the most difficult topics into very simple stuff so that we can understand easily.Keep it up sir.

    Reply
    • Hi,

      There’s no rule saying that you have to connect the load like this. But in the way I’ve connected the load, it’s much easier to calculate voltages to find the correct resistor values.

      Best,
      Oyvind

      Reply
  48. Great article!
    I have been searching the net for a way to build a 12vdc circuit with an LDR to operate a fan when the lights go out. If the source is 12vdc and the load is 12vdc it seems no resistor would be required other than on the base of a transistor, is that correct? I have only found diagrams for circuits using 9vdc or less and operating an LED. I will admit I am a novice when it comes to building circuits so any help you could provide would be great.

    Reply
    • Hey,

      To operate the fan, you could in theory just replace the LED+resistor on the right side with your fan. But – the transistor here, BC547, it can only handle about 100mA (I think) and fans usually requires much more. So you would need a transistor that can handle more current. For example the PN2222

      Best,
      Oyvind

      Reply
  49. In regards to the video of the ldr circuit, isn’t it the case that the ldr resistance is high when finger is placed on it to eliminate light which then implies that the led turns on (when its dark)? As oppose to what was illustrated in the video which makes the ldr useless if you think about it.

    Reply
  50. Hey cool post!

    I am trying to build something similar, hope you would help me.

    I have a series LED circuit (14leds) and I wish to ON them when the LDR is in dark.
    How can i modify the your given circuit according to my requirement?

    Please help

    Reply
  51. Hi.. I am from Venezuela. Nice to meet you! I have a device which works like that but it use 220 volts, can you tell me what kind of LDR I have to use? Thanks!

    Reply
    • Hi, That depends on how your circuit looks. If you already have the device, the easiest would be to just find a replacement part for it.

      Best,
      Oyvind

      Reply
  52. hey!!!! admin
    we tried the circuit (glow light when bright &off when dark) and it was working perfectly ,but the reverse one did not worked even after we followed ur circuit diagram plz reply asap we are working on this since one week

    Reply
      • tried and is working :) but for the dark sensor the led is always on :( and also can i give both light and dark indicator in the same circuit?

        Reply
        • Then you might need a higher resistance than 100k for the dark-sensor.

          Not sure what you mean about using both light and dark. If you want the buzzer/LED to be on both in light and dark, just connect it directly to the battery ;)

          Reply
  53. I want to use 3 leds instead of buzzer and use a 10ohm resistor with those……is it possible ?any changes required? Also where should i place the emf ?

    Reply
    • Hi,

      There’s no buzzer in this circuit. But you can place three LEDs in parallel instead of just the one. Just reduce the value of R1 to around 100 ohms to get some more current running through the LEDs.

      Reply
  54. Hi Oyvind,

    Why is the cariable resistor connected after and not before current feeds into the transistor base?

    Many thanks for the great posts,

    Victor

    Reply
  55. I build a ldr circuit as shown above but…. The ldr plays does not play an role in the circuit.
    Even if light is not provided,the bulb glows

    Reply
    • Try turning your potentiometer all the way to each side. If you’re not able to turn the LED on and off with the potentiometer, you need a larger resistance value for your potentiometer.

      Best,
      Oyvind

      Reply
  56. Hai sir, iam just confused becuouse when dark its high resistance and light ,low Resistance current flow its k but I think this is automatic light on and off day and night is it OK but here dark when its high resistance no current flow ist k lights will not on but we want day and night on and off plz clarify sir but I don’t know u understand or not clarify sir

    Reply
    • Yeah, should work. just adjust the resistor for the LED to a bit higher value to take into account the increased supply voltage.

      Best,
      Oyvind

      Reply
  57. What is the photoresistor dark resistance for the one used in the experiment ?
    If I want to use the circuit to cut the power to a motor instead of the led when there is no light reaching the ldr, how should I modify it?

    Reply
  58. Hello sir,
    Please help, I want to create a detector or sensor that operates in 12 volts and that use on some of these devices (Thyristor, SCR, SCS or UJT)

    May I ask for your suggestion?

    Reply
  59. Hi Øyvind

    Thanks for the very informative articles on your site. I have a basic question on this article: why use a transistor at all? If we build the circuit without the transistor, and without R2, and we place the LDR in series with R1 and the LED, how would this not achieve the same outcome?

    Thanks in advance

    Reply
  60. hi! may i know if the circuit can be connected with GSM module? For example if the LED turns on it will connected to the GSM module. Is it possible? Thanks a lot! :)

    Reply
  61. Three Questions:
    1) Can I use a 9 volt AC adapter plugged into a 220 Volt Outlet here?
    2) I don’t really want a Variable Resistor here. What’s a good value that won’t fry anything in this circuit? Will 10 KilloOhms work?
    3) Though the 2N4401 has previously been mentioned as an acceptable substitute for the BC557, will the changes implied by 1) and 2) change this?

    Reply
    • 1) Yes, as long as the output is DC
      2) That depends on your LDR. You can try different values from 1k and up to see what works.
      3) No

      Best,
      Oyvind

      Reply
  62. Hi,
    I am looking to design this:
    1- Minimum DC voltage required 8V
    2- Maximum DC voltage 18V
    3- Operation temperature -40F to 120F
    4- Dry contact sensor (Digital output)
    5- At least 30 seconds safety time delay or adjustable time delay
    I know that for the delay I can add a RC circuit to it. I am not sure how to do it. Can you please help me wit that?

    Reply
  63. Hi,

    I want to make the circuit for a school project which turns the LED ON when there is no light.

    But is it possible to modify the diagram to:
    1) use an NPN transistor (PN2222) instead of the PNP (BC557)
    2) use 10k potentiometer instead of 100k

    Many thanks in advance.

    Reply
  64. Hi Øyvind Nydal Dahl! And thanks for the article. I have modified your circuit (night detector circuit) and I want some help, cause I’m a beginner. I’ve modified the following parts:

    1) Power Source at 5V.
    2) My led is 1W and it has forward voltage 3.2-3.4V and forward current at 300mA.
    3) I’ve replaced the resistor with one at 6.8 Ohms.

    My question is this: When I turn on the circuit, the transistor gets hot too much (and after few seconds it breaks) and the LDR doesn’t work. My led stays on all the time (full light). I’ve read on forums that I have to replace the transistor maybe. Can you help me and tell me what to do?
    Thank you so much!

    Reply
  65. Interesting site.Looking to power a Garmin Edge 1000 gps unit during a long (18-hour-non-stop) bicycle ride – any advice as to features / capacity I should be looking for?Thanks

    Reply
  66. Hi bro…
    I want to make Lesar security system for my farm . For that I want that this LDR work just reverse….
    What will be the circuit now
    Plz help

    Reply
  67. I will immediately grab your rss feed as I can not find your email subscription link or enewsletter service. Do you have any? Kindly let me know so that I could subscribe. Thanks.

    Reply
  68. Hi,
    I made an Ldr smoke detector for my project but but it works in reverse as in when there is light the buzzer goes on and when it is dark it is off, what could be the problem?

    Reply
  69. If you have not done so you should explain that current only flows from positive to negative with circuit designers and engineers. In real life it flows from negative to positive. I discovered 70 years ago, when I was sixteen,that the symbol showing the direction of current flow through a diode is reversed.

    Reply
  70. Very nice. It’s very easy to understand your demonstrations with theoretical concept. I loved it alot. I just wanna design a new LDR circuit. So just working upon it! So let’s see how the stuff will make out! Thanks for your videos and very helpful website. Thanks to the team!

    Reply
  71. Hi, I have made the circuit with the LDR and the PNP transistor where the LED turns on when it is dark. I have a couple question, just to make sure:

    1) Does the voltage (potential difference) across the LRD become close to zero when the LDR is exposed to light and the transistor is turned off (no current passing through the LED)? The LDR resistance is not exactly zero when there is light but the voltage drop is so small and much less than 0.7C that can the transistor cannot be turned on.

    2) When it is dark, the current passing through the LDR and the resistor R2 is extremely small because the LDR has a very large resistance. Nonetheless, that small current produces a voltage drop across the LDR of about 0.7V which turn the transistor on and consequently the LED on too.

    Thank you!
    Øyvind

    Reply
  72. hii,
    actually i have made this circuit but i am facing one difficulty. the difficulty is this ..
    The distance between my leds and ldr is much nearly 5-6 cm because of which when a laser beam strikes the ldr the led turns onn but asa lazer beam is switched off led also switches off .. i want that when ldr is triggered once and led is turned on then untill an unless we remove the battery led continues to light .
    plss sugest me some ways .
    thank you.

    Reply
  73. Oyvind, Thank you for all the great info.
    If I add a second photoresistor in parallel will either one trigger the LED?
    Thanks, Frank

    Reply
  74. Sir I Wanted To Ask That Is LDR A Open Switch, And Gate, Or Gate Or Off Switch.
    I Would Be Very Thankful To You.
    Thanks!

    Reply
  75. Thanks for this. I have been surfing the internet for circuit that run on two LDR working alongside one another. Each LDR trap their own light, if one of the LDR is having higher impedance, pinA becomes high and pinB; low, otherwise pinB becomes high and pinA; low. But if they happen to be in the same impedance, pinA and pinB becomes low

    Reply
  76. I need to know what is the resistance of the r1 and r2 that need to be applied in circuit. And also i need to know whether r2 is a varible resistor. Can’t we use a normal resistor for r2

    Reply
  77. There is something in this circuit I do get: Why do we want the wiper of R2 grounded, instead of connecting the base of the transistor to R2’s wiper and not between LDR and R2 ?

    I mean, it is basically equally functional, is it not ? R2 still serves the function of setting a resistance “floor” in LDR+R2.

    Sorry if this is dumb, I think I understand how the circuit works as described, I’m just unsure as to why it’s made like this and not as I thought.

    Thanks !

    Reply
    • You’re absolutely right. You only need the wiper plus one of the sides. No need to connect it like I did. Often the third pin is connected like this, just to not leave it hanging. But no need to.

      Best,
      Oyvind

      Reply
    • I think I used a light-dependent resistor (photoresistor) with around 5 to 10 kΩ resistance in light and 200 kΩ or more in dark.

      Best,
      Oyvind

      Reply
  78. I still don’t understand, why is the potentiometer there? Why won’t the circuit work without the potentiometer? Please, Please someone explain

    Reply
    • It needs to be a resistor there. It makes up a voltage divide with the LDR. With a potentiometer, you have can adjust the resistance and thereby adjust the light-sensitivity.

      Reply
  79. Hey not be very judgy but your grammer needs work.
    but some of the points you mentioned are not correct and you interchanged some things which is not correct. the led glows only when no light falls on the ldr not when there is light. please correct this as there might be someone else who needs this document but will just blindly copy instead of going through.
    just a concern.

    Reply
  80. Never use a 10 turn pot. You don’t know where the wiper is and you don’t know which way the wiper is going when you turn it clockwise.

    Colin Mitchell
    TALKING ELECTRONICS.com

    Reply
  81. “Making The LED Turn ON When it’s Dark”

    Thank you,
    I needed this to “turn off” a blinking led circuit during the daytime.

    Reply
  82. Hi! You explained that when it’s dark, the LDR has high resistance, making the voltage at the base of the transistor too low to turn the transistor ON. How exactly does high resistance make the voltage low? Not sure if I’m missing something, but it just didn’t make sense to me. Let me know!

    Reply
  83. This does not make sense. An ohm meter will tell you all you need to know about a 10 turn pot. Having said that, there is no good reason to use a 10 turn pot here.

    Reply
  84. Hi, I’m making a solar alarm where you use a potentiometer and this LDR circuit to set the relative time at which it will go off, just wondering what potentiometer to use and where to put it.

    Reply
  85. An LDR typically has a resistance of 100 Ohms when brightly illuminated. Since the LDR is the only resistance between +12V and the base of the transistor, a current of (12 / 100 =) 0.12A (120mA) will flow into the base.

    Bye, bye transistor.

    Reply

Leave a Comment