Backpowering problems

First: I was pointed to the Put tape on the 5V pin - Why and how topic. How does one reply to an existing topic? I logged in, I seem to be able to create new topics, but I can't find a "reply" button. Why is it hidden?

Second: I don't understand the issue. A 3D printer controller should use about 20mA to run the CPU, maybe about 100mA for the stepper drivers, and maybe another 100mA for the backlight on the display. About 200mA. If your rapsberry pi supply can't handle that, better to fix that now instead of wait for your powersupply to age and degrade a bit.

Lastly: I've made a little board that takes 12V from the printer's powersupply and makes a nice 5V for the pi. This would prevent the whole printer-before-pi and pi-before-printer problems. Also... I read something about fans running.... This little board has two small mosfets that can switch a fan. I have a fan on my hotend and a fan in my powersupply that would otherwise be 100% on all the time. So I've implemented for the hotend: "fan1_on = temp > 50 OR hotend_setpoint > 0. For the one in the powersupply I have fan2_on = bed_setpoint > 0 OR hotend_setpoint > 0. Works for me!

Anybody interested in testing my little boards? I just realized today that there are printers that run on 24V. The DCDC chip is not going to like that. So only if you have a 12V printer. I'm going to try to sell them after some more testing. For now a few "I'll charge you nothing" boards are available for testing.

It should appear like this:

The issue is with the printer boards. It's the responsibility of the printer hardware to power the controller. Imagine you run the printer without OctoPrint. Actually a Atmel 2560 is rated with 200 mA.

This includes the great risk to power down the Pi without a proper shutdown. This can result in corrupted SD cards in the Pi

The "reply" button is now visible on all topics. Either I didn't see it this morning or it suddenly started appearing. There is now even a reply link under each posting! I'm pretty sure I examined all four other icons. Looking for "reply" I can't imagine that i looked over the text "reply" just besides where I double checked what the other buttons do.

The atmega2560 uses 20mA "typical" when active at 16Mhz at 5V supply voltage. You can certainly drive currents into output and that will "pass through" the atmega and you can call that "rated at 200mA", but it is not what typically happens on a 3D printer. On a ledcube when driving the leds directly from he IO pins of the atmega: yes. In a 3D printer: no.

About the risk of turning off the pi without warning: That hasn't changed. The position of the "on/off" switch for the PI has changed. You should shutdown the pi before turning it off. If you think that you can't get used to the fact that the pi runs off the printer-powersupply, then this is not for you.

Second: I think that the "pi corrupts SD cards when suddenly turned off" story is something that's less relevant today than it was a long time ago. I get myself into situations where a) I don't have a keyboard and b) I didn't get the network setup correct in one go, so I have no option but to turn it off without halting it.

The 200 mA for the 2560 is maximum rating. But you always have to calculate with maximum ratings of the device when you calculate your power supply.

No, it is still relevant. We frequently have users here with corrupted SD cards because of switching of the power supply. You can do it in an emergency moment. But if you do it frequently, it's real bad. Imagine the processor writes a block to the SD card and it's not written completely because of the power loss.

I agree you should work with "maximum" whenever appropriate. I don't know where you found that "200mA" maximum Ah! Absolute maximum rating. Micorchip does not guarantee that the device will ever work again if you exceed that. This has nothing to do with "Maximum power draw" for a board that we're calculating right now. Section 31

Yes, that's the absolute maximum ratting. You get no guarantee about performance of the chip when you exceed that even for a short while. That's NOT a statement that the chip COULD use that much.

If you read carefully (and they've hidden it pretty good) the chip will use up to about 20mA on its own and beyond that it can draw power from the supply pins for driving external things. On the Dutch electronics forum someone today asked about driving 5 leds at the same time with 10mA per led. That's 50mA going trhough the chip. That needs to stay below 50mA on the ATMEGA328. So he is exceeding the max of the chip (if you factor in the 20mA for the CPU itself), but unofficially this will work just fine.

My RAMPS has two STP55N05 mosfets mounted. Do I need to calculate the powersupply for 110A (2*55A) because they are "absolute maximum" rated for 55A. (Acutally they can take 220A each, as long as you don't do that for too long.... ) .

Even its only 20mA, that is still no reason why to power the printer controller via USB from the Pi. It's part of the printer hardware, so the printer PS is responsible to power it.

The problem with 'backpowering' (or whatever you want to call it, various names about) is actually more complex than the printer pulling too much power from the Pi. There are a number of issues caused, and they mostly stem from bad 3D Printer board designs. Well designed ones do not have this issue, but naturally they are more expensive.

The first issue is with the printer sucking power that it shouldn't do from the Pi. It's not just the chip, the LCD often draws power, and the stepper drivers in some bad cases. The max output the Pi's are quoted for is 500mA for peripherals, many users of OctoPrint use a webcam, which has to be included in this. Even with an up-to-spec supply, it does cause issues.

The second is when the printer's power supply is off, the Pi can keep the board alive. In some cases, this means that the stepper drivers are initialised at 5V (again, bad design) and then do not work properly later. Other times, maybe the LCD backlight is just a bit annoying. Or, like with my Ender 5 Pro, it made some strange noises from the electronics when the 5V line was connected.

Lastly, for some unknown reason, it seems to help with the transmission of data over the USB cable for some people. Maybe they are using crappy cables, no one really knows. But when people tape the 5V pin, it solves far too many problems.

I understand what you are saying - your points are perfectly valid, the printer's board should not draw more than x amount, why is this an issue? And, the answer is mostly cheap designs. Even to the point of some of the new Creality CR6 units supplying 24V over USB......


Thanks Charlie for explaining what the problem is.

FYI on boards where I suspect that this might happen, I design a jumper on the board for alowing USB-power onto the board. The advantage is that you can then choose to power it that way, e.g. when programming the board without the rest of the printer attached.

Sounds like an interesting project - I know TH3D sell small boards with the 5V line just disconnected, this sounds like a more sophisticated approach and probably be more useful.

I also have a board that allows you to selectively disconnect or measure the four USB signals. Instead of patching the connector I'd use one of those. It's a useful board, but it seems my marketing is not very good. It's been in my shop for a decade and sold 2 during that period... (last month).

Anyway, with that you'd have an extra cable lying around. Maybe the tape of the 5V contact isn't that bad.

It's not just the controller board. When it's powered on it also applies power to the steppers to hold them in position. The pi, even the 4, can only supply a MAXIMUM of 1.2amps from the USB. The steppers run anywhere from 600ma to 1amp of bias to hold them in position. And that is each one

All my stepper drivers have a separate "power" input and control input. If the control side is powered, it will hook up the inductor coils to the power-rails in the right order to try to make a current flow. However.... No current will flow because the power rails are unpowered.

Now I can imagine that in general you expect the power-rails to be higher than the logic supply rails. So a diode between them will "enforce" that more-or-less. But why a diode there? What stepper drivers would have such a weird diode? Wouldn't that diode be for "logic only" and burn out in like 50ms?

I have in the past worked on my own stepper-driver-board. And when I don't want the steppers to actually move, I just turn off the powersupply for the steppers. Problem solved. Not suddenly crashing microcontrollers or smoking PC because 1A of current is being drawn from USB in a futile attempt to power the steppers.

What stepper drivers have you seen that get this wrong?

would plug out the LCD slove all this problem ?
Since its only display printers info, and we already have octo for that anyway

It doesn't solve the problem, just treating the symptoms.

1 Like