The Raspberry Pi 4 powering my Voron 2.4 350mm 3D printer had undervoltage warnings in the kernel logs yesterday:
Mar 6 13:04:12 vortex kernel: [79246.791214] hwmon hwmon2: Undervoltage detected!
Mar 6 13:04:16 vortex kernel: [79250.824535] hwmon hwmon2: Voltage normalised
Mar 6 13:05:39 vortex kernel: [79333.480564] hwmon hwmon2: Undervoltage detected!
Mar 6 13:05:43 vortex kernel: [79337.512497] hwmon hwmon2: Voltage normalised
Mar 6 13:11:44 vortex kernel: [79698.382346] hwmon hwmon2: Undervoltage detected!
Mar 6 13:11:48 vortex kernel: [79702.414274] hwmon hwmon2: Voltage normalised
Mar 6 13:11:58 vortex kernel: [79712.494549] hwmon hwmon2: Undervoltage detected!
Mar 6 13:12:02 vortex kernel: [79716.526495] hwmon hwmon2: Voltage normalised
Mar 6 14:07:52 vortex kernel: [83067.170643] hwmon hwmon2: Undervoltage detected!
Mar 6 14:07:56 vortex kernel: [83071.202598] hwmon hwmon2: Voltage normalised
This goes on until 16:38 and again 23:25–23:27. Since the printer was idle in both periods, I assume an external cause – mains power failure and inverter switchover taking longer than usual. This has previously caused print failures with the Octopus Pro controller shutting down, for which I installed a BTT UPS 24V (supercapacitor-based backup) last month. That covered the controller’s 24V PSU but not the Pi’s separate 5V PSU. These logs show it came close to brownout, so I looked up PSU specs to find the relevant metrics:
- Setup time: The delay between power-on and power output
- Rise time: Time needed for output to rise to >90% of the spec
- Hold up time: On power loss, how long before output drops below 90% of spec
Here’s a table of Mean Well’s RS and LRS series PSUs, including the two recommended in the Voron BOM: RS-25-5 at 5V 5A for the Raspberry Pi and LRS-200-24 at 24V 8.8A for the controller(s). The time ranges are from minimal load with 230V AC to full load with 115V AC. The last four columns are efficiency ratings at each output voltage (with separate model numbers in “series-wattage-voltage” format):
PSU series | Setup time | Rise time | Hold up time | 5V | 12V | 24V | 48V |
---|---|---|---|---|---|---|---|
RS-15 | 1000ms | 30ms 🥉 | 70–12ms | 77% | 81% | 82% | 82% |
RS-25 | 1800–4000ms | 23-30ms 🥈 | 80–14ms 🥉 | 78.5% | 81.5% | 86% | 85% |
RS-35 | 500–1200ms 🥈 | 50ms | 80–15ms 🥈 | 80.5% | 84.5% | 88% | 88.5% |
RS-50 | 500–1200ms 🥈 | 30ms 🥉 | 60–14ms | 83% | 84.5% | 88% | 89% |
RS-75 | 500–1200ms 🥈 | 30ms 🥉 | 60–14ms | 79% | 84.5% | 88.5% | 89.5% |
RS-100 | 500–1200ms 🥈 | 20–30ms 🥇 | 95–17ms 🥇 | 77% | 81% | 84% | 84% |
RS-150 | 800–1200ms 🥉 | 20–30ms 🥇 | 28–20ms | 78% | 83% | 86% | 86% |
LRS-35 | 1000–2000ms | 30ms 🥉 | 30–12ms | 82% | 86% | 88% | 89% |
LRS-50 | 1000–2000ms | 30ms 🥉 | 30–12ms | 83% | 86% | 88% | 90% |
LRS-75 | 500ms 🥇 | 30ms 🥉 | 60–12ms | 86.5% 🥈 | 89% 🥈 | 90% 🥈 | 91.5% 🥈 |
LRS-100 | 500ms 🥇 | 30ms 🥉 | 55–10ms | 86% 🥉 | 88% 🥉 | 90% 🥈 | 91% 🥉 |
LRS-150 | 500ms 🥇 | 30ms 🥉 | 40–35ms | - | 87.5% | 89% | 90% |
LRS-150F | 500ms 🥇 | 30ms 🥉 | 16–12ms | 85% | 87.5% | 89% | 90% |
LRS-200 | 1500ms | 50ms | 16–12ms | 87% 🥇 | 87.5% | 89.5% 🥉 | 90% |
LRS-350 | 1500ms | 50ms | 16–12ms | 83.5% | 85% | 88% | 89% |
LRS-450 | 1500ms | 50ms | 16–12ms | 87% 🥇 | 90% 🥇 | 91% 🥇 | 92% 🥇 |
LRS-600 | 1300ms | 50ms | 20–16ms | 86% 🥉 | 90% 🥇 | 91% 🥇 | 92% 🥇 |
Observations:
- The RS-25-5 supplying 5V (for Raspberry Pi) can hold up to 80ms, long enough for power backup switchover
- However, it can take up to 4000ms (4 seconds!) to power up, the slowest of all
- The RS-35-5 is better on every metric and has spare capacity for more power draw
- The LRS-200-24 supplying 24V (for Octopus Pro and SB2209 toolhead) can only hold up 16ms, but ranks well for efficiency
Since I have full-household power backup, switchover time varies by overall load and I’ve had inexplicable print failures caused by the controllers powering out while the Pi unhelpfully says they’ve disconnected. I only made the connection when I saw the lights flicker at the same time. Supercapacitor-based backup for the 24V PSU (BTT UPS 24V) should have been a sufficient fix, but these logs indicate switchover took longer than the promised 80–14ms range and the 5V PSU’s output dipped low enough to trigger undervoltage warnings. The Pi is reporting recovery almost exactly 4.03 seconds later in many of these instances (full table below). I suspected this precision to be an artefact of the hardware monitor’s polling interval, but I looked into the code and found it polls every 200ms. 4.03 seconds is suspiciously close to the PSU’s 4000ms setup + 30ms rise time (4030ms)!
Questions:
- The Pi did not lose power in this interval, so was it still draining the PSU’s capacitors while the PSU itself was busy with setup? For four entire seconds?
- What was the voltage gradient during this interval? It’s not logged, so I’ll have to setup manual logging and hope to catch another incident.
- 4030ms is the maximum time for setup and rise at 115VAC with full load, but I have 230VAC and an idle Pi. How is this a full load?
- If I upgrade to an RS-35-5 for its lower setup time, will I get faster recovery from undervoltage warnings? (Bonus: spare wattage for future needs.)
- The RS-25-5 has configurable output from 4.75V to 5.5V. If I bump it up to 5.2V, will this stave off the undervoltage warning a bit, or is that irrelevant because it’ll just drain faster?
- What explains the other recurring durations in the data (2.02s, 6.04s, 12.09s) and the longer one-off durations (18s, 22s, 42s, even 104s), which cannot possibly be linked to the setup+rise time of the RS-25-5?
- Why are they all an even number of seconds? It’s tempting to think the polling interval is 2000ms, not 200ms.
Table of undervoltage to recovery durations
Undervoltage at | Recovery at | Duration |
---|---|---|
20660.900979 | 20664.934994 | 4.034015 |
20703.237704 | 20707.269523 | 4.031819 |
20822.183299 | 20824.203310 | 2.020011 |
20840.327546 | 20842.344579 | 2.017033 |
79246.791214 | 79250.824535 | 4.033321 |
79333.480564 | 79337.512497 | 4.031933 |
79698.382346 | 79702.414274 | 4.031928 |
79712.494549 | 79716.526495 | 4.031946 |
83067.170643 | 83071.202598 | 4.031955 |
87087.139999 | 87093.188137 | 6.048138 |
87095.204166 | 87105.284224 | 10.080058 |
87121.412568 | 87125.444637 | 4.032069 |
87161.733243 | 87183.909489 | 22.176246 |
87185.925629 | 87189.961642 | 4.036013 |
87196.005809 | 87200.037754 | 4.031945 |
87214.154236 | 87218.182057 | 4.027821 |
87468.170246 | 87478.251230 | 10.080984 |
87524.620754 | 87528.651110 | 4.030356 |
87534.699415 | 87538.731334 | 4.031919 |
87546.797755 | 87550.827537 | 4.029782 |
87669.773541 | 87681.869590 | 12.096049 |
87695.985910 | 87706.066057 | 10.080147 |
87710.098053 | 87712.110092 | 2.012039 |
87714.126287 | 87756.462804 | 42.336517 |
87758.482986 | 87766.542988 | 8.060002 |
87768.559104 | 87772.591103 | 4.031999 |
87776.623370 | 87780.655187 | 4.031817 |
87782.675304 | 87786.703320 | 4.028016 |
87788.719522 | 87893.553033 | 104.833511 |
87895.569136 | 87913.713816 | 18.14468 |
89014.467280 | 89018.499746 | 4.032466 |
89020.515585 | 89024.547277 | 4.031692 |
89032.611596 | 89036.643498 | 4.031902 |
89040.675590 | 89044.707723 | 4.032133 |
89046.723708 | 89050.756218 | 4.03251 |
89179.782421 | 89183.813821 | 4.0314 |
89191.877960 | 89193.894020 | 2.01606 |
89214.054439 | 89218.086497 | 4.032058 |
89220.103058 | 89226.150508 | 6.04745 |
89228.167234 | 89232.198622 | 4.031388 |
89240.263515 | 89244.295278 | 4.031763 |
89280.583528 | 89284.615978 | 4.03245 |
89302.759747 | 89314.855943 | 12.096196 |
89355.176693 | 89361.224713 | 6.04802 |
89413.642191 | 89417.677632 | 4.035441 |
90270.454911 | 90274.486859 | 4.031948 |
90474.073700 | 90478.105975 | 4.032275 |
90687.773090 | 90691.804483 | 4.031393 |
90697.852902 | 90699.868595 | 2.015693 |
90728.093642 | 90732.125187 | 4.031545 |
91066.786621 | 91070.818022 | 4.031401 |
91195.812554 | 91199.847975 | 4.035421 |
91268.389445 | 91270.405031 | 2.015586 |
91274.437171 | 91278.469217 | 4.032046 |
92066.737950 | 92070.769255 | 4.031305 |
92103.025839 | 92107.058284 | 4.032445 |
92113.106070 | 92117.138047 | 4.031977 |
116535.322825 | 116539.350745 | 4.02792 |
116599.831954 | 116603.863843 | 4.031889 |
116630.072856 | 116634.104295 | 4.031439 |
245043.253463 | 245047.281408 | 4.027945 |
245079.538038 | 245087.602085 | 8.064047 |
245383.959145 | 245387.991088 | 4.031943 |
245414.203625 | 245418.233004 | 4.029379 |
245494.840865 | 245496.856907 | 2.016042 |
274138.622519 | 274156.766558 | 18.144039 |
274158.782711 | 274162.814648 | 4.031937 |
274172.894976 | 274176.926871 | 4.031895 |
274191.039445 | 274195.071168 | 4.031723 |
274197.087203 | 274205.151794 | 8.064591 |
274209.183458 | 274213.215598 | 4.03214 |
274215.231473 | 274217.247496 | 2.016023 |
274354.337756 | 274358.369715 | 4.031959 |
274384.578253 | 274388.610283 | 4.03203 |
275259.535629 | 275263.567607 | 4.031978 |
275273.647849 | 275277.679815 | 4.031966 |
275356.305139 | 275360.337094 | 4.031955 |
275368.405314 | 275372.433282 | 4.027968 |
275392.593717 | 275396.625650 | 4.031933 |
275398.641879 | 275402.673749 | 4.03187 |
275430.898280 | 275434.930251 | 4.031971 |
275838.136634 | 275842.168637 | 4.032003 |
282609.986735 | 282618.050780 | 8.064045 |
283493.009251 | 283497.041167 | 4.031916 |
283499.057285 | 283503.089330 | 4.032045 |
284025.241692 | 284027.257705 | 2.016013 |
284093.786862 | 284097.818899 | 4.032037 |
284113.947251 | 284117.979175 | 4.031924 |
284184.508354 | 284188.540412 | 4.032058 |
284208.700813 | 284212.732806 | 4.031993 |
284265.150233 | 284269.185666 | 4.035433 |
This table has been updated with additional events in the following days. Curious how it’s always an even number of seconds.
Update (three days later)
I don’t think this is a mains voltage issue at all. The undervoltage events have no correlation to mains power backup switchover events. This appears to be something within the printer itself, and today’s kernel logs suggest it’s USB power draw:
[ 19.262766] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 23.144536] usb 1-1.1.3: reset high-speed USB device number 5 using xhci_hcd
[ 24.836305] hwmon hwmon2: Undervoltage detected!
[ 32.640483] usb 1-1.1.3: reset high-speed USB device number 5 using xhci_hcd
[ 32.904325] hwmon hwmon2: Voltage normalised
[ 34.916320] hwmon hwmon2: Undervoltage detected!
[ 37.410529] usb 1-1.1.3: reset high-speed USB device number 5 using xhci_hcd
[ 51.044118] hwmon hwmon2: Voltage normalised
[ 53.060672] hwmon hwmon2: Undervoltage detected!
[ 59.108098] hwmon hwmon2: Voltage normalised
One (or more) of my USB devices is drawing too much power. Since the PSU is capable of supplying 5V, I have four suspects to isolate from:
- The Raspberry Pi 4 cannot supply more than 1.2A to USB devices and is browning out from one of the two unpowered USB devices (SATA SSD and camera). The other two devices are controllers with their own 24V power supply and should not be taking any power from the Pi.
- The Pi is flaking out and may need to be replaced.
- The Pi’s power cable is losing too much power to heat and needs to be replaced.
- The PSU (RS-25-5) is flaking out and not supplying 5V 5A (or just needs its output dial adjusted).