I wanted to control the opening and closing of my front gate using the ESP8266. The gate uses a standard PTX4 remote, which is readily available at many hardware stores.
To my surprise, I couldn't find a hardware module that I can buy off-the-shelf and interface with the ESP8266. So I bought an extra remote, paired it with the gate receiver and proceeded to take it apart to see how I can use the circuitry inside.
SW4 is the button I press to open/close the gate. Points (1) and (2) are the junctions I need to short using a relay to simulate a button press. I measured point (1) to be 12V, so I need a 12V relay for this to work. The one that's readily available to me is SY4032. Since the operating voltage is 12V, I also need to use a MOSFET (the good ol' 2N7000) to drive the relay.
The gate pin needs to be grounded with a resistor, otherwise a spurious signal might be sent to the relay when the MCU is first powered on.
Another thing I did was to get rid of the A23 battery by connecting a DC booster (MT3608) to the 5V output of the WEMOS D1 Mini and calibrating it to output 12V. So now the entire circuit can be driven by the USB input to the WEMOS D1 Mini without the need for an extra battery.
Comments
Post a Comment