Mini PIR Sensor

Mini PIR Sensor

Mini PIR Sensor

I bought some of these mini PIR sensors on aliexpress, for the occupancy detector part of my ongoing NoTLamp project. They can be found for just under 1 UKP each. I want the NotLamp to work efficiently as it will be powered all the time. I also want it to all work from a single simple power supply and have chosen 3v3 as the lowest common denominator. I am taking the decision to work at 3v3 more often than 5V these days as so much is produced with 3v3 in mind. A big annoyance is the amount of 3v3 boards etc that are made 5V compliant and then used with other micro-controllers (ESP8266) or Pi’s that are 3v3. Very wasteful of both parts, and electrons. This picture shows the mini PIR sensor on top of a business card and next to a 20p piece so you can get a feel for how mini it really is. These little units are very simple with nothing to adjust and no daylight sensing, they are aimed at whole raft of people sensing switches etc and are designed to work across a wide voltage range from 4.5V up to around 20V. They have the part number DYP-ME003SE-V1 but can also be found online as an HC-SR505. These look to be almost identical bar the addition of a single capacitor on the front. I could not find any schematic for them which was disappointing, all the links claiming to point to a schematic take you to a schematic for the HC-SR501 the bigger brother to this one which uses a larger BIS0001 PIR chip.

Mini PIR Detail

Mini PIR Detail

These pictures show both sides of the board close up and side by side. In the left one you can see a 3v3 linear regulator and polarity protection diode, Those and the PIR detector at the top of the board look to be the only parts that are common between the two types of PIR sensor mentioned above. The IC is half the size of the BIS0001. The output is a 3v3 logic signal. Looking at the left hand image there is an unpopulated footprint to mount an S8050 NPN transistor for switching a relay or level translating the signal. You will also need to remove R1, just next to it if you want to do this. The presence of the 7133 3v3 regulator though is promising for my application as it shows that the circuit itself actually does run at 3v3. Just for the hell of it I tried the PIR at 3v3 and 5v to see how it did. It preferred 5V and worked reliably but dropping the voltage to 3v3 (Actually the test Arduino was putting out 3.73V) gave some interesting results. The device powered up and seemed to work OK but after triggering the detector the first time it re-triggered itself cycling on and off for its pre-set delay period. I counted the delay and it was around 10 seconds give or take a bit. Probing the underside of the board I found that for 3.73V in the protection diode was dropping about 0.2V giving 3.55V and the low drop-out (LDO) 3v3 regulator appeared to be dropping nothing. This was not very promising as the board should run at 3v3, given the presence of the regulator. Time to warm up the hot air pencil and iron then perform some surgery.

Modified PIR

Modified PIR

I first removed the regulator, and consulting a data sheet for the pinout, shorted the Vin to Vout pads where the regulator used to be. You can see how I did this in the before and after shots in this picture. Powering it up from the same source I checked the voltages but found it was performing exactly the same cycling of off to on all the time. So the cycling problem was not the regulator struggling with the low voltage. The voltage on the board side of the protection diode now measured 3.55V so given that PIR detector draw crazily low currents it should be working. But wasn’t. Given it was not looking very promising but I could not figure out why I removed the protection diode and placed a short across those two pins. Completing the modifications in the pictures. Now It worked fine exactly as it had done at 5V but now at 3.7V. So these were the mods that were needed to make the units I have functional at 3v3. Given the strange results we had been getting I hooked up the board to my bench PSU and an accurate multimeter and set the voltage for a real 3v3 and also took the board down to 2.9V in both cases it worked fine. So the issue had not been the actual voltage level as such. I can only think that there is insufficient capacitance across the power rails on the board and at low voltages the turn on/off glitches were enough to re-trigger the detector. Odd, not seen this problem before, but there you go.

In summary a nice little unit, very cheap, hours of fun can be had with them in your projects, watch out for the self re-triggering and it will work comfortably down to 3v3 if you remove the regulator and diode, then short the correct pads to make a straight through path for the supply voltage.