I'm developing a project to automate the flushing of some gent's urinals at a venue.
i'm using an AM312 PIR module as a "footfall" detector, the output is connected to D2 of the Wemos D1 mini, but the input never goes low, I've measured the voltage on pin D2 at 2.8V with the PIR unplugged. The PIR gives a HIGH output when it senses body movement, but I don't think it has output capability to pull the input LOW when it relaxes.
So, I thought about using an NPN transistor to pull the input LOW when the AM312 output goes HIGH, however, I measured the current from pin D2 to GND and was surprised it was a hefty 84mA. Is this normal for an ESP8266 input ?
Is my Wemos D1 mini working correctly ?
Re: Is my Wemos D1 mini working correctly ?
I think the answer lies here....
" NodeMCU/ESP8266 has 17 GPIO pins which can be assigned to functions such as I2C, I2S, UART, PWM, IR Remote Control, LED Light and Button programmatically. Each digital enabled GPIO can be configured to internal pull-up or pull-down, or set to high impedance. When configured as an input, it can also be set to edge-trigger or level-trigger to generate CPU interrupts."
Since my PIR is active-high, I believe I need to set D2 as PULL_DOWN, but I have no idea how to do that in Arduino code.
Whilst I am continuing to research this, can someone please enlighten me...
" NodeMCU/ESP8266 has 17 GPIO pins which can be assigned to functions such as I2C, I2S, UART, PWM, IR Remote Control, LED Light and Button programmatically. Each digital enabled GPIO can be configured to internal pull-up or pull-down, or set to high impedance. When configured as an input, it can also be set to edge-trigger or level-trigger to generate CPU interrupts."
Since my PIR is active-high, I believe I need to set D2 as PULL_DOWN, but I have no idea how to do that in Arduino code.
Whilst I am continuing to research this, can someone please enlighten me...
Who is online
Users browsing this forum: No registered users and 74 guests