android
  #1  
Old 06-29-2014, 07:52 AM
Berenicus Berenicus is offline
Junior Member
 
Join Date: Jun 2014
Posts: 2
Default Calibrating battery capacity and charging in Rockbox

I'm going to change my Battery in my Clip+ and was looking for a way to change the Battery time remaining setting in Rockbox. Unfortunately I didn't find any instructions . But I did find the solution.

For someone who is interested in having an accurate battery Time remaining display here is a how to.

Run a battery bench before to know the Voltages on % Levels

You have to edit Rockbox source files and compile Rockbox for it to work.

Voltage % Levels
Edit the Numbers according to what your battery bench results were.
rockbox\firmware\target\arm\as3525\sansa-clipplus\powermgmt-clipplus.c

/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
{
{ 3300, 3653, 3701, 3735, 3768, 3790, 3833, 3900, 3966, 4056, 4140 }
};

Battery time remaining aka Battery Capacity
The standard Clip+ battery capacity is 290 mAh
If you only wish to set a permanent capacity set the lines CAPACITY_DEFAULT/MIN/MAX to same Value and CAPACITY_INC to 0

If you however wish to play around from within Rockbox menu set the Values as you see fit. My new battery will be 2200 mAh so this are my example settings

rockbox\firmware\export\config\sansaclipplus.h
#define BATTERY_CAPACITY_DEFAULT 290 /* default battery capacity */
#define BATTERY_CAPACITY_MIN 290 /* min. capacity selectable */
#define BATTERY_CAPACITY_MAX 2200 /* max. capacity selectable */
#define BATTERY_CAPACITY_INC 50 /* capacity increment */


Battery charging speed and duration

If you have Replaced for a High Capacity Battery you may notice that it takes very long time to recharge and that the charging process terminates after some hours. To speed up the charging and prolong the charging duration you can edit the following file. The as3525 supports up to 400mA for charging according to datasheet.

rockbox\firmware\target\arm\as3525\powermgmt-target.h

#elif defined(SANSA_CLIPPLUS)

/* Check if topped-off and monitor voltage while plugged. */
#define BATT_FULL_VOLTAGE 4160
#define BATT_VAUTO_RECHARGE 4100
#define BATT_CHG_V CHG_V_4_20V
#define BATT_CHG_I CHG_I_350MA
#define CHARGER_TOTAL_TIMER (6*3600*2) /* about 1.5 * capacity / current */

and the line in rockbox\firmware\export\config\sansaclipplus.h

/* maximum charging current */
#define CURRENT_MAX_CHG 350

Last edited by Berenicus; 07-01-2014 at 04:53 AM.
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 06-29-2014, 08:38 AM
skip252 skip252 is offline
Administrator
 
Join Date: Dec 2007
Location: Chicago
Posts: 5,356
Default

Welcome to ABi

I've moved your thread to the Rockbox subforum as this only work in Rockbox. I also added "in Rockbox" to the title to make it more easily searchable.

I see that you mention different battery capacities. If you have information for a good source of batteries of various capacities could you add those? There's been people that have asked where to find them and having a known, reliable source could be helpful to those who want to change or upgrade theirs.
Reply With Quote

  #3  
Old 06-29-2014, 09:04 AM
Berenicus Berenicus is offline
Junior Member
 
Join Date: Jun 2014
Posts: 2
Default

Hi, didn't see that I was not in Rockbox thread.

I've been using an old mobile phone battery for quite some time witch gave me approximately 30h of play but ordered a new one from Amazon

I was looking only for the dimensions as it will glue it to the back of the clip+

The Battery for TravelPilot 500, TravelPilot 700 has Dimension (LxWxH): 35x53,4x11mm so I figured out it will be suitable. In fact any battery is ok, you even do not need the original voltage protection circuit as long you do not solder the blue middle wire. I was using a circuit from a broken TomTom battery Charging and discharging works ok.

The battery is currently for 11,25 € in Germany Amazon

523450L110 1S2PMX

Technologie: Li-ion
Spannung: 3.7 V
Kapazität: 2200 mAh
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 03:54 AM.