• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Build Electronic Circuits

Build Electronic Circuits

Electronics explained in a simple way

  • Start Learning
    • Basic Electronics
    • Digital Electronics
    • Circuits
    • Practical Skills
      • Printed Circuit Boards
    • Microcontrollers
      • Arduino
    • Maker Lifestyle
      • Podcast
    • Academy
  • About Me
  • Blog
  • Academy
  • Contact
You are here: Home / Circuits / LDR Circuit Diagram

LDR Circuit Diagram

November 1, 2013 By Øyvind Nydal Dahl 307 Comments

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 =)

Filed Under: Circuits

Reader Interactions

Comments


  1. Brian says

    May 22, 2014

    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

    • admin says

      May 23, 2014

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

      Cheers!
      Oyvind

      Reply

  2. Tom says

    May 22, 2014

    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

    • admin says

      May 23, 2014

      Thanks for your comment Tom!

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

      Cheers!
      Oyvind

      Reply

      • Chupo_cro says

        March 21, 2015

        Why didn’t you just swap LDR&R2 instead of using PNP in the place of NPN transistor?

        Reply

        • Shainy says

          January 4, 2016

          HI! Why you will swap the LDR & R2 when you will use NPN transistor?

          Reply

          • chupo_cro says

            August 19, 2017

            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.


        • Zarak says

          July 11, 2019

          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

          • admin says

            July 15, 2019

            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.


      • Ricardo says

        November 8, 2016

        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

        • Piyush says

          September 15, 2018

          You can use two transistors to accomplish it

          Reply

    • Asurya says

      July 17, 2016

      How to use on 230 volts can u telle
      [email protected]

      Reply

  3. julie says

    July 4, 2014

    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

    • admin says

      July 5, 2014

      You could replace the LED and resistor with a relay that you connect your lamp through.

      Reply

      • Abhishek Sharma says

        October 6, 2015

        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

      • anwar says

        June 30, 2016

        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

  4. Innocent Maforimbo says

    July 5, 2014

    thanx buddie.I like this one

    Reply

  5. Eddie says

    July 18, 2014

    Hi. Thanks for this. Wanna find out if this is also possible for a bulb.

    Reply

    • admin says

      July 18, 2014

      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

      • Bhushan says

        December 4, 2020

        Why is relay when 9 v bulb there To glow

        Reply

    • Garry Smith says

      December 31, 2017

      Good one, Oyvind :-)

      Reply

  6. samir says

    July 31, 2014

    thank you.can i know about what is the stuff in mobile phones screen display lighiting.

    Reply

    • admin says

      August 4, 2014

      The actual lighting in the screens are LEDs: https://www.build-electronic-circuits.com/what-is-an-led/

      Oyvind

      Reply

      • You Know who i am.. says

        September 28, 2020

        Making The LED Turn ON When it’s Dark.. how this process works..? Pls, explain

        Reply

  7. MARIUS says

    August 4, 2014

    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

    • admin says

      August 4, 2014

      You can use a voltage divider with a transistor. Then have the transistor turn on a relay that it connected to some circuit for making the loud noise. The efficiency might not be the best though. Start by reading up on voltage divider: https://www.build-electronic-circuits.com/voltage-divider

      Then learn how the transistor works: https://www.build-electronic-circuits.com/how-transistors-work/

      Good luck!
      Oyvind

      Reply

  8. pavithra says

    August 25, 2014

    how can we use a voltage divider with a transistor?

    Reply

    • admin says

      August 25, 2014

      What do you want to do?

      Reply

  9. Patricien Tsangya says

    September 23, 2014

    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

    • admin says

      September 23, 2014

      Hey Patricien! Then you should look into PIR sensors ;)

      Oyvind

      Reply

  10. Nayan says

    September 29, 2014

    Nice article, great info.. You really make it very easy to understand..

    Reply

    • admin says

      September 29, 2014

      Thanks Nayan =)

      Oyvind

      Reply

  11. prakhar says

    October 6, 2014

    why do we need ‘R2’ in the adove circuit. Pls explain the work done by it.

    Reply

    • admin says

      October 6, 2014

      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

  12. Ron Burke says

    October 23, 2014

    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

    • admin says

      October 23, 2014

      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

  13. ramn says

    October 24, 2014

    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

    • admin says

      October 27, 2014

      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

      • shivangi says

        November 4, 2014

        sir plz answer me..for fire alaram using thermistor and with out use of any IC …

        Reply

    • Joe says

      October 27, 2018

      Use an opamp and you can set the sensetivity to what ever ambient light level you want it to turn on at.

      Reply

  14. Amal Thettayil says

    November 1, 2014

    what would happen if you took the transistor out?

    Reply

  15. shivangi says

    November 3, 2014

    can you send me the circuit of firealram using bc 548 and themistor…i tired but cant succes plzz send me suggetion or circuit on my email id..thank you sir ..

    Reply

    • admin says

      November 4, 2014

      For finding schematics, I recommend this page: https://www.build-electronic-circuits.com/free-electronic-circuits/

      Cheers!
      Oyvind

      Reply

      • juan says

        March 30, 2017

        haha wow man you get alot of the same questions haha. Not sure why some of them dont understand. Guys im very new to electronics. That is the simplest diagram that you will get on this topic. Try making that and if you succeed play around with the same one just diffrent parts like one that uses noise or all that.

        Reply

  16. arjun says

    November 16, 2014

    Hi
    Can you please give a short idea how using the NPN transistor made the LED light up, when the LDR had high resistance?

    Thanks.

    Reply

    • admin says

      November 16, 2014

      Hi

      The LED lights up when the LDR has low resistance.

      If you look at just the LDR and the R2, they make up a voltage divider (https://www.build-electronic-circuits.com/voltage-divider/).

      So the less resistance the LDR has, the higher the voltage drop over R2 will be.

      Oyvind

      Reply

  17. Smithe877 says

    November 20, 2014

    Rattling nice pattern and good subject matter, hardly anything else we need D. ddaekbeffecaaddd

    Reply

  18. mahidul says

    November 30, 2014

    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

    • admin says

      December 1, 2014

      Great to hear! =)

      Oyvind

      Reply

  19. David says

    December 6, 2014

    Which gives the best battery life, LED on all the time or using this circuit to switch on the LED only when dark?
    Thanks.

    Reply

    • admin says

      December 8, 2014

      Hey David,
      It will use less power if you use the circuit to only have it on when it’s dark.

      Oyvind

      Reply

  20. Hayden says

    December 8, 2014

    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

    • admin says

      December 8, 2014

      Hey!

      The transistor turns on when the voltage on the base is around 1.6 volt.

      The values of the potentiometer and the photoresistor determines the voltage at the base. Read about the voltage divider here, and you might see how it works: https://www.build-electronic-circuits.com/voltage-divider/

      Cheers!
      Oyvind

      Reply

  21. Son Pham says

    December 9, 2014

    Thanks and it is very easy to understand.

    Reply

  22. Aisha says

    January 2, 2015

    Great site. Your explanations are very clear and presented in a very concise manner that is not dry or boring. Thanks!

    Reply

  23. Alister Dsouza says

    January 7, 2015

    nice ckt. simple but cool.it works perfectly fine

    Reply

  24. Alister Dsouza says

    January 8, 2015

    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

  25. rohan says

    January 8, 2015

    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

    • admin says

      January 9, 2015

      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

      • Daljit says

        March 29, 2017

        Hello sir
        Can we use this LDR SENSOR with 15 watt AC(220) voltage led bulb? if yes then pls give the details

        Reply

  26. Somesh Mahanty says

    January 19, 2015

    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

    • admin says

      January 20, 2015

      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

      • Somesh Mahanty says

        January 21, 2015

        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

        • admin says

          January 21, 2015

          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

          • Somesh Mahanty says

            January 22, 2015

            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


          • admin says

            January 23, 2015

            Yes that is right Somesh.

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

            Cheers!
            Oyvind


  27. Somesh Mahanty says

    January 23, 2015

    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

  28. vhin zeta says

    January 24, 2015

    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

    • admin says

      January 26, 2015

      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

      • vhin zeta says

        January 30, 2015

        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

        • admin says

          January 30, 2015

          That’s impossible for me to say since I have no idea what you are trying to achieve… =)

          Oyvind

          Reply

    • john says

      September 5, 2015

      ican help you with that

      Reply

    • Omale francis says

      December 9, 2015

      Just contact me so we can talk08098704583

      Reply

    • A.Murugan says

      December 10, 2015

      Hi Oyvind,
      Thanks a Million for sharing about electronic circuits.

      Thanks
      Murugan

      Reply

  29. John Ten says

    January 28, 2015

    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

    • admin says

      January 28, 2015

      Hi,

      I wrote about it here: https://www.build-electronic-circuits.com/current-voltage-resistance/

      Cheers!
      Oyvind

      Reply

      • Mandel says

        December 27, 2016

        Hi I want to connect ldr circuit direct to electricity bit here it is 9v give me a best circuit

        Reply

      • Pervaiz Abbasi says

        February 9, 2017

        My son is 10 year old and interested in electronic
        Suggest me how he can learn and make things and circuits
        Starting from zero
        I would be thankful

        Reply

  30. jean says

    February 12, 2015

    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

    • admin says

      February 12, 2015

      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

  31. Somesh Mahanty says

    April 10, 2015

    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

    • admin says

      April 13, 2015

      Cool =)
      Yes, I would love to see it.

      Oyvind

      Reply

  32. jos jack says

    May 6, 2015

    hi,
    I am a new learner i want make motion led circuit to use home current how to make it please suggest me.

    Reply

  33. Museeb Ghumman says

    May 31, 2015

    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

  34. Anurag says

    July 7, 2015

    What difference does it make when we reverse the position of ldr with r2.?

    Reply

    • admin says

      July 8, 2015

      I challenge you to do your own calculations on that. Check out the voltage divider: https://www.build-electronic-circuits.com/ldr-circuit-diagram

      Cheers!
      Oyvind

      Reply

  35. akshay says

    July 12, 2015

    got use of it

    Reply

  36. Ireul says

    July 21, 2015

    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

  37. Shane says

    August 27, 2015

    Can I use the BC547 to make the circuit sense dark instead of light, or will I have to replace the transistor?

    Reply

  38. Ishan Fernando says

    September 2, 2015

    I want to use this circuit on a input voltage of 6v and the led at 5v. What do i need to change ?

    Reply

  39. john says

    September 5, 2015

    thank you! it worked fine for me

    Reply

  40. Shannon says

    September 30, 2015

    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

  41. Luis says

    October 2, 2015

    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

  42. Lucky Graham says

    October 19, 2015

    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

    • admin says

      October 24, 2015

      Hi,

      here are some book recommendations: https://www.build-electronic-circuits.com/electronics-books/

      I have never used a multimeter that can do all those things. I use a simple multimeter for simple measurements like voltage, current, resistance, etc. And an oscilloscope for more advanced measurements like frequency, etc.

      Cheers!
      Oyvind

      Reply

  43. Lucky Graham says

    October 28, 2015

    Ok! but how do i get this books? i want to place an order so i can get them. If so then which adress?

    Reply

    • admin says

      November 4, 2015

      Hey, you can purchase my ebook here: https://www.build-electronic-circuits.com/products/ebook-2nd-edition/

      It’s an ebook, so no address needed. You’ll be able to download it right away.

      Best,
      Oyvind

      Reply

  44. Azad says

    November 19, 2015

    i just want tom know how to connect the potentiometer if it has
    3 pins?

    Reply

    • admin says

      November 23, 2015

      Hi Azad,

      All potentiometers have 3 pins. And you can see how to connect it in the circuit diagram in this article.

      Cheers!
      Oyvind

      Reply

  45. Paul Benn says

    November 19, 2015

    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

    • admin says

      November 23, 2015

      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

  46. Grant Felsing says

    November 25, 2015

    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

    • admin says

      December 3, 2015

      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

  47. aravind says

    November 29, 2015

    Can plz give a LDR circuit diagram that will make the out put to rotate a Simple toy motor

    Reply

    • admin says

      December 3, 2015

      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

  48. Roddy says

    December 6, 2015

    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

    • admin says

      December 6, 2015

      Hi Roddy,

      I’m not sure which circuit you are trying to build. But here is one amplifier circuit with circuit diagram that shows you how to connect everything. Maybe it can help: https://www.build-electronic-circuits.com/amplifier-circuit-diagram

      Cheers!
      Oyvind

      Reply

  49. Tony Smith says

    December 18, 2015

    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

    • admin says

      December 23, 2015

      Hey Tony,

      1.5V will be enough to turn in the transistor, but it’s too low to turn on the LED.

      Best Regards,
      Oyvind

      Reply

  50. Tariq Mahmood says

    January 13, 2016

    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

  51. Raymart Lopez says

    January 23, 2016

    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

    • Harsh says

      March 13, 2019

      Can I use a 100 k resistor instead of potentiometer?

      Reply

  52. niola says

    January 24, 2016

    Hi Oyvind, your site has been really helpful to me. thanks alot. You are doing a great job.

    Reply

    • admin says

      January 25, 2016

      Thanks Niola =)

      Oyvind

      Reply

  53. Anand says

    January 27, 2016

    Can i use this to turn on when dark, with the same components for the reverse process ? Is it possible with swapping any?

    Reply

    • admin says

      February 8, 2016

      Hey Anand,

      At the end of the article I show how to do that.

      Best,
      Oyvind

      Reply

  54. Genthon Taduran says

    January 29, 2016

    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

  55. Shalin says

    February 2, 2016

    Isnt there any logic gates involved like NE555?

    Reply

    • admin says

      February 8, 2016

      In this circuit, no.

      Cheers!
      Oyvind

      Reply

  56. smurf says

    February 5, 2016

    is it possible that instead of led, id use a dc motor? and how? tnx a lot.

    Reply

    • admin says

      February 8, 2016

      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

  57. johns says

    February 18, 2016

    will battery get consumed up on leaving it in dark?

    Reply

    • admin says

      February 18, 2016

      Hey, yes there will be some current going through the circuit even when it’s dark.

      Best,
      Oyvind

      Reply

  58. Manas.N says

    February 20, 2016

    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

    • admin says

      April 1, 2016

      Hey,
      Sorry I don’t have that.
      Oyvind

      Reply

  59. Toms says

    March 13, 2016

    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

    • admin says

      April 1, 2016

      Hey,

      Any general purpose transistor should work. For the npn type you can use for example bc546 or 2n3904

      Reply

  60. simutenda abby says

    March 17, 2016

    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

  61. Wayne Parry says

    March 18, 2016

    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

    • admin says

      April 1, 2016

      Hey,
      You can replace the R1 and the LED with your solenoid.

      Best,
      Oyvind

      Reply

  62. DURGA SAI says

    April 2, 2016

    sir
    can we use operational amplifier in the place of transistor.If we use what will happen?

    Reply

  63. V G Abraham says

    April 14, 2016

    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

  64. Karen says

    April 24, 2016

    Please for the dark detecting circuit, can I replace the BC557 with BC558?
    Please, its really urgent.

    Reply

    • admin says

      April 28, 2016

      Yes that should work.
      Oyvind

      Reply

      • areeb usama says

        May 6, 2016

        hlw , em confused why we use potentiometer in dark sensor , plz explain the working of this potentiometer plz

        Reply

        • admin says

          May 8, 2016

          The potentiometer is there to adjust when the light should go on/of (how much light is needed).

          Reply

          • areeb usama says

            May 19, 2016

            thanks


      • areeb usama says

        May 6, 2016

        this site is very helping can you plx tell me the working of potentiometer in dark sensor project

        Reply

  65. fred says

    April 27, 2016

    if i use a 12v battery and 12v led what materials do i need to build this proj?

    Reply

  66. abhishek says

    May 31, 2016

    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

    • admin says

      June 2, 2016

      It won’t. Or at least very little. And that’s why the transistor does not turn on.

      Oyvind

      Reply

  67. Tony says

    June 2, 2016

    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

    • admin says

      June 2, 2016

      Hey Tony,

      Maybe this breadboard article will make it more clear: https://www.build-electronic-circuits.com/breadboard

      Best,
      Oyvind

      Reply

  68. Tony says

    June 3, 2016

    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

    • admin says

      June 10, 2016

      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

  69. Rishabh says

    June 4, 2016

    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

    • admin says

      June 10, 2016

      Hey,

      If your bizzer works with 9V, just replace the LED+resistor on the right side with your buzzer. It has to be an active buzzer though (that doesn not need an external oscillator).

      Best,
      Oyvind

      Reply

      • Rishabh says

        June 19, 2016

        thanks for your support

        Reply

  70. Brian says

    June 25, 2016

    If you could do the terminations before inserting them in the breadsheet board it would be much much easier

    Reply

  71. george says

    June 26, 2016

    sir how if the 100k resistor out.what will happen?

    Reply

    • admin says

      June 26, 2016

      You should try it and see for yourself ;)

      Reply

  72. Jugal Rathod says

    June 30, 2016

    Can we make a LDR circuit to turn ON the street light automatically of 700 volts ??

    Reply

    • admin says

      July 3, 2016

      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

  73. prisca says

    July 15, 2016

    hey! i would like to get that book,**getting started with electronics**, how can i get it?

    Reply

    • admin says

      July 15, 2016

      Hi,

      You can buy it here: https://www.build-electronic-circuits.com/products/ebook-2nd-edition/

      Best,
      Oyvind

      Reply

  74. Sujay Mandi says

    July 15, 2016

    sir, how the pnp transistor work? And at last of the article please explain the circuit how it works?

    Reply

  75. Nityananda Hazarika says

    July 25, 2016

    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

    • admin says

      July 29, 2016

      Sounds like you have the pins mixed up… Or maybe you are using a pnp instead of an npn?

      Reply

  76. Gabriel says

    August 2, 2016

    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

  77. Uthpala says

    August 4, 2016

    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

  78. Gabriel says

    August 7, 2016

    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

  79. Kratika says

    August 9, 2016

    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

  80. shah salman says

    August 11, 2016

    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

  81. Ambar says

    August 12, 2016

    Thanx a lot sir for all the vidios…..

    Reply

  82. Ambar says

    August 12, 2016

    sir you are the best……..

    Reply

  83. Ambar says

    August 12, 2016

    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

    • admin says

      August 14, 2016

      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

  84. Ambar says

    August 12, 2016

    And when the Transistor is operated than the collector to Emitter current flow….
    Then Led will glow….
    I am confused….

    Reply

  85. Manish says

    August 18, 2016

    Sir how to we make street light lDR

    Reply

    • admin says

      August 18, 2016

      Exchange the LED+resistor with a relay that can control the street light.

      Best,
      Oyvind

      Reply

  86. Ramz says

    September 3, 2016

    I don’t have a Resistor and transistor, is that fine ?

    Reply

    • admin says

      September 4, 2016

      Not really… This circuit requires all the parts. But you can always have some fun with LDR and an LED anyway.

      Reply

  87. Thomas Jubb says

    September 13, 2016

    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

    • admin says

      September 14, 2016

      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

  88. Tushabe Benard says

    September 14, 2016

    How can i use this automatic light detector with 100W electronic bulb?

    Reply

  89. Divya says

    September 19, 2016

    Thank u sir i tried the second one and it worked…..
    it was like oh!!
    I shined before my classmates..
    thank u once again…

    Reply

    • admin says

      September 20, 2016

      That’s great to hear =)

      Best,
      Oyvind

      Reply

  90. James says

    September 29, 2016

    Thank you very much for this article sir!

    Reply

  91. Shrijith.P says

    October 2, 2016

    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

    • admin says

      October 5, 2016

      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

  92. Newbie Dan says

    October 4, 2016

    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

    • admin says

      October 4, 2016

      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

      • Newbie Dan says

        October 4, 2016

        Thanks Oyvind, for the reply and assistance!

        Reply

  93. Blue says

    October 5, 2016

    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

    • admin says

      October 8, 2016

      There’s a circuit at the end of this article that shows how to turn the LED on when it’s dark.

      Reply

  94. neha says

    October 24, 2016

    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

    • admin says

      November 4, 2016

      Hi, see the last circuit in this article.

      Best,
      Oyvind

      Reply

  95. Neomar Infante says

    October 31, 2016

    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

    • admin says

      November 4, 2016

      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

  96. sankalp says

    October 31, 2016

    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

    • admin says

      November 4, 2016

      Are you sure you used a PNP transistor (not NPN) and placed the legs correctly?

      Best,
      Oyvind

      Reply

      • louie says

        November 8, 2016

        Can i ask what is the value of LDR used?

        Reply

        • admin says

          November 11, 2016

          I think it was one that is around 10k for light and 1M for dark.

          Best,
          Oyvind

          Reply

  97. Gourab says

    November 27, 2016

    Can u plz tell me where a buzzer if I want it to go off when the led is on? And also what value of variable resistor should I buy?

    Reply

    • admin says

      November 28, 2016

      Just replace the LED and resistor with the buzzer. No need for a resistor as long as the buzzer can handle 9V.

      Reply

      • Gourab says

        December 3, 2016

        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

        • admin says

          December 8, 2016

          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

  98. Aster says

    December 5, 2016

    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

    • admin says

      December 27, 2016

      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

  99. Victor says

    December 23, 2016

    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

    • admin says

      December 27, 2016

      Hi Victor,

      It works as a voltage divider with the LDR: https://www.build-electronic-circuits.com/voltage-divider

      Best,
      Oyvind

      Reply

  100. Arya says

    December 27, 2016

    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

    • admin says

      December 28, 2016

      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

  101. shivu says

    January 4, 2017

    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

    • admin says

      January 5, 2017

      Hi Shivu,
      Sorry but I don’t understand your question. Please rephrase.

      Best,
      Oyvind

      Reply

  102. shivu says

    January 6, 2017

    Sir day time high resistance but led is off and no current flow clctr to emmittet but in your video high resistance is dark how its sir

    Reply

    • admin says

      January 9, 2017

      Daytime is light. Light gives low resistance. Dark high resistance.

      Reply

  103. Raghav Maheshwari says

    January 8, 2017

    thanks buddy

    it was the exact content that i was in need of

    keep it up!!!

    Reply

    • admin says

      January 9, 2017

      Glad to hear!

      Reply

  104. RoksaS says

    January 22, 2017

    i want to use MOSFET instead of BJT… will it work?
    my source is 12v , 30+Aamps

    Reply

    • admin says

      January 24, 2017

      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

  105. Katastrophy says

    January 24, 2017

    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

    • admin says

      January 25, 2017

      I think it was 1M in dark.
      To use motor instead of LED, replace LED+resistor with motor. Make sure the transistor you use can handle the amount of current your motor needs.

      Best,
      Oyvind

      Reply

      • Katastrophy says

        January 25, 2017

        How do I also incorporate an LED which will shine on the LDR, so when I cover the LED, the motor would stop working? Also do I have to use a MOSFET in this case?

        Reply

        • admin says

          January 27, 2017

          You have to do something to make sure the light in the room doesn’t hit your LDR, only the LED.

          You can use MOSFET if you want yes, but it’s not a requirement.

          Reply

          • Katastrophy says

            January 29, 2017

            Thanks! Also, where do I place the LED in the circuit?


          • admin says

            January 30, 2017

            If you want it to be ON all the time you place it with a resistor between plus and minus of the battery. If you’re unsure about this, check this article: https://www.build-electronic-circuits.com/current-limiting-resistor/

            Best,
            Oyvind


          • Katastrophy says

            February 1, 2017

            If you don’t mind could you check out the link and tell me if you were referring to circuit type 1 or type 2 by going to the link given below:
            https://drive.google.com/file/d/0BxVjGxwGrKvXdkVDSXBIUzNXT3ZpR3ZidFBYa1lYTEpacVNn/view

            Really appreciate the help!


          • admin says

            February 1, 2017

            Hey Katastrophy,

            It’s type 2.

            Best,
            Oyvind


          • Katastrophy says

            February 2, 2017

            Last Question Oyvind…So lets say I want the motor to work while there is no light shining on the LDR and then to stop working when the light strikes the LDR, then should I just switch the positions of the LDR and 100k potentiometer?

            Thank you so much for the help! You have been of great help!


          • admin says

            February 5, 2017

            Great =)

            You’ll find how to do that under “Making The LED Turn ON When it’s Dark” in this article ;)

            Best,
            Oyvind


  106. Natski says

    February 4, 2017

    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

  107. naveen says

    February 6, 2017

    can i add both buzzer and led

    Reply

    • admin says

      February 10, 2017

      Yes

      Reply

  108. Patch says

    February 8, 2017

    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

    • admin says

      February 10, 2017

      LDRs often have a resistance of 1k to 10k or more in light. So, the current to the LED would be too small for it to light up.

      Best,
      Oyvind

      Reply

      • Patch says

        February 10, 2017

        Thanks, that makes sense

        Reply

  109. nora says

    February 19, 2017

    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

    • admin says

      February 20, 2017

      Sure! Everything is possible =) But exactly how to do it depends on your GSM module.

      Best,
      Oyvind

      Reply

  110. monisha s.m says

    March 8, 2017

    it really good project and i’m trying for more calliber circuits.. thank you

    Reply

  111. cherrylyn borgoños says

    March 11, 2017

    can i replace the LED withb a speaker

    Reply

    • admin says

      March 13, 2017

      Hi,
      There’s no sound signal to drive the speaker in this circuit.

      Oyvind

      Reply

      • Rohibullah says

        May 17, 2017

        hello sir
        what is the important of this project and what is the daily uses of this project

        Reply

  112. Molly says

    March 15, 2017

    Sir i m newbie. How to connect a preset resistor in the circuit

    Reply

  113. click here says

    March 19, 2017

    How can the circuit can run 110v power supply? thank

    Reply

  114. Clayton Benignus says

    May 5, 2017

    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

    • admin says

      May 22, 2017

      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

  115. John says

    May 10, 2017

    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

  116. Ahmed Adel says

    July 3, 2017

    HI..
    please How can I use LDR to sense Red Color?

    Reply

    • admin says

      July 6, 2017

      It cant’t… You need a color sensor.

      Reply

  117. Roshan Joyce says

    July 16, 2017

    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

    • MARELLA KATHRINA P. ZALAMEDA says

      July 26, 2017

      HI PLEASE ANSWERTHIS.
      HOW DID YOU COME UP WITH THE RESISTANCE VALUE YOU USED FOR THIS CIRCUIT?

      Reply

    • admin says

      August 7, 2017

      It depends on the LDR you are using. But test it and see =)

      Reply

  118. Panagiotis says

    August 12, 2017

    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

    • admin says

      August 16, 2017

      Hi,
      Yes, the transistor I used only takes about 100 mA. Here’s a list of some transistors and the current they handle: http://images2015.cnblogs.com/blog/268182/201509/268182-20150922115048194-602221881.png

      Reply

  119. sam says

    October 5, 2017

    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

  120. adithya says

    October 13, 2017

    heyyyyyy
    are u crackkkkkk

    Reply

  121. Rishabh says

    October 18, 2017

    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

  122. chris says

    October 30, 2017

    Hi,

    I would like to use an LED and a 10k pot to vary the resistance of the LDR. How might I do that?

    Thanks,
    Chris

    Reply

  123. Smithd893 says

    November 9, 2017

    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

  124. Midway says

    November 14, 2017

    Can I usw transistor 547

    Reply

    • admin says

      November 15, 2017

      Yes you can.

      Reply

  125. Lenah says

    November 27, 2017

    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

    • admin says

      November 29, 2017

      Hi, the first circuit works like that yes. The second one works in the opposite way.

      Best,
      Oyvind

      Reply

  126. Archisman says

    December 17, 2017

    Can you clarify me that arrow just bellow R2?.Otherwise it is very simple diagram.

    Reply

  127. Archisman says

    December 17, 2017

    Please tell me what that arrow means in the 2nd circuit diagram bellow the R2. Pls reply fast pls pls.

    Reply

    • admin says

      December 18, 2017

      It’s a potentiometer, not a standard resistor. The arrow is the middle pin/wiper.

      Reply

  128. Walter Kunz says

    December 18, 2017

    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

  129. Naveen says

    January 13, 2018

    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

  130. Marco says

    January 30, 2018

    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

    • admin says

      February 5, 2018

      Hi,
      Great! it seems like you have understood it correctly.

      Best,
      Oyvind

      Reply

  131. Kushagra Pani Tiwari says

    February 11, 2018

    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

  132. Aadil says

    February 13, 2018

    How to make ldr ckt. O/P is one when light is off? Please reply fast

    Reply

  133. Frank Patterson says

    February 27, 2018

    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

    • admin says

      February 27, 2018

      Hey Frank,
      Yes, that should work.

      Best,
      Oyvind

      Reply

  134. doctor squish says

    March 2, 2018

    Good day! Would you mind if I share your blog with my facebook group?
    There’s a lot of people that I think would really enjoy
    your content. Please let me know. Thanks

    Reply

    • admin says

      March 2, 2018

      Sure! Feel free to share it!

      Reply

  135. Stephen says

    March 15, 2018

    Can you explain why changing the position of LDR and resistor 2 reverses the function of LDR?

    Reply

  136. Talha says

    April 6, 2018

    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

  137. Roja Malagi says

    April 11, 2018

    Can we use more than one Led’s??

    Reply

    • admin says

      April 19, 2018

      Yes, but make sure you choose a resistor size that sets the correct current for the amount of LEDs you want to use.

      Reply

  138. Pavan says

    April 18, 2018

    What if we dont use a resistor??

    Reply

    • admin says

      April 19, 2018

      Then you’ll most likely break you LED.

      Reply

  139. Shinanki says

    April 29, 2018

    nice work bro. thanks alot.

    Reply

  140. Stanley says

    May 1, 2018

    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

  141. Kalana Praveen says

    June 12, 2018

    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

  142. Jon Paul says

    August 7, 2018

    I used a buzzer. It worked, but the transistor got very hot??

    Reply

    • admin says

      August 8, 2018

      Sounds like you are running too much current through the transistor. Try adding a resistor in series with the buzzer.

      Reply

  143. u bee says

    September 9, 2018

    what the r1 360 indicate

    Reply

  144. N.Gayathri says

    September 9, 2018

    I want some important questions for this matter

    Reply

  145. zaz says

    September 10, 2018

    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

    • admin says

      September 13, 2018

      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

  146. charles watts says

    October 21, 2018

    What is the resistance of your ldr ( they come in a variety of values)?

    Reply

    • admin says

      October 29, 2018

      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

  147. Dev says

    November 22, 2018

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

    Reply

    • admin says

      November 26, 2018

      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

  148. ACP says

    December 6, 2018

    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

  149. Chango says

    December 27, 2018

    What would be the effect if R1 is not used?

    Reply

    • admin says

      January 7, 2019

      Then you don’t control the current to the LED anymore and your LED will burn up pretty soon.

      Reply

  150. Colin Mitchell says

    April 7, 2019

    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

  151. Joe says

    April 20, 2019

    “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

  152. Mathias Paul says

    May 12, 2019

    Thank you so much. It worked for me.

    Reply

  153. Janu says

    April 4, 2020

    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

    • admin says

      April 6, 2020

      The LDR and R2 make up a voltage divider. The higher resistance the upper resistor has, the lower the output voltage:

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

      Reply

  154. james says

    July 17, 2020

    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

  155. Alex says

    October 21, 2020

    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

  156. Bhushan says

    December 4, 2020

    Why we use relay.. When there are 9 v bulb there… In place of resistor and led

    Reply

  157. al imran says

    January 9, 2021

    Thank you for the explanation. Very simple and you’ve made it easy understand.

    Reply

  158. carlos the jackal says

    January 11, 2021

    T here’s no thing as “Photons”. Light is RADIO your eyes are RADIO RECIEVERS like little satellite dishes!

    Reply

  159. Gerry McErlean says

    January 21, 2021

    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

  160. Adam says

    April 15, 2021

    Is it possible to make the LED flash on and off with light intensity

    Reply

    • admin says

      April 15, 2021

      Yes, but you need a more complex circuit.

      Reply

  161. Ibiteye Michael says

    April 24, 2021

    Hi pls am confused and the circuit……..my question is can i use pnp transistor for that circuit

    Reply

    • admin says

      April 26, 2021

      Yes, but the function will be opposite. Learn more here: https://www.build-electronic-circuits.com/pnp-transistor/

      Reply

  162. Md. Rabiul Islam says

    October 9, 2021

    It’s very interesting.

    Reply

Trackbacks

  1. LDR Circuit Diagram - Build Electronic Circuits... says:
    December 4, 2013 at 8:21 pm

    […] This simple LDR circuit diagram shows how you can use the light dependent resistor to make a light turn on when it gets dark.  […]

    Reply
  2. Electronics for the JavaScript Developer using Wi-Fi and Bluetooth LE - All Markup News says:
    May 7, 2015 at 10:28 am

    […] Here we will need a couple of jumper wires, one photocell and 1kΩ resistor. We will firstly wireup the Red wire to pin Vin and the horizontal lines +. And similarly, the Black wire to pin Gnd and the horizontal line -. Next we will connect the photocell (or LDR) to pin A0 on the Spark Core and the ground, horizontal line -. LDRs do not have any polarity, so we can connect either of the legs to Gnd. Finally, with the 1kΩ resistor, we will connect to pins A0 and Vin on the Spark Core. This circuit might remind you of your high school physics voltage divider circuit. […]

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Search:

Footer

Topics

  • Basic Electronics
  • Digital Electronics
  • Circuits
  • Practical Skills
  • Microcontrollers
  • Maker Lifestyle
  • Newsletter Archive

Social:

  • Facebook
  • Twitter
  • YouTube

Products

  • Electronics Course
  • Other Products

Copyright © 2022 · Ohmify AS · Terms and Conditions · Privacy Policy