How can i turn off the arduino when voltage for lipo is below a certain value? I obviously want to prevent the arduino from bringing the 2 cell lipo below 3v per cell.
Is there a way to do it with software?
If not is there a way to do it with hardware module?
The LM393 will switch off the arduino when the
Lipo = 6.05V
Also , R1 & R2 labels are backwards
(Google voltage divider formiula)
(R1should be R2 and vice versa)
Vin * R2/(R1+R2)= 3.29V
Let Vin = 3.3V
Let R1=10000
.'. R2= 3.29M
(for LM393 to switch for 1S Lipo= 3.3V)
FYI, the fully charged voltage for a 2S Lipo is 8.4V
and the lowest voltage should not drop below
2 x 3.2V = 6.4V so 6,05 is slightly low.
Not sure if it is too low but I would readjust R2
to 10578 Ohms to switch at 6.4V for a 2S Lipo.
Aside from that if no change is desired, R1 and R2
LABELS (not values) should still be swapped.
But the regulators are still connected, and drawing power, when the Arduino is off. So if left, the batteries could go down to 0, and its bin time for the batteries.
Also be aware that with that circuit when the power to the Arduino is turned off the battery voltage will likley rise (due to the lower current) so the Arduino now turns back on, etc.
If the battery doesn’t have protection board (most lipo batteries have) you can get one, Protection board cuts the battery off to stop overdischarging or overcharging
Lipo cell recommended lowest voltage is 3.2V.
I've had batteries damaged because the ESC
didn't cutoff until 3V but that's another matter.
One issue not brought up yet is phantom ghost
powering (back feeding through protection diodes)
if an arduino has any boltage source connected to
any pins after power is removed from the arduino.
"But the regulators are still connected, and drawing power, when the Arduino is off. So if left, the batteries could go down to 0, and its bin time for the batteries"
This is a serious flaw in the schematic.
Somehow the Lipo must be disconnected from
all loads once it reaches 3.2V x # of cells (6.4V).
The question is what would power the circuit
that switches it off ?
If there is a P MOSFET in the battery\power line, and the gate is held high with a pull-up resistor, connect the battery and the MOSFET is off, so no power to Arduino.
You use a push button to temporarily ground the MOSFET gate, the Arduino then gets power.
You arrange for an NPN transistor to drive the MOSFET gate low when the Arduino program starts, this then keeps the battery\power on.
To switch off the battery\power turn off the NPN transistor with the Arduino program.
I have made standalone versions of the above using an 8 pin microcontroller which I then use to allow me to (safely) use 3S LiPos to power stuff in the field. If I leave something on the circuit powers the LiPo off when it drops below a pre-determined voltage and it then stays off. But you could do the same with the Arduino thats running the project.
Seems like something you should be able to order
from Hobbyking.
Sounds like that's what's needed to separate the
battery from the regulators. (Active Low Side Switch so when it cuts off the arduino output
floats high and it stays off. (GPIO pin stops pulling
gate low)
No, actually. That battery is labelled on amazon, as a lithium ion battery, not a LIPO. I have several of them. I personally wouldn't discharge a LIPO below 3.4V or higher, as "discharging below 3V could cause irreversible performance lost and even damage to the battery. " (see graph below)
This website has a great chart for battery percentages vs. voltages.
Notice how much faster the voltage drops once it gets below 15% or 3.7V. (left column is percentage, next column is for 1s battery.)
So for a 2S LIPO, I would say don't have it discharge less than 7.4V (15%) to be on the safe side, and not have the battery be damaged even the slightest. Unless of course, you're using the battery on a drone, in which case, I wouldn't go below 3.3V per cell.
I know that. I was explaining that on Amazon (a pretty universal online store), that battery isn't labelled as "LIPO". Also, they usually have a very low C rating, compared to ones that are labelled as LIPO.
Upon reviewing the recent data posted, I am strongly inclined to believe 3.7V is the lowest
a LIPO (like used in RC and with the high C ratings
(I've seen 75C !) should be allowed to discharge