WDT UPS charging status =0

txrocks

Member
I finally got around to putting in my WDT UPS the new multichemistry models. I have new LI-ON batteries that I charged on my charger. The one I have on my desk the when I run "wdt -g c" it returns 0 Do I have to enable the charging function somewhere, or since I do not have it powered by the 10-24v nor the 5v connector it is not going to charge?

The one I have installed at another location seems to have a bit of a different issue. It is setup the same UPS board with batteries in there the RPI will run a minute or two then shutdown. Upon rebooting, it shows that it shutdown from a low power event. If I remove the batteries, it runs like normal and never shuts down. The one on my desk infront of me does not behave like this.

Both RPI 5's are powered from the official RPI-5 power supply.

Thanks!
 

sequent

Administrator
Staff member
Hi,

You have to power the system through the watchdog to be able to charge the battery and have a backup.
 

txrocks

Member
The issue I am having with one of the WDT UPS is still occurring. If I put batteries in that WDT, after about 2 minutes the RPI goes into an under voltage condition and shuts down and stays shut down. It does not do this with the batteries removed, and it does not matter whether the 24VDC power supply is connected. These were batteries that just came off the charger at 4.2 volts. The other WDT that I have on a different controller is working just like it should with the external power supply connected. Any ideas what could be causing that ?
 

alexburcea

Administrator
Staff member
If you could measure some voltages or retrieve them from the watchdog before raspberry shuts down, will help us debug.
You can open a terminal and run:
wdt -g v
wdt -g vb
wdt -g vr

and if you can do this multiple times to see the evolution will be perfect
 

txrocks

Member
Not sure why my time stamps are retarded, here is the WDT that is being challenging. I chopped the data file down as it was too big for the post. But it all looks just like this

Code:
Using /usr/local/bin/wdt
Fri 6 Jun 21:44:07 UTC 2025 : Charging State:  0
Fri 6 Jun 21:44:07 UTC 2025 : VB: 5 mV:
Fri 6 Jun 21:44:07 UTC 2025 : V: 6 mV
Fri 6 Jun 21:44:07 UTC 2025 : VR: 5120 mV
Fri 6 Jun 21:51:50 UTC 2025 : Charging State:  2
Fri 6 Jun 21:51:50 UTC 2025 : VB: 3235 mV:
Fri 6 Jun 21:51:50 UTC 2025 : V: 5218 mV
Fri 6 Jun 21:51:50 UTC 2025 : VR: 5187 mV
Fri 6 Jun 21:44:07 UTC 2025 : Charging State:  0
Fri 6 Jun 21:44:07 UTC 2025 : VB: 5 mV:
Fri 6 Jun 21:44:07 UTC 2025 : V: 6 mV
Fri 6 Jun 21:44:07 UTC 2025 : VR: 5120 mV
Fri 6 Jun 21:52:00 UTC 2025 : Charging State:  2
Fri 6 Jun 21:52:00 UTC 2025 : VB: 3238 mV:
Fri 6 Jun 21:52:00 UTC 2025 : V: 5216 mV
Fri 6 Jun 21:52:00 UTC 2025 : VR: 5181 mV
Fri 6 Jun 21:44:07 UTC 2025 : Charging State:  0
Fri 6 Jun 21:44:07 UTC 2025 : VB: 5 mV:
Fri 6 Jun 21:44:07 UTC 2025 : V: 6 mV
Fri 6 Jun 21:44:07 UTC 2025 : VR: 5120 mV
Fri 6 Jun 21:52:10 UTC 2025 : Charging State:  2
Fri 6 Jun 21:52:10 UTC 2025 : VB: 3239 mV:
Fri 6 Jun 21:52:10 UTC 2025 : V: 5212 mV
Fri 6 Jun 21:52:10 UTC 2025 : VR: 5178 mV
Fri 6 Jun 21:44:07 UTC 2025 : Charging State:  0
Fri 6 Jun 21:44:07 UTC 2025 : VB: 5 mV:
Fri 6 Jun 21:44:07 UTC 2025 : V: 6 mV
Fri 6 Jun 21:44:07 UTC 2025 : VR: 5120 mV
Fri 6 Jun 21:52:20 UTC 2025 : Charging State:  2
Fri 6 Jun 21:52:20 UTC 2025 : VB: 3242 mV:
Fri 6 Jun 21:52:20 UTC 2025 : V: 5215 mV
Fri 6 Jun 21:52:20 UTC 2025 : VR: 5182 mV
Fri 6 Jun 21:44:07 UTC 2025 : Charging State:  0
Fri 6 Jun 21:44:07 UTC 2025 : VB: 5 mV:
Fri 6 Jun 21:44:07 UTC 2025 : V: 6 mV
Fri 6 Jun 21:44:07 UTC 2025 : VR: 5120 mV
Fri 6 Jun 21:52:30 UTC 2025 : Charging State:  2
Fri 6 Jun 21:52:30 UTC 2025 : VB: 3245 mV:
Fri 6 Jun 21:52:30 UTC 2025 : V: 5213 mV
Fri 6 Jun 21:52:30 UTC 2025 : VR: 5179 mV
Fri 6 Jun 21:44:07 UTC 2025 : Charging State:  0
Fri 6 Jun 21:44:07 UTC 2025 : VB: 5 mV:
Fri 6 Jun 21:44:07 UTC 2025 : V: 6 mV
Fri 6 Jun 21:44:07 UTC 2025 : VR: 5120 mV
�����������������������������������������������������



Here is my other WDT that is behaving as expected with the same batteries and same power supply

Code:
Using /usr/local/bin/wdt

Fri 6 Jun 22:03:25 UTC 2025 : Charging State:  2
Fri 6 Jun 22:03:25 UTC 2025 : VB: 3313 mV:
Fri 6 Jun 22:03:25 UTC 2025 : V: 5213 mV
Fri 6 Jun 22:03:25 UTC 2025 : VR: 5192 mV
Fri 6 Jun 22:03:28 UTC 2025 : Charging State:  2
Fri 6 Jun 22:03:28 UTC 2025 : VB: 3312 mV:
Fri 6 Jun 22:03:28 UTC 2025 : V: 5212 mV
Fri 6 Jun 22:03:28 UTC 2025 : VR: 5187 mV
Fri 6 Jun 22:03:35 UTC 2025 : Charging State:  2
Fri 6 Jun 22:03:35 UTC 2025 : VB: 3314 mV:
Fri 6 Jun 22:03:35 UTC 2025 : V: 5212 mV
Fri 6 Jun 22:03:35 UTC 2025 : VR: 5187 mV
Fri 6 Jun 22:03:38 UTC 2025 : Charging State:  2
Fri 6 Jun 22:03:38 UTC 2025 : VB: 3313 mV:
Fri 6 Jun 22:03:38 UTC 2025 : V: 5210 mV
Fri 6 Jun 22:03:38 UTC 2025 : VR: 5187 mV
Fri 6 Jun 22:03:45 UTC 2025 : Charging State:  2
Fri 6 Jun 22:03:45 UTC 2025 : VB: 3314 mV:
Fri 6 Jun 22:03:45 UTC 2025 : V: 5212 mV
Fri 6 Jun 22:03:45 UTC 2025 : VR: 5192 mV
Fri 6 Jun 22:03:48 UTC 2025 : Charging State:  2
Fri 6 Jun 22:03:48 UTC 2025 : VB: 3316 mV:
Fri 6 Jun 22:03:48 UTC 2025 : V: 5210 mV
Fri 6 Jun 22:03:48 UTC 2025 : VR: 5184 mV

Here is the script that I was pulling data with

Code:
#!/bin/bash

wdt_file=$(which wdt)
logfile=/home/jaker/wdt-rpi/wdtdb.log

if [[ -f $wdt_file ]]; then
   echo "Using $wdt_file" >> $logfile
else
   echo "wdt executable not found" >> $logfile
   exit 1
fi

#Read the battery voltage
var1=$(wdt -g vb)
#Set the voltage threshold in millivolts
var2=4000
var3=$(wdt -g v)
var4=$(wdt -g vr)
date1=$(date -u)
var5=1
state=$(wdt -g c)

if [[ $var1 == *Fail* ]]; then
   echo "WDT Hardware not detected" >> $logfile
   exit 1
fi

echo "Starting WDT troubleshooting Press CTRL+C to stop"

while true; do
   var1=$(wdt -g vb)
   var3=$(wdt -g v)
   var4=$(wdt -g vr)
   date1=$(date -u)
   state=$(wdt -g c)
   echo $date1 ": Charging State: " $(($state)) >> $logfile
   echo $date1 ": VB:" $(($var1)) "mV: "  >> $logfile
   echo $date1 ": V:" $(($var3)) "mV" >> $logfile
   echo $date1 ": VR:" $(($var4)) "mV" >> $logfile
   sleep 10
done

I do not see anything physically on the board that looks like an issue. both are multichem V1.0
 

alexburcea

Administrator
Staff member
I am sorry for asking, but are you plugging the power into the Watchdog or into the Raspberry?
Is acting very strangely
 

txrocks

Member
Never a dumb question....I still had the RPI powered as well as the WDT. The one that I have had issues with will not power up with the USB C that is on the WDT. Not really a big deal as I am going to power from a 20v DC power supply that I have.

Is there any plan to add the RPI to OpenPLC ? It would be nice to monitor the incoming voltage to the wdt so I can have that on my HMI. That will also tell me that I do not have any control or power to my pumping gear on one project. I may just use a 24v relay on that and hit another input on the building automation card for that.
 

alexburcea

Administrator
Staff member
So, the strange wdt is working from the 24V, but not working when powered through usb-C connector.
If this is the case, it might be because we did not implement the power negotiation feature of the USB 3 standard.

If you are asking if we plan to add the Watchdog to the OpenPLC, yes, but hard to tell you when it will be done.
 

txrocks

Member
I do have one odd thing I'm about to start looking into. I have an analog input going to the BAS, when the WDT is powered up with batteries in it, that analog input stays at zero. Seems like I have some data collision or addressing issue causing this. I can pull the batteries, unplug the DC power to the WDT and power the RPI directly with no issue.

For this install it would have been nice to use the RPI power supply and power from the WDT, but I have a few laptop power supplies that are not used any more that fit the bill.

I'll try the USB port on my other one later this evening also.
 

txrocks

Member
Since I have the BAS running Open PLC, and the WDT is not implemented in OPLC, could this be what is causing me issues and upsetting the BAS ?

The OPLC program is still running it is seeing the digital inputs, the analog input is stuck at zero.

Thanks!
 

alexburcea

Administrator
Staff member
The fact that the WDT is not implemented in OpenPLC should not be a problem at all. If you have access to the Raspberry Pi console, please run "i2cdetect -y 1" in both situations (working and not working) and share the outputs. BAS having all the inputs stuck at 0, looks like an I2C communication problem (hardware level).
 

txrocks

Member
It is the same, sooo the next question how do I go about changing the address of one of the boards? This is a RPI5, Smart Fan, BAS, WDT. In that order.

Code:
NO WDT
@wellcontrol:~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- 2d -- --
30: 30 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- 49 -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --           


WITH WDT
@wellcontrol:~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- 2d -- --
30: 30 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- 49 -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
 

txrocks

Member
Appears to have it all up and running with the address change, I changed the address of the BAS. If you are running OpenPLC you do have to go change your stack level in the PLC program also. Is there a way to change the address of the WDT itself?

I do still get low power supply warnings on the RPI when its powered through the WDT or the BAS and not running the RPI 5 official power supply. It has not crashed or browned out, just have the warning.

I really wish the Raspberry PI 5 had a connector for a WiFi antenna so I could have an external antenna outside of my junction box on the remote installs. I might have to buy another switch and access point to increase my network connection strength. It is -50dBm on 2.4GHz with the door open and drops to -70dBm when I close and latch the door.

NO WDT, CHANGED BAS ADDRESS TO ON-2,ON-1,OFF-0
@wellcontrol:~ $ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- 2d -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- 4b -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

WDT POWERED WITH BAS ADDRESS ON-2,ON-1,OFF-0
@wellcontrol:~ $ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- 2d -- --
30: 30 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- 4b -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
@wellcontrol:~ $
 
Last edited:

alexburcea

Administrator
Staff member
Sorry for the late reply,
The WDT has a fixed address.
Except for tightening the standoffs so the Raspberry Pi header makes good contact.
 

txrocks

Member
All the standoffs were good and snug, and I made sure the pins were all clean. It was easy enough to swap the address on the BAS, and make the change in Open-PLC.

I get the low voltage warning on my other controller that has a 16 input, 16 relay, fan, and BAS, with the RPI-5. The RPI-5 is just pissy unless its powered by the RPI USB C power supply.
 

alexburcea

Administrator
Staff member
Assuming the BAS powers the Raspberry Pi, please tell me the hardware version of the BAS.
We face this warning on our older versions (it's just a warning, the RPI stays alive) and did some modifications on our new versions, but that was a few revisions ago.
 
Top