0
\$\begingroup\$

I have a really janky setup where I'm using an ESP and some transistors to "push" the buttons on an RF remote control, used for controlling electrical outlets. The circuit works perfectly during normal operation, it's very simple, but when the power gets reset the remote control might send out random button presses, which I think is caused by the ESP itself and the way it starts up. What I'm wondering if there's anything I can add to delay the remote control board getting power, or something to buffer the signals from the ESP so short pulses get ignored while longer ones go through fine? I'm not familiar enough with that kind of circuit yet to know where to start. Here's a schematic of my circuit right now.

schematic

simulate this circuit – Schematic created using CircuitLab

That's the basic workings. There's a 3.3v regulator to drop the 5v input and the remote control is powered from the same 3.3v as the ESP, but that wasn't necessary for the schematic. The nodes that go to the remote control pins are soldered onto the button pad on the circuit board.

\$\endgroup\$
  • \$\begingroup\$ Why do you have pull-up resistors (10k)? This way, each transistor will be activated when the ESP is reset. \$\endgroup\$ – Wouter van Ooijen Dec 9 '18 at 8:22
  • \$\begingroup\$ With or without them, two of the transistors are activated when the ESP resets (the ones on GPIOs 2 and 3), the one on GPIO 0 doesn't look like it is. \$\endgroup\$ – HaLo2FrEeEk Dec 9 '18 at 9:54
  • 1
    \$\begingroup\$ Why are you using PNP transistors? \$\endgroup\$ – Andy aka Dec 9 '18 at 10:50
  • \$\begingroup\$ I honestly can't remember exactly why, but I remember having some issue that changing to PNP transistors solved. \$\endgroup\$ – HaLo2FrEeEk Dec 9 '18 at 13:20
0
\$\begingroup\$

Various circuits can achieve this, from a simple resistor in series with a supply combined with a large capacitor to ground after this resistor to ICs that are built for this specific purpose. My suggestion would be the following:

A simple PMOS in series with the supply. Using a large RC timeconstant (where 'large' means long enough for your ESP to start up before the gate-source voltage of the PMOS is high enough to turn it on) at the input could be used.

At startup the capacitor is empty, and thus the gate-source voltage is zero, the transistor is off. The resistor can then charge the capacitor, and the transistor will turn on, connecting power to your switch circuit.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.