PWM details for Duet high power outlets
-
Hi, I was considering the changeover from 12V to 24V and dont understand something and hopefully someone can help.
my understanding is that all of the outputs are PWM controlled and that the PID and PWM parameters are alterable in software so why is it that everything has to be changed to 24V?
24V input with PWM set at a maximum duty of 50% is in reality 12V (ok so its not on an oscilloscope but as far as the connected device is concerned it may as well be)
so why dont people set this way for the hotend, heatbed and even the fans?
ok its not perfect but certainly short term it should be perfectly workable and let you transition to a 24V supply and upgrade the other parts to 24V at your leisure. depending on the PWF frequency fans can be an issue but since they are already under PWM control the frequency must be high enough to avoid any audible harmonics.
while I am new to Duet (still awaiting the board) I am familiar with PWM and PID controls and since no-one seems to have done this I figure I must have missed something I just cant see what?
it does look like after a power cycle the PID settings are lost so it could be this is why its not done but that seems a poor reason that could be worked around.
can anyone explain to me what I have missed?
thank you
-
@opentoideas Yes it's perfectly possible. Fans are easy - you can just change a jumper if they are all 12V. The heater is another matter though. For sure you could run it at 50% duty cycle but the danger is if a mosfet fails open (which it could). Then things would get hot and smokey very quickly. Heaters are cheap as chips so why risk it?
-
well while everything in isolation is cheap replacing the whole lot is a big chunk at once also for example a "low" powered 12V bed heater could easily be over driven to speed up heating times. I can think of a ton of reasons why it would be handy and as with all things good basic design should negate any issues. I presume thermal runaway can be controlled from software likewise exceeding the temperature of any heater should automatically trigger a shutdown. without having the Duet to see whats there in the settings I am thinking out loud while I wait
to my thinking this would be FAR safer than many of the unsafe bodges I have seen to fit ac bed heaters. as you now from our earlier discussions I an in no way against AC bed heating but some of the examples out there are less than safe.
an over-driven 12V bed heater seems to me like a simple way to speed up bed heating at little to no loss as it would be replaced anyway with the upgrade and I already know mine will run at 500W so it could be an interesting experiment to see how far it can be pushed.
I was just curious as I hadn't found any mention of this and I have found people going to great lengths to get around what appears to be a non issue - just figured I had missed something
-
@opentoideas Well at the end of the day, a heater is just a resistor. So something rated at say 100Watt at 12v would be 200W at 24V. I think it's generally a safety thing in that if a moseft fails and you lose control, a high power hot end heater is more likely to be a fire hazzard than one that is a better match for the machine. Another potential failure mode is if a thermistor falls out. But I seem to recall having a similar discussion about running heaters wired in series and the concensus was that an appropriately sized fuse should take care of it. The Duet does a pretty good job of detecting heater faults. There are a few scary videos on the internet showing printers that have caught fire but that's generally people being stupid or very bad machine design.
Edit. You are probable fine running 24V to your bed heater at 50% PWM as it's unlikely to get hot enough to catch fire. Personally, I wouldn't risk it with hot end heater that costs peanuts.
-
Reasons this is a bad idea:
- 24v 50% PWM is not 12v, it is 24v half of the time and 0v the other half of the time. If you attach it to something that can be damaged by 24v (for instance, a brushless fan which often has capacitors inside, perhaps rated at 16v), damage can result.
- 24v 50% PWM does not create the same power (heat) as 12v. It creates twice that. For the 50% of the time the heater is on, it is producing 4x rated heat. For the other 50%, it is producing 0x rated heat.
- As deckingman mentioned, MOSFETs can fail (though I suspect he meant closed, as failing open would be safe). This results in the heater receiving 4x rated power. Probably catch fire.
- Software thermal management is not a solution here, because it can do exactly nothing in the event of a FET failure, firmware hang, etc.
- All it takes is a misconfigured config.g, perhaps a year from now you've forgotten about the 12v situation, and you're in a situation where you're sending 24v to your 12v heaters.
The only reasonable solution is to size a fuse such that it will blow at 24v 100% PWM, and not blow at 24v 25% PWM. But even that is not great.
Proper heaters are a whole lot cheaper than a fire. You might get away with not looking both ways before crossing a street, but does that mean you should do it?
-
@deckingman yes not ideal but just curious. there are a lot of people that just dont understand how simple things work so its interesting to see why things are done in a specific way as to whether its ignorance or a good reason.
-
while you make good points and for anyone not familiar with how PWM works its good information the simple fact is any component can fail and a good design should protect against likely failures. the vast majority of a 3D printer "could" catch fire in a failure and the design should take this into account.
unfortunately many designs/builds do not take basic safety into account but that is up to each individual to decide where they draw the line and it dismays me that many don't bother with a line at all.
any heated bed with a sensible heat up time if it fails on would reach combustion temperatures so its hardly a relevant concern when as above there should be safety elsewhere to deal with this eventuality.
In many ways I would expect a 12V bed fed 24V would be FAR more likely to burn out a track than a 1KW AC bed heater left on but neither to me are an acceptable safety. either way a physical over temp cutout should be part of the design no matter how the heating was done even though its not standard on many builds.
while I understand why many beat the drum over what they consider to be safe, those that are doing things in an unsafe way will just ignore them anyway.
using PWM PID control to moderate the maximum heat output on a heater is not at all uncommon - look at any commercial PID and they have a setting for just this case.
I already know that my heater bed is perfectly happy running at 2x its rated power but perhaps I should have been clearer. As for the brushless fans you mentioned this is why I was asking the details as if the PWM frequency is fast enough then 50% duty cycle of 24V IS 12V for all real purposes and if not a smoothing capacitor can correct it.
is this best practice and designed for long term use? hell no! but I thought I made that clear in the OP
-
It is very, very unsafe to run 12v heaters at 24v. Just don't do it.
This produces FOUR times power output. This is going to sound harsh @opentoideas but I am trying to keep you from dying, so I don't care if you think I'm a jerk: if you aren't able to do the V=IR, P=VI calculations in your head before asking this question, you have absolutely no business evaluating the risks of driving components beyond their ratings. You are almost certainly not qualified to over-drive your printer parts safely.
Electronics component ratings are generally not suggestions and have minimal safety factor; only electrical engineers and similarly-qualified people should consider taking parts outside their specs.
Explaining out the risk a bit further. This isn't merely a matter of heating up your bed or hot end four times faster, or making your PID untunable from the process gain going too high relative to the sensing lag, or having a maximum reachable temp high enough to self-ignite. Those are all issues but are pretty obvious and can be addressed with a firmware PWM limit. The big problem in my view is that low-impedance loads like heaters DO NOT just see the average voltage, they repeatedly alternate full power and zero power. Going to 400% power thermal-shocks the everliving shit out of the heater element. You will get serious hot spots, particularly with ceramic-potted heater cartridges as the coil generates too much heat for the insulating ceramic to carry it away effectively, and over time that leads to potting cracking and internal shorts. Once you get an internal short, VERY VERY BAD STUFF can happen:
- The cartridge resistance can drop due to a coil-coil short, thus causing the cartridge to generate MORE power, leading to thermal runaway even at your reduced firmware PWM level.
- The coil can short to cartridge casing, causing the entire hot end to be energized to +24v. If the hot end is grounded, your heater will run away whether the Duet tries to shut off the MOSFET or not. (Only killing the PSU will stop this.)
Other issues that aren't going to burn your house down but are worth understanding:
- Bed power in excess of around 0.5 watts per square centimeter will generally cause the bed stack to flex from thermal warping as the bottom touching the heater is much hotter than the top. This can throw off Z height and put banding into prints.
- 12v fans have very high early mortality rates when run on 24v PWM'd down (or two 12v fans in series) because the BLDC driver electronics just aren't designed for it. They might work for a while but will likely not work reliably. What happens if your hot end fan gives out mid-print?
- High heater powers cause voltage sag through the Duet and PSU. Remember, if you use a PWM limit, it's doing 400% power 25% of the time and 0% power 75% of the time, which on a 12v heatbed is putting a non-negligible amount of PSU sag, +24v rail sag, and ground-plane voltage rise into your board due to trace and wiring resistance. That, in turn, can potentially mess with thermistor vrefs, mess with other heaters, and throw EMI off your printer from common-mode noise on all your lines.
There ARE quite a few people who do run low-power 12v heatbeds on 24v. There are also a lot of people who run 12v heaters on a 16v laptop brick. It's still a bad idea even if setting a firmware PWM limit makes it work ok in the short/medium term.
-
@opentoideas said in PWM details for Duet high power outlets:
any heated bed with a sensible heat up time if it fails on would reach combustion temperatures so its hardly a relevant concern when as above there should be safety elsewhere to deal with this eventuality.
Huh? My MK3 bed takes about 10 minutes to 100C, and tops out at about 130C (well below auto-ignition for the polymers we print with)
using PWM PID control to moderate the maximum heat output on a heater is not at all uncommon - look at any commercial PID and they have a setting for just this case.
Yes, but in these cases the rest of the design must be safe in the event the PID controller fails.
As for the brushless fans you mentioned this is why I was asking the details as if the PWM frequency is fast enough then 50% duty cycle of 24V IS 12V for all real purposes
This is not true.
and if not a smoothing capacitor can correct it.
This is also not true. If you put a capacitor on a 24v PWM'ed signal and measure it, you will see 24v. The reason for this is that when the FET is on, the capacitor will appear as a short, and near-infinite current will flow into the capacitor for an instant in order to fill the capacitor to 24v. Current will only be limited by the ESR of the capacitor.
You could use an LC filter (an inductor and a capacitor) to solve this, but... why? Why not just use a 12v supply as well as the 24v supply, if you insist on not changing the heaters and fans.
-
@opentoideas said in PWM details for Duet high power outlets:
24V input with PWM set at a maximum duty of 50% is in reality 12V (ok so its not on an oscilloscope but as far as the connected device is concerned it may as well be)
This is absolute not true. For example a 16V capacitor will blow up if driven with 24V 50% PWM, or it life time will be drastically shorten.
24V 50% PWM isn't 12V and never will be. 24V 50% PWM only means that you average power will be like 12V (BTW, not sure about that but I think 24V 25% will give the same power as 12V, not 50%) -
@rcarlyle - I dont even know where to begin with that but since PWM switching is generally in the kHz range and above little of it applies.
Outside of the scope of the OP however there are a load of good points and things that people should consider rather than "I just fitted a 10MW bed heater and now am up to temp in 0.00003 pico seconds" lol no I dont think you are a prat but unnecessarily rude and condescending.....
@elmoret - it comes as no surprise that your heatbed is of sensible design and rating but there are a great deal of folks out there putting 1KW heaters on a 300mm2 bed.... mine running at 400w seems more than fast enough
While you are right in a theoretical world most multimeters sample in MHz try connecting a good old moving coil meter to that 24V 50% in the real world current is flowing so in the real world there is no infinate current flow into your capacitor and the voltage measured is 12V. Oh hang on just spotted this is a deliberate trap. Why would you connect a capacitor to a PWM output? Only to store the on segments filling it up to a steadystate at 24V. Oh dear it took a moment to see where you were going with that lol
Naughty! naughty! obfuscation isnt clever you should be ashamed!
Now I understand why you and dragon want to use a capacitor in this as once the capacitors "bucket" is full it would just read 24V but for resistive and inductive loads we are actually talking about then it holds true.
No of course 24V at any duty cycle is still ultimately 24V
But to a load it behaves like 24V x duty% which is all that matters.
Would I use this to "reduce voltage" for driving IC's - of course not that would be absurd
This is where I am confused by your PWM fans as I thought the Duet only provided 2 pin fan headers therefor not suitable for 4 pin fans anyway, so only bog standard motor fans are likely unless you are doing something outside the scope of the query.
Anyway so yes its possible, no its not a good idea and as with any part of the system good failsafes are needed whatever controlls are used.
Does that about sum it all up?
-
The bed PWM runs at 10 Hz. Which isn’t even really “PWM” at the level of capacitance/inductance the bed heater has, so much as just switching on and off.
You can’t run a high current MOSFET PWM at super high frequencies without risking overheating the MOSFET. They have relatively high resistance / voltage drop in the unsaturated periods between full-on and full-off. Excessive switching frequency means they spend proportionately more time in that unsaturated range and can overheat.
Then bed and chamber heater PWM specifically has to be a pretty slow switching frequency to support AC SSRs, which cut off at voltage zero crossings of the AC waveform. So if your line frequency is 60 Hz, you want to make sure the control input to the SSR is quite a bit slower than that, to ensure you actually get some Duet FET full-off time in during AC zero crossings so the SSR will shut off the correct proportion of the time.
-
@rcarlyle 10Hz! oh wow yes thats slow. thank you that was one of the first things I was looking for and yes changes things a lot.
Isnt it strange how "High power" is so situation dependant
when I built a many KW 3 phase heater with PID and SSR I don't consider that very high power! while thought through the switching mechanism and was aware of the zero crossing the frequency never occured to me as these are quality industrial components and "just work" with less stress for the switch than a contactor at the load and the benefits of the PID algorithms.
in comparison when building "high power" LED lighting with PWM control (~50W per lamp) frequency was critical. most controllers were about 10-20KHz which while fine with the LED, when used with the cooling fans produced audible harmonics that were a nightmare.
for these, resolution is also a factor as at low levels the LED dimming "steps" are noticeable so I am about to experiment with some 12 bit controllers to see how well 4096 steps compares to the 8 bit resolution with arduino and driven from the ESP8266 development board(if that sounds familiar the ESP is used for the wifi module on the Duet but is also great for home automation projects)
now I know how slow the switching is there is no point asking about the resolution as it will be good enough for this slow switching
thank you again for this as while PWM in itself is a simple concept the application can change which properties become important
-
@opentoideas Just wanted to add a correction to something I said earlier. I thought the Duet had a 12v regulator and that you could run 12v fans on a 24v psu by changing the Vfan jumper. I just checked the Wiki and note that it's a 5V regulator so Vfan can be set to Vin or 5V, not 12V as I indicated. Apologies.
-
@deckingman said in PWM details for Duet high power outlets:
@opentoideas Just wanted to add a correction to something I said earlier. I thought the Duet had a 12v regulator and that you could run 12v fans on a 24v psu by changing the Vfan jumper. I just checked the Wiki and note that it's a 5V regulator so Vfan can be set to Vin or 5V, not 12V as I indicated. Apologies.
It's the DueX2 and DueX5 that have a 12V regulator on board.
-
@dc42 said in PWM details for Duet high power outlets:
It's the DueX2 and DueX5 that have a 12V regulator on board.
Ahh, thanks. I knew I'd seen it somewhere! - alzheimer's is not as advanced as I was beginning to think it was
-
@deckingman lol its all good, this was a bit of a brain fart thought experiment and not a real world scenario
as always, thank you so much for your assistance