Electrical – Trying to power on/off esp8266 power with a 2n2222a NPN transistor

esp8266npntransistors

I am trying to save some power, using an Arduino and an ESP8266 (ESP12 ESP-14F version).

The 3.3v is provided thanks to an LD1117V33. I've placed a 2n2222a transistor between the LD1111V33 and the ground. When ESP is powered on through the transistor, AT commands don't work anymore (I am mesuring 3.2V between Collector and the ESP VCC).
When I short Collector to Emitter, everything is fine.

Here is a log of AT exchange with the ESP. As you can see, the 2 first "AT" requests return something I can't read, then, all the other "AT" commands don't receive anything:

***** SEND *****
AT+CIOBAUD=9600[CRLF]
======= WIFI INIT START =======
***** SEND *****
AT[CRLF]
***** RECEIVE *****
sllœ�sŒ!ãoŒ€lìpŒ|�ƒŸìp“Ÿ�“œæŒpŒpóoŸlooœccpŒ�!lãú
***** SEND *****
AT[CRLF]
***** RECEIVE *****
kÿ
***** SEND *****
AT[CRLF]
***** RECEIVE *****

***** SEND *****
AT[CRLF]
***** RECEIVE *****

I read on the post below, that it is not possible to use the 2n2222a NPN transistor to do so. Could anyone give me some explanations?
(I know, there is a deep sleep mode I could use, but I'm trying to learn from my mistakes).

For an Arduino and ESP8266, can I power up the ESP8266 from a set of 2n2222 transistors?

Here is how I wired it up (I removed the resistors to ESP RX, and CH_PD to simplify the picture).

Here is how I wired it up

enter image description here

Best Answer

Thanks to mkeith & JRE, I finally got the solutions. There were 2 problems:

  • voltage drops to 3.2 instead of 3.3 beacause of the NPN transistor. Using a PNP to give the LD1117V33 a real ground fixed it.

  • serial messages were corrupted because the esp ignored the first message: it didn't have time to wake up between transistor activation, and the first serial message, which goal is to set up the baud speed! Adding a "delay(1000)" fixed the issue.

Thanks a lot!