Rockbox Development > New Ports
Cowon D2
Chronon:
--- Quote from: wahamir on April 11, 2008, 05:33:06 PM ---Just to be sure. I think you don't understand all.
We cannot calculate the level of the battery with volt, because the volt value will always be the same. If you want to calculate the amount of electricity left in a battery, you need to use ampere.
Hope that will help you still I can't help with the code and good job. I can't wait to have a rockbox firmware for my d2.
--- End quote ---
That is true for an ideal voltage source. Initially, the voltage of the battery will change very little since it can source enough current to maintain the voltage. As a battery runs down it will not be able to produce enough electrons to maintain the potential difference for a given load.
Surely you will agree that as a battery runs down the potential difference across its electrodes approaches zero.
---
I'm not terribly familiar with how the battery state gets characterized here. I'm only pointing out that a battery is not an ideal voltage source.
martink:
I think, because the battery is not an ideal voltage source, we can use it for measurement, and we don't have to measure electric current (ampere):
the voltage becomes lower and lower, when the battery turns empty.
cybergrind:
blinking battery has voltage near 3.500V.
2 wahamir: that opinion not correct, because we use battery input through power supply chip, that controls voltage in player (pcf50606 need only 2.7V for work), and controls battery state using resistive divider (fig 57 in datasheet).
you can view battery voltage in HWinfo with this patch FS#8878 (http://www.rockbox.org/tracker/task/8878).
I used formula two at page 73, maybe this more precise method. Message your max and min values for more accurate results.
NB! results not correct with usb-cable pluged.
shotofadds:
I've updated SVN to read the battery status (you can see the voltage in Debug > View battery, and then press +). It's not calibrated yet, so the battery icon may well show incorrect information (and the "estimated runtime" is certainly wrong).
Inserting a USB cable or the AC-adapter will affect the voltage reading. I'm not sure what is the best way to compensate for this.
cybergrind:
since results of two measurements is too different, we should use average value, for more precise values.
and, maybe, measure in such way:
--- Code: ---pcf50606_write(PCF5060X_ADCC2, 0x3); //0b00000011 read subtractor
....
current_voltage = adc_val*2400/1024+3000; //with this formula we can't use BATTERY_SCALE_FACTOR
--- End code ---
and I didn't sure, that we should get battery voltage, when plugged USB or DC
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version