Measuring undervoltage, my new power shield


#1

This is a really quick and dirty set of measurements from my new shield, using it to see when undervoltage is happening. This happened while 'backpowering' my shield- instead of using it to provide power to the Pi, I was just using it to measure the voltage supplied to the Pi. That's why the power usage numbers are negative.

Bus Voltage:    4.864 V
Supply voltage: 4.816 V
Bus Current:    -2.287 mA
Power:          39.634 mW
Shunt voltage:  -0.050 mV

throttled=0x50000
 False <class 'bool'>
lowest:             4.61597
lowest unthrottled: 4.65595
highest throttled:  4.86797

The system was right on the edge of being throttled, so it was bounching from 5000 to 5005 all the time. What's interesting to me is the "lowest unthrottled" / "highest throttled" voltages overlap by quite a bit. It must be the difference between what is sitting on the bus and what is seen inside the chip.

Here are two copies of the power shield. I'm only connecting 6 pins on the bottom because I'm lazy and it requires a lot more soldering to do so. The next iterations will add a fan controller and re-add MOSFETs for controlling some lights.

FWIW, here are the measurements when running on my shield. Pretty much perfect- I designed it to give 5.2v.

Bus Voltage:    5.192 V
Supply voltage: 5.201 V
Bus Current:    434.451 mA
Power:          2371.951 mW
Shunt voltage:  10.170 mV

Undervoltage notification
#2

printed enclosure to accommodate the pi with shield and a fan duct for a 4-pin fan:


#3

So I take it that you power all this from the top (5.2V?) and let your board regulate, right?

That's innovative with the fan cowl. I'm not sure what design I'd cook up for the enclosure but I like this so far. I might have to have you sell me one of these.


#4

Power in needs to be 8-30v (stolen from printer or any other DC source), 5.2v out, over GPIO, to the Pi. No USB power needed. The 5.2v is monitored as seen above.

Next version adds two line voltage outputs back (for LED lighting in my case) and wires up the PWM fan. We'll see how those work out when the boards come back.


#5

Nice project! Will you put boards up for sale on Tindie or similar?

How about a battery pack connector for a LiPo or similar and some charge control? A mini UPS? My biggest gripe with the Pi's is that a sudden power loss can wreck havoc on the file system making it unbootable.

And a button for safe power off (that will be automatically triggered if the power is out and the battery is getting low) Also, if there's an RGB LED strip connected, do short flashes of red to alert the user! :rotating_light:

For now I'm not using an RPi for octoprint, but an Up Squared that is way too powerful for the job. I'd like to use the Up for other, more demanding tasks :slight_smile:


#6

I'll put 'em on Tindie if they are popular, but they aren't cheap, either. That's part of why the Pi doesn't have this built-in.

UPS prob needs to be external to this project, there are 18650-style PiUPSes out there.

I had three buttons .. and a few neopixel-style LEDs .. and a 16-LED bar graph in various versions. Just too many things to go wrong. I will probably add the buttons back- it takes three to properly handle "shut down Pi", "start up Pi" and "cancel print". On the bright side it's easy to add those on without this board.


#7

Are you running Ubuntu on that or Yocto (for OctoPrint)?


#8

It's plain Ubuntu 18.04 LTS. When I installed it was just for testing, to see how octoprint performed on that hardware. So it's not running the custom Linux kernels that would give me access to all the cool hardware features on that board.


#9

I like that it's got USB 3. Soon enough, one of these printer boards will start supporting that and it would be good to do some early testing.