ModMyPi PIR Infrared Motion Sensor (HC-SR501) (CE05786)

This is a placeholder topic for “ModMyPi PIR Infrared Motion Sensor (HC-SR501)” comments.

PIR sensors often referred to as, “Passive Infrared” or “IR motion” sensors, enable you to sense motion

Read more

3.3v Operation. I guess you remove the yellow jumper between the 2 top header pins and connect to the 3.3V to 3rd pin. Or can you just swap the jumper to be between the middle and bottom pin then connect 3.3v to the normal VCC pin. Or both

[Edit] I based this idea on this hack.

Further research shows the header is also used for repeat triggering or not.

Trying to Implement LDR for daylight sensing - bought ldr from Core ( SEN-09088 ) - soldered into standard ldr pin - just behind 3 way connector - I see pir already has 105 resistor installed - does not seem to work - is additional resistor required ? Tested by covering ldr and dancing in front of normally working pir . . .

Anyone got an LDR working on this pir module ?

Trying to implement as per this appnote :

Trace board has half of voltage divider - 105 resistor (1M Ohm) - however all of my research has indicated that LDR with dark value of 10M used successfully - I thought to add a parallel resistor to the 1 M to drop resistance of voltage divider to suit 10k dark resistance of LDR.

Tried with 47K in parallel with 1M - net resistance of 45K - in voltage divider with 10k of LDR dark - should give 0.66V trigger signal on Biss0001 pin 9 . . . no luck - doesn’t seem to work . . .

Hey Hylton,

I’d imagine that there’d be a way to operate the PIR module so that it has the added capability of an LDR to sense daylight. Another option could be to use a circuit in series which would cut the power or data capability of the PIR module to be able to only activate it during daytime or nighttime as you configure. Hopefully someone from the team or community with more experience with this PIR device could assist you further. All the best with it!

Core Electronics | Support

I have the same PIR but have not used it with the LDR option. It has been working perfectly the last 2 years. Reading this post I decided to try the LDR option. I had the same LDR SEN-09088 in my parts bin. Soldered a header to the two LDR pads. Used jumper wire to connect the LDR. and it works.

When the workshop light is on the PIR does not trigger. When the light is off the PIR triggers.

Voltage on pin 9 without the LDR is 2.4V. With the LDR, 0.66V when workshop light off, 0.01 volts when workshop light is on. Datasheet says greater than 0.2V the PIR will trigger, less than 0.2V it will not. This seems to be what is happening. Voltage tolerances are quite low.

So the feature does work, at least on my device.

(Core Electronics Customer)


Hi everybody
i would like to implement PIR with LDR to work at night
Could you please share a purchase link for LDR and a link for PIR (amazon link for example)
to be sure that will work


Hey Ben,

When you say a PIR and LDR I assume that you mean a Passive Infrared Sensor and a Light Dependent Resistor? It’s worth noting that a PIR can actually work better in a dark environment over a short distance (such as at night) and is often used to turn on security lights or similar based on the ambient infrared light. Where as an LDR purely provides a resistance across it’s two pins proportionally to the ambient light and doesn’t necessary act as a sensor directly as there’s no logic built in.


thanks for your reply
when i say PIR i am speaking about that :
PIR Infrared Motion Sensor (HC-SR501) Australia (

When i speak about LDR , i speak about that:
Photorésistance,Xiuyer 100 Pièces 5mm Résistance Dépendant de la Lumière GL5516 GL5528 Capteur de Luminosité LDR: Commerce, Industrie & Science

i was trying to use the HC-SR501 RL pins to plug a LDR , and thus be able to light on when someone is behind the pir and when it is dark


1 Like

Hey Benoit,

As you know we do have the PIR and some LDR’s (this one’s resistance is 1M at fully dark
, so may not work as James measured the voltage at the pin to be 0.2V).

Getting your hands on the photoresistor from Amazon shouldn’t be too difficult, not too sure about tracking down an HC-SR501 with the same layout though, most seemed generic and might not have the best QC.

PS: this guide here was really useful in understanding how it works. PIR sensors: HC-SR501


1 Like

Hey Benoit,

Ah I see, have you tried soldering an LDR across the appropriate pads on the board so far and mounting it to the appropriate position to detect when someone is in the beam? LDR are not already included on the PIR sensors supplied at Core Electronics, although the CE05786 that we supply I linked to earlier should have two pads you can solder the LDR onto in order to only enable the PIR sensor in the dark.

1 Like

Hi thanks for your reply
i already have that kind of HC-SR501 it seem to be the same as your CE05786.

If I am right you seem to be saying that I need a special Photoresistor with a very small light sensor to be compliant with my HC-SR501 and thus detect someone only in the dark ?


1 Like

Hey Benoit,

Yeah, It looks like I forgot to link the guide in my last post. The guide and datasheet for the chip(Hylton also linked it above) used on the sensors.

We’re after this particular part of the circuit to allow for the PIR to be turned on and off

Image from LadyAda’s datasheet

Yeah, an LDR (also known as a photoresistor) will have to bring the voltage down to less than 0.2V on the pin. The small part of the circuit acts as a voltage divider, so when you are selecting the ‘dark’ resistance of the LDR you will have to consider the component R2 (another resistor). Sparkfun have an excellent guide here: Voltage Dividers -


1 Like

Additional the my previous post.
About 6 months after the post the device failed, it kept turning on immediately it turned off.
I could not find what was causing this and replaced it with this device which is simpler and in my opinion works better. Connecting it to a mico would allow many more options. I found the HC-SR501 hard to adjust accurately using the pots on the board. The Adafruit one may be better than the cheap one; $22.45 compared to $3.95. In my opinion Adafruit produces are priced too high but are high quality and they work really well.