Skip to content

About

GoldenMate UPS monitor and Windows software

Resources

Stars

22 stars

Watchers

4 watching

Forks

Latest commit

 

History

331 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoldenChute

GoldenMate UPS monitor and Windows shutdown software

This is a simple modification for the GoldeMate UPS to access the information displayed as well as safely shut a Windows PC down before the battery runs down. One of the most important features of a UPS.

WebAndWinPic

The left is the web page for remote access. The other windows are the Windows app (different sizes).

This mod requires opening the case of the UPS and plugging in a small board inline with the front display. It's a segmented display with SPI interface, so the ESP32 decodes all the segment bits and translates them to something usable. The data is only sent to the display for 60 seconds when the power button is short-pressed, so this also simulates the button (in parallel). The 5V power for the ESP32 needs to be external since the display 5V is only on when the display is powered, and may not support the current requirement, so run a USB cable to the rear panel and cut a small notch so the case can slide back on, and connect to PC or USB power supply (powered by the UPS, so it's powered on battery).

Note: The interface could easily be changed to any small Arduino or microcontroller, since it only connects to 3 pins for data (no ground) and momentarily shorts the power button (28V or 56V pulled low).

I beleve the first model had a push-on/push-off button and the display stayed on. For that model, all you need is the PCB, ESP32, and 7 pin connectors. Leave out the solid state relay, R2 and 2 pin connectors.

Parts needed:

  • PCB r4 Moved the DI trace to fix RF issues with a new module, and removed ground fill around it as well.
  • ESP32-C3-super mini, or ESP32-S3-super mini for USB-HID support (native Windows, NUT, etc.)
  • AQY282S (SSR) I used this one because it's cheap and currently well stocked.
  • R1 470 ohm 0805 resistor
  • M & F JST-XH (This one has wires to place it closer to the side for better signal) 7P 2.54mm, or 7P 0.1" pinheader
  • 2P 2.54mm/0.1" connector M
  • 2P 2.54mm/0.1" connector F + 2 wires (3-4 inches) Note: The button is non-polarized (The AliExpress above didn't fit the 2 pin) Dupont will work if nothing else.
  • 1x 18650 cell and holder for battery power on the ESP32. Solder the wires on the back of the ESP32 first.
  • r5 board: 3x BSS138 (MOSFET), 3x 10K resistors, and another AQY282S + 470 resistor. This is still an untested board. The addition of the SSR is because the front button is DPST. One side is for the BMS (display control). The other side is for the UPS (powering on/off and beeper mute). Some models have separate buttons for this function, and may have different input timings.

UPS Board
Front panel

Remove the 2 screws under each rubber foot. Slide the cover off (to the front). Remove the 6 screws around the front panel.

The female XHB (XH works well, and a plain female pinheader actually holds well if you can't find XH/B) connector needs pins or wire lead clippings crimped to make it solder to a PCB. I used male pinheader pins. Install the 2-pin connector and wires before the ESP32 for ease.

Back
Cut a notch in the rear panel to fit the USB cable.

Arduino:
Settings for router SSID and SSID password are in Config.h, as well as the remote password for web control. If they aren't set or the SSID changes, EspTouch can be used.
Compiling the code should be easy. Most information is in UPS.ino, like where to get the libraries needed, and settings for the ESP32-C3-super mini such as enabling CDC on boot (for serial output).
There's code in UPS.ino to setup the initialDate, lastCycleDate, Cycles and percent to be used once, and commented out if desired.

The ESP32-S3 super mini is mostly pin compatible, and has HID support for UPS emulation. It has 2 more pins (1 per side) that just overhang on the PCB. The current GPIO pins in the code for the C3 are incorrect for the r3 board. Just 1 pin is different. There are likely different models of the S3 also. Just make sure GND is pin 2.

Web page:
The HIBERNATE and SHUTDOWN buttons send a message to the Goldenmate app to start the shutdown or hibernate process.
The POWER OFF button will hold the power button for 5 seconds to shut the UPS off. This will cut power to everything, including the ESP32 most likely.
RESET DISP causes a timeout in the display restart timer. When the USP returns to AC power, once in a while the display malfunctions, but the data is still good. This just fixes it.
BEEPING / SILENT toggles to enable a button tap at the start of backup power, disabling the beeps.
Shutoff Watt Threshold prevents the delayed shutoff from operating until the watts out drops below the set value.
HID Warn % is what Windows uses to pop up a warning.
HID shutdown % is what Windows uses to shutdown when the battery level reaches that value. Set the warning above the shutdown. These are overridden by settings in Windows, though, so probably not useful.
PPKWH (price per killowatt hour) is used for, well, calcuating cost.
password needs to be the same as what's in Config.h and needs to be set to allow any input (button presses or value changes). You can leave it blank any other time.

Windows app:
Extract the exe and move it to somewhere like C:\Goldenmate. The startup folder symbolic link will auto-generate to this path.
Clicking on the top-right corner of the app will hide it.
Right-click for context menu (settings, quit, clear log/chart)
The outage and daily WH log (top right area, hidden when small) is blank until an entry is created. Entries are comma delimited lines saved in a file in the local exe folder, named ups_log.txt (or ups_log1.txt for the 2nd instance...).

Settings:
Right-click in the window, or go to the tray, and right click the icon for the menu. Select "Settings" and enter the IP address of the ESP32 device in the format "192.168.xxx.xxx" which you can find in the Arduino IDE ports, named UPS (192.168.xxx.xxx). Up to 8 clients can be connected at once. Your router should also be on UPS when using this method.
If it connects, there should be a small red circle in the top left of the app. This will blink when data is received. Serial is the same.
COM Port (Note: using serial will cause the ESP32 to reset every time the app exits or another app accesses the COM port, which loses WH history and may get off track if charging).
The radio buttons allow selecting either COM or websocket.
Note: When using HID, the Windows app will not be able to use serial, but can connect to the IP address. There's no resetting, which is better, but be careful of the HID shutdown % along with the app shutdown %. The app should be set higher, and HID can be fallback if it's not running for any reason.
Percent to shut down: Active (red bars left of battery in the main display and tray icon) and Inactive (right red bars) depends on whether the monitor is in standby. The depth of discharge (D.O.D.) determines the impact on health. When inactive, it should shut down at 70% for best health. When active, more time can be allowed for manual shutdown. The % is just the bar levels, not actual percent (which could possibly be inaccurate). There is a 10 second delay when it reaches the desired %, then it will shut down or hibernate/hibrid-sleep if that is set up properly and doesn't fail, otherwise it will shut down.
Note: Hibrid-sleep can wake immediately by odd USB devices if not set up properly. It should be tested before use. It will also slowly drain the battery over time.
Skip seconds: 0 will add data to the chart every second (total 24 hours). 1 would be 48 hours, but records peak values of 2 seconds.
Alerts cause the window to popup and show a text box such as "Serial timeout/in use" or WebSocket disconnected" with annoying sound.
Power off after [30] seconds: Will turn the UPS power off (cutting power to everything on it) the delayed time (15 secs to 60 mins) after the PC begins shutdown/hibernate, and also waits for the watts out to drop below the shutoff watt threshold setting on the webpage.
Note:The ESP will also lose power, so there's no way to remotely power it back on.
Hide after start causes the window to hide 4 seconds after startup.

About

GoldenMate UPS monitor and Windows software

Resources

Stars

22 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages