AM312 mini PIR?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
TommySharp
Normal user
Posts: 19
Joined: 20 Oct 2017, 14:30

AM312 mini PIR?

#1 Post by TommySharp » 23 Oct 2017, 12:32

Anyone able to help me out getting one of these working with ESP Easy?

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

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: AM312 mini PIR?

#2 Post by grovkillen » 23 Oct 2017, 12:40

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.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: AM312 mini PIR?

#3 Post by Shardan » 23 Oct 2017, 14:45

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
Regards
Shardan

Domosapiens
Normal user
Posts: 307
Joined: 06 Nov 2016, 13:45

Re: AM312 mini PIR?

#4 Post by Domosapiens » 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
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 10227 times
20170729_220451_small.jpg
20170729_220451_small.jpg (374.32 KiB) Viewed 10227 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
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.

TommySharp
Normal user
Posts: 19
Joined: 20 Oct 2017, 14:30

Re: AM312 mini PIR?

#5 Post by TommySharp » 25 Oct 2017, 07:23

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?

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: AM312 mini PIR?

#6 Post by Shardan » 25 Oct 2017, 12:24

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.
Regards
Shardan

TommySharp
Normal user
Posts: 19
Joined: 20 Oct 2017, 14:30

Re: AM312 mini PIR?

#7 Post by TommySharp » 26 Oct 2017, 07:22

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 10151 times

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: AM312 mini PIR?

#8 Post by toffel969 » 26 Oct 2017, 08:12

Yes correct
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

TommySharp
Normal user
Posts: 19
Joined: 20 Oct 2017, 14:30

Re: AM312 mini PIR?

#9 Post by TommySharp » 26 Oct 2017, 10:20

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....

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: AM312 mini PIR?

#10 Post by grovkillen » 26 Oct 2017, 13:30

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!). :)
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: AM312 mini PIR?

#11 Post by papperone » 26 Oct 2017, 14:18

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.
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

bubastic
Normal user
Posts: 4
Joined: 12 Jan 2022, 18:47

Re: AM312 mini PIR?

#12 Post by bubastic » 22 Jan 2023, 20:15

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest