Grove – Mini PIR Motion Sensor Module Guide

Recently, I exhausted my stock of common passive infrared (PIR) motion sensor modules and was looking for a new one to play with. I searched the web for a small type with self-contained electronics. It was just before the COVID-19 era but the only right one I’ve seen in the woods is the Grove-mini PIR motion sensor (v1.0) module.

I cannot find a good hands-on review of the minuscule digital passive infrared motion sensor anywhere but Seeed Studio (and some resellers) have listed its key specs which look promising. Luckily, I got my Grove-mini PIR motion sensor modules from an Indian seller just after three days of the online purchase, and I decided to start a quick evaluation of the motion sensor module.

A quick introduction

According to Seeed studio, Grove-mini PIR motion sensor is a simple to use passive infrared motion sensor with Grove compatible interface, allows you to sense motion, usually human movement in its range. The sensor module will output HIGH on its REL pin when anyone moves in its field of vision.

Features

  • Low power consumption.
  • Digital signal processing (DSP)
  • Built-in filter, high immunity to RFI

Specifications

  • Working voltage (VCC): 5VDC
  • REL output (HIGH level): 3VDC
  • REL output (ON time): 5 sec appx
  • Sensitivity: 120-530 μV
  • Maximum detection range: 2m (25°C)

About its inside electronics

As mentioned, the self-contained module has a 3V low dropout (LDO) voltage regulator chip on board, which seems to be designed for 5V input (typical) and 6V (maximum). The plastic lens (Fresnel lens) at the top can easily be removed revealing the real PIR sensor. Through a quick web search I found that it’s the S16-L221D mini digital pyroelectric infrared sensor chip brought in by NANYANG SENBA OPTICAL AND ELECTRONIC CO., LTD (www.nysenba.com). It seems that all the complex signal processing is done within the intelligent digital sensor chip designed to run at 3VDC, and it has a very low power Schmitt REL output.

According to this datasheet, S16-L221D is a 6-pin digital intelligent PIR sensor. All signal processing is performed digitally.

The S16-L221D interfaces directly with up to two conventional PIR sensors via a high impedance different input. The PIR signal is converted to a 15-bit digital value on chip. The parameters for sensitivity and timing are set by connecting the corresponding inputs to DC voltages. The voltage levels on the inputs are converted to digital values ​​with 7-bit resolution. The S16-L221D is an SMD package, including the settings for time, sensitivity, and ambient light level.

Now to the complete schematic of the Grove-mini PIR motion sensor (v1.0) module published by Seeed Studio (a bit reformed by me):

As can see in the schematic, a potential divider (R2-R3) is used to set the ‘on’ time, and another potential divider (R1-R6) is wired to set the sensitivity. For dilated sensitivity adjustments, user can add a trimpot (and a capacitor) to the existing circuitry through the solder pads set aside (see below). Sadly, I cannot find further instructions anywhere, and on mine I don’t see any legends at all!

Moreover, the S16-L221D sensor lets you add a light dependent resistor (LDR). It is not very practical in this Grove-mini PIR motion sensor module, especially because of the ‘tight’ PCB artwork. The PCB itself is quite fragile as well. Further, I do not want to sacrifice a working sensor module this time, but I’ll try to provide some ideas on this later through a do it yourself project based on the same S16-L221D sensor/module.

My crude test jig and the quick test

So far, I’ve only powered it up, and with merely seems one amber LED attached to the output (REL) pin, but as a quick test it to work as promised by the maker.

Note that a series-resistor is not required for the test LED as there is an onboard 4.7KΩ resistor in the REL line. Below you can see the casual snaps from my test bench. Obviously, it’s a crude test jig, but a properly installed and aligned module should perform better.

As found in a Seeed Studio documentation, if you think the sensitivity is incorrect, try the module in the recommended orientation for more accuracy.

I have not tried this way yet. Occasionally the sensor orientation can influence its sensitivity. Maybe the small plastic optics is sub optimal. I will do more tests later if I can.

Further from the first impression

My Initial tests (using the regulated 5VDC power supply) found it works well enough for my needs. In my quick estimation, the Grove-mini PIR motion sensor module (v1.0) is a compact and cost effective passive infrared motion sensor module which is appropriate for certain relatively applications with less detection distance requirements. The module shows passably high immunity to interferences and is less susceptible to false triggering!

Note that 2 meter is the best detection distance that I recommend and 25℃ is the most suitable temperature. As pointed out earlier, the sensitivity is adjustable, there is a reserved location on the back of the PCB so that you can solder an SMD trimpot to adjust the sensitivity. Besides, it is noticed that dragging the Fresnel lens a little up will help enhance the sensitivity.

I had already made the decision to interface the module with a microcontroller, I think that is a good call. For my first attempt I hooked my module to a Digispark Attiny85 development board lying around, and I am quite happy with it. Down to business.

This is in fact a simple application example of sensing motion. When someone moves within the sensor’s field of vision, the onboard LED of Digispark board will turn on for a finite duration. You can modify this setup to drive external audio/visual annunciators/devices as desired. Following is the Arduino Sketch, tailored for Digispark Attiny85 Development board!

/*

 * Grove-mini PIR Motion Sensor Module (v1.0)

 * Quick Test Sketch / Digispark Attiny85 Dev. Board

 * Author: T.K.Hareendran / 2020

 * Publisher: www.electroschematics.com

 */


#define Grove_mPIR 0// REL output to P0 of Digispark

#define sysLED 1 // Use onboard LED wired to P1 as system status indicator


/* Use appropriate external circuitry to drive powerful audio/visual indicators through P1 */


void setup()

{

pinsInit();

}


void loop()

{

if(isMotiondetected())

turnOnsysLED();

else

turnOffsysLED();

}


void pinsInit()

{

pinMode(Grove_mPIR, INPUT);

pinMode(sysLED,OUTPUT);

}


void turnOnsysLED()

{

digitalWrite(sysLED,HIGH);

}

void turnOffsysLED()

{

digitalWrite(sysLED,LOW);

}


boolean isMotiondetected()

{

int sensorValue = digitalRead(Grove_mPIR);

if(sensorValue == HIGH)

{

return true;

}

else

{

return false;

}

}



This is the recommended hardware wiring diagram. Remember to power up the entire set up by a well-regulated 5VDC power supply source. The setup shown here is not protected from any accidental reverse voltage supply input and could be destroyed if that happens!

Here are test snaps from my workbench:

Following is the revised hardware setup diagram for 9V to 12V DC operation. This revision lets you power up your hardware through a standard 6F22 9V battery or the like. This is convenient to do some real-life testing!

Now it is your turn!

Now you have all the info you should need to play with the Grove-mini PIR motion sensor (v1.0) module. You might need more parts to complete your project(s), but you have a start!

This small sensor module is distinctive due to its shape and is about 20mm x 20mm. Depending on the hack you plan; You will get coverage distance anywhere from a few millimeters to a few meters. When it comes to frequent false triggering, my module is surprisingly stable.

When it comes to buying your modules, you might be able to find a local source, or you can order them straight from Seeed Studio. I prefer the second option, as you will usually get a better price going straight to the source, even when paying for international shipping. If you opted for the first option, do your best to ensure that your vendor sells genuine modules and not cheap knockoffs. A side note: I am not affiliated with companies/sellers making/selling boards and modules – just wanted to make it easy for you to find right parts.

I am going to do a bit more research on these modules, I think they show promise and will allow me to create better projects. Let me know what you think and thank you!

Postscript

Surprisingly, I found this sensor module last week. It seems like a near-replica of the Grove-mini PIR motion sensor. One original maker and a bunch of copycats? I am planning to buy a few later.

Leave a Comment