I have been making a project involving a relay and an esp8266. Essentially a WiFi enabled relay. The issue that I have been having is that when the esp8266 boots it flashes all of its GPIO pins high and low a few times in quick succession. This of course has adverse effects on the device I have attached to the relay. Currently I have been trying to use a filter type circuit that I have designed using a capacitor and some transistors however I have discovered that this will work for some relays but I have to adjust resistance values and the like in order to get it to work for each different relay due to inconsistencies in their construction.
Here is what i have been using currently with approximate resistor values:
simulate this circuit – Schematic created using CircuitLab
Essentially what this circuit does is it prevents the relay from operating before the 470uf capacitor is charged. During startup the 7.5kohm resistor is trying to charge the capacitor (It takes about a second for it to charge to a usable level) but the filter line is unstable so it keeps being discharged. Only once the esp has finished booting and all the pins are stable can it charge and allow the relay to operate.
You might also notice that while fine tuning the circuit it is quite easy to adjust the resistor values so that things like the voltage regulator running the circuit start to get quite hot.
Essentially I am looking for a more reliable (less overheat-able) and all in all more elegant solution to this problem than I have already been using. I have considered adding an atTiny to the circuit to enable the relay due to the fact that its pins seem to be stable during startup but I figure there must be a simpler solution than having to add a whole other IC to my project!
Thanks