-->
Page 1 of 1

Transmitter triggered on restart

PostPosted: Sun Oct 02, 2022 5:17 am
by byroncoetsee
Hi everyone

So I've got a transmitter circuit (retail thing so I can't change it) that is triggered by a "ground pulse". I'm not sure what to call that. Basically, it stays high and to trigger it, I need to pull a pin low.

The transmitter is connected to my ESP8266 (NodeMCU v2), pin D1. It requires 5v and is thus connected to Vin.
Each time the ESP is restarted, pin D1 goes high for a splitsecond, then low, then high again where it now stays - since I've set that pin to `inverted`. Doing this little cycle however, triggers the transmitter.

My current thoughts are:
• Delay the power to the transmitter so it isn't awake while the ESP is booting
• Adding a kinda of debounce to the pin to prevent the up/down in such quick succession (only on boot)
• Adding hardware to invert the signal from the pin and set it to default low and trigger high
• Adding a resistor somewhere (no idea if or how - just seen this solution show up a few times for other issues)

Any ideas would be appreciated. I'm pretty new to electronics and the ESP/Homeassistent world but not new to coding if that helps. Thanks!

I'm using ESPHome on HomeAssistent.

Re: Transmitter triggered on restart

PostPosted: Wed Oct 05, 2022 6:57 am
by QuickFix
I think the easiest way is to chose a GPIO that is pulled to HIGH at boot.
D1 (= GPIO 5) is pulled LOW at boot, which indeed will trigger your transmitter at every reset.
Alternatively you could, as you already suggested, invert the port using additional hardware.

See this informative page about everything there's to know about the ESP's ports. :idea:
And keep in mind that the "D" designations on a NodeMCU are different than the actual GPIO numbers.