Page 1 of 2

PIR sensor + eps8266

Posted: Tuesday 15 November 2016 21:29
by borgkitty
I am having a hell of a time trying to calibrate these pir sensors the cheap ones trying from ali express here
https://www.aliexpress.com/item/NEW-PIR ... 677b5e8301

I have tried to search through the forums but it is lacking a bit of information
i have found this which gives the pinout. https://saturn.ffzg.hr/rot13/index.cgi/ ... 12-0-25685

I am having a ton of false positives no matter which way I turn it. If I turn them one way it calms the fp's but then turns into false negatives which is equally as bad if I turn them the other way tons of FP
I have tried 3 of them so I might be in my settings of domoticz/ esp or on the pir itself any suggestions are appreciated
I have it hooked up to espeasy here are the settings

GPIO 0
pulled up (checked)
inversed (checked)
switch type (switch)
switch button type (normal switch)
send boot data (unchecked)
send data (checked

I have tried both pull up and inversed both ways doesn't make a difference
in domoticz itself
standard dummy switch
switch type = motion sensor

it communicates fine with domoticz and i see it turn on and off so I would assume there is nothing wrong there.
ANY SUGGESTIONS would be great
relating articles i have found some useful some not
viewtopic.php?t=9179
https://electrosome.com/pir-motion-sens ... pberry-pi/

Re: PIR sensor + eps8266

Posted: Tuesday 15 November 2016 22:31
by Derik
mm There was something withe voltage icw the pir..
What is power u use..?
What software u use?
espeasy?

Re: PIR sensor + eps8266

Posted: Wednesday 16 November 2016 12:06
by toreandre
I have never been able to get a stable PIR node with ESP, most of the PIRs need 4-5v to function properly.
There is a workaround for some of the PIR models out there, you can cut some copper traces on the sensor to get it working with 3.3v, check out the ESPEasy forum.

If you want to make more DIY nodes you could look into MySensors (wireless arduino nodes), i have 5 nodes with RGB LED strips, 3 PIR, 2 "clappers" and 2 nodes with LCD/OLED display running stable as a rock.

Re: PIR sensor + eps8266

Posted: Wednesday 16 November 2016 13:24
by borgkitty
@Derik

Yes I use easy esp

I am currently using 3.55 volts for the sensor as it said it could accept a range of 3-5v. I don’t want to go higher as I made a custom circuit board that powers all accessories and the esp itself from the same psu. even though I am pretty sure I have an esp on 5v and it was fine by accident.

I could maybe try it on 5 volt just temp to see if it alleviates any issue on a separate line.

@toreandre yes you are right there is a workaround as hotwiring a pin from power to high pin on jumper or to go past the voltage regulator. I have tried both and have powered it directly with 3.55 v from the standard power pin and it does power up and "works"



I have also tried setting a pull up resistor in the software and disabling that then putting an actually 10k pull up in between and same thing

Re: PIR sensor + eps8266

Posted: Wednesday 16 November 2016 13:27
by borgkitty
toreandre wrote: If you want to make more DIY nodes you could look into MySensors (wireless arduino nodes), i have 5 nodes with RGB LED strips, 3 PIR, 2 "clappers" and 2 nodes with LCD/OLED display running stable as a rock.
I can certainly look into this however looking at the website from mysensors they use the same exact PIR
https://www.mysensors.org/build/motion

how would converting to arduino nodes help the pir sensors?

Re: PIR sensor + eps8266

Posted: Wednesday 16 November 2016 13:39
by qwerk
borgkitty wrote:@Derik

Yes I use easy esp

I am currently using 3.55 volts for the sensor as it said it could accept a range of 3-5v. I don’t want to go higher as I made a custom circuit board that powers all accessories and the esp itself from the same psu. even though I am pretty sure I have an esp on 5v and it was fine by accident.

I could maybe try it on 5 volt just temp to see if it alleviates any issue on a separate line.

If you don't change the pir to work on 3,3 V http://www.instructables.com/id/Convert ... r-ESP8266/
it needs 5V otherwise you get lots off false positives.

Re: PIR sensor + eps8266

Posted: Wednesday 16 November 2016 14:27
by borgkitty

Re: PIR sensor + eps8266

Posted: Wednesday 16 November 2016 15:13
by qwerk

Thanks for the links.
All I knew was you had to solder ( not my strong suit)
You made my hobby a bit easier.

Re: PIR sensor + eps8266

Posted: Wednesday 16 November 2016 16:54
by toreandre
borgkitty wrote:
toreandre wrote: If you want to make more DIY nodes you could look into MySensors (wireless arduino nodes), i have 5 nodes with RGB LED strips, 3 PIR, 2 "clappers" and 2 nodes with LCD/OLED display running stable as a rock.
I can certainly look into this however looking at the website from mysensors they use the same exact PIR
https://www.mysensors.org/build/motion

how would converting to arduino nodes help the pir sensors?
Yes, but the arduino supplys 5v, not 3.3v as the ESP does and the 3.3v is a bit too weak for many of the PIR sensors (and other DIY modules).

Re: PIR sensor + eps8266

Posted: Thursday 17 November 2016 23:33
by borgkitty
so i changed it to 5 v no difference. I changed it to 12 v no difference. I completely disconnected the esp entirely and measured pin voltage manually no difference. I have tried shielding it with tin foil grounded as suggested in some other posts no difference.

Any other suggestions?
id still like to get this to work

I think instead of a motion sensor I might use a ky 008 laser and pickup module because i just need to detect movement across the floor of a certain area in my room to switch on lights in the night. and I have set up a prototype and it works 100% of the time 3d printing a case right now to hold the units and ordered a few more as I accidentally powered the ky008 with 12v which has killed the brightness/ part of the laser. It is sort of good because it was so dang bright as long as it reaches 2 meters I will be happy. There is some guy on youtube that transmitted audio 100+ meters with one of these modules.
random thought i would love to set two of them up for a tx / rx for long range internet connections.

Re: PIR sensor + eps8266

Posted: Thursday 24 November 2016 17:26
by cherowley
I wasted far too much time on those sensors - if you hunt around using google you will find that they usually give false positives with esp8266 :(

You can power them easily with 3.3v by feeding +3v to one of the jumper pins - just meter the pin that connects to the regulator output.

However, like I said its very hard to get those devices stable near an esp8266.

I'm now using these devices:

http://www.ebay.co.uk/itm/Mini-IR-Infra ... SwZVlXrsXI

These don't seem to false trigger with the esp8266 and run find on 3.3v.

They don't have an easy way to adjust sensitivity though, I ended up putting black tape to partially cover the one outside my front door in order to stop it reacting to cars and people passing 30 feet away!

Re: PIR sensor + eps8266

Posted: Sunday 07 January 2018 21:36
by taeraeyttaejae
Sorry to barge in on an old topic - but this is the only one here on this forum with ESP8266 using PIR sensor.

I am very new to domoticz, although i have been a hobbyist for a while with electronics.

How have you set up domoticz and ESP easy(or some other firmware on esp) so that domoticz checks periodically(probably every second?) that if the sensor has triggered?

I have been succesful in setting up relays and temperature sensors, but i cannot find a good "type" for the PIR sensor in domoticz interface.

Re: PIR sensor + eps8266

Posted: Sunday 07 January 2018 23:45
by miremi
taeraeyttaejae wrote: Sunday 07 January 2018 21:36 Sorry to barge in on an old topic - but this is the only one here on this forum with ESP8266 using PIR sensor.

I am very new to domoticz, although i have been a hobbyist for a while with electronics.

How have you set up domoticz and ESP easy(or some other firmware on esp) so that domoticz checks periodically(probably every second?) that if the sensor has triggered?

I have been succesful in setting up relays and temperature sensors, but i cannot find a good "type" for the PIR sensor in domoticz interface.
This is how i have configured PIR with ESP Easy.
1. In Domoticz create Dummy switch and configure this as motion sensor. Take an note of IDX number.
1. Log in ESPEasy and configure domoticz as controller in third tab
2. In ESPEsay fifth tab create Switch Input Device and put the IDX number in that you got from Domoticz.

ESP will then update status of device in domoticz if there any motion

Re: PIR sensor + eps8266

Posted: Monday 08 January 2018 18:22
by taeraeyttaejae
Hi and thanks for the answer. I don't have any option resembling a motion sensor. "alert" is the most similar but probably does totally different function. I have the newest release of domoticz.

Edit : sorry I found it! It was under switches / my new device /change type

Re: PIR sensor + eps8266

Posted: Friday 19 January 2018 0:11
by Tcepser
Hello!

Did you made it?

I´ve got an esp8266 (with espeasy) and one Pir sensor, Got it connected to pin D3, gnd and 5v and even got some results from the PIR when i wave in front of it (Value changes to 1 on my esp).

But when i cant send the information to domoticz. I have similar esp´s that communicate with my domoticz server, both sending temperature and and relay.
I dont know why it dosent work this time.

Re: PIR sensor + eps8266

Posted: Wednesday 21 February 2018 10:41
by twimpy
Hello,
I did not read the complete post but I had false positives to. Costed me some time to figure out so I think some more people will like this reply.
After soldering a ceramic capacitor of 180 or 220 nF over pin 12 and 13 problem was solved.
As well the small cheap PIR doesn’t have any problem work out of the box, only you cannot adjust range and time.

Re: PIR sensor + eps8266

Posted: Tuesday 26 June 2018 20:11
by Abu06
I solved the issue by adding a 47uF capacitor between the + pin and ground pin.

It seems that the HC-SR505 Infra Red sensor is sensitive to the noise on the power supply.

André

Re: PIR sensor + eps8266

Posted: Saturday 07 July 2018 16:08
by rfmon
Dear all, i bought this pir wifi sensor with esp8266. Can you help me to program it with espeasy and domoticz? ImageImageImageImageImage

Inviato dal mio SM-N9005 utilizzando Tapatalk


Re: PIR sensor + eps8266

Posted: Tuesday 09 July 2019 19:28
by Herman-H
rfmon wrote: Saturday 07 July 2018 16:08 Dear all, i bought this pir wifi sensor with esp8266. Can you help me to program it with espeasy and domoticz? ImageImageImageImageImage

Inviato dal mio SM-N9005 utilizzando Tapatalk
Question, where did you buy this sensor? It looks good.

Re: PIR sensor + eps8266

Posted: Tuesday 13 August 2019 12:09
by rfmon