Trouble with the Enable pin on a Voltage Regulator

I’m using the MCP1640T-I/CHY in the following setup:

MCP_EN is connected to C2 on my Electron. The R1/R2 configuration ensures Vout is 5V.

The datasheet mentions the following about the Enable pin:

So by pulling C2 low, I want to disable the regulator.This is crucial, as I have components with a very high quiescent current connected to Vout, and I need my setup to draw as little current as possible in Deep Sleep. I use the following code for this:

const int MCP_EN = C2;

void setup(){
    pinMode(MCP_EN, OUTPUT);

void loop() {
    digitalWrite(MCP_EN, HIGH);
    digitalWrite(MCP_EN, LOW);
    System.sleep(SLEEP_MODE_DEEP, 10000);

Observations: While EN is high, Vout is 5V. When EN is pulled low, Vout starts dropping towards 0V. When the Electron enters Deep Sleep, Vout goes back to 5V after about a second. EN appears to remain at 0V. The components connected to Vout continue to draw a lot of current while the Electron is in Deep Sleep.

What am I misunderstanding about the functionality of this device? It’d be great if someone could give me a push in the right direction here…

In SLEEP_MODE_DEEP all pins are put in high impedance mode.

You probably need to add a pull-down on the EN pin to prevent it from floating and causing the regulator to enable.


Noob question: is it possible to maintain this LOW state throughout Deep Sleep without adding an additional resistor to my setup? (i.e. just relying on the Electron’s features)

@Vitesze, not in Deep Sleep but it can be done in STOP sleep modes since the pin states are preserved but power consumption is not as low.


Thanks. Unfortunately, the 2.75mA draw in Stop Sleep is quite a lot (17x) higher than Deep Sleep so this will really hurt the lifespan of my setup. I’ll probably just add a pulldown resistor to it.

Just one more question: what would the most ideal value for a pulldown resistor be here? Would something similar to the internal pull-up be preferable (~40K if I’m not mistaken)?

@Vitesze, 10K will do. 47K might work also.

1 Like