diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2004-07-23 08:45:34 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2004-07-23 08:45:34 +0000 |
commit | 25a60a54e72cbf2694110b998a603ae5c63fae5f (patch) | |
tree | 566d3610f59e7bd1c41efb28d50a8cdf4f27a48b /docs | |
parent | 6c7011415b91e23d4740b8df8fba84d450c55a6d (diff) | |
download | rockbox-25a60a54e72cbf2694110b998a603ae5c63fae5f.tar.gz rockbox-25a60a54e72cbf2694110b998a603ae5c63fae5f.zip |
Brushed it up a little
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4919 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'docs')
-rwxr-xr-x | docs/CHARGING_ALGORITHM | 133 |
1 files changed, 69 insertions, 64 deletions
diff --git a/docs/CHARGING_ALGORITHM b/docs/CHARGING_ALGORITHM index 81c4fc3b5c..a1a6e2b56e 100755 --- a/docs/CHARGING_ALGORITHM +++ b/docs/CHARGING_ALGORITHM | |||
@@ -1,16 +1,17 @@ | |||
1 | CHARGING ALGORITHM | 1 | CHARGING ALGORITHM |
2 | 2 | ||
3 | This doc and a part of the charger implementation (especially voltage courves, | 3 | This doc and a part of the charger implementation (especially voltage curves, |
4 | remaining time estimation, trickle charge) is written by Uwe Freese. If you miss | 4 | remaining time estimation, trickle charge) is written by Uwe Freese. If you |
5 | some information here, write to mail@uwe-freese.de. | 5 | miss some information here, write to mail@uwe-freese.de. |
6 | 6 | ||
7 | 7 | ||
8 | 8 | ||
9 | [INTRODUCTION] | 9 | [INTRODUCTION] |
10 | 10 | ||
11 | This doc describes how the charging works for the recorder. The algorithm can be | 11 | This doc describes how the charging works for the recorder. The algorithm can |
12 | found in firmware/powermgmt.[c|h]. Debug output is done in apps/debug_menu.c. | 12 | be found in firmware/powermgmt.[c|h]. Debug output is done in |
13 | Charging for the player and the FM recorder is done by the hardware and | 13 | apps/debug_menu.c. |
14 | Charging for the player and the FM/V2 recorder is done by the hardware and | ||
14 | therefore isn't implemented in rockbox. Only the functions that calculate the | 15 | therefore isn't implemented in rockbox. Only the functions that calculate the |
15 | battery level are also used for these models. | 16 | battery level are also used for these models. |
16 | 17 | ||
@@ -24,14 +25,14 @@ All following information is related to the recorder. | |||
24 | - We can switch the charging current (about 350mA, constant) on and off. | 25 | - We can switch the charging current (about 350mA, constant) on and off. |
25 | 26 | ||
26 | 27 | ||
27 | [VOLTAGE COURVES] | 28 | [VOLTAGE CURVES] |
28 | 29 | ||
29 | See http://www.uwe-freese.de/rockbox for some voltage courves taken while | 30 | See http://www.uwe-freese.de/hardware-projekte/rockbox/ladeverfahren.html |
30 | charging and decharging an AJB. | 31 | for some voltage curves taken while charging and decharging an AJB. |
31 | 32 | ||
32 | These voltage courves are implemented as arrays in rockbox. We can then | 33 | These voltage curves are implemented as arrays in rockbox. We can then |
33 | calculate how full the batteries are (in percent) after taking the actual | 34 | calculate how full the batteries are (in percent) after taking the actual |
34 | voltage. Both voltage courves (charging and decharging) are used here. | 35 | voltage. Both voltage curves (charging and decharging) are used here. |
35 | 36 | ||
36 | 37 | ||
37 | [CHARGE OVERVIEW] | 38 | [CHARGE OVERVIEW] |
@@ -43,27 +44,29 @@ voltage. Both voltage courves (charging and decharging) are used here. | |||
43 | regulation at a high value). | 44 | regulation at a high value). |
44 | - After that, do trickle charge (max. 12 hours with voltage regulation at a | 45 | - After that, do trickle charge (max. 12 hours with voltage regulation at a |
45 | lower value). | 46 | lower value). |
46 | - When trickle charge is done and you did not disconnect or shut off your AJB by | 47 | - When trickle charge is done and you did not disconnect or shut off your AJB |
47 | now, the AJB decharges normally since it reaches a low voltage and everything | 48 | by now, the AJB decharges normally since it reaches a low voltage and |
48 | starts from the beginning. | 49 | everything starts from the beginning. |
49 | 50 | ||
50 | 51 | ||
51 | [NORMAL CHARGE] | 52 | [NORMAL CHARGE] |
52 | 53 | ||
53 | When charging is started, the charger is turned on. The batteries are charged | 54 | When charging is started, the charger is turned on. The batteries are charged |
54 | with a constant current of about 350mA. The charging is stopped for three reasons: | 55 | with a constant current of about 350mA. The charging is stopped for three |
56 | reasons: | ||
55 | 57 | ||
56 | - the voltage goes down in a 5 min interval (delta peak, see below) | 58 | - the voltage goes down in a 5 min interval (delta peak, see below) |
57 | - the voltage goes up only a little bit in an 30 min interval (is mainly constant) | 59 | - the voltage goes up only a little bit in an 30 min interval (is mainly |
60 | constant) | ||
58 | - the charging duration exceeds a maximum duration | 61 | - the charging duration exceeds a maximum duration |
59 | 62 | ||
60 | 63 | ||
61 | [DYNAMIC MAX DURATION CALCULATION] | 64 | [DYNAMIC MAX DURATION CALCULATION] |
62 | 65 | ||
63 | The max duration is calculated dynamically. The time depends on how full the | 66 | The max duration is calculated dynamically. The time depends on how full the |
64 | battery is when charging is started. For a nearly full battery, the max duration | 67 | battery is when charging is started. For a nearly full battery, the max |
65 | is low, for an empty one, it is a high value. The exact formula can be found in | 68 | duration is low, for an empty one, it is a high value. The exact formula can |
66 | the source code. The battery capacity is also considered here. | 69 | be found in the source code. The battery capacity is also considered here. |
67 | 70 | ||
68 | 71 | ||
69 | [LIION BATTERY IN FM RECORDER] | 72 | [LIION BATTERY IN FM RECORDER] |
@@ -79,13 +82,14 @@ batteries are full. | |||
79 | 82 | ||
80 | Two facts on batteries are the reason why this works: | 83 | Two facts on batteries are the reason why this works: |
81 | 84 | ||
82 | - If the batteries are full, the charging current cannot charge the battery anymore. | 85 | - If the batteries are full, the charging current cannot charge the battery |
86 | anymore. | ||
83 | So the energy is absorbed by heating up the battery. | 87 | So the energy is absorbed by heating up the battery. |
84 | - Each battery has a negative temperature coefficient, that means the voltage goes | 88 | - Each battery has a negative temperature coefficient, that means the voltage |
85 | down when the temperature goes up. | 89 | goes down when the temperature goes up. |
86 | 90 | ||
87 | NiMH batteries have a smaller delta peak than NiCd, but is is enough for Rockbox | 91 | NiMH batteries have a smaller delta peak than NiCd, but is is enough for |
88 | to detect that the batteries are full. | 92 | Rockbox to detect that the batteries are full. |
89 | 93 | ||
90 | Related documents on the web: | 94 | Related documents on the web: |
91 | 95 | ||
@@ -102,16 +106,16 @@ Related documents on the web: | |||
102 | [TOP OFF CHARGE AND TRICKLE CHARGE] | 106 | [TOP OFF CHARGE AND TRICKLE CHARGE] |
103 | 107 | ||
104 | After a normal charge is completed, trickle charging is started. That means | 108 | After a normal charge is completed, trickle charging is started. That means |
105 | charging to keep the batteries full. While trickle charge in other (stand alone) | 109 | charging to keep the batteries full. While trickle charge in other (stand |
106 | chargers means charging the amount that the battery loses because of self | 110 | alone) chargers means charging the amount that the battery loses because of |
107 | decharging, here it's charging the amount the AJB consumes when it's on. That's | 111 | self decharging, here it's charging the amount the AJB consumes when it's on. |
108 | because it is not possible to switch off the AJB when charging is done. It goes | 112 | That's because it is not possible to switch off the AJB when charging is done. |
109 | on again and then the archos firmware charger code would charge again. So we | 113 | It goes on again and then the archos firmware charger code would charge again. |
110 | have trickle charge in rockbox. | 114 | So we have trickle charge in rockbox. |
111 | 115 | ||
112 | In simple words, rockbox charges about 15 seconds per minute in trickle mode. An | 116 | In simple words, rockbox charges about 15 seconds per minute in trickle mode. |
113 | AJB consumes 100 mA when it's on and the charging current is about 300mA. So | 117 | An AJB consumes 100 mA when it's on and the charging current is about 300mA. |
114 | charging 15 s and decharge 45 s will keep the batteries full. | 118 | So charging 15 s and decharge 45 s will keep the batteries full. |
115 | 119 | ||
116 | But the number of seconds the charger is on in trickle charge mode is also | 120 | But the number of seconds the charger is on in trickle charge mode is also |
117 | adjusted dynamically (between 1 and 24 sec). Rockbox tries to hold the battery | 121 | adjusted dynamically (between 1 and 24 sec). Rockbox tries to hold the battery |
@@ -120,21 +124,22 @@ full") for 90 minutes, then a level of 5,45 V. If the voltage drops below the | |||
120 | wanted value, rockbox will charge one second more the next minute. If is is | 124 | wanted value, rockbox will charge one second more the next minute. If is is |
121 | greater than this value, is will charge one second less. | 125 | greater than this value, is will charge one second less. |
122 | 126 | ||
123 | Trickle charging runs 12 hours after finishing the normal charging. That should | 127 | Trickle charging runs 12 hours after finishing the normal charging. That |
124 | be enough for charging the AJB over night and then unplug the charger sometime | 128 | should be enough for charging the AJB over night and then unplug the charger |
125 | in this 12 hour trickle charge time. It is not recommended to trickle charge | 129 | sometime in this 12 hour trickle charge time. It is not recommended to trickle |
126 | over days, that's because it is stopped after 12 hours. | 130 | charge over days, that's because it is stopped after 12 hours. |
127 | 131 | ||
128 | Many chargers do top off and trickle charge by feeding a constant (low) current | 132 | Many chargers do top off and trickle charge by feeding a constant (low) |
129 | to the batteries. Rockbox, as described, makes a voltage regulation. That's | 133 | current to the batteries. Rockbox, as described, makes a voltage regulation. |
130 | because the power consumption of the AJB changes when backlight is on/disk is | 134 | That's because the power consumption of the AJB changes when backlight is |
131 | spinning etc. and doing a voltage regulation is the simplest way to charge | 135 | on/disk is spinning etc. and doing a voltage regulation is the simplest way |
132 | exactly the needed amount. | 136 | to charge exactly the needed amount. |
133 | 137 | ||
134 | There are two charge ICs I want to mention here: The Philips TEA1102 and TEA1103 | 138 | There are two charge ICs I want to mention here: The Philips TEA1102 and |
135 | do voltage regulation for NiCd and NiMH at 1,325 V per cell. That would be 5,3 V | 139 | TEA1103 do voltage regulation for NiCd and NiMH at 1,325 V per cell. That |
136 | for four cells, but I think 5,45 V is best for Rockbox with the maximum time of | 140 | would be 5,3 V for four cells, but I think 5,45 V is best for Rockbox with the |
137 | 12 hours. Note that the voltage values are taken in the part of a minute where | 141 | maximum time of 12 hours. |
142 | Note that the voltage values are taken in the part of a minute where | ||
138 | the charger is off, so the values are a little bit smaller than the actual | 143 | the charger is off, so the values are a little bit smaller than the actual |
139 | average of the whole 60 seconds. | 144 | average of the whole 60 seconds. |
140 | The Philips TEA1102 top-off charge time (with 0,15 C) is one hour. | 145 | The Philips TEA1102 top-off charge time (with 0,15 C) is one hour. |
@@ -155,11 +160,11 @@ In simple words, it is | |||
155 | 160 | ||
156 | remaining time = remaining battery energy / power consumption of AJB | 161 | remaining time = remaining battery energy / power consumption of AJB |
157 | 162 | ||
158 | With using the battery courves described above and the battery capacity you | 163 | With using the battery curves described above and the battery capacity you |
159 | selected in the settings menu, the remaining capacity is calculated. For the | 164 | selected in the settings menu, the remaining capacity is calculated. For the |
160 | power consumption, a usual constant value is used. If the LED backlight is set | 165 | power consumption, a usual constant value is used. If the LED backlight is set |
161 | to always on, it is also considered. Having a modified Jukebox with 8 MB of RAM | 166 | to always on, it is also considered. Having a modified Jukebox with 8 MB of |
162 | leads to about 22 percent longer estimated running time. | 167 | RAM leads to about 22 percent longer estimated running time. |
163 | 168 | ||
164 | 169 | ||
165 | [BATTERY DISPLAY HOW THE USER EXPECTS IT] | 170 | [BATTERY DISPLAY HOW THE USER EXPECTS IT] |
@@ -168,15 +173,15 @@ To not confuse the user with the shown battery level, some tricks are used in | |||
168 | the battery level calculation (this does not affect the charging algorithm, | 173 | the battery level calculation (this does not affect the charging algorithm, |
169 | because it uses the raw voltages): | 174 | because it uses the raw voltages): |
170 | 175 | ||
171 | - if charging is completed, top-off charge or trickle charge is running, always | 176 | - if charging is completed, top-off charge or trickle charge is running, |
172 | set the battery level to 100% | 177 | always set the battery level to 100% |
173 | - the battery level is only allowed to change 1% per minute (exception: when usb | 178 | - the battery level is only allowed to change 1% per minute (exception: when |
174 | is connected, is is allowed to go 3% down/min) | 179 | usb is connected, it is allowed to go 3% down/min) |
175 | - if charging just started (or stopped), ignore the battery voltage for the | 180 | - if charging just started (or stopped), ignore the battery voltage for the |
176 | first 25 minutes | 181 | first 25 minutes |
177 | - after turning on the device, add another 5% to the battery level, because the | 182 | - after turning on the device, add another 5% to the battery level, because |
178 | drive is used heavily when booting and the voltage usually gets a little higher | 183 | the drive is used heavily when booting and the voltage usually gets a |
179 | after that | 184 | little higher after that |
180 | 185 | ||
181 | 186 | ||
182 | [WHICH CHARGING MODE TO USE] | 187 | [WHICH CHARGING MODE TO USE] |
@@ -190,9 +195,9 @@ charge on" (that the batteries remain full). | |||
190 | 195 | ||
191 | A special case: If you fill up the batteries that are still nearly full every | 196 | A special case: If you fill up the batteries that are still nearly full every |
192 | night, it is recommended that you make a complete charge cycle from time to | 197 | night, it is recommended that you make a complete charge cycle from time to |
193 | time. Select "deep discharge on" and "trickle charge on" and wait till the whole | 198 | time. Select "deep discharge on" and "trickle charge on" and wait till the |
194 | cycle is over (you can speed up the discharging a little bit by turning on the | 199 | whole cycle is over (you can speed up the discharging a little bit by turning |
195 | LED backlight). Even if the battery sellers say NiMH cells don't show a memory | 200 | on the LED backlight). Even if the battery sellers say NiMH cells don't show a |
196 | effect, I recommend making this procedure from time to time (every 10th charging | 201 | memory effect, I recommend making this procedure from time to time (every 10th |
197 | cycle). BUT: Don't recharge the batteries completely every time if you don't | 202 | charging cycle). BUT: Don't recharge the batteries completely every time if |
198 | have to. | 203 | you don't have to. |