Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Battery/Charging
  • Assigned To No-one
  • Operating System Another
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by HIllshum - 2009-02-28
Last edited by bertrik - 2009-03-22

FS#9968 - Charging on e200v2

So apparently the charger/battery on the e200 is the same for both v1 and v2. This patch simply copies powermngt-e200.c to powermngt-e200v2.c

Closed by  bertrik
2009-03-22 19:10
Reason for closing:  Accepted
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Committed as svn r20465

Admin
fg commented on 2009-02-28 14:42

If this is the same file, why not just change SOURCES?

was it confirmed that the exact same battery is used in both models?,

I haven't seen any "V2" batteries for sale anywhere…

They do seem to be the same

This patch alone does not enable charging yet, it simply allows the e200v2 to have its own charge / discharge calibration curves.
There was some talk about the e200v2 battery on the sansa v2 forum thread.

To enable charging, we need to include powermgmt-as3525.c too (and change a few other minor changes). I can post a patch that does enable charging later today. It would be nice to have confirmation of the charge settings first (charge current, charge voltage and proper ADC channel to use for reading the voltage).

how would I provide those?

I think I already explained that in the forum thread (but that one is getting so long now that it's easy to overlook something).

1) Charging current can only be determined from direct measurement through the charging cable. This is not so easy to do because it requires a modified cable. Using the same 300 mA charging current as used in the v1 is probably safe (it's still less than 0.5C)
2) Charging voltage can be determined by looking at the battery voltage in the rockbox battery debug menu just after the OF did a full charge of the battery.
3) The proper ADC channel can be determined by checking if the battery voltage shows a realistic value when the charger is plugged in. Modify the argument to adc_read in powermgmt-as3525.c to either ADC_RTCSUP or ADC_BVDD and check which one causes a realistic battery voltage display in rockbox with the charger plugged in (realistic means somewhere between 3.3V and 4.25V).

I'm not going to fry the thing am I?

no

MikeS commented on 2009-03-03 21:52

Bertrik:
"So apparently the charger/battery on the e200 is the same for both v1 and v2"

The as3525 docs just give a better explanation of the very same charging system that the as3514 has (which isn't explained so well there) so it's just a matter of filling in specifics.

To all concerned:
"I'm not going to fry the thing am I?"

The main difference between OF and Rockbox charging is we don't set the voltage to 4.25V but 4.20V instead which I suppose will shorten the runtime a bit compared to OF but is nicer to the LiIon cell. When possible Rockbox takes voltage into consideration before starting a cycle. It's safe to say that we're on the safer side of things.

I said that but whatever….

Okay, I don't think I'll have time for a few days but I'll see what I can do.

Why wait again? You can't do 1) anyway so it doesn't take time, 2) can be done in 5 minutes, 3) might take an hour or so (at the most), assuming you have the build-environment set up.
Creating the patch should take me no more than a few hours, I just need the information I explained earlier (03 March 2009, 16:55 GMT+1).

I will start charging now, is there a way to boot straight to that debug screen?
3) I will do once I have the time

The voltage after a full OF charge is 4.149V

This patch should enable charging for the e200v2.
The charge settings and charge curve have been copied from the e200v1 for now (charge current is actually a little lower than reported in the forum thread) and could be further calibrated.

Not quite sure about the proper ADC channel for battery voltage monitoring during charging. Please check if the battery voltage shows a normal value in the rockbox debug/battery menu.

The powermgmt-target file is now moved in SVN, so the patch is a bit smaller now.

I have applied e200v2-charging4.patch to my e200v2 and tested charging. The battery was at about 58% charge when I started the charge cycle. I reached max voltage level of 4.226v after 38 minutes of charging. The battery voltage remained at that level until I disconnected the USB cable. I did not see the 50mv drop in voltage at full charge.

I have attached a text file with the voltage levels as shown on the battery debug screen while charging and a screen dump of the debug screen.

Great, thanks for testing. This basically look OK to me:
* voltage seems right: the final voltage is a little higher than the expect 4.2V but nothing to worry about IMO.
* you see the voltage saturate nicely as the charger goes from constant-current charging into the constant voltage charging mode.
* the charge was not complete, that's why you didn't see the slight drop in voltage as the charger turned off. Basically what happens in the constant voltage mode is that the charger keeps the charge voltage constant while the battery charging current slowly drops over time. At some point the charge current has dropped to a certain percentage of the initial charge current (say 10%) and the charger should automatically stop the charge cycle.

Could you try a charge again, and wait a bit longer?
BTW, you should be able to use the battery bench plugin for logging the charge parameters (just make sure you shutdown the player cleanly, so the battery bench plugin has a chance of properly writing its measurements to file).

Here is the battery bench from a second run. The battery was completely run down prior to this charging cycle.

Nice, thanks. You can see in the battery bench that the charger went from constant-current to constant voltage mode after 1h48 (1.8 hours) and then spent another 0h54m (0.9 hours) in constant voltage mode.
In constant-I mode, about 300 mA * 1.8 hour = 540 mAh was delivered to the battery and in constant-V mode, about 165 mA * 0.9 hour = 148.5 mAh was delivered (assuming a linear decreasing current from 300 mA to 30 mA), for a total of about 688 mAh. This is quite close to the claimed battery capacity of 730 mAh.

The battery bench file also exposes a bug in the battery bench plugin … It doesn't show the status of the charger (charging or discharging) :P

As far as I'm concerned, the information so far indicates that charging can be enabled for e200v2.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing