ESP easy+nodemcu+HC-SR501 problem
Moderators: grovkillen, Stuntteam, TD-er
-
- New user
- Posts: 7
- Joined: 01 Jul 2018, 12:23
ESP easy+nodemcu+HC-SR501 problem
Goodmorning everyone. I have a problem with the PIR motion sensor. I connected it to the nodemcu with ESP easy mega firmware (ESP_Easy_mega-20180624_normal_ESP8266_4096) by following the instructions here (https://www.letscontrolit.com/wiki/index.php/PIR_Sensor), but on the module page it always gives me or 1 or 0 fixed; on the same nodemcu I have a DHT22 sensor that works properly. I tried to change different configurations and powers for the PIR but without results. an help please?
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: ESP easy+nodemcu+HC-SR501 problem
Please give us info on what exact PIR module you got. Some are useless.
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

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



-
- New user
- Posts: 7
- Joined: 01 Jul 2018, 12:23
Re: ESP easy+nodemcu+HC-SR501 problem
this is my sensor PIR: HC-SR501
-
- New user
- Posts: 7
- Joined: 01 Jul 2018, 12:23
Re: ESP easy+nodemcu+HC-SR501 problem
Did you refresh the module page?
The PIR sensors are technically handled as a switch.
The output on the module page is static, so you have to refresh.
Suggestion: Try monitoring the serial, this is much easier for testing PIR.
Another reason might be the setting of the SR-501 (Sensivity and jumper).
Test with a voltmeter from "out" to gnd" on the PIR if you get a correct signal there at all.
For myself I didn't find differences between SR-501 sensorts but my samples are all from the same series.
It might help to put a pullup resistor (10 KOhm) from the GPIO to Vcc (3.3V).
It also might be a good idea to use a separate 5V supply for the PIR for testing. The 5V output from the
nodeMCU is known for some problems now and then. There's a diode in the output that lowers the output
voltage a bit. As the SR-501 uses an internal voltage regulator the Voltage from the 5V pin might be a bit
too low for the regulator.
Regards
Shardan
The PIR sensors are technically handled as a switch.
The output on the module page is static, so you have to refresh.
Suggestion: Try monitoring the serial, this is much easier for testing PIR.
Another reason might be the setting of the SR-501 (Sensivity and jumper).
Test with a voltmeter from "out" to gnd" on the PIR if you get a correct signal there at all.
For myself I didn't find differences between SR-501 sensorts but my samples are all from the same series.
It might help to put a pullup resistor (10 KOhm) from the GPIO to Vcc (3.3V).
It also might be a good idea to use a separate 5V supply for the PIR for testing. The 5V output from the
nodeMCU is known for some problems now and then. There's a diode in the output that lowers the output
voltage a bit. As the SR-501 uses an internal voltage regulator the Voltage from the 5V pin might be a bit
too low for the regulator.
Regards
Shardan
Regards
Shardan
Shardan
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: ESP easy+nodemcu+HC-SR501 problem
Not true anymore Shard, I've made it update automatically.

Good advice, but the web log is now a tons better with "infinite" logging.
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

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: ESP easy+nodemcu+HC-SR501 problem
Oooops...
missed that over my unwanted hiatus, sorry
missed that over my unwanted hiatus, sorry
Regards
Shardan
Shardan
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: ESP easy+nodemcu+HC-SR501 problem
Happy to have you back! 

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

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



-
- New user
- Posts: 7
- Joined: 01 Jul 2018, 12:23
Re: ESP easy+nodemcu+HC-SR501 problem
So you want to say that to see if it works correctly I can do it from the frontend of Home Assistant (in my case) and not from the web page of ESP easy? did I get it right?. I tried various ways of power, since my nodemcu card does not have a 5V output pin I tried to power the sensor with 3.3V, through the third pin of the jumper and then to 5V separately. but the result has never changed on the web page.
Re: ESP easy+nodemcu+HC-SR501 problem
Very first check:
Power the SR-501 with 5V.
Put a 10 KOhm resistor from 3.3V to the output pin of the SR-501.
Use a voltmeter / multimeter - or if you have one an oscilloskope - connected from the SR-501 output to gnd.
Check if you get a reliable reaction on the voltmeter. It should show near 0 V if it has detected something, otherwise 3.3V.
Second check:
Put a resistor from 3.3 V to the GPIO
Use a simple switch from the GPIO to zero, or use a Dupont wire to emulate a switch.
Check if connectiong / disconnecting the GPIO shows a result at the webpage.
Then report back.
Power the SR-501 with 5V.
Put a 10 KOhm resistor from 3.3V to the output pin of the SR-501.
Use a voltmeter / multimeter - or if you have one an oscilloskope - connected from the SR-501 output to gnd.
Check if you get a reliable reaction on the voltmeter. It should show near 0 V if it has detected something, otherwise 3.3V.
Second check:
Put a resistor from 3.3 V to the GPIO
Use a simple switch from the GPIO to zero, or use a Dupont wire to emulate a switch.
Check if connectiong / disconnecting the GPIO shows a result at the webpage.
Then report back.
Regards
Shardan
Shardan
-
- New user
- Posts: 7
- Joined: 01 Jul 2018, 12:23
Re: ESP easy+nodemcu+HC-SR501 problem
Now it seems to work (at least now I see it on HA). I connected the pir sensor to the vin pin of nodeMCU and then gnd and GPIO10. the problem now is that it continues to detect movement even if it is not there. passes continuously from 0 to 1. I tried to rotate the trimmers but nothing.
Re: ESP easy+nodemcu+HC-SR501 problem
Dear all, i bought this pir wifi sensor with esp8266. Can yoy help me to program it with espeasy and domoticz?
- Attachments
-
- 20180703_194424.jpg (3.11 MiB) Viewed 19239 times
-
- 20180703_194024.jpg (3.1 MiB) Viewed 19239 times
-
- 20180703_193808.jpg (2.79 MiB) Viewed 19239 times
-
- 20180703_193721.jpg (2.78 MiB) Viewed 19239 times
-
- 20180703_193533.jpg (2.4 MiB) Viewed 19239 times
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: ESP easy+nodemcu+HC-SR501 problem
If you are able to send me one I can make an official guide.
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

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: ESP easy+nodemcu+HC-SR501 problem
Sure but I don't have the funds to buy it myself right now. We'll have to wait then 

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

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: ESP easy+nodemcu+HC-SR501 problem




I'll try to flash it with espeasy and do some testing.
Thank for your support
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: ESP easy+nodemcu+HC-SR501 problem
Seems like the visa are accessable easily for RX/TX. Look at the ESP-01 guide and you will most likely get it working. Please give us info on your progress
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

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: ESP easy+nodemcu+HC-SR501 problem
I'm trying to flash it, but where is the vcc + chpd connected?
- Attachments
-
- ontatti.jpg (185.05 KiB) Viewed 19202 times
Re: ESP easy+nodemcu+HC-SR501 problem
You may also want to connect the GPIO-0 to GND during flash.
And on the images I could not find the 3.3V point, so that one may be tricky.
Also double-check those USB => serial converters output 3.3V. Some just give 5V on the pins labelled 3.3V
And on the images I could not find the 3.3V point, so that one may be tricky.
Also double-check those USB => serial converters output 3.3V. Some just give 5V on the pins labelled 3.3V
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: ESP easy+nodemcu+HC-SR501 problem
It seems that there's another notation about RX/TX as well. But I believe I found the 3.3V via. See attached pictures.
- Attachments
-
- IMG_20180714_081103.jpg (506.86 KiB) Viewed 19176 times
-
- IMG_20180714_081201.jpg (629.62 KiB) Viewed 19176 times
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

ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you



Re: ESP easy+nodemcu+HC-SR501 problem
I had seen the 3v3 pin but I can not find the chpd pin that goes bridged with the 3v3. I keep trying
-
- New user
- Posts: 7
- Joined: 01 Jul 2018, 12:23
Re: ESP easy+nodemcu+HC-SR501 problem
nothing to do, I inserted a 10k resistor between the GPIO and the sensor data output but I continue to have fakes, it goes continuously between the two states
-
- New user
- Posts: 7
- Joined: 01 Jul 2018, 12:23
Re: ESP easy+nodemcu+HC-SR501 problem
nothing to do probably the sensor model has problems .. I will try to change the manufacturer ..
Who is online
Users browsing this forum: No registered users and 17 guests