UPS integration
-
I'm thinking of fitting a UPS to my printer. I have one fitted to my NAS but don't know all that much about them. One thing that comes to mind is that these things usually have the ability to interact with a PC or NAS server and shut it down in an elegant fashion before the battery dies completely. I'm wondering if something similar could be done with my printer but is it necessary? I guess current power fail detection\resurrection would still work but maybe the extra time that a UPS buys, might allow things to be done differently or better? Do these things have a pin that could be monitored so that I could run a macro? I think the one on my NAS uses serial comms but could be wrong. Thoughts anyone?
-
You could have the UPS feed a spare endstop input, and set up a trigger to pause the print when the UPS indicates that power has gone down. RRF 1.20 saves the resume information any time the print is paused.
-
The way I see it, if you just want to stop a print when power goes out M911 works. The benefit of a ups would be the ability to print despite the power going out (especially useful if you only lose power for a couple of seconds/minutes at a time). The most useful situation I can think of would be as follows:
1. Power goes out, printer keeps printing from ups power.
2. Power comes back, printing continues. Otherwise:
3. Power stays out, ups reports battery situation to duet.
4. Duet pauses print and shuts down printer before ups battery runs down. -
The way I see it, if you just want to stop a print when power goes out M911 works. The benefit of a ups would be the ability to print despite the power going out (especially useful if you only lose power for a couple of seconds/minutes at a time). The most useful situation I can think of would be as follows:
1. Power goes out, printer keeps printing from ups power.
2. Power comes back, printing continues. Otherwise:
3. Power stays out, ups reports battery situation to duet.
4. Duet pauses print and shuts down printer before ups battery runs down.Exactly so. I'm fully aware of how a UPS works ( I already have one) so it was steps 3 and 4 that I was asking about.
One could of course fit huge batteries that would sustain the printer for hours thus negating steps 3 and 4 but that isn't economically viable (at least not to me it isn't). -
I did a bit of research and came across this https://forums.ni.com/t5/LabVIEW/How-to-monitor-a-UPS-by-serial-port/m-p/3318648/highlight/true#M972416
At least for the cyberpower brand units mentioned, they send just send simple on/off signals on the control lines for low battery and AC power loss so we could presumably trigger something to happen in each event.
-
Yes, that's the sort of info I was after. Getting the Duet to take the necessary action is simply matter of monitoring a pin then writing a little macro to take appropriate action when the pin changes state. It could be that I'll need to build a small interface to monitor the serial port of the UPS and output a high or low on one or two pins.
-
I think there would be a market for such a printer to ups device, an arduino Nano for £1.50 would work. I suspect every ups manufacturer uses a different signal which would be the stumbling block. But it's a great idea since it's the ideal way to avoid failed prints due to power issues. I tried just using power fail resume without a ups or batteries, there is not enough left in my psu's capacitors when the mains goes off to move the head away. Even with a large extra capacitor added.
-
I'm having a re-think about this along the lines of the following:
A UPS will sustain the printer for a few minutes in the event of a power failure - the actual number of minutes depends on the size of the battery(s) and the power consumption of the printer, but from the tests I did with a power consumption monitor, it could be quite a while. Most power cuts we get around here either last a few minutes or several hours.
If the power goes off for a sustained period of time, then the bed will cool and the part will fall off. So, I ask myself, "is there any point in getting the printer to take any action"? The print will likely be lost in any case. Also, because of my dual X carriage rails and huge gantry, it's very unlikely that I'd be able home Z when power is restored. Unless I changed things around and used Z max rather than Z min but that's about 760mm away, so it'd take for ever to move my big bed that far and back again.
So I think in my case, I'll just hook up a UPS and leave it at that. Maybe for those who print on a cold bed or blue tape and can home to Z max, it might be worth pursuing further but I don't think I'll bother personally.
-
If the UPS has a "battery low" output, it might be worth connecting it to an endstop input on the Duet and setting up a trigger to pause when low battery is signalled, to guarantee that the Duet will pause cleanly and save the resume data at that point.
-
If the UPS has a "battery low" output, it might be worth connecting it to an endstop input on the Duet and setting up a trigger to pause when low battery is signalled, to guarantee that the Duet will pause cleanly and save the resume data at that point.
Yes it might be. I'll see how easy it is to do. Better to power down the printer in a controlled and elegant fashion, rather than letting it crash. The resume data is largely irrelevant for me as I don't see how I could re-home Z with a partly printed object on my particular machine. Although maybe if I didn't lift the nozzle when it paused I might be able to resume and salvage something? (assuming the power outage was sufficiently short that the bed didn't cool too much)
-
To resume a failed print, you need to re-home the printer. On a Cartesian or CoreXY printer, homing X and Y with a print on the bed should not be a problem. To home Z, you can either use a sufficiently reproducible Z-max endstop, or use the Z probe to home at one edge or corner of the bed if the print does not fill the bed (which is more difficult with a large hot end like the Diamond).
-
To resume a failed print, you need to re-home the printer. On a Cartesian or CoreXY printer, homing X and Y with a print on the bed should not be a problem. To home Z, you can either use a sufficiently reproducible Z-max endstop, or use the Z probe to home at one edge or corner of the bed if the print does not fill the bed (which is more difficult with a large hot end like the Diamond).
Ahhh. If homing Z is mandatory to resume a print, that's definitely a no no for me then. As I said, homing at Z min would only be possible on the smallest of prints - the two parallel X rails are about 150mm apart measured at the outside (in y) and the carriage is about wide 150mm wide (in X) with the part cooling fans. So even with a 360mm x 360mm build area, anything larger than about 60mm in either X or Y is going to collide. In fact it's worse than that because if the object was taller than about 150mm, there is even more likelihood that it will collide with the extruder gantry which is even bigger. I could home at Z max but as I said, that's 760 mm away from the nozzle tip, so the bed would have to travel up to 1,520mm and the fastest I can get away with is 10mm\sec or 600mm\minute and I'm not prepared to wait two and half minutes every time I want to home Z. No worries. It's no big deal.
-
I'm going to wake this thread up… because it seems odd that none of you discuss running the battery directly on the 12V circuit.
In most of your cases, you have a 12V battery circuit with a charger and an inverter to convert power into and back out of 12V ... at some varying rate of efficiency. Did it not occur to any of you to simply put the 12V battery (gel cel) on the 12V rail?
Now... you need to adjust your power supply "up" to your battery's charge level. Typically gel cels are in the neighbourhood of 13.5 or 13.7 volts. As long as the Duet tolerates that, you're done. A Gel Cel should give you ~30 minutes of run for 350 watts (and cost ~$35) ... a $100 car battery should run the whole thing for 3 or 4 hours ... depending on things.
If you get a larger battery ... you might want to up the power supply to 500W or so.
On some other post our fearless leader said the "low voltage" warning was around 9.8V ... so you'll get 80 or 90 percent of the useful life of a 12V lead-acid cell and you should get a very high efficiency out of the system.
-
I've been thinking about pressing an old ups (with new cells) into service to prevent failed prints. I started a thread on it here https://www.duet3d.com/forum/thread.php?id=4634#p40465 I have some delay relays on order, an unusual type which switch the relay after the delay rather than switching it then starting the countdown and then unlatching it. My intention is to use the ups active led output to switch the relay on when the battery comes on, and then connect the other side of the relay to an endstop channel with a pause command triggered by it. If the timer doesn't run out it doesn't get sent so short outages don't pause the printer, if it does then the machine pauses and saves the resume data before the battery reaches the voltage where the ups switches off. This will suit me as one ups can power 3 machines for long enough to achieve this. Although I will have to test all three machines running and pull the power and see how long it can sustain them.
However the idea of just placing batteries in parallel with the psu must be a simpler way of achieving this for one individual printer. Lead acid certainly safer than lithium, but then lithium has some advantages, it would have a BMS so whilst the printer could pause at x voltage and shutdown at y voltage the pack would be disconnected by the BMS at z voltage rather than with a lead acid battery without a similar circuit which would potentially continue to discharge even though the printer was "off" until it was over discharged, as unless you've implemented a relay system for ps on and off, even a printer which has shutdown is still drawing current. So you might render your battery inoperable even if you save a print, not a great improvement, unless you have some way of monitoring and disconnecting the battery (a BMS) which isn't that far off a ups system.
I'm looking forward to experimenting with it.
-
My solution on this is a raspberry pi (cheap older model off ebay) and a second usb power adapter. The pi is powered from the ups and the 2nd power adapter is on the mains and feeds into a gpio pin on the pi through some other small board I found that converts usb 5v to pi 3.3v.
When the power drops the normal result is that the generator comes on automatically within 8-10 seconds so the ups's carry everything through. For the times when the generator fails, the pi is counting down (5 minutes i think - set up when had to manually start the gen). When that time runs out the pi executes ssh scripts to shutdown the nas and a desktop.
I haven't investigated how to add the duet to the list of things to shutdown via the network. Pretty sure that is currently do-able, but if the gen is not starting then the failed print is not my biggest problem -
I'm going to wake this thread up… because it seems odd that none of you discuss running the battery directly on the 12V circuit.
In most of your cases, you have a 12V battery circuit with a charger and an inverter to convert power into and back out of 12V ... at some varying rate of efficiency. Did it not occur to any of you to simply put the 12V battery (gel cel) on the 12V rail?
.......................................Nice idea. In my case I'd need to fit 2 batteries to give 24v. That would still leave me with the problem that my bed is 240v AC powered but for 12 or 24v systems it might be a viable way to do it I'd have thought.
-
If you are talking about regular 12V car batteries, two of them in series will give you more than 25V - which exceeds the Duet's max voltage rating.
Keep in mind that hooking up a battery in parallel will likely discharge your battery to the voltage level of your PSU. So you loose quite a bit of energy because you do not operate the battery at 100% charge. A car battery is usually almost empty at exactly 12V… (from what I was told).
-
That's not the only drawback, once the machine switches to pause, even heaters off, it will continue to discharge the battery unless something cuts the battery off at 11.5v or whatever.
-
I wouldn't have thought that any of those are huge problems that can't be dealt with. I'm just thinking that a UPS is essentially a battery running an inverter to give mains voltage. This mains voltage is then stepped down to DC voltage by the printer PSU. From what little I understand, inverters aren't the most efficient devices and there would also be some losses through the PSU itself. So it seems to me to be reasonable to cut out the step up to mains voltage\step do back down to DC aspect and just supply DC directly.
Someone cleverer than I could probably build a circuit that would trickle charge the battery from the printer PSU maybe, then when mains is lost, it switches over to the battery? A bit like a UPS but without the inverter. Just musing…......
Not that it would work for me as my bed is 240V AC.
EDIT. A quick google search shows that one can already buy power supplies with integral DC UPS - might be the way to go for printers with non AC bed heaters?
In fact thinking about it, my 10mm thick insulated aluminium build plate takes forever to cool down so if the power failed once it was up to temperature, I could probably still print for quite a while by just maintaining the DC side of things before the part falls off the bed. Might look into this a bit further.............
EDIT2. How about something like this? https://www.simplypowersupply.com/DC-UPS/AD-155C-Meanwell-24V-155W-DC-UPS.aspx