fix pir false triggering

This commit is contained in:
interfisch 2020-11-08 11:59:34 +01:00
parent 99a57c594c
commit a53fd957af
2 changed files with 7 additions and 4 deletions

View File

@ -222,7 +222,7 @@ build_flags =
-D dataDHT22_humidity_minchange=1.0
-D SENSOR_PIR
-D PIRPIN=D0
-D PIRPIN=D6
-D dataPIR_readdelay=100
-D dataPIR_senddelaymax=1000*60*10

View File

@ -82,9 +82,12 @@ struct sensordata
#ifdef SENSOR_PIR
// PIR Sensors HC-SR501 (modified to put out shortest pulse time short pins 5 and 6 of ic)
// PIR Sensors HC-SR501
// pir sensor needs 5v through an inductor for filtering. output level is 3.3v
// 100nF capacitor should be soldered between pins 12 and 13 of BISS0001 to stop interference from esp causing false triggers (in some setups). source: https://www.letscontrolit.com/forum/viewtopic.php?t=671
// hc-sr501 should also be a few cm away from the esp. interference can cause false triggering
// poti closer to jumper is sensitivity (cw increases). other poti is pulse time (cw increases).
// time set to output around 30s pulse
sensordata dataPIR;
bool value_PIR=false;
#endif