Undervoltage bug?


What is the problem?
After upgrading to the latest OctoPrint on my Raspberry Pi B+, I'm getting the undervoltage icon. I had it connected via an older cable. I replaced that today with an official switchable pi power supply and I'm still seeing the icon. I even when to the settings to disable to the feature but it still shows. Might this be a bug or is there something else I can check? Seems like with an official PS I shouldn't have this issue.

What did you already try to solve it?
Replaced power supplies and cables

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)
Octoprint v1.3.10
Ender3 Pro


Hi @Jeff_Bell!
Do you get this warning with the printer plugged in?


Link to the power supply you have. Better yet, take a readable pic of the power specs on the wall wart.


Here's a link to the PS I purchased. It includes a photo of the sticker: https://www.amazon.com/gp/product/B071YD8JLM/ref=ppx_yo_dt_b_asin_title_o03__o00_s00?ie=UTF8&psc=1

I haven't been watching super closely but I know when I first turn on the Pi and fire up Octoprint, the symbol is not there. The first time I notice it is when I send a print to the printer.


That isn't an official power supply. Certainly it's better than a generic cell phone charger (rule of thumb: "integrated" cord is more likely to handle voltage drops). They say it's sufficient but that's definitely the source of your problem.

You can rule it out by grabbing the Canakit power supply, which is "known good".

That sounds about right. The power supply is decent until the Pi really starts to churn its CPU, and then it can't supply enough. It then basically throttles the CPU to 50%.

I'm waiting for yet another revision of my personal Pi power supply that is designed (a) to avoid USB cables and (b) to target about 5.2V well above 3A.


I may have to do that just to rule it out. However, I have tried this with an old charging cable and two different power blocks and now this separate PS. I didn't go with the Canakit one because I wanted something with a switch.


Well, in any case, it isn't a bug.


Note that if you also have a webcam and it's plugged into the Raspi then that also sinks power. Anything USB plugged into the Raspi could also potentially sink power, to include your printer's controller board. (What if your Raspi is shunting 5V over that serial line to your controller?)


Buy a https://www.amazon.com/AmazonBasics-Port-USB-Power-Adapter/dp/B00DQFGJR4/ref=sr_1_4?ie=UTF8&qid=1548724826&sr=8-4&keywords=active%2Busb%2Bhub&th=1


For what it's worth, the official 12W 5V Apple power brick for the iPad/iPhone is a little powerhouse, pushing 2.4A at about 5.2V. I routinely use it to power Raspberry Pi 3B computers. I know that a lot of us have a spare one sitting around the house. I don't recall ever seeing an undervoltage indication using one. At $19 each they're a little pricey but I'm pretty sure it's very forgiving of a wide range of input voltage/frequency.


Thanks all. I do have the official Pi Cam installed in the available port. The only thing plugged into the USB is the printer.


Perhaps temporarily tape the USB 5V line and see if the undervoltage indication goes away. If so, it means that your Raspi is sinking 5V over to your controller board.


@OutsourcedGuru I'll give that a shot tonight. I'm pretty new to Raspi so when you say that it's "sinking" 5V to the controller board, is that a problem that I should look to solve more permanently? Does that indicate a behavior that it should not have? I know for a fact that the Raspi is powering my controller board because even after I shut the pi down, the LCD on my printer stays on. I just assumed that was how it behaved. Do you suppose that's the problem and, if so, is there a more permanent solution aside from electrical tape? :slight_smile:


I got the errors also. When I got a different power supply, they went away. https://www.amazon.com/gp/product/B00L88M8TE/ref=ppx_yo_dt_b_asin_title_o06__o00_s00?ie=UTF8&psc=1. I run a logitech webcam c270, a MP Maker Ultimate and MP Select Mini on it. I've run both printers and the webcam at the same time without issue.


For example, I have an autonomous tank project. It's got both a Raspberry Pi Zero W and an Arduino Mega 2650 board in it. There's like two GPIO wires that go from the Pi over to the Arduino to send signals to tell it how to steer. Each computer has its own power supply.

But then I notice that if I turn off the Arduino power supply, the LEDs on the Arduino are still on (just faintly). So the Pi is "sinking" 5V over to the Arduino via the serial connection I've created. In electronics design, if power is flowing from one thing to another we say that it sinks power.

Okay, so that's the cause of your undervoltage.

Long-term? Honestly, I don't know of anybody who provides a "smart" USB serial cable which includes an unexpected reverse-direction diode inline with that 5V. Typically, the Type-A side of the serial cable is the host side (imagine a PC computer). The manufacturers all think: plenty of power, let that side of the communications provide 5V to the other side. But in the case where the host is a small single-board computer and the "other side" is the beefy stepper-driving controller board, then this is just unexpected from the standpoint of the people who originally designed USB. You can't have the Pi sink power to the controller.

Honestly, I should make and sell smart serial cables for this industry. The 5V signal (as seen by the Pi from the controller) is supposed to be necessary so that the Pi then knows to create a device in the device tree for it. All that makes the software stack happy. In reality, though, we've got people here who are doing it [the tape thing], it solves their problems and everything works.

If you're handy with soldering, you could buy a good-quality serial cable (with internal metallic shielding or with an external ferrite core), cut off the Type-A end and solder on a replacement, leaving out the 5V power wire. I assume that you had fully tested this with tape first before deciding to do something like this.

An alternate version would be to solder inline a diode for that 5V pin. You'd orient the diode so that current can't flow from the Pi to the controller board. (But in theory, the controller board could present 5V to the Pi which is technically part of the USB handshake.)


@OutsourcedGuru - thanks so much for the solid and thorough reply! I seemed to have found another solution by chance. My printer is in the basement and it gets cold down there. I ran an extension cord from a different outlet and plugged in a small heater. The printer and the pi were plugged into a power strip with some other miscellaneous things. Just for shits and grins I took the pi out of the power strip and plugged it in to the extension cord that the heater was in. Boom. No more voltage error. Does this make any sense or is this a fluke?


Literally the last URL I had open:


There you go. Buy one of those and solder a diode across it if you wanted the "gold" version of that. Given the slight additional capacitance, I would prefer a single cable solution but that's about as good as you could hope for. (That guy's going to make some money, I'd guess.)


Obviously, the heater was dropping that 120VAC down to something less than what it was supposed to be (when it was on). So then, the input side of the 5V adapter is—I dunno—now 111VAC and that means that the output side of that is now less than the 4.64VDC threshold.

If you want to confirm, put your multimeter into the power strip before/after adding the heater (ON, obviously). When the heater pulls the line voltage down to that 111VAC number then the power adapter can't do its job right.

But still, your controller shouldn't sink power from the Raspi. Go chase one of those adapters that Tedder linked if you don't like the tape option.


On Power supplies:
Don't assume that because it's an Apple charger, it's OK. Apple does make good chargers (which are actually more like a true power supply. Most "chargers" are not, and lack the voltage regulation required to serve as a power supply). However, Apple makes various sizes. The one which came with my brand new iPhone XR is rated at 1 amp. The one that came with my wife's iPad is rated at 10 watts, 2.1 Amps (you MIGHT get by with that one, especially if you don't have a lot of "extras" plugged in to your Pi.

The power supplies CanaKit sells seem to be good, though even they are not immune from problems. I bought 3 R-Pi kits from them which each came with a power supply. 2 of the 3 worked fine, the 3rd had problems and was showing a lightning bolt occasionally. To their credit, when I called CanaKit to complain, and described what I had done to diagnose the problem, the immediately sent me a replacement under warranty, which has been working fine. So my own experience is 75% of them have been fine (though my sample is too small to be a meaningful predictor). I was happy with my interaction with CanaKit, and would not hesitate to buy from them again. (They let me keep the bad power supply: turns out it works fine for powering my 7" display.)

If you are looking for a power supply with a switch, I have a 5V 3A Power Supply with switch from Northpada and have had good luck with it. No lightning bolts, no problems. The wiring in the cable is 20 ga., which appears to be enough (some power supplies have 22 or 24 ga wires, which causes a larger voltage drop under load). I do like having the switch, just to save the repeated plugging and unplugging of the power supply from the Pi - saves wear and tear on the connector.