Releases: dacarson/UPSPlus_oss
Version-26
UPSPlus Firmware Release Notes — Version 26
Fix issue with UPS turning off
Symptom: With a charging cable plugged in, the UPS switched to battery and stayed there, slowly draining it. The charger was never enabled, so the battery received no charge despite a working power source being present.
Internally, the charger is disabled so that good readings of the battery can be made (Sample Period). However, if the charger was disabled while it validating if a charger is present, it would think no charger is present and the charger would not get re-enabled. Both actions had to coincide, so it seemed to happen randomly.
Fix: correct the state machine so that it would not do charger validation during a sample period. Updated documentation.
Version-25
UPSPlus Firmware Release Notes — Version 25
Settings No Longer Lost After Firmware Updates
Settings (such as protection thresholds, auto power-on, and load-on-delay) are now correctly preserved when performing an over-the-air (OTA) firmware update. Previously, all settings would silently reset to defaults after each update.
More Accurate Battery Full/Empty Detection
The logic that learns your battery's true full and empty voltage levels has been significantly improved:
-
Full detection is more reliable, catching additional charging patterns and ignoring spurious mid-charge voltage plateaus.
-
Empty detection now requires a meaningful discharge to have occurred before recording a new low-voltage baseline — preventing a bad reading during a brief communication glitch from corrupting the empty level.
-
Short power-off events and I2C gaps no longer mistakenly trigger an "empty" commit.
Battery Percentage and Current Readings Work Without a Raspberry Pi
When the UPS is running standalone (no Raspberry Pi connected), current readings from the power monitor chip were incorrectly being blocked, causing battery percentage, taper detection, and empty-voltage learning to stall. This has been fixed — the UPS now operates correctly whether a Pi is attached or not. So it can learn Full/Empty without a RPi.
Auto Power-On Setting Saves Immediately
Changing the auto-power-on setting via I2C now takes effect and is saved to flash immediately, so it is not lost if power is cut unexpectedly before the next scheduled save.
Protection Mode No Longer Gets Stuck
If the battery dropped below the protection threshold with auto-power-on disabled, the device could get permanently stuck in protection mode with no way to recover short of a full power cycle. This has been fixed — the UPS will now properly clear the protection state once the battery voltage recovers.
Button Can Resume from Protection State
After the battery recovers from a low-voltage protection event, a short button press can now power the Raspberry Pi back on, as expected.
Load-On-Delay Countdown Updates Immediately
Writing a new load-on-delay value while a countdown is already running now takes effect instantly, rather than only applying to the next countdown.
Improved Crash Recovery — Pi Stays On
If the firmware encounters an internal fault, the Raspberry Pi is now left powered rather than potentially having its power cut mid-operation. The UPS controller will reset itself and resume normal operation without unnecessarily rebooting the Pi.
I2C Bus Reliability Improvement
Fixed a rare condition where the I2C communication bus could lock up if the Raspberry Pi began sending a command at a specific moment during an internal switchover, requiring a power cycle to recover.
Firmware Update Instructions Updated
The recommended method to enter OTA (firmware update) mode has changed from sending an I2C command to using the button sequence. See the README for updated instructions.
Version 25
Beta release as it hasn't been hardware tested. This release contains:
- Revise OTA mode entry instructions in README (fd377e5)
- Add bootload behavior details (2fcb62d)
- Merge pull request #2 from dacarson/FlashSaving-SysTick_Migration (9047beb)
- Merge pull request #4 from dacarson/HardFault_Handling (9c5f123)
- Further FLASH size reductions (acc233d)
- Correct Measurement window description (eb2b679)
- Increment release number (b45a707)
Version-24
Version-24
Just one improvement, re-enable a software driven OTA path.
Version-23
Version 23
MCU reliability and diagnostics improvements:
- Watchdog (IWDG): Independent watchdog enabled (~8 s timeout). Refreshed once per main-loop iteration; never in ISRs. A hung main loop or I2C deadlock will cause a device reset so the unit can recover.
- HardFault safe state: On HardFault the MCU drives MT_EN and IP_EN low (RPi power off, charger path off), PWR_EN high, then resets. Ensures safe outputs before reset regardless of fault cause.
- Reset cause: Reset cause is captured at boot and persisted in flash. Exported via I2C Factory Testing: selector 0x08 = this boot’s raw reset flags (e.g. IWDG, POR, NRST); selector 0x09 = last persisted reset cause and sequence from flash. See Behavior Spec §4.4 and §10 for encoding.
- Flash persistence: Persistence record uses hardware CRC and structure version 2. Records with older version or invalid CRC are rejected at load (defaults applied). Old software-CRC records are no longer accepted.
- I2C robustness: Analog and digital input filters enabled (1 I2C clock digital filter) for noise immunity. Stuck-bus recovery remains software-based (e.g. SCL toggling); no hardware I2C timeout.
No change to the external I2C register contract or power/charger behavior beyond the above.
Version-22
UPSPlus Firmware — Version 22
Highlights
- Exposed INA219 current measurements via the
0x17register set - Improved power-up and power-down sequencing, including forced shutdown when state persistence fails
- Prevented low-power oscillation by blocking startup without a charger present
- Added smarter battery full/empty learning and improved capacity estimation
- Introduced dynamic battery full detection for more accurate state-of-charge
Factory Testing & Diagnostics
- Added factory testing and debug visibility for flash persistence
- Improved debugging scripts and test documentation
INA219 Current Measurement
- Implemented a full multi-phase INA219 architecture on a shared I²C bus:
- Boot-time setup, runtime access window, snapshot integration
- Fault handling, recovery, and validation
Other Improvements
- Improved documentation and added hardware reference docs
Version 21
- Added brownout support as document in the readme
- Corrected calibration mode
- Code cleanup, remove artifacts after the refactoring
Version 20
Version 20
This version is totally refactored firmware for the EP-0136 based on the Refactor Plan markdown document.
I have found this firmware to be rock solid in my testing, and it has the additional features that I sort after for a fully functional UPS.
As with most open source software, please use the firmware at your own risk.