Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On cold boot vbat filter too slow. #132

Closed
neilh10 opened this issue Mar 7, 2023 · 4 comments
Closed

On cold boot vbat filter too slow. #132

neilh10 opened this issue Mar 7, 2023 · 4 comments

Comments

@neilh10
Copy link
Owner

neilh10 commented Mar 7, 2023

On a cold boot, turning on the power switch, the vbat filter algorithm reports a low voltage, and the system takes some time to report a reasonably accurate Vbat
and doesn't do the initial time check on power up.
It does correct, a few pass after initialization and can be bypassed with a reset.
If there is a no clock set, RTC battery dead, it does record initial date values before it connects to NTP and updates time.

A sequence is here
[2023-03-07 12:31:23] Vbat_low prev/new 3.245/3.245
[2023-03-07 12:31:26] Vbat_low prev/new 3.245/3.957
[2023-03-07 12:32:04] Vbat_low prev/new 3.245/3.957
[2023-03-07 12:32:04] ---LB_PWR_MODEM_USE_REQ CANCELLED--Lbatt= 0
[2023-03-07 12:35:03] Vbat_low prev/new 3.957/3.957
[2023-03-07 12:35:03] ---logDataAndPubReliably (0x1)----

---Boot. Sw Build: src\tu_xx01.cpp Dec 27 2022 13:52:51 b'neilh20'
b'release1'
Sw Name: LT500/Modbus Digi WiFi S6/LTE XB3-C-A2 MMW
ModularSensors version 0.34.1-aba

@neilh10
Copy link
Owner Author

neilh10 commented Mar 7, 2023

When a PUBLISH event happens its goes through
[2023-03-07 12:40:03] Vbat_low prev/new 3.957/3.957
[2023-03-07 12:40:03] ---logDataAndPubReliably (0x3)----
[2023-03-07 12:40:15] /---- Line Saved to tu_rcru_test06_2023-03-07.csv ----/
[2023-03-07 12:40:15] 2023-03-07 12:40:00,2,3.957,11.23,0.0761,57.75,12.07,-1
[2023-03-07 12:40:16] Waiting up to 15000 ms for unspecified modem to respond to AT commands...
[2023-03-07 12:40:21] Lte internet comms with Digi XBee3 Cellular LTE-M IMEI OK HwVer 4B41 FwVer 11418
[2023-03-07 12:40:22] Loop=Sec] rx db : Status ' Operator ' #Polled Cell Status every 1sec
[2023-03-07 12:40:22] 0=37.46] 0:0x22 'OK'
[2023-03-07 12:40:23] WATCHDOG ISR barksUntilReset 74 <--WatchDogAVR
[2023-03-07 12:40:23] 1=38.48] 0:0x22 'OK'
[2023-03-07 12:40:24] 2=39.50] 0:0x22 'OK'
[2023-03-07 12:40:25] 3=40.52] 0:0xff 'OK'
[2023-03-07 12:40:26] 4=41.54] 0:0xff 'OK'
[2023-03-07 12:40:27] 5=42.56] 0:0xff 'OK'
[2023-03-07 12:40:28] 6=43.58] 0:0xff 'OK'
[2023-03-07 12:40:29] 7=44.60] 0:0xff 'OK'
[2023-03-07 12:40:30] 8=45.63] 0:0x22 'OK'
[2023-03-07 12:40:31] 9=46.65] 0:0x22 'OK'
[2023-03-07 12:40:32] 10=47.67] 0:0x22 'OK'
[2023-03-07 12:40:32] Try +CREG '
[2023-03-07 12:40:33] 11=48.70] 0:0xe '22'
[2023-03-07 12:40:35] 12=49.72] 0:0x0 '22' Cnt=1
[2023-03-07 12:40:36] 13=50.74] 0:0x0 '22' Cnt=2
[2023-03-07 12:40:37] 14=51.76] 0:0x0 '22' Cnt=3
[2023-03-07 12:40:37] Digi Xbee3 setup Sucess. Registration ' 0 '
[2023-03-07 12:40:39] WATCHDOG ISR barksUntilReset 72 <--WatchDogAVR
[2023-03-07 12:40:39] mdmIP[ 1 / 16 ] ' 0.0.0.0 '= 7
[2023-03-07 12:40:41] mdmIP[ 2 / 16 ] ' 0.0.0.0 '= 7
[2023-03-07 12:40:44] mdmIP[ 3 / 16 ] ' 0.0.0.0 '= 7
[2023-03-07 12:40:47] mdmIP[ 4 / 16 ] ' 0.0.0.0 '= 7
[2023-03-07 12:40:47] WATCHDOG ISR barksUntilReset 71 <--WatchDogAVR
[2023-03-07 12:40:50] mdmIP[ 5 / 16 ] ' 100.105.179.204 '= 15
[2023-03-07 12:40:50] XbeeWLTE IP# [ 100.105.179.204 ]
[2023-03-07 12:40:50] Connecting to the Internet with Digi XBee3 Cellular LTE-M
[2023-03-07 12:40:50] Connected Internet
[2023-03-07 12:40:51] pubDQTR Sending data to [ 0 ] monitormywatershed.org:80

neilh10 pushed a commit that referenced this issue Mar 7, 2023
@neilh10
Copy link
Owner Author

neilh10 commented Mar 7, 2023

at beginning do another read of Vbat and use that, so now looks like
[2023-03-07 14:38:36.091] Board: Assume Mayfly 1.1A
[2023-03-07 14:38:36.101] batteryCheck req/wait/src 1 1 1
[2023-03-07 14:38:36.101] Vbat_low init=3.821 filter_sz=6
[2023-03-07 14:38:36.107] Vbat_low prev/new 3.821/3.821

@neilh10
Copy link
Owner Author

neilh10 commented Mar 13, 2023

This worked on two systems to read a good Vbat about the threshold. The third system still read a low voltage, and three seconds later read a good voltage
[2023-03-07 16:28:49] Board: mayfly rev:'1.1X07' sn:'MAYFLY22134'
[2023-03-07 16:28:49] Board: Assume Mayfly 1.1A
[2023-03-07 16:28:49] batteryCheck req/wait/src 1 1 1
[2023-03-07 16:28:49] Vbat_low init=3.229 filter_sz=6
[2023-03-07 16:28:49] Vbat_low prev/new 3.229/3.229

[2023-03-07 16:28:52] Vbat_low prev/new 3.229/4.003

[2023-03-07 16:29:04] Vbat_low prev/new 3.229/4.003
[2023-03-07 16:29:04] Bat_V(low) 3.23
[2023-03-07 16:29:04] Vbat_low prev/new 3.229/4.003

[2023-03-07 16:29:04] ---LB_PWR_USEABLE_REQ CANCELLED--Lbatt= 0

[2023-03-07 16:30:03] Vbat_low prev/new 4.003/4.003

neilh10 pushed a commit that referenced this issue Mar 13, 2023
neilh10 pushed a commit that referenced this issue Mar 14, 2023
@neilh10
Copy link
Owner Author

neilh10 commented Mar 14, 2023

for version 0.34.1-abc: on boot it checks for a slow rise time on Vbat, checks 5 times, waiting 200mS between each check, and adjusts accordingly, with an output that looks like this;
[2023-03-14 16:09:33] Board: mayfly rev:'1.1X07' sn:'MAYFLY22134'
[2023-03-14 16:09:33] Board: Assume Mayfly 1.1A
[2023-03-14 16:09:33] batteryCheck req/wait/src 1 1 1
[2023-03-14 16:09:33] Vbat slow rise detect : 3.59
[2023-03-14 16:09:33] Vbat slow rise detect : 3.78
[2023-03-14 16:09:33] Vbat slow rise detect : 3.87
[2023-03-14 16:09:33] Vbat slow rise detect : 3.91
[2023-03-14 16:09:33] Vbat slow rise detect : 3.94
[2023-03-14 16:09:33] Vbat_low init=3.942 filter_sz=6
[2023-03-14 16:09:33] Vbat_low prev/new 3.942/3.942

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant