Page 1 of 1

AM312 mini PIR?

Posted: 23 Oct 2017, 12:32
by TommySharp
Anyone able to help me out getting one of these working with ESP Easy?

https://www.aliexpress.com/item/Mini-IR ... 688bb8ffcf

Re: AM312 mini PIR?

Posted: 23 Oct 2017, 12:40
by grovkillen
I have used one of those, lots of false alarm. But you might get someone else to help since it should be possible to fix some of those false triggers.

Re: AM312 mini PIR?

Posted: 23 Oct 2017, 14:45
by Shardan
Same here. I've tested those sensors.

They work, simply as a switch. So just connect the output to a free GPIO and configure it to a pushbutton switch.
See https://www.letscontrolit.com/wiki/index.php/Switch
As Grovkillen said these modules a lot of false positives. Sensivity is not changeable so just some filtering of powersupply might help.
See https://www.letscontrolit.com/wiki/inde ... _positives.

Regards
Shardan

Re: AM312 mini PIR?

Posted: 23 Oct 2017, 19:45
by Domosapiens
This PIR seems a simplified module of the HC-SR505 PIR sensor.

I use this one:
https://nl.aliexpress.com/item/HC-SR505 ... 22745.html
The HC-SR505 PIR sensor is sensitive to the 2.4Ghz WiFi.

To solve the false positives problem, I have added a 47pF cap over the input voltage.
With a shielding of isolation plus ALU tape connected to earth
20170729_220511_small.jpg
20170729_220511_small.jpg (311.85 KiB) Viewed 13747 times
20170729_220451_small.jpg
20170729_220451_small.jpg (374.32 KiB) Viewed 13747 times
In this box, 230V conversion is on the left, ESP on the right.
So WiFi antenna and HC-SR505 PIR are very close to each other.
Thanks to the shielding, no false positives.
Image

Re: AM312 mini PIR?

Posted: 25 Oct 2017, 07:23
by TommySharp
So any advice on how to set it up in ESP Easy?

I've connected it to GPIO 15 and set it up as a switch on the Devices tab.
I must have done something wrong because it's not working.....
Can I see the state getting updated in the web interface or do I need to check the MQTT traffic?

Re: AM312 mini PIR?

Posted: 25 Oct 2017, 12:24
by Shardan
For first testing i'd prefer to use GPIO-12/13/14.

GPIO-0/2/9/10/15/16 have additional functions. The connected sensor might lead to unpredicted results like not booting or crashing.

You can see the actual state in the "Devices" page.
Please remember this site is static and needs reloading (F5) to show changes.

Re: AM312 mini PIR?

Posted: 26 Oct 2017, 07:22
by TommySharp
Okay so taking this back to complete basics.... I've used a jumper cable and am just connecting D7 (GPIO13) to GND and I'd assume the following setup should allow me make the state change from 0 to 1?
2017-10-26_182030.png
2017-10-26_182030.png (20.69 KiB) Viewed 13671 times

Re: AM312 mini PIR?

Posted: 26 Oct 2017, 08:12
by toffel969
Yes correct

Re: AM312 mini PIR?

Posted: 26 Oct 2017, 10:20
by TommySharp
Okay, cool well I'm not seeing any sort of change when I complete the GPIO13 and GND connection so I must have something else not quite right....

Re: AM312 mini PIR?

Posted: 26 Oct 2017, 13:30
by grovkillen
Yes I got the same experience. Some tinkering gave me a trigger signal but gave me tons of false triggers = I simply tossed that device into my trash bin (to be sorted as electronic waste, just to be clear!). :)

Re: AM312 mini PIR?

Posted: 26 Oct 2017, 14:18
by papperone
Maybe I misunderstood but:
  • If you short GPIO to GND the PIN state I can guess will always be LOW (zero).
  • To have a real pull-down you should have a resistor (I normally use 10k) between GND and the GPIO.

Re: AM312 mini PIR?

Posted: 22 Jan 2023, 20:15
by bubastic
Domosapiens wrote: 23 Oct 2017, 19:45 This PIR seems a simplified module of the HC-SR505 PIR sensor.

I use this one:
https://nl.aliexpress.com/item/HC-SR505 ... 22745.html
this module has DC4.5-20V supply voltage ?
If so, then it's inconvenient.

Re: AM312 mini PIR?

Posted: 07 Mar 2023, 00:39
by bubastic
I spent a lot of time, I tried 3 AM312 modules, but they didn't work.
But as soon as I connected the SR602 and lo and behold, everything works.

Re: AM312 mini PIR?

Posted: 09 Mar 2023, 16:43
by bidrohini
bubastic wrote: 07 Mar 2023, 00:39 I spent a lot of time, I tried 3 AM312 modules, but they didn't work.
But as soon as I connected the SR602 and lo and behold, everything works.
I think espeasy supports the SR series only. https://espeasy.readthedocs.io/en/lates ... ensor.html

Re: AM312 mini PIR?

Posted: 09 Mar 2023, 17:10
by Ath
bidrohini wrote: 09 Mar 2023, 16:43
bubastic wrote: 07 Mar 2023, 00:39 I spent a lot of time, I tried 3 AM312 modules, but they didn't work.
But as soon as I connected the SR602 and lo and behold, everything works.
I think espeasy supports the SR series only. https://espeasy.readthedocs.io/en/lates ... ensor.html
ESPEasy supports any PIR sensor that provides a high or low output signal when movement is detected, as it is picked up by the Switch plugin that can detect both low- or high-active state.

For PIR sensors outputting an analog signal (probably related to the detection-distance) the Analog input plugin, probably using a voltage divider on the input pin, can be used. That might need some rules to trigger at the desired level.