Difference between revisions of "Power modes"
Jonsneyers (talk | contribs) (→Lid Closed) |
(→What about the power cable?) |
||
(22 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
+ | [[File:Lead_Photo_For_Power_modes0-2920264867079787.jpg|thumbnail|Powerbutton]] | ||
+ | |||
+ | =Power Supply= | ||
+ | ==Can it charge from USB?== | ||
+ | Yes, through the mini-AB OTG port. However, whilst the Pandora is in use the charge rate may be so low as to make it impractical for normal purposes. [http://www.gp32x.com/board/index.php?s=&showtopic=45902&view=findpost&p=683572] | ||
+ | |||
+ | ==What kind of battery does it have?== | ||
+ | |||
+ | The Pandora has a 4000mAh Lithium Polymer battery. | ||
+ | |||
+ | Batteries are user-replaceable and spares are sold by Pandora retailers. | ||
+ | |||
+ | ==How long does the battery last?== | ||
+ | * The actual battery runtime varies based on the the software being run, peripherals in use, and consequently the [[Power modes|power mode]] in which the Pandora operates. | ||
+ | ** For instance, using Wifi constantly, or having it constantly polling will reduce the life by a couple hours, compared to disabling the wifi altogether. | ||
+ | * Starting with the OS [http://boards.openpandora.org/index.php?/topic/7558-superzaxxon-beta-2-released/ SuperZaxxon, Beta 2, using kernel 3.2.1], the Pandora has: | ||
+ | ** a total standby of averagely 180 hours, | ||
+ | ** an active runtime of 10 to 30 hours (screen on & WiFi on, PND app(s) which utilize more/less CPU) | ||
+ | ** up to 75 hours (idle system, screen & WiFi off). | ||
+ | ** Source: [http://boards.openpandora.org/index.php?/topic/7196-32-kernel-issue-tracking-thread/page__st__200#entry138048 Study by user porg] | ||
+ | |||
+ | ==What about the power cable?== | ||
+ | The Pandora ships with a switching power supply with a standard cord socket which should function with 110V and 240V AC power. These are either localised, or shipped with an appropriate adaptor. | ||
+ | |||
+ | A PSP power supply will work fine with the Pandora [http://forum.openpandora.org/viewtopic.php?f=17&t=41&st=0&sk=t&sd=a]. | ||
+ | |||
+ | The barrel jack is 4mm Ø 1.7mm inside and 9.5mm long + on the inside | ||
+ | |||
+ | ==Is it possible to run from the AC Adaptor alone?== | ||
+ | Originally, it was thought not, due to the design of the OMAP chipset appearing to require a battery to be connected. [http://www.gp32x.com/board/index.php?s=&showtopic=41548&view=findpost&p=600811] However, it has now been confirmed that the Pandora DOES now work without a battery installed, although some features (like backlight) may have to be turned off via software to enable this[http://www.gp32x.com/board/index.php?/topic/51654-notaz-and-his-pandora/page__view__findpost__p__806714]. The hardware tweak or tweaks have been performed as part of Pandora development, and are not something that the end user will have to worry about/perform[http://www.gp32x.com/board/index.php?/topic/51654-notaz-and-his-pandora/page__view__findpost__p__806734][http://www.gp32x.com/board/index.php?/topic/51654-notaz-and-his-pandora/page__view__findpost__p__806808]. | ||
+ | |||
+ | Information from Mweston [http://www.gp32x.com/board/index.php?/topic/53635-so-are-the-batteries-tested-at-all/page__view__findpost__p__858065] | ||
+ | When no battery is found on AC adapter insertion, the unit goes into constant voltage mode which provides a constant 4.0V on the battery net. It doesn't like it if you put a battery in at this point because the TI chip doesn't appear to be designed to jump back to normal mode without a power cycle. It could do weird things like dump ridiculous amounts of current into the battery without software control. I liked the idea of letting customers power without a battery so we left this feature in but be aware of this restriction: | ||
+ | |||
+ | IF YOU POWERED THE SYSTEM WITHOUT A BATTERY, SHUT IT OFF BEFORE STICKING THE BATTERY BACK IN. (not an angry sentence, just making it clear.) :) | ||
+ | |||
+ | When the battery is inserted first, the system will power up using the normal mode. When the AC adapter is plugged in after this, it will power the system and charge the battery up to the limits set in software. Currently, Notaz and I have chosen 1A on the AC adapter and 600mA from the USB input. It can be changed by sending commands to the chip to alter these set numbers but that is a software lesson better learned from someone else. With the LCD off (lid closed perhaps) idling on the desktop, something like 750mA will go to the battery for a 6 hour charge time or so. With the system doing stuff and demanding more power, less current will go to the battery and it will charge slower. 1A was also chosen to consider thermal dissipation because the regulator of the TI chip is linear and wastes energy dropping the voltage from the 5V down to just above the cell voltage. You may notice the system feels warmer when the battery is more discharged than when it is full which is normal. | ||
+ | |||
+ | I haven't had much luck hot swapping batteries while the system is live but I think it worked for ED once. For me, as soon as I pull the battery, the system resets. The power management chip seems to rely on the status of the thermistor in the battery and it if disappears, it can trigger events. Maybe there are software work arounds but I don't know. | ||
+ | |||
+ | ==Does the Pandora have 'sleep' or 'hibernate' modes?== | ||
+ | Pandora supports suspend-to-RAM (sleep) but not suspend-to-disk (hibernate)[http://boards.openpandora.org/topic/16732-hibernation-on-the-pandora]. Entering these [[Power modes|power saving modes]] will be controlled by software and can be configured to happen when you press the power switch, close the lid, or only on demand. | ||
+ | |||
+ | |||
[[Image:Battery.jpg|thumb|The Pandora's battery]] | [[Image:Battery.jpg|thumb|The Pandora's battery]] | ||
Line 6: | Line 50: | ||
===Normal Mode=== | ===Normal Mode=== | ||
− | This is the normal operating mode, [[display]] on, [[WiFi]] and [[Bluetooth]] on if requested. | + | This is the normal operating mode, [[display]] on, [[WiFi]] and [[Bluetooth]] on if requested. CPU speed can be selected by the user, and has a small impact on battery life. Screen brightness will also have a significant effect on battery life. The CPU should automatically self-regulate to the current task, and 10-20 hours battery life is possible depending on usage. This is mostly independent of the set CPU speed for any given task. At any time, the battery gauge will show the remaining battery life ''if the usage remains the same as over the past some seconds''. |
See [http://boards.openpandora.org/index.php?/topic/10738-pandora-power-consumption-breakdown/] for a detailed breakdown of power consumption. | See [http://boards.openpandora.org/index.php?/topic/10738-pandora-power-consumption-breakdown/] for a detailed breakdown of power consumption. | ||
===Lid Closed=== | ===Lid Closed=== | ||
− | The only change with the lid closed is to turn off the LCD | + | The only change with the lid closed is to turn off the LCD backlight and the display itself. This improves battery life, allowing music playback and streaming to continue. As of Hotfix2, the screen remains on if the device is powered up with the lid closed. It is also possible to set xfce to blank the screen after a period of inactivity, which helps with battery. |
===Low Power=== | ===Low Power=== | ||
− | Low power mode is toggled by a short press of the | + | Low power mode is toggled by a short press of the power switch to the right. The screen is off, the [[radios]] are disabled, the CPU max speed is set to 14 MHz. The device is still silently on, allowing for alarms to go off or it to be turned on again instantly. The power LED will be dimmed, and may appear to be off if you are outside in the sunshine. |
Low power mode is probably going to be used as the normal "off" for most people, with true off (device powered down entirely, unable to respond to alarms or wake up quickly) available to conserve battery power. Turning the Pandora off completely is the best option if you don't plan on using it for few days or longer. | Low power mode is probably going to be used as the normal "off" for most people, with true off (device powered down entirely, unable to respond to alarms or wake up quickly) available to conserve battery power. Turning the Pandora off completely is the best option if you don't plan on using it for few days or longer. | ||
− | Since the Pandora has to be powered whilst it is charging, low power mode is best for fastest charging, and will even allow a full charge to be achieved from | + | Since the Pandora has to be powered whilst it is charging, low power mode is best for fastest charging, and will even allow a full charge to be achieved from USB. It is also the best way to use the Pandora as a USB charger for other devices. |
− | Opening the | + | Opening the screen whilst in low power mode has no effect (screen stays off, clocks stay low), and you will need to use the power switch to resume. |
− | At the moment, there is no clear advantage in slowing the clocks (other than being an effective pause button when playing MP3). The only saving is through disabling the radios. This is likely to be improved in due course since there are features in the omap processor for power saving which are being added to the linux | + | At the moment, there is no clear advantage in slowing the clocks (other than being an effective pause button when playing MP3). The only saving is through disabling the radios. This is likely to be improved in due course since there are features in the omap processor for power saving which are being added to the linux kernel. |
===Power Off=== | ===Power Off=== | ||
− | Select Logout then Shutdown from the window manager to power off. If a charger is connected, the device will re-boot immediately. It is possible to get into a state where you believe it is powered off, but in fact it is using power at the normal screen off rate - so after 12 hours, 50% of your battery is gone. The Power green | + | Select Logout then Shutdown from the window manager to power off. If a charger is connected, the device will re-boot immediately. It is possible to get into a state where you believe it is powered off, but in fact it is using power at the normal screen off rate - so after 12 hours, 50% of your battery is gone. The Power green LED ought to be a tell-tale. It is possible that some bugs exist in this area, but nothing has been clearly identified[http://www.gp32x.com/board/index.php?/topic/54652-solved-pandora-lost-charge-overnight/] |
A common problem seems to be that if you switch off ''before'' unplugging, your Pandora will re-boot even though it is now left unplugged. This problem is compounded by the low battery shutdown script being called repeatedly (and actually preventing shutdown). | A common problem seems to be that if you switch off ''before'' unplugging, your Pandora will re-boot even though it is now left unplugged. This problem is compounded by the low battery shutdown script being called repeatedly (and actually preventing shutdown). | ||
− | To do a '''hard-reset''' of the Pandora (in case of software crashes), press and hold the | + | To do a '''hard-reset''' of the Pandora (in case of software crashes), press and hold the Pandora key and flick the power button to the right. |
To do a '''hard-shutdown''' of the Pandora, press and hold the Pandora key ''with right shoulder button held'' and flick the power button to the right, and then select shutdown from the menu.[http://www.gp32x.com/board/index.php?/topic/59233-hf5-not-shutting-down-or-rebooting/page__view__findpost__p__946375] | To do a '''hard-shutdown''' of the Pandora, press and hold the Pandora key ''with right shoulder button held'' and flick the power button to the right, and then select shutdown from the menu.[http://www.gp32x.com/board/index.php?/topic/59233-hf5-not-shutting-down-or-rebooting/page__view__findpost__p__946375] | ||
Line 37: | Line 81: | ||
==Charging== | ==Charging== | ||
[[image:Power_uk.png|thumb|alt=UK charger and adapter|UK charger and adapter]] | [[image:Power_uk.png|thumb|alt=UK charger and adapter|UK charger and adapter]] | ||
− | It is possible to charge from the mains charger (use the supplied one or a ''GENUINE'' PSP adaptor only) or | + | It is possible to charge from the mains charger (use the supplied one or a ''GENUINE'' PSP adaptor only) or USB cable. While a charger is connected, remaining battery level is displayed, but the time displays 00:00. If charging from USB, it is possible that the battery will still discharge slowly, since the Pandora takes more current (in normal mode) than the USB can supply. Mains charge is configured to draw 1000mA, USB charge is more like 600mA. |
It is not possible to charge the Pandora without turning it on - connecting the mains charger or the USB cable will turn it on automatically. The normal charging circuits rely on the CPU for configuration. In practice, this has minimal impact on usage, except that after charging, | It is not possible to charge the Pandora without turning it on - connecting the mains charger or the USB cable will turn it on automatically. The normal charging circuits rely on the CPU for configuration. In practice, this has minimal impact on usage, except that after charging, | ||
− | + | you might wish to unplug the charger and explicitly turn off if you don't intend to use the Pandora soon. <!-- (and maybe there is a easy way to automate this by adding a charger event to call a script). [Not if you have to manually disconnect it, IMO] --> | |
− | you might wish to explicitly turn off (and maybe there is a easy way to automate this by adding a charger event to call a script). | ||
Full discharge charging: The pandora will shutdown in case of low battery power. However there is a protection circuit in the battery itself which will cut off the power output of the battery. The battery and the pandora seems to be dead in this condition, but it's not. If you plug in the power | Full discharge charging: The pandora will shutdown in case of low battery power. However there is a protection circuit in the battery itself which will cut off the power output of the battery. The battery and the pandora seems to be dead in this condition, but it's not. If you plug in the power | ||
Line 49: | Line 92: | ||
<!-- which firmware was this below for? --> | <!-- which firmware was this below for? --> | ||
− | If your Pandora's | + | If your Pandora's battery is at less than 1% (actually configurable in XFCE), then you may have problems in using USB to charge the Pandora. Currently, USB is not recognised by the XFCE battery monitor so it will shutdown with no warning. As a workaround, you can put your Pandora into low power mode as soon as the flashing mouse icon (XFCE startup) appears. This should significantly delay loading the battery monitor widget, and even if the charge hasn't passed 1% by the time it checks, on the next try you should be there. |
==Operating Point== | ==Operating Point== | ||
− | The ''OPP'' is a TI term which reflects the fact that low clock speeds can be achieved with lower supply voltage than the higher clock speeds. Increasing OPP will reduce the lifetime of the device significantly (from 10 years to 5 years of continuous use.) OPP3 is the default as shipped by OpenPandora. As of Hotfix4, it is possible to set a maximum OPP in the range 1-5 (for example, to 5): | + | The ''OPP'' is a TI term which reflects the fact that low clock speeds can be achieved with lower supply voltage than the higher clock speeds. Increasing OPP will reduce the lifetime of the device significantly (from 10 years to 5 years of continuous use.) OPP3 is the default as shipped by OpenPandora. |
+ | |||
+ | Since at least SuperZaxxon 1.52, the system has shipped with a utility to modify the maximum OPP. It is part of the CPU-Settings app (found in your Settings menu). Select the option 'Set the max OPP level', select 'Change Setting' and read the following warning. Agreeing to it will allow you to set the maximum OPP in the range 3-5. | ||
+ | |||
+ | As of Hotfix4, it is possible to set a maximum OPP in the range 1-5 (for example, to 5): | ||
<source lang="bash">echo 5 | sudo tee -a /proc/pandora/cpu_opp_max</source> | <source lang="bash">echo 5 | sudo tee -a /proc/pandora/cpu_opp_max</source> | ||
− | This will then increase OPP to suit the requested CPU max, as pre-determined by a table built in to the kernel. These thresholds use OPP1 for below 125 MHz, and OPP5 for above 720 MHz. It is possible to set the limiter and maybe run at 500 MHz in OPP2 (depending on your specific chip). See [http://boards.openpandora.org/index.php?/topic/22-using-hotfix4-how-high-can-you-clock/ this forum thread] for actual results. | + | |
+ | This will then increase OPP to suit the requested CPU max, as pre-determined by a table built in to the kernel. These thresholds use OPP1 for below 125 MHz, and OPP5 for above 720 MHz <!-- Is this the same on a 1GHz unit? -->. It is possible to set the limiter and maybe run at 500 MHz in OPP2 (depending on your specific chip). See [http://boards.openpandora.org/index.php?/topic/22-using-hotfix4-how-high-can-you-clock/ this forum thread] for actual results. | ||
{{warning | {{warning | ||
|Using anything above OPP3 WILL shorten the lifetime of your Pandora, although it should still outlive the 1 year warranty. Using anything above OPP5 and 1Ghz will void your warranty (see [[Overclocking#Warranty_information|here]]) | |Using anything above OPP3 WILL shorten the lifetime of your Pandora, although it should still outlive the 1 year warranty. Using anything above OPP5 and 1Ghz will void your warranty (see [[Overclocking#Warranty_information|here]]) | ||
}} | }} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
==Times== | ==Times== | ||
* This data originates from different studies performed under different OS versions and use cases. | * This data originates from different studies performed under different OS versions and use cases. | ||
− | * Please add the source and a short note about the conditions you used, and if necessary more detailed ones to the Talk page. | + | * Please add the source and a short note about the conditions you used, and if necessary more detailed ones to the Talk page. You can use [http://repo.openpandora.org/?page=detail&app=sysinfo.wb Pandora System Info] to monitor power consumption. |
{| class="wikitable" | {| class="wikitable" | ||
!Mode | !Mode | ||
Line 73: | Line 116: | ||
!Details, Source | !Details, Source | ||
|- | |- | ||
− | ! Active | + | ! Active applications/games |
− | | | + | | 8-18 hours |
− | | | + | | SZ 1.52 |
+ | |- | ||
+ | ! Low load, low backlight brightness | ||
+ | | 20-25 hours | ||
+ | | SZ 1.52 | ||
+ | |- | ||
+ | ! Drain the battery as fast as possible | ||
+ | | 4 hours | ||
+ | | SZ 1.52, backlight at max brightness, constant wifi activity (big download), CPU stress test running at OPP5 and overclocking above 900 MHz, copying huge files from one SD card to the other, USB host and bluetooth activated (but nothing connected) | ||
|- | |- | ||
! MP3 play, screen off | ! MP3 play, screen off | ||
Line 84: | Line 135: | ||
! Low Power Mode | ! Low Power Mode | ||
|30-75 hours | |30-75 hours | ||
− | |||
− | |||
− | |||
− | |||
| [http://boards.openpandora.org/index.php?/topic/7196-32-kernel-issue-tracking-thread/page__st__200#entry138048 OS SuperZaxxon, Beta 2, Kernel 3.2.1] | | [http://boards.openpandora.org/index.php?/topic/7196-32-kernel-issue-tracking-thread/page__st__200#entry138048 OS SuperZaxxon, Beta 2, Kernel 3.2.1] | ||
|- | |- | ||
Line 94: | Line 141: | ||
| although there are reports of much faster drain?[http://boards.openpandora.org/index.php?/topic/24-battery-drain/] | | although there are reports of much faster drain?[http://boards.openpandora.org/index.php?/topic/24-battery-drain/] | ||
|- | |- | ||
− | ! | + | ! Standby Mode (no longer applicable?) |
− | | | + | | 160-200 hours |
− | | | + | | [http://boards.openpandora.org/index.php?/topic/7196-32-kernel-issue-tracking-thread/page__st__200#entry138048 OS SuperZaxxon, Beta 2, Kernel 3.2.1] |
|- | |- | ||
− | ! Mains charge | + | ! Mains charge, lid closed |
− | | | + | | 4 hours |
− | | | + | | SuperZaxxon 1.52 |
|- | |- | ||
! USB Charge, operating | ! USB Charge, operating | ||
Line 110: | Line 157: | ||
|estimate | |estimate | ||
|} | |} | ||
+ | |||
+ | ==Battery Calibration== | ||
+ | * Fully charge to 100%, turn off the Pandora and leave it for 5 hours. | ||
+ | * A full charge is when, while charging,"cat /sys/class/power_supply/bq27500-0/voltage_now" reads around 4200000 and "cat /sys/class/power_supply/bq27500-0/current_now" reads around 800000. If the meter reads 100%, make sure to check these two files to ensure it's actually FULL. Realistically a charge current below 100000 is close enough. | ||
+ | * Then fully discharge (make sure that "cat /sys/class/power_supply/bq27500-0/voltage_now" returns about 300000), turn it off again for 5 hours. | ||
+ | * That's the process for recalibrating the fuel gauge. | ||
==Battery Care== | ==Battery Care== | ||
− | * You can charge your | + | * You can charge your battery to full charge, the charging circuits will then reduce the current to avoid overheating |
− | * If you won't use the | + | * If you won't use the battery for more than a week, it is best to leave it at about 40% charged (as opposed to full) |
* Don't worry about running it down too low, there are protection circuits to avoid a '''damagingly low discharge'''. | * Don't worry about running it down too low, there are protection circuits to avoid a '''damagingly low discharge'''. | ||
**Avoid leaving the battery completely discharged though. When the power runs out, the system will be unable to shutdown cleanly, and might corrupt your files or the system. | **Avoid leaving the battery completely discharged though. When the power runs out, the system will be unable to shutdown cleanly, and might corrupt your files or the system. | ||
Line 120: | Line 173: | ||
**This will only affect the 'time to run' indication | **This will only affect the 'time to run' indication | ||
* If you're not going to be using your battery for a very long time, the extremely best thing you can do for it is to discharge to 40%, seal it in an airtight bag, and put it in the fridge. Even years later, you pull it out, and it will be almost as good as when you put it in. | * If you're not going to be using your battery for a very long time, the extremely best thing you can do for it is to discharge to 40%, seal it in an airtight bag, and put it in the fridge. Even years later, you pull it out, and it will be almost as good as when you put it in. | ||
+ | |||
+ | == My Pandora does not start, even with the mains adapter plugged in == | ||
+ | |||
+ | When a battery is inserted, the power goes into the battery, charges it and the battery powers the Pandora. | ||
+ | When no battery is inserted, the power goes through the charging circuit directly into the Pandora. | ||
+ | |||
+ | What this means is, if the battery is really empty, the Pandora won't power on when connected to AC until the battery reaches a certain voltage level. Let it charge the battery (it could take 10 or more minutes before it starts to charge) or remove the battery and plug in the mains adaptor, it then should start. | ||
+ | |||
+ | {{warning|If you powered the system without a battery, shut it off before sticking the battery back in!}} | ||
+ | |||
+ | == Controlling LEDs and backlight == | ||
+ | [[LEDs_and_backlight]] | ||
+ | |||
+ | == Data provided by battery and power driver == | ||
+ | Information from the battery and power supply in the pandora when it is booted. It lists readout data that is provided so that you for example can write your own applet showing current power status or include some power information in your application. | ||
+ | |||
+ | Power information is available via sysfs. This is the dmesg information about the battery: | ||
+ | bq27x00-battery 3-0055: support ver. 1.1.0 enabled | ||
+ | |||
+ | ==Fuel Gauge/ Battery Monitoring== | ||
+ | ''/sys/class/power_supply/bq27500-0'' reports how long the battery will run for. | ||
+ | |||
+ | Here is a list of the provided information and how to interpret the values: | ||
+ | |||
+ | {|class="wikitable" | ||
+ | !node | ||
+ | !meaning | ||
+ | !interpretation | ||
+ | |- | ||
+ | |capacity | ||
+ | |remaining capacity in % | ||
+ | |100=full, 0=empty | ||
+ | |- | ||
+ | |current_now | ||
+ | |discharging/loading rate | ||
+ | |µA; negative: discharging; positive: loading | ||
+ | |- | ||
+ | |present | ||
+ | |is a battery inserted? | ||
+ | |1=yes; 0=no | ||
+ | |- | ||
+ | |status | ||
+ | |Discharging/Charging | ||
+ | | | ||
+ | |- | ||
+ | |temp | ||
+ | |monitoring IC temperature | ||
+ | |decidegree celsius, value of 250 = 25.0°C | ||
+ | |- | ||
+ | |time_to_empty_avg | ||
+ | |battery time left based on drain on some average; not used in XFCE applet | ||
+ | |seconds; only relevant/existing when discharging! | ||
+ | |- | ||
+ | |time_to_empty_now | ||
+ | |time left based on current drain; used in the XFCE applet | ||
+ | |seconds; only relevant/existing when discharging! | ||
+ | |- | ||
+ | |time_to_full_now | ||
+ | |time left for charging with the current usage; not used in XFCE applet | ||
+ | |seconds; only relevant/existing when charging! | ||
+ | |- | ||
+ | |type | ||
+ | |should always read "Battery" since it is a battery... | ||
+ | | | ||
+ | |- | ||
+ | |uevent | ||
+ | |empty | ||
+ | | | ||
+ | |- | ||
+ | |voltage_now | ||
+ | |current voltage left | ||
+ | |µV | ||
+ | |- | ||
+ | |} | ||
+ | |||
+ | ==Power Management IC== | ||
+ | ''/sys/class/power_supply/twl4030_bci_battery/'' Manages charging, from the mains charger or from USB. | ||
+ | * ''online'' | ||
+ | ** 0 = No charger | ||
+ | ** 2 = Mains charger | ||
+ | ** 3 = USB charge | ||
+ | |||
+ | The mains charger takes precedence if USB and mains charger are plugged in. Pandora seems not to take power from both inputs for charging. | ||
+ | Charging by USB only works with a powered system. If the system is off or the battery is empty, it is not possible to boot the system only by USB power (only tested on one Pandora, please recheck). | ||
+ | |||
+ | Please do keep in mind that all time values are plain estimates and can be "jumpy" depending on current system load, display brightness, WiFi/Bluetooth activity and things like the phase of the moon. | ||
+ | |||
+ | == Charging == | ||
+ | /sys/class/power_supply/twl4030_*/*. Enable/disable charging through those files. The charger chip has trouble operating in automatic mode (overcharges the battery), so pndevmapperd uses enable/disable to prevent that. | ||
+ | === config === | ||
+ | /etc/pandora/conf/eventmap | ||
[[Category:Power supply]] | [[Category:Power supply]] | ||
+ | [[Category:Drivers]] |
Latest revision as of 16:38, 3 November 2014
Contents
- 1 Power Supply
- 1.1 Can it charge from USB?
- 1.2 What kind of battery does it have?
- 1.3 How long does the battery last?
- 1.4 What about the power cable?
- 1.5 Is it possible to run from the AC Adaptor alone?
- 1.6 Does the Pandora have 'sleep' or 'hibernate' modes?
- 1.7 Power Modes
- 1.8 Events
- 1.9 Charging
- 1.10 Operating Point
- 1.11 Times
- 1.12 Battery Calibration
- 1.13 Battery Care
- 1.14 My Pandora does not start, even with the mains adapter plugged in
- 1.15 Controlling LEDs and backlight
- 1.16 Data provided by battery and power driver
- 1.17 Fuel Gauge/ Battery Monitoring
- 1.18 Power Management IC
- 1.19 Charging
Power Supply
Can it charge from USB?
Yes, through the mini-AB OTG port. However, whilst the Pandora is in use the charge rate may be so low as to make it impractical for normal purposes. [1]
What kind of battery does it have?
The Pandora has a 4000mAh Lithium Polymer battery.
Batteries are user-replaceable and spares are sold by Pandora retailers.
How long does the battery last?
- The actual battery runtime varies based on the the software being run, peripherals in use, and consequently the power mode in which the Pandora operates.
- For instance, using Wifi constantly, or having it constantly polling will reduce the life by a couple hours, compared to disabling the wifi altogether.
- Starting with the OS SuperZaxxon, Beta 2, using kernel 3.2.1, the Pandora has:
- a total standby of averagely 180 hours,
- an active runtime of 10 to 30 hours (screen on & WiFi on, PND app(s) which utilize more/less CPU)
- up to 75 hours (idle system, screen & WiFi off).
- Source: Study by user porg
What about the power cable?
The Pandora ships with a switching power supply with a standard cord socket which should function with 110V and 240V AC power. These are either localised, or shipped with an appropriate adaptor.
A PSP power supply will work fine with the Pandora [2].
The barrel jack is 4mm Ø 1.7mm inside and 9.5mm long + on the inside
Is it possible to run from the AC Adaptor alone?
Originally, it was thought not, due to the design of the OMAP chipset appearing to require a battery to be connected. [3] However, it has now been confirmed that the Pandora DOES now work without a battery installed, although some features (like backlight) may have to be turned off via software to enable this[4]. The hardware tweak or tweaks have been performed as part of Pandora development, and are not something that the end user will have to worry about/perform[5][6].
Information from Mweston [7] When no battery is found on AC adapter insertion, the unit goes into constant voltage mode which provides a constant 4.0V on the battery net. It doesn't like it if you put a battery in at this point because the TI chip doesn't appear to be designed to jump back to normal mode without a power cycle. It could do weird things like dump ridiculous amounts of current into the battery without software control. I liked the idea of letting customers power without a battery so we left this feature in but be aware of this restriction:
IF YOU POWERED THE SYSTEM WITHOUT A BATTERY, SHUT IT OFF BEFORE STICKING THE BATTERY BACK IN. (not an angry sentence, just making it clear.) :)
When the battery is inserted first, the system will power up using the normal mode. When the AC adapter is plugged in after this, it will power the system and charge the battery up to the limits set in software. Currently, Notaz and I have chosen 1A on the AC adapter and 600mA from the USB input. It can be changed by sending commands to the chip to alter these set numbers but that is a software lesson better learned from someone else. With the LCD off (lid closed perhaps) idling on the desktop, something like 750mA will go to the battery for a 6 hour charge time or so. With the system doing stuff and demanding more power, less current will go to the battery and it will charge slower. 1A was also chosen to consider thermal dissipation because the regulator of the TI chip is linear and wastes energy dropping the voltage from the 5V down to just above the cell voltage. You may notice the system feels warmer when the battery is more discharged than when it is full which is normal.
I haven't had much luck hot swapping batteries while the system is live but I think it worked for ED once. For me, as soon as I pull the battery, the system resets. The power management chip seems to rely on the status of the thermistor in the battery and it if disappears, it can trigger events. Maybe there are software work arounds but I don't know.
Does the Pandora have 'sleep' or 'hibernate' modes?
Pandora supports suspend-to-RAM (sleep) but not suspend-to-disk (hibernate)[8]. Entering these power saving modes will be controlled by software and can be configured to happen when you press the power switch, close the lid, or only on demand.
Power Modes
Without switching the device entirely off, it may be placed into low power mode or regular power mode; simply pressing the power button will toggle modes. Note that as of hotfix3, opening the lid in low power mode has no effect.
Normal Mode
This is the normal operating mode, display on, WiFi and Bluetooth on if requested. CPU speed can be selected by the user, and has a small impact on battery life. Screen brightness will also have a significant effect on battery life. The CPU should automatically self-regulate to the current task, and 10-20 hours battery life is possible depending on usage. This is mostly independent of the set CPU speed for any given task. At any time, the battery gauge will show the remaining battery life if the usage remains the same as over the past some seconds. See [9] for a detailed breakdown of power consumption.
Lid Closed
The only change with the lid closed is to turn off the LCD backlight and the display itself. This improves battery life, allowing music playback and streaming to continue. As of Hotfix2, the screen remains on if the device is powered up with the lid closed. It is also possible to set xfce to blank the screen after a period of inactivity, which helps with battery.
Low Power
Low power mode is toggled by a short press of the power switch to the right. The screen is off, the radios are disabled, the CPU max speed is set to 14 MHz. The device is still silently on, allowing for alarms to go off or it to be turned on again instantly. The power LED will be dimmed, and may appear to be off if you are outside in the sunshine.
Low power mode is probably going to be used as the normal "off" for most people, with true off (device powered down entirely, unable to respond to alarms or wake up quickly) available to conserve battery power. Turning the Pandora off completely is the best option if you don't plan on using it for few days or longer.
Since the Pandora has to be powered whilst it is charging, low power mode is best for fastest charging, and will even allow a full charge to be achieved from USB. It is also the best way to use the Pandora as a USB charger for other devices.
Opening the screen whilst in low power mode has no effect (screen stays off, clocks stay low), and you will need to use the power switch to resume.
At the moment, there is no clear advantage in slowing the clocks (other than being an effective pause button when playing MP3). The only saving is through disabling the radios. This is likely to be improved in due course since there are features in the omap processor for power saving which are being added to the linux kernel.
Power Off
Select Logout then Shutdown from the window manager to power off. If a charger is connected, the device will re-boot immediately. It is possible to get into a state where you believe it is powered off, but in fact it is using power at the normal screen off rate - so after 12 hours, 50% of your battery is gone. The Power green LED ought to be a tell-tale. It is possible that some bugs exist in this area, but nothing has been clearly identified[10]
A common problem seems to be that if you switch off before unplugging, your Pandora will re-boot even though it is now left unplugged. This problem is compounded by the low battery shutdown script being called repeatedly (and actually preventing shutdown).
To do a hard-reset of the Pandora (in case of software crashes), press and hold the Pandora key and flick the power button to the right.
To do a hard-shutdown of the Pandora, press and hold the Pandora key with right shoulder button held and flick the power button to the right, and then select shutdown from the menu.[11]
Events
The events which control power can be customised [12]. Lid switch, Power Switch, battery threshold and Window Manager shutdown commands. Note that the battery manager in xfce will also take action when the battery is low, by default forcing a shutdown at 5% (so you may observe a full boot process, the window manager appears, then immediately shuts down)
Charging
It is possible to charge from the mains charger (use the supplied one or a GENUINE PSP adaptor only) or USB cable. While a charger is connected, remaining battery level is displayed, but the time displays 00:00. If charging from USB, it is possible that the battery will still discharge slowly, since the Pandora takes more current (in normal mode) than the USB can supply. Mains charge is configured to draw 1000mA, USB charge is more like 600mA.
It is not possible to charge the Pandora without turning it on - connecting the mains charger or the USB cable will turn it on automatically. The normal charging circuits rely on the CPU for configuration. In practice, this has minimal impact on usage, except that after charging, you might wish to unplug the charger and explicitly turn off if you don't intend to use the Pandora soon.
Full discharge charging: The pandora will shutdown in case of low battery power. However there is a protection circuit in the battery itself which will cut off the power output of the battery. The battery and the pandora seems to be dead in this condition, but it's not. If you plug in the power you'll see nothing happen - but the battery will be recharged very slowly until the battery is above it's cutoff level. This could take up to 30 minutes. Then the pandora will startup and the normal CPU controlled faster charging will continue. [13]
If your Pandora's battery is at less than 1% (actually configurable in XFCE), then you may have problems in using USB to charge the Pandora. Currently, USB is not recognised by the XFCE battery monitor so it will shutdown with no warning. As a workaround, you can put your Pandora into low power mode as soon as the flashing mouse icon (XFCE startup) appears. This should significantly delay loading the battery monitor widget, and even if the charge hasn't passed 1% by the time it checks, on the next try you should be there.
Operating Point
The OPP is a TI term which reflects the fact that low clock speeds can be achieved with lower supply voltage than the higher clock speeds. Increasing OPP will reduce the lifetime of the device significantly (from 10 years to 5 years of continuous use.) OPP3 is the default as shipped by OpenPandora.
Since at least SuperZaxxon 1.52, the system has shipped with a utility to modify the maximum OPP. It is part of the CPU-Settings app (found in your Settings menu). Select the option 'Set the max OPP level', select 'Change Setting' and read the following warning. Agreeing to it will allow you to set the maximum OPP in the range 3-5.
As of Hotfix4, it is possible to set a maximum OPP in the range 1-5 (for example, to 5):
echo 5 | sudo tee -a /proc/pandora/cpu_opp_max
This will then increase OPP to suit the requested CPU max, as pre-determined by a table built in to the kernel. These thresholds use OPP1 for below 125 MHz, and OPP5 for above 720 MHz . It is possible to set the limiter and maybe run at 500 MHz in OPP2 (depending on your specific chip). See this forum thread for actual results.
Using anything above OPP3 WILL shorten the lifetime of your Pandora, although it should still outlive the 1 year warranty. Using anything above OPP5 and 1Ghz will void your warranty (see here) |
Times
- This data originates from different studies performed under different OS versions and use cases.
- Please add the source and a short note about the conditions you used, and if necessary more detailed ones to the Talk page. You can use Pandora System Info to monitor power consumption.
Mode | Time | Details, Source | |
---|---|---|---|
Active applications/games | 8-18 hours | SZ 1.52 | |
Low load, low backlight brightness | 20-25 hours | SZ 1.52 | |
Drain the battery as fast as possible | 4 hours | SZ 1.52, backlight at max brightness, constant wifi activity (big download), CPU stress test running at OPP5 and overclocking above 900 MHz, copying huge files from one SD card to the other, USB host and bluetooth activated (but nothing connected) | |
MP3 play, screen off | 43 hours | MP3 playback in Audacious in OS SuperZaxxon, Beta 2, Kernel 3.2.1 | |
Low Power Mode | 30-75 hours | OS SuperZaxxon, Beta 2, Kernel 3.2.1 | |
Power off | 5% charge loss per week | although there are reports of much faster drain?[14] | |
Standby Mode (no longer applicable?) | 160-200 hours | OS SuperZaxxon, Beta 2, Kernel 3.2.1 | |
Mains charge, lid closed | 4 hours | SuperZaxxon 1.52 | |
USB Charge, operating | 20 hours | inactive, screen+wifi on, may charge or discharge depending on load | |
USB Charge, low power | 20 hours | estimate |
Battery Calibration
- Fully charge to 100%, turn off the Pandora and leave it for 5 hours.
- A full charge is when, while charging,"cat /sys/class/power_supply/bq27500-0/voltage_now" reads around 4200000 and "cat /sys/class/power_supply/bq27500-0/current_now" reads around 800000. If the meter reads 100%, make sure to check these two files to ensure it's actually FULL. Realistically a charge current below 100000 is close enough.
- Then fully discharge (make sure that "cat /sys/class/power_supply/bq27500-0/voltage_now" returns about 300000), turn it off again for 5 hours.
- That's the process for recalibrating the fuel gauge.
Battery Care
- You can charge your battery to full charge, the charging circuits will then reduce the current to avoid overheating
- If you won't use the battery for more than a week, it is best to leave it at about 40% charged (as opposed to full)
- Don't worry about running it down too low, there are protection circuits to avoid a damagingly low discharge.
- Avoid leaving the battery completely discharged though. When the power runs out, the system will be unable to shutdown cleanly, and might corrupt your files or the system.
- No harm will come if you only partially recharge it. If you've only got 10 free minutes to charge before leaving, go ahead. You'll put an hour of usage back into the battery, and you can always charge it more later.
- For best accuracy, the battery meter relies on watching the battery discharge over most of it's range (down to say 10%).
- This will only affect the 'time to run' indication
- If you're not going to be using your battery for a very long time, the extremely best thing you can do for it is to discharge to 40%, seal it in an airtight bag, and put it in the fridge. Even years later, you pull it out, and it will be almost as good as when you put it in.
My Pandora does not start, even with the mains adapter plugged in
When a battery is inserted, the power goes into the battery, charges it and the battery powers the Pandora. When no battery is inserted, the power goes through the charging circuit directly into the Pandora.
What this means is, if the battery is really empty, the Pandora won't power on when connected to AC until the battery reaches a certain voltage level. Let it charge the battery (it could take 10 or more minutes before it starts to charge) or remove the battery and plug in the mains adaptor, it then should start.
If you powered the system without a battery, shut it off before sticking the battery back in! |
Controlling LEDs and backlight
Data provided by battery and power driver
Information from the battery and power supply in the pandora when it is booted. It lists readout data that is provided so that you for example can write your own applet showing current power status or include some power information in your application.
Power information is available via sysfs. This is the dmesg information about the battery:
bq27x00-battery 3-0055: support ver. 1.1.0 enabled
Fuel Gauge/ Battery Monitoring
/sys/class/power_supply/bq27500-0 reports how long the battery will run for.
Here is a list of the provided information and how to interpret the values:
node | meaning | interpretation |
---|---|---|
capacity | remaining capacity in % | 100=full, 0=empty |
current_now | discharging/loading rate | µA; negative: discharging; positive: loading |
present | is a battery inserted? | 1=yes; 0=no |
status | Discharging/Charging | |
temp | monitoring IC temperature | decidegree celsius, value of 250 = 25.0°C |
time_to_empty_avg | battery time left based on drain on some average; not used in XFCE applet | seconds; only relevant/existing when discharging! |
time_to_empty_now | time left based on current drain; used in the XFCE applet | seconds; only relevant/existing when discharging! |
time_to_full_now | time left for charging with the current usage; not used in XFCE applet | seconds; only relevant/existing when charging! |
type | should always read "Battery" since it is a battery... | |
uevent | empty | |
voltage_now | current voltage left | µV |
Power Management IC
/sys/class/power_supply/twl4030_bci_battery/ Manages charging, from the mains charger or from USB.
- online
- 0 = No charger
- 2 = Mains charger
- 3 = USB charge
The mains charger takes precedence if USB and mains charger are plugged in. Pandora seems not to take power from both inputs for charging. Charging by USB only works with a powered system. If the system is off or the battery is empty, it is not possible to boot the system only by USB power (only tested on one Pandora, please recheck).
Please do keep in mind that all time values are plain estimates and can be "jumpy" depending on current system load, display brightness, WiFi/Bluetooth activity and things like the phase of the moon.
Charging
/sys/class/power_supply/twl4030_*/*. Enable/disable charging through those files. The charger chip has trouble operating in automatic mode (overcharges the battery), so pndevmapperd uses enable/disable to prevent that.
config
/etc/pandora/conf/eventmap