Chat freely about anything...

User avatar
By Nolva
#19983
martinayotte wrote:All ESPs have that boot process.
If your issue is that your transistor+relay need to be driven with a HIGH level, and you don't wish to have turned ON at power up, you can simply have another NPN transistor to have that signal inverted.
Of course, if you use some other kind of ESP, such ESP-07 or ESP-12, you get more GPIOs, so you can use them instead.


please forgive my ignorance but i dont mind if the relay is turned on at power up but how would i do that if it doesn't boot?

at the moment i have a general purpose npn with the base connected via resister to gpio2. the collector to the relay and flyback diode then positive 12v rail and emitter to ground. (similar to this but with 12v)

from what i understand the transistor is pulling gpio2 down so it wont boot. I dont understand how i can have it turned on at start up to solve this?

Ill look into the inversion thing as dont quite get that yet. but I guess also a pnp would solve it, or as you said use a higher version board with a different gpio.

thank you very much for your help. its good to learn
User avatar
By Nolva
#19984
Nolva wrote:
martinayotte wrote:All ESPs have that boot process.
If your issue is that your transistor+relay need to be driven with a HIGH level, and you don't wish to have turned ON at power up, you can simply have another NPN transistor to have that signal inverted.
Of course, if you use some other kind of ESP, such ESP-07 or ESP-12, you get more GPIOs, so you can use them instead.


please forgive my ignorance but i dont mind if the relay is turned on at power up but how would i do that if it doesn't boot?

at the moment i have a general purpose npn with the base connected via resister to gpio2. the collector to the relay and flyback diode then positive 12v rail and emitter to ground. (similar to this but with 12v)

from what i understand the transistor is pulling gpio2 down so it wont boot. I dont understand how i can have it turned on at start up to solve this?

Ill look into the inversion thing as dont quite get that yet. but I guess also a pnp would solve it, or as you said use a higher version board with a different gpio.

thank you very much for your help. its good to learn


forgot the link http://www.electro-tech-online.com/imgc ... 087bwj.jpg
User avatar
By martinayotte
#19985 If you don't mind about power-up state of the relay. simply add a pullup resistor directly on the GPIO, and make sure that the resistor to the base of the transistor is much higher than the pullup.
In fact, if it was a MOSFET instead of plain NPN, thing will be easier, since base resistor with NPN can limit the current provided to the relay.