diff --git a/PiSugar-3-Series.md b/PiSugar-3-Series.md index 3dfb47c..03f7135 100644 --- a/PiSugar-3-Series.md +++ b/PiSugar-3-Series.md @@ -1,6 +1,6 @@ # PiSugar 3 Series PiSugar 3 is the third generation of PiSugar Raspberry Pi battery power supply series, making Raspberry Pi a portable device. With the on-board RTC, the Raspberry Pi can get the correct time whether it’s powered or networked. - + ## Features * **Full functions UPS** @@ -29,7 +29,7 @@ PiSugar 3 is the third generation of PiSugar Raspberry Pi battery power supply s PiSugar 3 adds a software watchdog function. When the function is turned on, the dog needs to be kicked regularly, which can effectively prevent the Raspberry Pi from crashing and improve the reliability of the system. * **Onboard RTC** - + With the ultra-low power consumption design, the onboard RTC can keep the clock running for more than one year when PiSugar is off. * **Hardware battery protection** @@ -38,17 +38,17 @@ PiSugar 3 is the third generation of PiSugar Raspberry Pi battery power supply s ## Electrical Specifications -| Electrical Specifications | PiSugar 3 Plus | PiSugar 3 | -| :------ | :-----: | :----: | -| Input| 5V-3Amax |5V-3Amax | -| Output | 5V-3Amax | 5V-2.5Amax | -| Battery capacity | 5000mah | 1200mah | -| Communication interface | 0x57/0x68 address | 0x57/0x68 address | +| Electrical Specifications | PiSugar 3 Plus | PiSugar 3 | +| :------------------------ | :---------------: | :---------------: | +| Input | 5V-3Amax | 5V-3Amax | +| Output | 5V-3Amax | 5V-2.5Amax | +| Battery capacity | 5000mah | 1200mah | +| Communication interface | 0x57/0x68 address | 0x57/0x68 address | ## Table of I2C - c.ntrol + c.ntrol - **Register address:** + **Register address:** 0x57 ![I2C address table](https://cdn.pisugar.com/img/I2Ctable.png) @@ -62,118 +62,118 @@ PiSugar 3 has many advanced power functions that can be set up, which are descri Some functions can be operated on WebUI, indicating that this function does not need to be manually set up by I2C, only in WebUI. At the same time, the WebUI interface can be set up directly through the command line. The function set through the WebUI will retain the settings in the Raspberry Pi system and will not be set to the default value after restart or battery reset. 1. External power supply detection - **Register address:** + **Register address:** the 6th bit of the 0X02 address - **Register operation:** + **Register operation:** can be read or written - **Data description:** + **Data description:** 1 means external power supply access, 0 means no external power supply - **Function description:** + **Function description:** It can be judged whether the external power supply is connected by querying the 7th bit of the 0X02 address. The detection is to detect whether the power input interface has voltage. If the plug is inserted but there is no power supply, it will be detected that the external power supply is not connected. WebUI supports reading the status. -2. Charging switch +1. Charging switch - **Register address:** + **Register address:** the 6th bit of the 0X02 address - **Register operation:** + **Register operation:** can be read or written - **Data description:** + **Data description:** 1 is on, 0 is off - **Function description:** + **Function description:** When charging switch is turned on, once the external power access, the device begins charging. - + **default value:** This function will be reset to on each time the device is turned off **WebUI does not support this function.** -3. Output switch +1. Output switch - **Register address:** + **Register address:** the 5th bit of the 0X02 address - **Register operation:** + **Register operation:** can be read or written - **Data description:** + **Data description:** 1 is on, 0 is off - **Function description:** + **Function description:** When output switch is turned off, PiSugar does not output voltage externally. When output switch is turned on, PiSugar outputs 5V voltage externally. If the automatic hibernate function is turned on and PiSugar is turned off, the PiSugar system will immediately go into the hibernate state, and I2C will be inoperable. (About turning off PiSugar: The shutdown command is executed in the PiSugar-Poweroff client.) - + **default value:** This function will be reset to on each time the device is turned on. **WebUI does not support this function.** -4. Automatically resume booting when power is reconnected +1. Automatically resume booting when power is reconnected - **Register address:** + **Register address:** the 4th bit of the 0X02 address. - **Register operation:** + **Register operation:** can be read or written. - **Data description:** + **Data description:** 1 is on, 0 is off. - **Function description:** + **Function description:** + + a. When this function is turned on and PiSugar is turned off, once the external power supply is restored, PiSugar will automatically turn on and start the external output. - a. When this function is turned on and PiSugar is turned off, once the external power supply is restored, PiSugar will automatically turn on and start the external output. - b. When this function is turned off, once the external power supply is restored, PiSugar will charge, but will not output externally. - + If you need to awake the Raspberry Pi even when PiSugar is powered on, please refer to the SCL awakening function. - + **default value:** This function is on by default. It resets to on each time the PiSugar system is completely reset. WebUI supports this function. -5. Anti-mistaken touch function +1. Anti-mistaken touch function - **Register address:** + **Register address:** the 3rd bit of the 0X02 address. - **Register operation:** + **Register operation:** can be read or written. - **Data description:** + **Data description:** 1 is on, 0 is off. - **Function description:** + **Function description:** - a. When anti-mistaken touch function is turned on, if PiSugar shuts down, first short press the power button, and then release, the LED will indicate the current power. Next, press and hold the power button to achieve the purpose of booting. When anti-mistaken touch function is turned off, short press the power button to trigger the boot. + a. When anti-mistaken touch function is turned on, if PiSugar shuts down, first short press the power button, and then release, the LED will indicate the current power. Next, press and hold the power button to achieve the purpose of booting. When anti-mistaken touch function is turned off, short press the power button to trigger the boot. b. Whether the function is turned on or not, when PiSugar is turned on, it needs to be turned off by a long press. @@ -185,21 +185,21 @@ WebUI supports this function. **WebUI does not support this function.** -6. Automatic hiberate function: +1. Automatic hiberate function: - **Register address:** + **Register address:** the 6th bit of the 0X03 address. - **Register operation:** + **Register operation:** can be read or written. - **Data description:** + **Data description:** 1 is on, 0 is off. - **Function description:** + **Function description:** This function is related to the output switch function. @@ -214,98 +214,98 @@ WebUI supports this function. **WebUI does not support this function.** -7. Soft shutdown function +1. Soft shutdown function - **Register address:** + **Register address:** 1. set up:he 4th bit of the 0x03 address; 2. query whether to enter the soft shutdown state: the 3rd bit of the 0x03 address. - **Register operation:** + **Register operation:** can be read or written - **Data description:** + **Data description:** 1 is on, 0 is off - **Function description:** + **Function description:** The soft shutdown function is set for shutdown behavior for the power button. a. When the soft shutdown function is turned off, while PiSugar is working, press and hold the power button for more than 2 seconds to directly turn off the power. b. When the soft shutdown function is turned on, press and hold the power button will not directly turn off the output. Instead, it indicates that the system has triggered the shutdown process and should start to execute the shutdown command through the 3rd query bit of the 0x03 address. - + **default value:** This function is off by default, it resets to off when restarting. -8. Chip temperature +1. Chip temperature - **Register address:** + **Register address:** 0X04 address. - **Register operation:** + **Register operation:** can be read - **Data description:** + **Data description:** 0 means -40 degrees Celsius - **Function description:** + **Function description:** The temperature measurement is in the range of -40 to 85 degrees Celsius. This temperature is only the temperature of the chip itself, it does not represent the temperature of the Raspberry Pi, nor does it represent the temperature of the battery. **WebUI does not support this function.** -9. Software watchdog +1. Software watchdog - **Register address:** + **Register address:** The function switch: the 7th bit of the 0X06 address, the watchdog reset: the 5th bit of the 0x06 address, the watchdog interval time: the 0x07 address. - **Register operation:** + **Register operation:** can be read or written. - **Data description:** + **Data description:** 1 is on, 0 is off. - Writing 1 on the watchdog reset setting bit will reset the watchdog timer (kicking the dog). - + Writing 1 on the watchdog reset setting bit will reset the watchdog timer (kicking the dog). + The watchdog delay is set to the register value X 2s, for example, when the register value is 0x05, the actual watchdog delay is 5X2s=10s. - **Function description:** + **Function description:** The software watchdog provides a watchdog other than the Raspberry Pi system, which restarts the Raspberry Pi system when the Raspberry Pi system crashes. When this function is turned on, if the watchdog timer is not reset (kicking the dog) within the software watchdog time interval, PiSugar will temporarily turn off the output to achieve the purpose of restarting the Raspberry Pi system. The operation of kicking the dog needs to be completed by the user. - + **default value:** This function is off by default. It is off by default each time it restarts. **WebUI does not support this function.** - -10. Charging protection - **Register address:** +1. Charging protection + + **Register address:** the 7th bit of the 0X20 address. - **Register operation:** + **Register operation:** can be read or written. - **Data description:** + **Data description:** 1 is on, 0 is off. - **Function description:** + **Function description:** PiSugar 3 provides hardware charging protection function. @@ -317,21 +317,21 @@ WebUI supports this function. **WebUI supports this function.** -11. SCL awakening +1. SCL awakening - **Register address:** + **Register address:** the 3rd bit of the 0X20 address. - **Register operation:** + **Register operation:** can be read or written. - **Data description:** + **Data description:** 1 is on, 0 is off. - **Function description:** + **Function description:** This function is related to the booting function. @@ -342,17 +342,17 @@ WebUI supports this function. This function is off by default, it resets to off when restarting. **WebUI does not support this function.** -12. Battery capacity reading +1. Battery capacity reading - **Register address:** + **Register address:** 0X22, 0X23, 0X2A - **Register operation:** + **Register operation:** can be read - **Data description:** + **Data description:** 0x22 is high battery voltage, 0x23 is low battery voltage. When reading, you should first arrange the two bits of data in order to get the actual voltage in mA. @@ -360,17 +360,17 @@ WebUI supports this function. The 0X2A address is the calculated battery power percentage. - **Function description:** + **Function description:** WebUI can read the battery power percentage -13. RTC function +1. RTC function - **Register address:** + **Register address:** write protection: 0x30, data address: 0x31-0x37 - **Register operation:** + **Register operation:** can be read or written @@ -378,23 +378,26 @@ WebUI supports this function. RTC has a write protection function in order to prevent data fluctuations caused by misoperation or system instability. -14. Timing boot function +1. Timing boot function - **Register address:** + **Register address:** control bit: the 7th bit of 0x40, data address: 0x44-0x47 - **Register operation:** + **Register operation:** can be read or written. - **Data description:** + **Data description:** Write the control bit to 1 to turn on the timing boot function, write 0 to turn off the timing boot function. The Weekday bit ranked by bit represents from Sunday to Saturday, where 0 represents Sunday. - **Function description:** + **Function description:** + + a. When the function is turned on, PiSugar will turn on the output each time the specified time is reached. + + b. This function will not be reset due to restart. - a. When the function is turned on, PiSugar will turn on the output each time the specified time is reached. - b. This function will not be reset due to restart. c. Turning off this function requires manual settings. -WebUI supports this function. + +**WebUI supports this function**