PDA

View Full Version : Power Supply Build for Router CNC



Wobblycogs
27-09-2013, 03:29 PM
As I've got bits starting to arrive for my CNC build (http://www.mycncuk.com/forums/router-build-logs/6418-wobblycogs-cnc-mk2.html) I thought it was about time I started looking into build a power supply. I've read until my head hurts and I think I've come up with a power supply that would work. It's certainly not the finished design, I would like to incorporate the eStop to cut the mains power, but I'd like to know if I'm heading in the right direction with the calculations and design. So without further ado...

The items this supply will be powering are

4 * CNC4YOU 3.1Nm Steppers
4 * AM882 Drivers

The steppers will be wired parallel which the datasheet gives as 4.2A giving a combined draw of 16.8A. Using an approximate real draw of 66% because of the phase shift gives 11.2A which I'll round up to 12A to account for the drivers and any losses.

I've read a ton of stuff on the correct voltage to run the steppers at, the calculation based on inductance [32*sqrt(3.2)] gives 57.2V and one based on the coil voltage rating [20*2.73] gives 54.6V. There's no end of people reporting that these steppers will run happily on 70V though so that's my target.

Working backwards from my 70VDC target gives a secondary voltage of (70/1.4) 50VAC which I plan on getting by wiring a 25+25 toroidal transformer in parallel. The transformer will need to be able to supply 70*12=840W so I was planning on using a 1000VA transformer (this one (http://www.airlinktransformers.com/chassis_mounting_toroidal_transformers/chassis_mounting_toroidal_transformers_standard_ra nge/CM1000225/)). There will be a 7A type T fuse on the primary side as well as a DPDT switch.

The bridge needs to be a bit of a beast so I was going to go with this (http://uk.rs-online.com/web/p/bridge-rectifiers/6296320/) 400V 35A part. At full tilt it will need some serious cooling (assuming my calculation is correct)...

1.1V * 20A * 2 = 44W of heat
(130 degC - 30 degC) / 44 = 2.27 K/W
2.27 K/W - 1.4 K/W = 0.87K/W

so I'm planning on attaching a CPU heat sink to it. I assumed a 30 degC ambient since it will be in a case, 20A is the transformer limit. In reality it will almost certainly never be going flat out so I don't think it'll be a problem. After rectification it looks like I'll be getting 67.8V.

For smoothing I'll be using some cheap and nasty (http://www.ebay.co.uk/itm/1-NEW-NIPPON-100V-10000UF-105-c-Electrolytic-Capacitor-35mmX51mm-B94-LI-/280934713637) 100V 10000uF capacitors I've found on eBay. My calculation shows I need 28,288uF of capacitance to achieve 7V of ripple:

C = (20 * 0.01) /7.07 = 0.028288F

As the capacitors don't list a ripple current I was just going to stick 4 in parallel to give me 40,000uF of smoothing goodness.

I originally designed the system with always connected bleed resistors but I changed my mind to have a relay system. I'm in two minds which is best but I've got the relay version drawn up at the moment. I chose 30 seconds as a bleed time because it would take longer than that to get into the case. The calculation for the bleed resistor is:

W = 4 * ((CV^2) / 2) = 4 * ((0.01 * 70 * 70) / 2) = 98J
90J / 30s = 3.3W
R = (70 * 70) / 3.3 = 1484Ω

So I've got a 5W, 1k5 resistor in there at the moment. I've had a look on RS and I can seem to find a suitable relay. I've never used a relay so hopefully what I've draw is the correct way to wire it up. If I understand correctly when power is applied it energizes the coil and opens the relay preventing power going though the bleed resistor.

And finally the circuit diagram. Keep in mind this is the first circuit I've ever designed so there could be any number of brain dead things in there. If any of the symbols / terminology are wrong please point it out as I'd like to try and get it right. I suspect the power supply is a bit powerful for what I need but I think the machine will grow another axis at some point so I'd rather go large than build a second power supply.

10249

Cheers :biggrin:

m_c
27-09-2013, 03:49 PM
50VAC will most likely give you nearer 80V than 70V, depending on how your mains voltage. I'd aim about 10% lower on paper to give a good safety margin. The exact value you should be using for the figures is sqrt(2), which is 1.414... which in theory gives you 70.7V, but in practice the end result is usually higher when there's no load.

I wouldn't bother with a relay for the bleed resistor. Just pick a suitable value that sinks a watt or two constantly. The bleed resistor is only really needed when there's nothing connected, as the drives will do a reasonable job of draining the current once they're connected even if they're not moving anything.

Jonathan
27-09-2013, 04:16 PM
The steppers will be wired parallel which the datasheet gives as 4.2A giving a combined draw of 16.8A. Using an approximate real draw of 66% because of the phase shift gives 11.2A which I'll round up to 12A to account for the drivers and any losses.

As I posted here (http://www.mycncuk.com/forums/stepper-servo-motors/5075-confirming-psu-spec-steppers-5.html#post35480), it's actually often quoted as 1/sqrt(2), so 70.7%.. but that doesn't change your conclusion.




Working backwards from my 70VDC target gives a secondary voltage of (70/1.4) 50VAC which I plan on getting by wiring a 25+25 toroidal transformer in parallel.

You meant series!


The transformer will need to be able to supply 70*12=840W so I was planning on using a 1000VA transformer

The transformer output will be 50VAC, so 50*12=600W. Nothing wrong with getting the bigger transformer if you want plenty of spare capacity for more axes, but you would be fine with a smaller one, e.g. 750VA.


The bridge needs to be a bit of a beast so I was going to go with this (http://uk.rs-online.com/web/p/bridge-rectifiers/6296320/) 400V 35A part. At full tilt it will need some serious cooling (assuming my calculation is correct)...

The bridge rectifier only needs to be rated for the average power, not peak. As I posted here (http://www.mycncuk.com/forums/motor-drivers-controllers/1380-best-stepper-driver.html#post44036) the power rating of the motors you've chosen is found from their rated voltage and current, then remember to multiply by two as it's a two phase motor. That's P=2*4.2*2.73=23W. You've got 4 motors so call it 100W. Recalculate for 100W and you'll find if you stick with the 35A rectifier you wont need a heatsink.
Also, the rectifier and transformer are cheaper at Rapid Electronics.


After rectification it looks like I'll be getting 67.8V.

Remember it'll vary with the UK mains voltage tolerance, namely +10%-6%. That's still within the drivers rating though, but maybe a bit close so you could get the 24+24v transformer instead.


For smoothing I'll be using some cheap and nasty (http://www.ebay.co.uk/itm/1-NEW-NIPPON-100V-10000UF-105-c-Electrolytic-Capacitor-35mmX51mm-B94-LI-/280934713637) 100V 10000uF capacitors I've found on eBay. My calculation shows I need 28,288uF of capacitance to achieve 7V of ripple:

C = (20 * 0.01) /7.07 = 0.028288F

As the capacitors don't list a ripple current I was just going to stick 4 in parallel to give me 40,000uF of smoothing goodness.

As above, the current is actually a lot less than the value you've used in the formula, so 40mF will be plenty. as with most things, you can get the capacitors for even less on aliexpress. You might end up with fakes though, hence I'm not going to advise using smaller capacitors!


I originally designed the system with always connected bleed resistors but I changed my mind to have a relay system. I'm in two minds which is best but I've got the relay version drawn up at the moment.

The way you've connected the relay wont behave as intended, since (assuming the motors aren't connected) the voltage across its coil will stay high, as the capacitors are storing a charge, so the relay wont switch. The relay will only switch and connect the bleed resistor when the capacitors have already discharged a fair bit, which may take a long time. That kind of defeats the object. I'd go back to leaving the resistors connected permanently, as what if the relay fails? You don't need to save the few watts it can gain by using a relay.
Other than that, I think your circuit is fine.

Wobblycogs
27-09-2013, 04:17 PM
Thanks for that :biggrin:, I spent a whole evening trying to figure out if the 1.4 was supposed to be sqrt(2) and I couldn't find anywhere that definitively answered the question. In the end I assumed that people used 1.4 because after smoothing the average value of Vdc will still be slightly below Vmax (the highest voltage coming through the rectifier).

The next transformer "down" is this (http://www.airlinktransformers.com/chassis_mounting_toroidal_transformers/chassis_mounting_toroidal_transformers_standard_ra nge/CM1000224/) 24+24 model then below that is this (http://www.airlinktransformers.com/chassis_mounting_toroidal_transformers/chassis_mounting_toroidal_transformers_standard_ra nge/CM1000222/) the 22+22V. The mains in this house is normally around 235 to 237 volts so yes I would be a bit over-voltage. Does the output voltage change linearly with the input voltage? I'm thinking 235V into the 25+25 transformer would produce about 51V out (wired in series). Wish I'd put together a spreadsheet for the calculations now! Considering there's a 2.2V drop in the rectifier I think the 24+24 is probably the best choice in that case - I suppose I've just got to go away and crunch the numbers again.

I'll scrap the relay for the bleed resistor. Considering the price it would take 100 years to pay for itself in the electricity it saves.

I was thinking of trying to put a fan in the case as I have loads of 12V 90mm computer fans kicking around. I don't know how to power the fan from the circuit I have though. I only need a couple of watts so even if the way I get the power is really wasteful I don't suppose it'll matter.

Jonathan
27-09-2013, 04:24 PM
Does the output voltage change linearly with the input voltage?

For the purposes of this discussion, yes near enough.


I'm thinking 235V into the 25+25 transformer would produce about 51V out (wired in series). Wish I'd put together a spreadsheet for the calculations now! Considering there's a 2.2V drop in the rectifier I think the 24+24 is probably the best choice in that case - I suppose I've just got to go away and crunch the numbers again.

If the transformer is wound for 230V to 25+25, then putting 235V in will indeed get 235/230*50=51V, however the tolerance is +10%, so 50*1.1=55V will be the limit. The rectifier drop is 1.1V, not 2.2V. The reason is (for the purposes of this discussion!) you only ever have 2 diodes conducting at a time and the forward voltage drop of two diodes will be about 1.1V. That means with 55VAC in to the rectifier, you can expect 55*sqrt(2)-1.1= 76.7V peak.

m_c
27-09-2013, 04:32 PM
sqrt(2) essentially gives you the average value of a sine wave, and isn't electric specific.
It's officially the Root Mean Square equation for a sine wave - Root mean square - Wikipedia, the free encyclopedia (http://en.wikipedia.org/wiki/Root_mean_square)

Jonathan
27-09-2013, 04:35 PM
sqrt(2) essentially gives you the average value of a sine wave, and isn't electric specific.
It's officially the Root Mean Square equation for a sine wave - Root mean square - Wikipedia, the free encyclopedia (http://en.wikipedia.org/wiki/Root_mean_square)

No, the average value of a sine wave, i.e. sin(x), is precisely zero. The RMS value is sqrt(2).

m_c
27-09-2013, 04:46 PM
No, the average value of a sine wave, i.e. sin(x), is precisely zero. The RMS value is sqrt(2).

If you want to be such a pedant, a sine wave doesn't necessarily have an average of zero. It can be offset from zero. You've just assumed that all sine waves are drawn with zero as the base line.

As I'm sure you're aware, I meant that the average value for 90degree either side of a sine wave peak or trough i.e a 180degree section, is sqrt(2).

Wobblycogs
27-09-2013, 04:51 PM
Thank you both, some things that we nagging me are a lot clearer now. I misunderstood the spec sheet for the rectifier and assumed it was 1.1V drop per diode in use.

I'm going to remove the relay before the bleed resistor but, from an academic point of view, how would you safely incorporate the relay? Whatever is supplying power to the coil would have to be completely independent of the capacitors. If I understand correctly current can't flow backwards through the rectifier so presumably power for the coil could be take from the between the secondary and rectifier.

There's just one thing I don't think I properly understand... why is the transformer 50*12=600W (or should that really be 600VA) not the 70*12 I calculated? I have a feeling this is an AC power vs DC power thing but that's right at the limit of my understanding of circuits.

m_c
27-09-2013, 05:01 PM
Use a relay with a 240VAC coil and a set of NC contacts, and wire the bleed resistor through the NC contacts.
When 240 is applied, the contacts open, then when it's removed they shut and connect the bleed resistor.

Jonathan
27-09-2013, 05:09 PM
If you want to be such a pedant, a sine wave doesn't necessarily have an average of zero. It can be offset from zero. You've just assumed that all sine waves are drawn with zero as the base line.

That's just changing your reference point - if it's got a DC offset then it's a sine wave with an offset, not a sine wave. I thought it was misleading to just say 'squrt(2) is essentially just the average value of a sine wave'.


As I'm sure you're aware, I meant that the average value for 90degree either side of a sine wave peak or trough i.e a 180degree section, is sqrt(2).

No that's a new one to me, as it's incorrect!
As I'm sure you're aware, to find the average value of a function you integrate it over the section in question, and divide by the 'length' of that section. So lets do it:
Let y=sin(x)
We want '90degree[sic] either side of a sine wave peak', so in radians the limits of out integral are 0 and pi and we integrate over pi:
Average=1/pi*Integral(sin(x)dx) from 0 to pi.
Average=1/pi*(-cos(pi)--cos(0))
Average=2/pi

2/pi is not equal to sqrt(2).

To get the correct RMS value of a function, you first square the function, then find the mean of the function (using the above method) then find the square root of it. Hence the name - root mean square.

m_c
27-09-2013, 06:49 PM
10254

tenletters

Wobblycogs
15-11-2013, 12:36 PM
I can't believe my last post here was in September and it's November already!

I've been away and done some recalculations based on your advice, before I rush out and buy parts though it'd be great if someone could cast their eye over the spec.

10762

The transformer is still 1000VA but has been dropped down to 24+24 wired in series. That should give me a maximum voltage at the drivers of 73V assuming the mains voltage is at it's upper limit of 253V.

The relay for the bleed capacitors has been ditched in favour of always connected resistors. I've gone for 6k, 1W resistors, one per capacitor. The calculation shows a bleed time of 30 seconds with 0.88W being dissipated per resistor. The capacitors are the same 10mF one's I linked to earlier.

The neon on the primary side of the transformer has gone and I've got a blue LED with the 15k, 0.5W resistor on the secondary side.

What should I attach all the components to? I've got some 4mm aluminium plate, wood, plastic, something else e.g. thick PCB blank.

Thanks

EddyCurrent
15-11-2013, 12:55 PM
I tried a bleed resistor and it's surprising how much heat 1watt gives off but in reality it's not required because the stepper drives drain the capacitor quite quickly.

10764


Traditionally it's mounted on an aluminium plate about 3mm thick which allows it to be bent quite easily and obviously with enough space to fit everything else on. The vertical part protects the transformer from mechanical knocks which could easily damage it. The capacitor I used was mounted vertically as it had a one bolt fixing at the bottom, the rectifier is bolted to the aluminium with a little heatsink compound added, terminals and fuses are whatever you decide but I found a 4 way one of these to be useful and compact, it's 12volt rated but I decided it would be fine for my 60v supply, you need to decide yourself. 2/4/6/8/10/12 WAY + HEAVY DUTY AUTO FUSE BOX/HOLDER 12V VOLT STANDARD BLADE | eBay (http://www.ebay.co.uk/itm/2-4-6-8-10-12-WAY-HEAVY-DUTY-AUTO-FUSE-BOX-HOLDER-12V-VOLT-STANDARD-BLADE-/321061386290?pt=UK_WSJL_Wholesale_GL&var=&hash=item4ac0bff832)

Wobblycogs
15-11-2013, 01:40 PM
Thanks Eddy,

Just about the only other electronics project I've done was build a 50 LED lamp (a bit like this (http://www.instructables.com/id/STEP-X-STEP-LED-CUBE-NO-Programming/)). IIRC that required a 2W resistor and I was very surprised how hot it got and was why I was looking at using a relay to control the bleed resistors. I realize the steppers will normally dissipate the power in the capacitors but I want to make sure the power supply reverts to a safe state even if the steppers aren't connected.

The aluminium plate looks like a great way to mount everything.

EddyCurrent
15-11-2013, 01:58 PM
That's a nice hypnotic kind of lamp

You can see how my power supply turned out here
http://www.mycncuk.com/forums/electronic-project-building/6565-ready-steady-eddy-4.html#post51392

Wobblycogs
02-01-2014, 02:53 PM
Over Christmas I've got the power supply built and most of the electrical cabinet wired up but I've got a little bit of a problem which has left me scratching my head.

As far as I can tell the power supply is correctly wired but I'm getting an annoying number of nuisance trips from the breaker it's running off. The transformer I'm using is this (http://www.airlinktransformers.com/chassis_mounting_toroidal_transformers/chassis_mounting_toroidal_transformers_standard_ra nge/CM1000224/) 1000VA 24+24V part and at the moment the only load is the bleed resistors.

I initially wired it up with an 8A regular fuse but after blowing a couple of fuses I switched it over to a 6A Type C MCB which I had and this stayed in about 70% of the time on power up. Since the Type C was almost enough I figured a 6A Type D would do the trick so off to the shops, one quick swap over later and.... trip. The Type D stays in 90 to 95% of the time but I'm still getting some trips on power up.

I suppose it's possible there's a wiring fault but I've had the power supply powered up for 40 minutes and the blue smoke didn't escape so I think the problem is just the initial inrush current. I found somewhere that gave a rule of thumb for the inrush as 8* the nominal current for 0.1 seconds for transformers under 2500VA. If I'm understanding it correctly new for this coil that would be 4.3 * 8 = 35A which is well inside the 60A my Type D breaker should handle as an instantaneous load. This (http://www.ametherm.com/inrush-current/transformer-inrush-current.html) page gives a maximum inrush of 104A if the AC voltage is at 0V at power on, that seems more believable considering the trips I'm getting.

Right now I'm kicking myself for getting such a big transformer, I think a more moderately sized one would probably have run fine on the D6 but it's too late to change that now. I think the solution is probably to fit an NTC thermistor in series with the primary supply to provide a soft start. I'm hesitant to do that as I've not seen any other power supply builds like that so I'm concerned I'm doing something wrong.

EddyCurrent
02-01-2014, 03:05 PM
You didn't mention trying a time delay fuse

Wobblycogs
02-01-2014, 03:39 PM
No, I haven't (intentionally) tried a slow blow fuse yet.

I initially tried these RT19-8 (http://www.chaloncomponents.co.uk/shop/article_RT19-8/RT19-8.html?sessid=yoiUC1dVDugmmbLAJibA0Cn2Jx6J2m8YSZR8 9Rekt57jP9k6qZFffJTPzDthuofb&shop_param=cid%3D66%26aid%3DRT19-8%26) 8A fuses. I think they are Type T but as you know Chalon aren't exactly big on describing the products they have on offer.

EddyCurrent
02-01-2014, 08:43 PM
This link shows they come in 3 time delays and looking at the Chalon pictures those are gG or Gg and that looks to be 'Normal' type.
http://mingrong1981.en.made-in-china.com/product/XqlmbYKoEMav/China-RT19-Series-Fuse-Holders-Size-8-5-31-5-10-3-38.html

These may be better

Your Search Results | Farnell UK | Results (http://uk.farnell.com/jsp/search/browse.jsp?N=2031+203774+110182912+110198734+11017 6521&Ntk=gensearch&Ntt=time+delay+fuse&Ntx=mode+matchallpartial&No=0&getResults=true&appliedparametrics=true&locale=en_UK&divisionLocale=en_UK&catalogId=&skipManufacturer=false&skipParametricAttributeId=&prevNValues=2031+203774&mm=1002162||,1002336||,1002960||,&filtersHidden=false&appliedHidden=false&autoApply=false&originalQueryURL=%2Fjsp%2Fsearch%2Fbrowse.jsp%3FN% 3D2031%2B203774%26Ntk%3Dgensearch%26Ntt%3Dtime%2Bd elay%2Bfuse%26Ntx%3Dmode%2Bmatchallpartial%26No%3D 0%26getResults%3Dtrue%26appliedparametrics%3Dtrue% 26locale%3Den_UK%26divisionLocale%3Den_UK%26catalo gId%3D%26skipManufacturer%3Dfalse%26skipParametric AttributeId%3D%26prevNValues%3D2031%2B203774)

Boscoe
05-01-2014, 10:20 AM
You utterly need soft start for a 1000VA transformer. You will pull in the order of hundreds of amps when it's first turned on. Remember when the field hasn't established in the transformer you only have the DCR of the primary to limit current. This DCR may be anything from 2 to 10R so you may well pull ~160Apk when first turned on!

Rogue
05-01-2014, 02:03 PM
I'll be interested to see how you tackle this, Wobbly, as I want to incorporate a similar thing.

Your build thread is excellent, by the way!

Wobblycogs
05-01-2014, 02:17 PM
I'll probably end up building a little circuit something like this (http://www.instructables.com/id/Controlling-the-Inrush-Current-Required-by-Large-T/). Initially I'll just wire a thermistor in series and see how much heat it dumps into the case, I suspect it will be an unacceptable amount. The thermistor I've got in mind is this (http://uk.rs-online.com/web/p/thermistors/2161371/). My concern is that if the relay fails to close then power will continue to go through the thermistor and I wouldn't be aware of it slowly trying to burn the house down. The alternative situation where the relay fails to open should blow a fuse / trip a breaker on start up so I should spot the problem fairly quickly.

I'll keep this thread up to date either way though.

Rogue
05-01-2014, 05:27 PM
I was wondering if you had seen this article: link to article (http://sound.westhost.com/project39.htm). It seems to warn away from using thermistors and recommends using resistors (along with appropriate calculations).

I can't comment on the accuracy of the article but it made for an interesting read.

Wobblycogs
05-01-2014, 06:48 PM
Yeah, I've got that page open and had a bit of a read of it.

I've looked at quite a few designs now and there's almost an even split between the resistor camp and the thermistor camp. There are certainly benefits to using resistors but I don't like the failure modes much. With a thermistor if the relay fails to close at least the resistance should drop to a fairly low level, with the resistor you're always pumping out the full power until, hopefully, the resistor goes open circuit. That strikes me as a bad design. The thermal fuse isn't really a solution either as it probably won't operate fast enough to prevent serious overheating.

This is essentially why I'm seriously considering just using a thermistor and living with the waste heat. All the disconnecting designs just move the potential fault somewhere else and if you want the design to fail safe you have to design for the possibility the resistors / thermistor will be taking the full load.

Wobblycogs
04-02-2014, 07:11 PM
Well I've finished the power supply and most of the rest of the wiring for the electrical cabinet, there's just a few wires left to run once I get some connectors for the steppers.

I was just double checking my earthing plan and I came across something I'd not considered before. Should the neutral (DC common) of the secondary be bound to earth at a single point (perhaps with a 1000 ohm resistor in series) to prevent it floating to a high potential above earth?

If you Google for "linear power supply (https://www.google.co.uk/search?q=linear+power+supply&safe=off&source=lnms&tbm=isch&sa=X&ei=vinxUurnObCQ0QX22oGwDQ&ved=0CAoQ_AUoAg&biw=1920&bih=993)" there seems to be about an even split between circuit diagrams that show neutral bound to earth and those that don't. The only reason I have seen for not doing it is to prevent noise but this is a power supply for steppers there's noise all over the place anyway.

I think I can see where a problem would occur. Without the earth bond on neutral what's to stop the neutral rising to, say, +100V relative to earth as long as the positive is always 70V higher? Having said that my natural aversion to letting the blue smoke out makes me hesitant to connect a cable from the secondary side of the coil to the same earth the primary side is using - I don't properly understand why this can't act as a short.

EddyCurrent
04-02-2014, 10:40 PM
You shouldn't use a resistor between earth and neutral.
If it's a linear power supply this implies a transformer, rectifier, capacitor, setup and there is no problem connecting both primary and secondary to earth because they are not electrically connected, they are connected magnetically through the transformer metal core.
You are correct about some people connecting the -ve to earth and some don't, it's the same with 110v control transformers in larger installations.
One thing about having one pole to earth is that if there is an earth fault on the other pole it will blow the fuse but if one pole is not earthed the fuse will not blow because there is no circuit. In the second instance two earth faults have to be present, one on each pole before the fuse blows, it's then the same as shorting the poles together.