Adding a light sensor to a PIR module.

74 mil vistas28

    It turns out that most of the cheap PIR modules sold for use with Arduinos have the facility to add an LDR (Light Dependent Resistor) so they only activate at night. This is quite a useful feature to have, so here's how to add one to a typical module of this style.
    Note that the most common type of LDR is based on Cadmium Sulphide and as such the technically clueless eco-hippies are trying to get them banned under the RoFS (Reduction of Functional Substances) bandwagon. So buy 'em while you can.
    If you enjoy these videos you can help support the channel with a dollar for coffee, cookies and random gadgets for disassembly at:-
    www.bigclive.com/coffee.htm

    Publicado el Hace 3 años

    Comentarios

    1. Mark Maisy

      Hi could you tell me how I can increase the output from 3.3v to 3.8v? Any help appreciated

      1. bigclivedotcom

        @Mark Maisy The module won't put out enough current to light an LED directly. Is this video helpful? essels.info/video/video/nq--smKYtrbcuI0.html

      2. Mark Maisy

        ​@bigclivedotcom Thanks for reply I want to use a 3.7v input to trigger a 3.7v 10mm LED as the 3.2v is too dim and it seems to be the max output for this module. Is there an easy way to do this?

      3. bigclivedotcom

        Odd voltage, but there's a voltage regulator that could be changed. You could even change it to a 5V regulator if your supply voltage was higher than that.

    2. Mark

      nice find

    3. Michael Knowles

      Hi clive. I have a riddle for you. I have ordered a wt588d-u sound module to connect a to my 2p machine and was wanting to use pir modules to instead of switches. The schematic or the wt588d-u shows the trigger pins put out 5v to the ground rail inorder to activate them. How would I connect a pir with that has +5v Sig and gnd pins in a 2pin application

      1. Michael Knowles

        @bigclivedotcom thanks Clive your a legend.

      2. bigclivedotcom

        You could use an NPN transistor to shunt the inputs to ground. You'd need a 10K resistor from the sensor to the base of the transistor.

    4. kirigaya kazuto

      Sir what do you call to that connector in pir module? Thanks

    5. kamran shaikh

      Its very helpful...ill try it in my bathroom.... Bye bye coding

    6. Ajmal Maad

      It's really an amazing feature

    7. Ajmal Maad

      Does it really works with ldr?? Wow

    8. ANANTHA NARAYANA

      Could you please send me the circuit diagram to my mail roananth@gmail.com

    9. Rudransh Gupta

      Sir.,,,,, Thank you so much..... . . I am making my science project.... . . And I was finding the PIR sensors only for night... . . This helped me a lot. . . . Thank you so much sir!!!!!!!🙏🙏

    10. Daijoubu

      Anyone tried to use a solar panel instead somehow?

    11. squalazzo

      hi Clive :) i see on the net that there are 2 pads for a thermal resistor, too, on that module... what is that used for??? Thanks

      1. squalazzo

        thanks for the answer :) look here: ozcott.com/NomadTronics/wp-content/uploads/2015/03/PIR-SensorModule.jpg or here: i0.wp.com/dronebotworkshop.com/wp-content/uploads/2018/01/HC-SR501.jpg

      2. bigclivedotcom

        I'm not aware of a temperature sensing function.

    12. Ajay Gupta

      help me to make presence of human sensor

    13. Leonard Nunag

      Hi I am not an expert in electronics/electricals, I need help on my solar lamp post. During daytime, it automatically switches off. But comes night, it doesn't turn on automatically. It comes with a remote control that I can switch on manually. What could be the problem? Can I rig the remote control and add a photoresistor LDR and put something to press and hold the ON button? Where can I connect the LDR in the circuit of the remote control? What is the specs of the LDR? The remote is powered by just 3v 2x1.5AAA battery.

    14. Javier Soto

      Hi, I have a doubt. By placing the LDR, the two things work simultaneously? . I mean that if first the light sensor prevails and then the movement sensor. Can you make the light sensor prevail and if there is not enough lighting come into operation the movement?

    15. Muhammad Rehan

      I have a circuit in which I have motion sensor with 5V and 220V bulb, can I use this all with that circuit?

    16. mina magdy

      can i change the block time of it?? accually it is written that it can be changed in its datasheet..but i do not know how to

      1. WB IsMe

        Block time, Ti = 24 * R * C. You need to check your PIR sensor's schematic to change the R and C value. If your sensor's IC chip is BISS0001, the R and C that affects the Ti is connected to pin 3 of IC chip.

      2. mina magdy

        +bigclivedotcom thanks but i already know ... it is about which one to change

      3. bigclivedotcom

        The easiest timing component to change is the capacitor.

    17. Andy Chiu

      My PIR sensor with the LDR doesn't sense motion anymore and only light the LED when it is dark. I want the PIR sensor to detect motion to light LED when there's daylight and just light the LED when its dark. Does soldering in the LDR disable the motion sensing?

      1. bigclivedotcom

        +Andy Chiu Removing the LDR will make it look dark all the time.

    18. LipWoon

      Hi Clive, I'm a electronic noob. The project I have in mind is to build a 2x18650 PIR light that turns ON only during the night. Problem is there are external light pollution, so I gotta have a light-sensitivity adjustment function. [1st qns] You had talked abt adding a variable resistor in parallel to the 1M-ohm resistor to enable adjustment of the light sensitivity. I needed this function to adjust the light-ON triggering point. Searched ebay but seems like 10M-ohm variable resistors are rare and expensive. Are there any cheaper alternatives to add in this "light sensitivity adjustment" function? [2nd qns] for the LDR, is there any particular model to look for? I think not all LDR are the same rite? Thanks in advance!

    19. V.R. Rajendiran

      Thank you .Useful information.

    20. Huy Vu

      If i add a light sensor to a PIR module to control a lamp , but i want to know when dark, and have a motion, the lamp is on, Is the light of the lamp affect the LDR and turn off it??? Thanks

    21. SubZerogbh

      I have spent most of today watching your videos. There epic, especially this one. Never knew you could tweak the cheap PIR sensor form china. Thank you so much for this video. Would love to see a few more tweaking videos of cheap modules from china. :)

    22. Hoetel_Kuntz

      Hi Clive, wouldnt the LDR be a big current drain when using batteries?

      1. Okt ayO

        Hi, I asked me the same question. But looking at 1M with 3.3V and Ohms Law: 3.3V/1.000.000 Ohms=3µA=38 Years with 1000mA LiPo. with 100k approx 3-4years. The sensor (50µA) would suck the battery within 2 years empty without and operation. with 100k (33µA) + sensor's 50µA we are at 1,4 Years. or am I doing wrong calculation?

    23. Jonathan Smith

      I have this working but mine comes on too early, when it's still quite light outside, can I add a potentiometer and where would I add it?

      1. Jonathan Smith

        No, I can't get more light into it. Also, I need it to be more sensitive, not less don't I? Right now it's coming on too soon, I need for it to wait until it's darker before it comes on. Thanks!

      2. bigclivedotcom

        Is it possible to aim the sensor so it gets exposed to more light? Failing that you could bridge the resistor I mentioned in the video with a suitable resistor to make the unit less sensitive.

    24. Kevin Watson

      Hi Clive; Any idea if an LDR can be added to these pcb's? www.ebay.com/itm/321803269004?_trksid=p2057872.m2749.l2648&ssPageName=STRK%3AMEBIDX%3AIT

      1. Kevin Watson

        The time delay can be altered and an ldr can be added.

    25. Kevin Watson

      Thank you Clive. I had no idea that some of these PIR sensors would accept an LDR.

    26. Nicholas Aarons

      Fantastic Video Clive. Very Cool. Keep up the great work. Nick.

    27. theLuigiFan0007

      I'v never heard a one of those light sensors called a LDR before. That's odd. They'v always been called a Cadmium Disulfide Photocells/Photoresistors when I'v seen them.

      1. Juan Rial

        Light dependent resistors, apparently. But yeah, we call 'em photocells as well. Or simply "light sensors", as in the title.

    28. Aaron Dobson

      what do the 2 pots do?

      1. Aaron Dobson

        Thanks Big C, you're a legend!!

      2. bigclivedotcom

        Sensitivity and output timer.

    29. nyetloki

      the same can be done to the smaller ones, but they may need a trace cut.

    30. Aaron DC mediA

      I have been contemplating a project that needs this exact function, so your video is perfectly timed. Thanks!

    31. Ivo Noorhoff

      What value LDR did you use ?

      1. Anton Neufeld

        The LDR was R_3 in the schematic. 5V/0. 2V = (R_2 + R_3) / R_3 R_3 = R_2/[(5V/0.2V) - 1] = 41.6kΩ In daylight, we want to pull pin9 below 0.2V. When light shines upon the LDR, its resistance diminishes. Less voltage drops across it and we fall below the 0.2V treashold. Thus, if you want to have your PIR trigger in more than complete darkness, you might want to choose a bigger value than calculated, so that more voltage drops across it even though there is still some light there. That is what I think about the value of the resistor.

    32. Jeff Flowers

      Do the light sensors trigger on IR light? I have plans to use the PIR module with a Raspberry Pi and an IR camera with built-in IR LED lights to detect motion, take a photo and then email the photo.

      1. bigclivedotcom

        No. They detect longwave IR from body heat.

    33. Stein-Ove Bratthammer

      hey.. rather cover the ldr with electric black tape... if you have a project that requier it to run at day light?

    34. Taylor Horton

      Clive, could you make a video about inductors?

    35. Gaf

      I just realised I watch these videos not just for the accent, but the amazing dexterity in holding the board and solder with one hand.

    36. Alltop Notch

      I have found using a 100k resistor in parallel with the 1m resistor turns the lights on around the same time as my solar lights come on

    37. l wilton

      I might be inclined to put a wee bit of electrical tape over the light sensor rather than gutting it out. Of course that might not work, but it would be a cheap try.

      1. theLuigiFan0007

        I say cut the trace and solder a SMD dip switch over the gap. Much more efficient an looks like it was designed that way.

    38. Gorkem Yildirim

      Mine has LDR (RL) and also thermistor (RT) holes.

      1. bigclivedotcom

        The RT pads appear to be in parallel with a 10K resistor that couples the first gain stage from the sensor to the second. I guess it just varies sensitivity so that it compensates for ambient temperature.

    39. TheJohn8765

      Clive, totally tangential question, but: how long did it take you to grow that goatee portion of your beard? I'm growing facial fungus much the same, but mine is only about 3" thus far. BTW, did you experience the same polarizing responses? I'm getting a laugh from the gender-bias: many men love my look and many women absolutely hate it :) Lol!

      1. TheJohn8765

        @bigclivedotcom Yup. It's nice to get laid every now and again (I go a few years between, personally, but routinely intimate relationships are irritating and intrusive.

      2. bigclivedotcom

        Single for life. Makes things so much simpler.

      3. TheJohn8765

        @bigclivedotcom Good answer ;) I plan to keep growing mine; A couple of my customers have remarked on "it", I'm a "confirmed bachelor", so I don't much care if women find it attractive or not. I suspect you might be the same :)

      4. bigclivedotcom

        Women hate beards because they can't grow them. If they could they would be a fashion statement. I couldn't say how fast my beard grows as it just happens progressively over time and gets trimmed now and then.

    40. Ether Oar

      I was a bio-medical electronics tech for nearly fourty years, and Big Clive is teaching me more of my trade than I ever knew before. Well done Clive.

    41. Aaron Sluis

      is it possible to make these re-trigger? Edit: apparently it's quite easy: there will be three pins (not the power and signal pins) with a jumper on two of them. Just move the jumper to the other pair.

      1. bigclivedotcom

        There seem to be two versions, one with the link and one with the pads and a track acting as a link. If it's a link then try it in the other position to allow the unit to retrigger continually. If it's the pads then it should already be linked to retrigger I think.

    42. coolafman

      Halloween is coming. So an in darkness, motion sensing light string should be accompanied by some sort of medium-high pitched recording of the Wilhelm Scream...and perhaps actuated skeleton arms..

    43. mmmlinux

      Does the PIR sensor turn off when its day time, or is it still using the same amount of power?

      1. bigclivedotcom

        It's quiescent current is very low. About 50uA in either day or night standby mode.

    44. Kate

      or put on a small pot so you can tweak the light sensitivity.

    45. Mark L

      I have to admit, this was *far* easier than I expected when I read the title of the video. I saw the title and thought it was going to be too complicated to be worth the effort, but as it turns out, it is quite simple. Thanks!

    46. Steve Page

      Frootery!

      1. Steve Page

        bigclivedotcom Ahhh!

      2. bigclivedotcom

        Footery.

    47. James Pourroy

      Hey Clive what is that 3 pin connector called that you used? I was trying to find those for use in a computer fan project I was working on and I couldn't find the right phases to search on eBay.

      1. Ethan Poole

        Electro_Leet Specifically lookup the Molex KK series with 0.100"/2.54mm spacing. The contacts are available in 3 different finishes depending upon your application, zinc, phosphor bronze, and gold (with zinc being cheapest). They are wonderful general purpose connectors for projects for everything from signal lines to several amps as power connectors.

      2. James Pourroy

        Thank you!

      3. bigclivedotcom

        It's a standard connector based on a Molex style. You have to buy the housing and contacts separately. www.rapidonline.com/jyk-h2500-03-3-pole-crimp-housing-22-0910

    48. ThePaulius

      POT!

    49. jkmacgyver

      Love the RoFS acro! :P

    50. Ray Kent

      Can you tweek the the dwell time? Many ready-mades are almost exactly what I want except they turn off after 30 sec, where I'd like 2 mins. Is there a simple way of modding them? Ta!

      1. Ray Kent

        @bigclivedotcom thanks a lot!

      2. bigclivedotcom

        There are two pots on this type. One for delay and one for sensitivity.

    51. Siskin's Bits and Bobs

      I have a couple of those modules. I just need to hunt down what I did with the bag of LDRs that I have. I need to organise all my stuff.

    52. zx8401ztv

      Or stick a 1M pot with 100k in place of R2 :-)

      1. TRX VLOGGER

        @therealnightwriter True...

      2. TRX VLOGGER

        i farted once

    53. Graham R Dyer

      I didn't know those things where made for Arduino, I just use them for what they where made for sensing people or cats in my case.

      1. Dave P

        the're just easier to find when you add arduino to your eBay search.

    54. Doug Reed

      Another way to temporarily disable the LDR would be to cover it with something opaque (say, duct tape).

      1. Juan Rial

        Exactly. Why snip it off when you can just cover it?

    55. johneh87

      Mr Bigc, totally unrelated, but i have a question, since you seem to have a great knowledge of electronics.. i ordered a " Rotating LED Kit POV Soldering Training Kit" from banggood, and soldered it together, it works. its basically a strip of leds that are rotating and pulsing and making and image, based on the persistence of human vision. however, i noticed that the design have one resistor inline of each LED which is then connected to ground by the IC, why are they simply not sharing one resistor, but instead have one 560ohm resistor for each LED?

      1. johneh87

        Thanks, that makes more sense in the morning. :)

      2. bigclivedotcom

        If more than one LED was on at a time the current through the resistor would be shared and the LEDs would be dim.

    56. twocvbloke

      Neat little mod, could be useful in a home-made a bathroom light for those night time visits to the throne... :P

    57. michael shampine

      Kool information to know!

    58. Fred Zlotnick

      It seems to me all you would need is an LDR, a resistor and a small MOSFET to turn on and off the lights. Connect to light string anode to +12 through an appropriate resistor, to the drain of a TO92 enhancement mode MOSFET, a large resistor to GND from to the source and the source to GND, the gate of the FET to +12 V through a large resistor. when the LDR "sees" light it it is low R, and shunts the voltage on the gate to GND, shutting off the FET, and when ther is low light, the LDR is high R, and the gate turns on, with the LEDs turning on. A FET like this sells for 25 for $2

      1. Fred Zlotnick

        and cost, 2 resistors and a MOSFET would cost about $.25 or less.

      2. ELECTRONTHORP

        If low idle current was critical then this might be a better option.

    59. Shadow BannedbyGoogle

      Awesome video. Thanks. There is so many half thought out items coming out of china that could be so much more useful or actually work by adding a few components.

      1. Jonathan Smith

        How is this a half thought out item? It works very well and is quite cheap. Plus it has provisions in the way of solder pads to expand the functionality. Too many people are too quick to bash things made in China as being inferior. We make some crappy stuff here in the US too.

    60. diceyface

      How do you solder anything with that novelty size iron?

      1. bigclivedotcom

        Effortlessly.