Nano: enable pin not working

LIPO batteries power a 5 volt LED using the Arduino Nano. Ideally, I want the Nano to shut down or power down when the LIPO battery depletes to 2.9 volts. Using this Voltage Divider I'm able to read the voltage. Once the shutoff voltage is reached, I want to power down the Nano. Reading the voltage works great.

Now, I want to use the "Enable" pin on this Voltage Regulator. I've connected the enable (EN) pin on the regulator to the D2 pin on the Nano. I'm using the following code:

void setup() {
pinMode(2, OUTPUT);   //This is the "enable" function on pin 2 th
}

Then when the 2.9 volts per cell is reached, I call this killBattery function:

void killBattery() {
digitalWrite(2, LOW);
}

I've tried using HIGH also but see no effect. I have the internal LED (pin13) blinking in the function so it gets there correctly.

I'm not sure where I should be measuring. When I measure against voltage in (VI) I see the battery voltage. When I measure the voltage out (VO) is see 5 volts as I've set as output on the voltage regulator. For testing I cycle between HIGH & LOW.

Shouldn't I see a dramatic reduction in voltage in one of these places?

Please post schematics. Pen and paper usuallt works fine.
Posting the full code is adviced.

How do You get started when powering up?

1 Like

Do you have any information on the chip used in your regulator module? A part number, or markings?

1 Like

IDK why what you are trying isn't working, but I do know that discharging a LiPo to 2.9 volts is not good practice.

You should adjust your voltage divider to turn everyone off at 3.3 volts, at which point it is quite empty enough.

You can treat them better at the high end also - every little bit less than charging a LiPo to 4.2 volts your use case can tolerate will return to you in an improved lifetime as measured in power cycles.

Learn too much about LiPos at

a7

I think @Delta_G has the answer. The buck regulator defaults to ON, which means the ENable input has a pullup resistor - either on the board somewhere, or inside the IC itself. When you bring D2 low, the regulator shuts down, which also shuts down the Nano. When the Nano shuts down, it no longer produces an active LOW on D2, so the pullup resistor pulls ENable back high, and the Nano powers up again. This can happen very fast, so you may not see it happen.

It may be possible to make this work by adding a pull-down resistor so it defaults to OFF. Then you would also need a push-button to manually start it up until D2 could be set HIGH to keep the regulator ON.

I couldn't find any match for the IC markings. It's a bit odd in that it appears to have taken the diode into the chip, or possibly it's a synchronous converter of some kind that uses a mosfet instead of a diode. Anyway, I couldn't find it.

That's the answer I was looking for. The conclusion then is that I can't use the EN pin to shut down the power to the Nano.

I can shut down the LED programmatically so I will abandon the EN pin approach.

I thank all who responded...

But you could install a shutoff circuit even ahead of the regulator consisting of a P-channel mosfet, an N-channel mosfet and two resistors. And a pushbutton to get it started.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.