🛠️ Dive into our collection of DIY Kits, 🔊 Audio Amplifiers, Digital Scoreboards, FM transmitters, and more!
🎶 Explore endless possibilities at our new store.


Dark/Light sensor using transistor

Dark light sensor
Automatic dark detector senses darkness. As the light level decreases and LDR meets the maximum threshold resistance, the circuit automatically switches on the LED D1. 

Dark light sensor

Dark sensor with variable resistor:
Dark light sensor

A dark detector can be made using a variable resistor. The sensitivity of the circuit can be adjusted with a variable resistor.

High resistance-> more darkness to switch on the LED.

Low resistance-> less darkness to switch on the LED.

Automatic Light detector using variable resistor

A light detector senses light. As the light level increases and LDR meets the lowest threshold resistance, the circuit automatically turns on the LED D1. We can adjust the sensitivity using the preset VR1-10K.

LESS RESISTANCE(VR1)-> LESS DARKNESS TO SWITCH OFF THE LED

HIGH RESISTANCE(VR1)-> MORE DARKNESS TO SWITCH OFF THE LED
Dark light sensor

Just swap the resistor and LDR to convert a dark sensor to a light sensor

Dark light sensor

Dark light sensor


🛠️ Dive into our collection of DIY Kits, 🔊 Audio Amplifiers, Digital Scoreboards, FM transmitters, and more!
🎶 Explore endless possibilities at our new store.


98 thoughts on “Dark/Light sensor using transistor

    1. Hi i have a 4 kw solar pv system and i am looking to buy/build a dark/light sensor switch to use as a switch, in line, into the domestic supply to turn on and off an electric oil filled radiator rated 1 or 2 kw, when the solar panels are generating enough power to run the heater. So I don’t have use energy from the grid..
      Can anyone help?

  1. Today, I want to make automatic switch, to turn on my car head lamp based on this dark sensor. Is this your scheme can be recommended for that?
    Actually, I’ve done this experiment from your scheme. With a relay (instead of LED), I hope my plan worked.
    Apparently, I have problems; at the time of the light intensity changes gradually (in the afternoon), or at the time of the transistor base current for the process began to get saturation, relay shaking, of course, my bulb flashes great, even broken.
    Do you have any suggestions to solve this problem?

    Thanks & Regards,
    amdani

  2. Thank you very much for your quick response.

    I will soon try the circuit.
    If I use a 12 volt battery, what components need to be changed?

    Thanks & Regards,
    amdani

  3. I want to make a dark sensor that turns on 1 led when it is dark, another when the light is ambient, and one final led when it is bright. I havent been able to find any circuit based on this description on the internet and I wanted to know if I could get some pointers.

    If it isnt possible, im okay with that! I just want to know if it is possible in one setup or if I need to make 3 sensors operate 3 individual LEDs, and if I can; could I be led to a link of the circuit? Im aming for something small and something I can enjoy making for myself.

  4. i want to make a lamp for my aquarium with dark sensor. i want to use 6 white leds 5mm..can u pls post a diagram for me to follow. thanks

  5. can you show me a digrame of how i can make a automatic dark detector 12v dc using a led tail light thank you and god bless

  6. Sir…can i make a color sensor composed of red, green, blue, yellow, and orange.

    Can i use these LDR’s to make a color sensor like these?

    And can u help me make a schematic diagram on these.

    Thankz You…

  7. Hi, I want to build a circuit that will turn a small motor in one direction when light is present and then reverse the motor when the light is out.

    This circuit will be used to open a door in the morning when the sun comes up. After the door is completely open, it will trigger a limit switch to stop the motor. When darkness falls, the motor will need to run in reverse to close the door. When the door is closed, it will also need to trigger a limit switch to stop the motor.

    Is this possible? Thank you!

  8. Thanks man! It is surely the most simple and the best explanation for a dark/light sensor! I want to light up more than one, say 3 LEDs in this way. Any changes to be done? Thanks in advance buddy!! 🙂

    1. If you are keeping 3 LEDs in Parallel, then, use another transistor, for example, BD139. and if you are keeping LEDs in series, you don’t need to make change. I recommend for series.

  9. Hi my brother, i am very impressed with your site. Can you help me with how to use ldr with atleast 40 leds for security lights

    1. You need to use a dedicated “LED driver” and a microcontroller for controlling at least 40 LEDs or, you need to have a power transistor that can take up to 2 Amp.

      1. hye mr admin..can u help me how to make dark sensor using relay..the relay must Normally Open when connected with 5WATT Solar Panel (Max. Voltage: 17V, Short Circuit Current: 0.34Ampere.)..Tq..What type of relay i need to use for this low power solar panel for switch the relay..

  10. I am using the same configuration but using lm741 as comparator. The output of that will light an LED strip. I want to usr RC circuit to fade in and out that. What type of transistor do I need? Can you draw a schem. Thanks

  11. hi sir, i need a theoretical proof for the values of the resistors used in this two circuits. this is quite a useful start for the beginners! nice job sir! help me out as soon as you can!

  12. I want to know what is the resistance of a LDR in the dark and the risistance in the light..can any one tell me???????????

  13. dear sir i currently saw your video on light sensor on youtube , i need to make this for my project so kindly can u give me the materials required to make it as i am unable to figure out the materials in video
    Thanks!

      1. thnx for d link sir!!!
        i made d ckt using LM358 n it’s functioning properly…but sir, dere’s 1 thng i wanna tell u that
        even a 5th grade boy wud do d connectns if v gave him some basic tips n ckt diagram, but
        being a future engg 1 shud know y is this happening….dis thot haunts me a lot…
        thr4 1 request u if u can tell me d working of dis ckt…..i tried to figure out bt got
        confused in no. of points…. i wud b very thnkful to u sir….
        PLS help me out…

        1. You need to learn about operational amplifier. You can start with LM741 operational amplifier(op amp). Try to understand the description of this project: http://www.buildcircuit.com/dark-sensor-using-741-2/

          If you understand this you can also understand the working LM358 because it is also a type of op amp. The simple circuits have been published on buildcircuit for electronic starters. If you are studying in school, just focus on learning about components. There are several things you need to learn, so wait till you join engineering.

      2. sir i want to generate emf of south and north pole in coil using operational amplifier lm393
        and also want to generate emf in a coil circuit of 2 volt

  14. Nice post. I was checking continuously this blog
    and I’m impressed! Extremely useful information particularly the last part 🙂 I care for such info a lot. I was seeking this certain info for a long time. Thank you and best of luck.

  15. Sir, i am a beginner in electronics and i am going to make this but i wanted to light up more LEDs instead of just one…so should i use a resistor of lower resistance and if yes then where should i place it or should i use a trim pot or potentiometer?? please help

    1. Nevermind sir i saw the comments and figured it out but please help on this thing that if i connect my LEDs in series will not their brightness decrease and if yes then please recommend a solution..

  16. need some pointer here. I’m building an automatic light system which need to be shutoff during night time. i believe i have some idea on that part using simple connection through a relay. however i’ve to depend a car battery. so my question is how do i size up the circuit so it can take up higher amp and volts. thanks in advance.

  17. Hey, can I use SL100 instead of BC547?

    Also, I saw a couple of links that showed making the same thing using two transistors? One transistor will do right?

    1. You can use any voltage that doesent burn out your LED. Remember V=IR so you may want to increase your resistance.
      The Differant resisters adjust the sensativity of the phototransistor so if you change those values it may always stay on, or need very bright light.
      It would also be smart to incorperate hysterisis so you dont get flickering when the current is “just” right.

  18. i have made a automatic light sensor .if i use greater or less than 6V battery will it work? why different resistors are used?

    1. add a relay to the output with a protection diode in front of the relay or search for connecting a relay on google and you will understand better.

  19. sir this video is very helpful bt pls sir i wnt the working of dark sensor today only as soon as possible … as tomorw is my practical nd i hve made this circuit nd it is now working bt i dont know how it is working…. thank you sir

  20. Which transistor to put if i want to run a DC motor instead of a LED.?? reply fast pls… imp
    ……

  21. sir..
    i follow your circuit in the video,but it doesn’t work..
    i also do the automatic dark detector circuit on the breadboard but replace the transistor with 2N3904/BC547..
    But,it work reversely..the led turns off when dark..
    can u help me how to do it properly?

    1. Maybe the terminals at the end of the breadboard are not connected..
      We try it also and it doesn’t work. But after we troubleshoot it, we saw the ends are not connected.

  22. Hi, I would like to ask why transistor is needed for lighting up the LED? Since LDR has almost similar characteristics as a variable resistor, through voltage divider rules, LED still turned on, right? Hope to receive your feedback. Thanks.

  23. Dear sir,
    How many bulbs or lamps can the above dark light detector control?Can it be modified to handle strong lamps?If yes help me with materials used thanks

  24. Hi i wanna circuit to glow 100w bulb in dark sensor with the help of AC voltage. i want to use transistor instead relay.

  25. Hi…. In this dark sensor circuit .. i want to illuminate the led using AC supply and not the dc voltage…. Can anyone help me out with this

  26. I want to run a 9v motor instead of a LED in the Dark Sensor. can you please send me the materials wanted?
    pleeeeeeeeeeeeease!!!!!

  27. First of all I wanna thank you. This circuit is really working fine. But, instead of led, i wanna replace that with 5v DC motor. I replaced BC547 with 2n3055. But it is not providing sufficient current to drive motor. Should I use SL100 ? Could you please help me out with this ?

    Thank You,

    1. You could use the darligton pair transistor BC517 to fire 2N3055 which would in turn drive the load.
      That should work fine for your motor.

  28. Pingback: Quora
  29. I want to make an dark detecting sensor. I want to make some changes like in place of led I want a buzzer. How to choose a good buzzer??? It’s for my school project to make security system

  30. RE: Solar Panel Controller ‘Shut Off/Turn On’ Photosensor

    SITUATION: Solar Panel Controller doesn’t function properly after the Sun comes up.

    BACKGROUND: At a remote mountain location, I have a solar panel array to provide electrical power. It works well. However several lines of PWM controller units all have the same problem. When the Sun comes up the next morning, the controllers ‘misbehave’. Instead of reading 14V going into the battery array, they read 24V and the batteries don’t charge. They drain. When I disconnect the controller from the panels and reconnect it, then it works just fine.

    The panel array provides 100W at 12V.

    SOLUTION: Get a photocell switch that disconnects the controller from the panels after Sunset and reconnects after Sunrise.

    PROBLEM: There is no such beastie on the market. They are all DUSK-TO-DAWN. No such critter as a DAWN-TO-DUSK.

    CONCLUSION: I have to DIY.

    This site’s article provides me with the basic information I need. But not being a Double-E major [I’m Microbio] I’m having to educate myself.

    QUESTIONS: For this situation:

    [1] What resistor is necessary for R1 470R?
    [2] What resistor is necessary for the VR1 10K?
    [3] What transistor is necessary to Q1 BC 547?

Leave a Reply

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