esp2866 + transistor to switch a couple of LEDs?
Posted: Thu Feb 28, 2019 4:59 pm
Hi all,
I was wondering if anybody here could help me out. I want to switch 3 LEDs from a 12v strip with the esp8266 running its server.
I got the code running, when giving the commands on the website I can measure the GPIO2 pins voltage, 3.3 at high and 0 at low.
Next step is to incorporate the transistor part. I have the 2n2222 transistor. Collector to the 12v side, base to gpio2 with a 220ohm resistor in between, emitter to ground.
See attachment for the schematics.
[img]here[/img]
However when I plug in the esp8266, it won't go true it's usual cycle. The red powered goes on, but also the blue led stays on.
When I remove the connection to the gpio2 pin it will boot normally.
Anybody any idea? If code is needed I can post that too.
Kind regards.
I was wondering if anybody here could help me out. I want to switch 3 LEDs from a 12v strip with the esp8266 running its server.
I got the code running, when giving the commands on the website I can measure the GPIO2 pins voltage, 3.3 at high and 0 at low.
Next step is to incorporate the transistor part. I have the 2n2222 transistor. Collector to the 12v side, base to gpio2 with a 220ohm resistor in between, emitter to ground.
See attachment for the schematics.
[img]here[/img]
However when I plug in the esp8266, it won't go true it's usual cycle. The red powered goes on, but also the blue led stays on.
When I remove the connection to the gpio2 pin it will boot normally.
Anybody any idea? If code is needed I can post that too.
Kind regards.