Hello all,
I need to combine 3-4 (maybe 2) motion sensors (hc-sr501)to the same input of the esp easy. I read something about or gate ic component, is there anybody advice me which or gate ic should i choose?
or gate IC
Moderators: grovkillen, Stuntteam, TD-er
Re: or gate IC
Your requirements are very simple, so an IC is not needed. Instead use small signal diodes (1N914, 1N4148, etc.). One diode per PIR sensor module.
The HC-SR501 data sheet states that the module has an active high output (goes to 3.3V when triggered). So here's what I recommend:
1. Connect each diode's anode to a sensor output.
2. The cathode of all diodes are tied together and then connected to a single GPIO pin.
3. Connect a 10K resistor from ground to the GPIO pin (A.K.A. pull-down resistor).
4. Disabled the GPIO's internal pull-up. Important, must do this.
You've just created a discrete RTL OR gate. Any sensor that has an active high output will trigger the GPIO.
High state voltage will be approx 2.6V, but that is sufficient for the ESP8266. If you desire a more traditional 3.3V logic level then use your favorite schottky diode instead of the silicon variety.
- Thomas
The HC-SR501 data sheet states that the module has an active high output (goes to 3.3V when triggered). So here's what I recommend:
1. Connect each diode's anode to a sensor output.
2. The cathode of all diodes are tied together and then connected to a single GPIO pin.
3. Connect a 10K resistor from ground to the GPIO pin (A.K.A. pull-down resistor).
4. Disabled the GPIO's internal pull-up. Important, must do this.
You've just created a discrete RTL OR gate. Any sensor that has an active high output will trigger the GPIO.
High state voltage will be approx 2.6V, but that is sufficient for the ESP8266. If you desire a more traditional 3.3V logic level then use your favorite schottky diode instead of the silicon variety.
- Thomas
Re: or gate IC
Just one remark.
Since Thomas suggests a pull-down resistor, you cannot connect this to GPIO-0 or -2.
Those need to be high at boot.
Since Thomas suggests a pull-down resistor, you cannot connect this to GPIO-0 or -2.
Those need to be high at boot.
Re: or gate IC
Thanks ThomasB and TD-er both of you. I will do what you describe.
Who is online
Users browsing this forum: Ahrefs [Bot] and 3 guests