Bedroom Project Problem

I am developing a project that consists of an esp8266 esp-01 connected to a BD711 transistor to turn a 12V led strip.
I have connected the esp`s GPIO 2 to a 1k resistor to the base of the transistor. Led strip anode to +12v and negative to the collector of the transistor and emitter to ground. For power I have the ams1117 3.3v regulator. Ch_PD and reset are both connected to 3.3v directly.

My problem is that when GPIO 2 is connected to the transistor the esp wont start correctly and the blue led stays on. If I disconnect the transistor the module starts correctly. What can I do to leave it connected and restart the module without the problem?

What pinMode settings are you using?

I am just using the ESP8266 Standalone Example and a simple button in the blynk app to GPIO2

Both ESP and LEDs directly grounded?

The led strip`s negative is connected to the transistors collector and the esp negative is connected to ground.

See if this helps http://www.forward.com.au/pfod/ESP8266/GPIOpins/index.html

I tried connecting a 2.2k resistor from gpio0 and gpio 2 but still the same and the led strip is always on because of the 2.2k resistor from 3.3v.

Maybe use an ESP with more than 2 GPIO pins and one that doesn’t need the AMS1117.

The AMS117 is a voltage regulator don’t all esp’s need 3.3v ?

No if you buy the $3 to $4 NodeMCU / WeMos varieties.

Rumour has it the WeMos Mini is turning “Pro” in the next couple of weeks with an external antenna connector (like the ESP07’s).

Oh well I even mada a pcb for the project. I will just have to buy the nodemcu version.

You can probably solve your problem with the ESP01 but transistors are not my thing.

Maybe read this thread for inspiration http://www.esp8266.com/viewtopic.php?f=13&t=1730 and let us know if you find a solution as there are lots of people with ESP01’s.

Hello blynkers, my first post here.
As GPIO2 must be HIGH during startup, you cannot connect it to a circuit which pulls GPIO2 LOW. 1k resistor to the base of NPN transistor is pulling GPIO2 down, because the base behaves like a diode in conducting direction. I would suggest adding a small pnp transistor: emitter to 3v3, base through 2k2 to GPIO2, collector through 100-200ohm to base of BD711 (to limit the base current), additionally about 1k from BD711 base to ground (to ensure BD711 is able to switch off). Of course the logic must be inverted.

1 Like

Thanks I will try what you suggested and keep this post updated.

Thanks

Did not work I burned one of my esp`s trying what @crazy4volvo suggested. Could this be because voltage from the base of the pnp transistor is going into GPIO2?

Hi @claytoncamilleri100,
Have a look at this little module based in the MOSFET IRF520, it could be useful

http://s.aliexpress.com/6NBRZbaE

Hi @psoro
My problem is gpio2 and not the transistor.
Thanks anyway for your help.

@psoro could you please indicate how the IRF520 is wired up and if it will give a HIGH or a LOW signal on the data pin by default. If that makes any sense to you :slight_smile:

@Costas, @claytoncamilleri100,
I have done the test with the IRF520 and I have same issue… It doesn’t work…
I’ve got 1.22V at GPIO2 at Startup and the Blue light is ON…

It would be better if you use a Relay Module, it works fine (tested!)

http://es.aliexpress.com/item/Relay-module-for-arduino-uno/32390153575.html?spm=2114.13010608.0.52.t4SpuL

Yes I thought of that but the problem is that I can’t control it with PWM.