Connecting the GPIOs to a Relay
Posted: Mon Jan 05, 2015 11:28 am
Hello everybody,
I'm currently developing a unit foy my home automation project using the ESP8266.
I got a tiny little step-down converter, which outputs 3.3v with 600mA from the mains 230v.
I can power the ESP8266 ( -01 ) without any problems, and I can talk to it via tcp (I got a custom firmware which starts the tcp server on bootup and lets me control the gpios)
Now the problem is, when I try to connect the relay:
Because the relay itself would draw way too much current from the gpio, I used a transistor.
Once the relay with the transistor is connected to any of the gpios, it doesn't boot up properly..
When I connect the relay to GPIO 0, the blue led blinks once, but it doesn't start.
Whereas when I connect it to GPIO 2, the blue light stays on all the time!
I can fix it by connecting the GPIO to VCC, and then power the ESP8266 on. Once it is bootet up, I can disconnect the gpio from vcc and everything works as expected.
So I thought, maybe my circuit is pulling the GPIO to ground, which causes this mibehaviour. Therefore I tried to add a diode, but actually it didn't help.
So does any one have an idea ?
Kind Reagrds,
Jannik Jung
I'm currently developing a unit foy my home automation project using the ESP8266.
I got a tiny little step-down converter, which outputs 3.3v with 600mA from the mains 230v.
I can power the ESP8266 ( -01 ) without any problems, and I can talk to it via tcp (I got a custom firmware which starts the tcp server on bootup and lets me control the gpios)
Now the problem is, when I try to connect the relay:
Because the relay itself would draw way too much current from the gpio, I used a transistor.
Once the relay with the transistor is connected to any of the gpios, it doesn't boot up properly..
When I connect the relay to GPIO 0, the blue led blinks once, but it doesn't start.
Whereas when I connect it to GPIO 2, the blue light stays on all the time!
I can fix it by connecting the GPIO to VCC, and then power the ESP8266 on. Once it is bootet up, I can disconnect the gpio from vcc and everything works as expected.
So I thought, maybe my circuit is pulling the GPIO to ground, which causes this mibehaviour. Therefore I tried to add a diode, but actually it didn't help.
So does any one have an idea ?
Kind Reagrds,
Jannik Jung