ESP8266 and HC-SR501 false positives en

By redfox314 on Wednesday 7 November 2018 18:48 - Comments (7)
Category: -, Views: 1.388

Trying to install a motion detector in my living room to trigger lights I decided that constructing one myself using a ESP8266 module and a cheap HC-SR501 module was an interesting challenge.

Some soldering and an Arduino sketch later it was operational.

During the day my setup works fine but for some reason during the night it kept triggering.

After much searching it seems that the gain stage of the HC-SR501 suffers from interference from the wifi. To eliminate this I placed a 220nF capacitor across pin12 and pin13 of the chip (verify that it actually is a BISS0001).

Unfortunately the package isn't exactly geared to receive any capacitors so some improvising was in order.

solder-3

solder-2

solder-1

After that no more false positives.

Volgende: VPN and VLAN with Ubiquity EdgeRouterX 09-'16 VPN and VLAN with Ubiquity EdgeRouterX

Comments


By Tweakers user peterrus_, Thursday 8 November 2018 00:29

Heel obscuur, maar er gaat vast ooit iemand wat aan hebben ;) keep it up

By Tweakers user redfox314, Thursday 8 November 2018 07:01

peterrus_ wrote on Thursday 8 November 2018 @ 00:29:
Heel obscuur, maar er gaat vast ooit iemand wat aan hebben ;) keep it up
Da's precies waar het om gaat, hier heb ik maanden op gezocht en toen ik in de trein iemand tegen kwam die exact hetzelfde probleem ook niet opgelost kreeg ben ik maar in mijn pen gekropen.

By Robin, Friday 9 November 2018 10:13

Heb je een pull down resistor gebruikt op de output van de bewegingssensor? Ik denk dat dat je probleem kan oplossen

By Tweakers user elleP, Friday 9 November 2018 11:41

When dealing with power fluctuations it can also help to add a small (1 ohm-ish) resistor in the power line before any buffer caps. This will make sure your buffer cap is used for the sensor, and doesn't flow back into the processor board.

By Tweakers user redfox314, Friday 9 November 2018 11:43

Robin wrote on Friday 9 November 2018 @ 10:13:
Heb je een pull down resistor gebruikt op de output van de bewegingssensor? Ik denk dat dat je probleem kan oplossen
I indeed have a pulldown resistor on the output of the motion sensor but in the end it was the capacitor that did the trick.

By Tweakers user -36-, Friday 9 November 2018 19:22

Heel herkenbaar dit, en handig om te weten. Is er een nog reden dat je een foliecap ipv elec. hebt gebruikt?

[Comment edited on Friday 9 November 2018 19:26]


By Tweakers user redfox314, Friday 9 November 2018 19:37

-36- wrote on Friday 9 November 2018 @ 19:22:
Heel herkenbaar dit, en handig om te weten. Is er een nog reden dat je een foliecap ipv elec. hebt gebruikt?
Die had ik in huis, meer niet.

Comment form
(required)
(required, but will not be displayed)
(optional)