I have an ESP8266 that I've got connected to my arduino and communicating quite well with... Now I'm looking at options to run my conifig via battery, so need to find ways to shutdown the ESP8266.

Easiest way I have read is via the broken out CH_PD pin that is normally tied to 3.3v. However, further reading suggests that the TX/RX pins are 5v tolerant, the CH_PD is NOT. So what would be the best way to power the CH_PD from a digital pin.

Options are Connect the Arduino digital pin to:

  • Voltage divider using resistors
  • Transistor switch?
  • small 100mA 3.3v regulator

I have no idea how much the CH_PD pin draws in mA... I assume very little. I've used voltage dividers for signal, but not for constant ON applications like this would be.


Thank you!


3 Answers 3


The cheapest way is to use a voltage divider consisting of two resistors. The most robust way is to use a level converter IC (SN74LVC1T45 or similar). These have a VCCA and VCCB: Set VCCA to 3.3V, and VCCB to 5.0V, and the IC will translate signals between the two VCC domains.


An easier way is, your arduino has a 3.3v rail. Place a pull up resistor from 3.3v to the pin. Then connect it any digital pin. Set the pin to a low state. Then turn the pin from an input to an output to pull the pin low. Set the pin back input to pull the pin high.

  • \$\begingroup\$ This can be done, but it's very risky as any accidental configuration of the pin as an output driven high can damage the 3.3v device. It's pretty farfetched for saving the second resistor to be worth that risk, especially considering how tiny and inexpensive resistors can be. Further, your proposal will waste power. When you drive the signal low to deactivate the ESP8266, you'll be using the pullup resistor as a little heater, granted a small one, but enough to be noticeable in a better battery powered design where the main CPU might also sleep and the regulators have lower quiescent current. \$\endgroup\$ Commented Mar 15, 2016 at 13:03
  • \$\begingroup\$ @ChrisStratton By hard coding the transitions into #define macros the risk is very minimal. Also if using a 10k resistor the current draw would be 330uA which is not too shabby. The stand by power of a garden variety UNO board is in the mA. Further more all linear regulators have a minimum output current that must be kept for the regulator to stay in regulation. \$\endgroup\$
    – vini_i
    Commented Mar 15, 2016 at 13:39
  • \$\begingroup\$ 330uA is little compared to an off-the-shelf Arduino, but a hundred times the sleep power budget of a serious battery powered design. Why go to all the trouble to save a resistor? Use two resistors and make a voltage divider - as stiff in the high case, no power wasted in the low, and no fried parts to replace if there's ever a typo in the code. Situations where code can break the hardware should really be reserved for cases that cannot so easily be protected against. \$\endgroup\$ Commented Mar 15, 2016 at 13:41
  • \$\begingroup\$ @ChrisStratton The OP specifically calls out an Arduino which would not be used for a serious battery powered design. One could for example us a low quiecent current level shifter and a MOSFET to shut down the 3.3v rail all together. For the OP's design this would be overkill. All i'm suggesting is a quick and dirty work around. \$\endgroup\$
    – vini_i
    Commented Mar 15, 2016 at 14:00

I would use three diodes in series to drop the voltage. A standard silicon diode has a voltage drop of ~0.6V, so if you chain three the voltage is dropped from 5V - 5V - (3 * 0.6) which is 3.2V. I hope this helps!

  • 2
    \$\begingroup\$ Not true! Only under certain current conditions. \$\endgroup\$ Commented Mar 15, 2016 at 12:55
  • \$\begingroup\$ "The voltage dropped across a conducting, forward-biased diode is called the forward voltage. Forward voltage for a diode varies only slightly for changes in forward current and temperature, and is fixed by the chemical composition of the P-N junction. Silicon diodes have a forward voltage of approximately 0.7 volts." Quote from AllAboutCircuits.com, I guess I was off by 1/10 of a volt. \$\endgroup\$ Commented Mar 15, 2016 at 13:47
  • 1
    \$\begingroup\$ Try for yourself.. Under small currents it's not 0.6v \$\endgroup\$ Commented Mar 15, 2016 at 13:50
  • \$\begingroup\$ fairchildsemi.com/datasheets/1N/1N914.pdf this is a data sheet for a diode. Look at Figure 3,4 and 5. These are forward current vs forward voltage plots. As forward current climbs so does the forward voltage. The forward voltage does not remain constant. \$\endgroup\$
    – vini_i
    Commented Mar 15, 2016 at 13:56
  • \$\begingroup\$ Hmm, true. I acknowledge defeat :( For non-precision applications though, it is pretty close. \$\endgroup\$ Commented Mar 15, 2016 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.