Did anyone here use A20 on LiPo battery power supply and could confirm that it worked without ANY problems?
Yes, my friend have used this configuration with Rev D boad.
Yesterday I try to charge the battery and the orange led was on.
This night I'll try to power the board with only the battery.
Yes, Rev.D board with 7"LCD booted fine from a 6600mAh battery.
And the android is still running in sleep mode for almost a week now.
Similar discussion is going on here: https://www.olimex.com/forum/index.php?topic=1687.0
Thanks you shamada and PaceyIV - I figure these are just preliminary results and I'm glad you replied.
The reason I keep asking the same question over and over again is that there's some discrepancy in how the AXP209 handles LiPo during charging and discharging. From what I observed so far the undercharged LiPo (around 60% left) will not power Android board at all. It just blinks the screen and dies immediately. Sometime it runs and then shuts it off without any warning. When LiPo is fully charged it seems to run alright. Then again, it dies around 60% battery capacity. I used both 3000mAh and 8000mAh batteries taken from my other tablets that use the same Power Management circuit built around AXP209 chip.
I appreciate if you keep posting your observations.
I only tested with battery charge level above 90%. But i will keep a look at what happens, when the charge level drops.
How can you see charge level?
Messages like this in dmesg are normal?
[ 113.182020] [AXP]Correct5:fix 99:charger->rest_vol = 100
I'm running android at the moment. And I guess/hope the gui display of the charge level is working.
You also have an indication of the temperature of the processor or the board?
No, haven't tried to find that yet.
Hello
using A20 with Debian image, sourced by a 9v ac adaptor, I'm trying to use a battery connected to jst as a UPS, principally while closing some processes and shutdown in an eventually failure of the main power
I can't figure out how to know when the board is sourced through barrel or not, is there a way to know about ?, even I don't know if A20 can switch from source to source (barrel - battery), I'm concerned about SD card integrity
started this thread https://www.olimex.com/forum/index.php?topic=2928.0
thanks in advance
Hi Jess,
You are fully right! Using a 6600mH LIPO I got from Olimex store, My Debian R7 switch off without any reasons as soon as the battery charge goes below 40% (measured by reading /sys/class/power_supply/battery/capacity).
So for the moment, the LIPO is useless for A20 for those who want to use it standalone!
Fab
Quote from: fab on March 28, 2014, 09:25:41 PM
You are fully right! Using a 6600mH LIPO I got from Olimex store, My Debian R7 switch off without any reasons as soon as the battery charge goes below 40% (measured by reading /sys/class/power_supply/battery/capacity).
So for the moment, the LIPO is useless for A20 for those who want to use it standalone!
Hi Fab, this must be a setting in Debian that is shutting down the system as I am running Android with the A20 and a 6600mA battery and it got down to under 3% before it did a switch off.
Also check the fex file as there is a pwroff_vol setting and mine is set for 3300mV
Thx Dave,
My pmu_pwroff_vol was also set to 3300 mv.
However there was another value pmu_battery_cap which was set to 2400 mA instead of 6600mA. I just tuned it to match my LIPO, and wait wether it is going better or not.
Fab
I played with different values regarding pmu_para from the fex file, but got no improvement.
The A20 board is actually switching off at random time. I double checked the LIPO, and it is fully charged (around 3900 mVolts read from the voltmeter).
Something weird too, is the capacity read from /sys/class/power_supply/battery/capacity is completely different when I unplug and replug the LIPO jst connector. Again seems to be random!
The capacity read seems to be totally unrelated to the real LIPO capacity.
Any other ideas are welcome
Fab
Quote
Thx Dave,
My pmu_pwroff_vol was also set to 3300 mv.
However there was another value pmu_battery_cap which was set to 2400 mA instead of 6600mA. I just tuned it to match my LIPO, and wait wether it is going better or not.
Fab
Hi FAB
Do you have a debug cable you can connect to UART0?
On my Android system I get a message when the system is about to shutdown. Maybe you can track it down that way?
Hi Dave,
QuoteHi FAB
Do you have a debug cable you can connect to UART0?
On my Android system I get a message when the system is about to shutdown. Maybe you can track it down that way?
Just tried with my UART0 debug cable, then check that connection is ok by making simple bash commands, then wait around 3 minutes sourcing from the LIPO...and got no messages, no warning, nothing when the LIPO switched off!!
I discovered something interesting today and you might want to check if similar.
I started up my system from the battery and everything was fine. When I then switched on the 15V step up supply, the system immediately switched off and would not switch on again. My +15V is powered from 5V and is a step up supply to power sensors. There was nothing connected to the output so no current drawn.
When I checked the battery voltage it was ZERO.
I had to unplug the battery and reconnect it to get the system to power back up. I then checked the voltage and it was 4.1V
I have nothing connected to the +15V output during these tests.
I know the batteries have a current limit but should be able to handle at least 6.6A according to the specs.
Also found out something nice today...
If I unplug the LIPO, then powering ON the A20 board, I got 100% for the /sys/class/power_supply/battery/capacity, and the LIPO is powering up the board many hours without any issues.
However If I switch OFF the A20 board, and immediately after switch it ON, without UNPLUGING the LIPO, the /sys/class/power_supply/battery/capacity fall below 30% !! :-(
If again, I unplug the LIPO, and boot up again, I am recovering the 100% capacity :-)
It seems that Debian is monitoring this "capacity" parameter and switch off when in a low state, but because this "capacity" parameter is wrongly setup by the onboard PMU, I got all this troubles.
Fabien
Quote from: PaceyIV on August 10, 2013, 12:05:03 AM
How can you see charge level?
cat /sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/battery/capacity
or
upower -d
Can you check the LiPo voltage as soon as it switches off? Keep it connected to the board and check it at the connector.
I found with my power spike issue that the battery voltage went to zero indicating that it has safety shutdown. Pulling it out would reset it.
Quote from: dave-at-axon on May 01, 2014, 04:47:16 AM
... Pulling it out would reset it.
I wonder if it's the same dreaded "feature" reported multiple times by plenty of android tablet users reporting how they had to open the case and physically disconnect the battery to re-start their otherwise dead tablet :)
Quite possibly.
I am running with a 6600mA battery so for this to auto shutoff it must be taking one hell of a voltage drop and must be for long enough that the auto cutoff circuit comes into effect.
Funnily enough, I don't see this with a 4000mA VARTA battery that I have. My only issue with that battery is that the voltage drop to the 3.3V regulator drops too low and the touch controller freaks out.
It must be something to do with the design of this battery protection circuit. Sadly VARTA don't do these batteries anymore otherwise I would get some more. Mind you, they were 3 times the price :)
I think I have probably seen this issue to
I had assumed that below about 40% the battery couldn't supply enough current for all the junk I have hanging off my a20
However I always seem to see smooth power levels (not random) before a shutdown below 40%
Is a large capacitor accross the lipo likely to help with this? Batteries are a bit of a black art to me!
Quote from: jess on August 09, 2013, 04:34:23 AM
Did anyone here use A20 on LiPo battery power supply and could confirm that it worked without ANY problems?
I'm running an A20 with an Olimex 6600mAh LiPo.
The O/S is Debian and its kernel is 3.4.61+ #2 SMP PREEMPT
The board is normally powered from a mains supply - about 12V and the LiPo is there for times when the power goes off. I have a small script (see below) that monitors the status of the battery and logs it both to a file and to a remote website. As a teston Thursday (it's Saturday morning now) I pulled the power and ran the device on battery until it ran out of juice. After I started it up again, off the external PSU, I found the LiPo was very slow at accepting charge, as recorded by the script. I also found that overnight the battery status changed from
Health: Good to
Health: Dead and charging stopped at about 18% capacity.
Pulling the plug once again and reapplying it after a few seconds restored the battery status to
Health: Good and
Status: Charging 226 mA, Capacity: 18 which is the capacity it was reporting when the charging stopped during the night.
So I would count that as a problem although so far, it's not one I've investigated. I do have one question for the team:
Should I allow the battery to be completely run down to zero, or should I be monitoring its discharge state and shutting down the board at some threshold?
Here's my battery monitoring script:
#!/bin/bash
# script to monitor the state of the battery
PROG=`basename $0`
date "+%d-%b-%Y %H:%M:%S $PROG" >> /var/log/programs
LOG="/var/log/battery.log"
DIR="/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/battery"
MAXV=`cat $DIR/voltage_max_design`
MINV=`cat $DIR/voltage_min_design`
# Run until just before midnight so the log rotator can run
# Have the process restarted from cron
while [ `date "+%H%M%S"` -lt 235930 ] ; do
DATE=`date "+%d-%b-%Y %H:%M:%S"`
MICROVOLTS=`cat $DIR/voltage_now`
HEALTH="`cat $DIR/health`"
STATUS="`cat $DIR/status`"
CAPACITY="`cat $DIR/capacity`"
CURRENT="`cat $DIR/current_now`"
T="`cat $DIR/temp`"
V=`echo "scale=3; $MICROVOLTS / 1000000.0" | bc`
TEMP=`echo "scale=1; $T / 10.0" | bc`
MA=`echo "scale=0; $CURRENT / 1000.0" | bc`
echo "$STATUS" > /var/log/battery-status
if [ "$STATUS" == "Full" ] ; then
printf "$DATE Voltage is $V Temp: $TEMP Health: $HEALTH Status: $STATUS not charging, Capacity: $CAPACITY\n" >> $LOG
else
printf "$DATE Voltage is $V Temp: $TEMP Health: $HEALTH Status: $STATUS $MA mA, Capacity: $CAPACITY\n" >> $LOG
fi
sleep 15
done
and this is what the log file looks like (there are double entries, I think 2 instances of the script are running):
10-May-2014 11:32:45 Voltage is 3.716 Temp: 30.0 Health: Dead Status: Charging 0 mA, Capacity: 18
10-May-2014 11:32:46 Voltage is 3.716 Temp: 30.0 Health: Dead Status: Charging 0 mA, Capacity: 18
10-May-2014 11:33:00 Voltage is 3.716 Temp: 30.0 Health: Dead Status: Charging 0 mA, Capacity: 18
10-May-2014 11:33:01 Voltage is 3.716 Temp: 30.0 Health: Dead Status: Charging 0 mA, Capacity: 18
10-May-2014 11:33:16 Voltage is 3.716 Temp: 30.0 Health: Dead Status: Charging 0 mA, Capacity: 18
10-May-2014 11:33:17 Voltage is 3.716 Temp: 30.0 Health: Dead Status: Charging 0 mA, Capacity: 18
10-May-2014 11:33:31 Voltage is 3.716 Temp: 30.0 Health: Good Status: Discharging 0 mA, Capacity: 18 ### Started running on battery
10-May-2014 11:33:32 Voltage is 3.716 Temp: 30.0 Health: Good Status: Discharging 0 mA, Capacity: 18
10-May-2014 11:33:46 Voltage is 3.729 Temp: 30.0 Health: Good Status: Discharging 567 mA, Capacity: 18
10-May-2014 11:33:47 Voltage is 3.729 Temp: 30.0 Health: Good Status: Discharging 567 mA, Capacity: 18
10-May-2014 11:34:02 Voltage is 3.724 Temp: 30.0 Health: Good Status: Discharging 554 mA, Capacity: 18
10-May-2014 11:34:03 Voltage is 3.707 Temp: 30.0 Health: Good Status: Charging 225 mA, Capacity: 18 ### resumed mains power
10-May-2014 11:34:17 Voltage is 3.708 Temp: 30.0 Health: Good Status: Charging 226 mA, Capacity: 18
10-May-2014 11:34:18 Voltage is 3.708 Temp: 30.0 Health: Good Status: Charging 226 mA, Capacity: 18
10-May-2014 11:34:32 Voltage is 3.708 Temp: 30.0 Health: Good Status: Charging 228 mA, Capacity: 18
10-May-2014 11:34:33 Voltage is 3.707 Temp: 30.0 Health: Good Status: Charging 223 mA, Capacity: 18
10-May-2014 11:34:47 Voltage is 3.710 Temp: 30.0 Health: Good Status: Charging 222 mA, Capacity: 18
10-May-2014 11:34:48 Voltage is 3.710 Temp: 30.0 Health: Good Status: Charging 222 mA, Capacity: 18
Dear all,
I use this topic because I recently bought a LiPo battery (6600 mah) for my Olimex A20 Lime 2 4Gb. I use the distribution Jessie with kernel 3.14 and I have got a problem :
* I use this script. When I only use my battery, I lost around 20% after 15 minutes, see below an extract of my log :
- Voltage is : 1,5V instead of 3,xV ; it's strange
- I lost 1% every 1 minute
2016-07-12 07:51:39 Voltage: 1.50 V | Temp: 30.0°C | Health: Good | Status: Discharging 269 at mA | Capacity: 80%
2016-07-12 07:51:54 Voltage: 1.30 V | Temp: 30.0°C | Health: Good | Status: Discharging 219 at mA | Capacity: 80%
2016-07-12 07:52:09 Voltage: 1.30 V | Temp: 30.0°C | Health: Good | Status: Discharging 220 at mA | Capacity: 79%
2016-07-12 07:52:24 Voltage: 1.40 V | Temp: 30.0°C | Health: Good | Status: Discharging 227 at mA | Capacity: 79%
2016-07-12 07:52:39 Voltage: 1.30 V | Temp: 30.0°C | Health: Good | Status: Discharging 227 at mA | Capacity: 79%
2016-07-12 07:52:54 Voltage: 1.30 V | Temp: 30.0°C | Health: Good | Status: Discharging 227 at mA | Capacity: 78%
2016-07-12 07:53:09 Voltage: 1.40 V | Temp: 30.0°C | Health: Good | Status: Discharging 232 at mA | Capacity: 78%
2016-07-12 07:53:24 Voltage: 1.40 V | Temp: 30.0°C | Health: Good | Status: Discharging 237 at mA | Capacity: 78%
* After shutdown my Olimex (after 1 hour) and connected external power supply (5V 2A ; battery still connected) I've got this status :
2016-07-12 08:27:19 Voltage: 0 V | Temp: 30.0°C | Health: Good | Status: Charging 0 at mA | Capacity: 0%
2016-07-12 08:27:34 Voltage: 0 V | Temp: 30.0°C | Health: Good | Status: Charging 0 at mA | Capacity: 0%
2016-07-12 08:27:49 Voltage: 0 V | Temp: 30.0°C | Health: Good | Status: Charging 0 at mA | Capacity: 0%
2016-07-12 08:28:35 Voltage: 0 V | Temp: 30.0°C | Health: Good | Status: Charging 0 at mA | Capacity: 0%
2016-07-12 08:28:50 Voltage: 0 V | Temp: 30.0°C | Health: Good | Status: Charging 0 at mA | Capacity: 0%
2016-07-12 08:29:05 Voltage: 0 V | Temp: 30.0°C | Health: Good | Status: Charging 0 at mA | Capacity: 0%
2016-07-12 08:29:20 Voltage: 0 V | Temp: 30.0°C | Health: Good | Status: Charging 0 at mA | Capacity: 0%
2016-07-12 08:29:35 Voltage: 0 V | Temp: 30.0°C | Health: Good | Status: Charging 0 at mA | Capacity: 0%
2016-07-12 08:29:50 Voltage: 0 V | Temp: 30.0°C | Health: Good | Status: Charging 0 at mA | Capacity: 0%
2010-01-01 01:00:08 Voltage: 0 V | Temp: 30.0°C | Health: Good | Status: Charging 0 at mA | Capacity: 0%
2016-07-12 08:30:57 Voltage: 0 V | Temp: 30.0°C | Health: Good | Status: Charging 0 at mA | Capacity: 0%
2016-07-12 08:31:12 Voltage: 0 V | Temp: 30.0°C | Health: Good | Status: Charging 0 at mA | Capacity: 0%
2016-07-12 08:31:27 Voltage: 0 V | Temp: 30.0°C | Health: Good | Status: Charging 0 at mA | Capacity: 0%
2016-07-12 08:31:42 Voltage: 0 V | Temp: 30.0°C | Health: Good | Status: Charging 0 at mA | Capacity: 0%
>> After check the voltage on my battery I've got : 3,6V , but this value it's never identify on my Olimex.
Do you have any idea on this problem ?
Thanks for your help.