PWM, PSU, Fault Protection?

I recently swapped out a rotozip for a 300w spindle and one of those PWM modules.

I’m having some issues, and perhaps someone here can help out.

For sanity sake, here are the spec’s on the spindle and PSU:
Working voltage :12-48VDC
Power: 300W
Speed :3000-12000RPM (12v-3000rpm,24V-6000rpm,36V-9000rpm .48V-12000rpm)
Torque:400mN.m
Insulation resistance:> 2 megohms
Dielectric strength: 400V
Diameter: 52mm
Chuck Part Length: Arbor parts 35mm, (including nuts and sandwich 43mm)
Part chuck diameter: 16mm
Motor length: 178mm (including gripping parts and motor)

PSU:
(1)L0143 48V 8.3A 400W:
Material: Metal case
Input voltage: AC110/220V ±15%
Input Frequency: 50/60Hz
Input surge: Cold start 25A@115V AC 50A@230V AC
Output voltage: DC 48V
Output voltage adjustment range: ±10%
Output current: 8.3A
Current Range: 0~8.3A
Output power: 400W
Working temperature: -40~65 degree Celsius
Storage Temperature: -20°C - +60°C
Humidity: 20%~90%RH Non-Condensation
Item size: 21.4 * 11.3 * 4.8cm / 7.9 * 3.9 * 1.9in
Item weight: 704g / 1.55lb
Package size: 22.0 * 11.7 * 5.2cm / 8.7 * 4.6 * 2.0in
Package weight: 748g / 1.65lb

The issue i seem to be having, is when i send the command M3 S3000 the power shuts down if Sxxxx is above 2500, it seems the PSU will fault protection shutdown…

However, if i send command S2500, then i can go directly to the top speed, the PSU does just fine all the way up to 12000 rpm

Is there a way to get grbl to slowly ramp up the spindle speed via PWM, or will i be forced to create a set of M3 commands to gradually increase the speed in every nc file i create?

(Edited to reflect actual speeds tested)

No.

I would be more inclined to fix the power supply issue. Fixed once, then you don’t have to deal with it anymore.

Either the spindle is drawing too much current or the power supply is unable to handle the initial in-rush of the motor.

Just wondering if the PSU’s inventables sells now have fault protection, and at what point they kick off, versus the PSU i have now, which does have fault protection.

The issue as i see it right now, after experimenting, is that the PSU i have can’t handle the innitial inrush as you say. After some further testing, it seems the PSU can handle a max of S6000 innitial startup. After that it kicks off briefly, then tries again.
As i can’t afford another PSU at the moment, i’m going to live with it for now, and just add S2500 into my post processor so that it adds it.

example, my post processor automatically adds
G21
G90
G94

I have the ability to have the post processor add my M03 S2500 after these so it would automatically add this to the top of my files:

G21
G90
G94
M03 S2500

Seems like a way less expensive solution to me :smiley:

You can help your power supply with the in rush by installing a capacitor across the 48 volt power leads. You would need to use an electrolytic capacitor. They are polarized so you have to make sure that you hook up the positive lead of the power supply to the positive lead of the capacitor and the negative lead of the power supply to the negative lead of the capacitor.

The value would depend on how much in-rush you have. Make sure they are rated for 100 VDC at a minimum.

I might start with 100uF and if that doesn’t work go to 1000uF.

1 Like

And OP, don’t forget you can put the caps in parallel to increase the capacitance, or the amount of energy stored. If 1000uF electrolytics are more than x2 the price of 470uF (hypothetically), you could get some protoboard and wire 6, 14, any number of caps in parallel in increase the inrush performance of your power supply. My only suggestion if you get above 1000uF is that you use a 1Mohm resistor across the caps as a bleeder to prevent the possibility of accidentally shorting that much energy across a screw driver or something.

EDIT: You know, I wonder if it’d be possible to edit a G Code post processor to check for changes in spindle speed and inject incremental S commands to smooth that change. Has anyone worked with making a post processor script?

2 Likes

I’m using HSMworks and Solidworks, so when i finish off a cam job in SW, and save it out for GRBL, it automatically opens HSMWorks post processor, in there, you can edit the macro’s, and create your own. It’s not the most automated solution, but it does allow me to inject my spindle startup speed before the required spindle speed using a macro, and since it automatically opens upon export anyway, it’s a good reminder.

Although, it would be nice if GRBL itself ramped up to speed on the first spindle startup, Spindles don’t start already buried in the work piece anyway, and the send or two it takes to ramp up the speed shouldn’t have a drastic effect on the over all job, unless of coarse you’re starting and stopping your spindle hundreds or thousands of times during an operation.

As for “checking for spindle speed changes” I’m not so sure that’s the right way to go, as there are some times when you need to change the speed depending on the operation. There’s no sense in slowing it all the way down, just to speed it back up in this case, as it’s only the innitial powering of the spindle that’s causing the PSU to enter fault protection. Once the spindle is going, i can immediately jump to the top speed without an issue.

Your power supply may fault while you are carving if you hit a tough spot in your material or if your feed rate is too high for the cut you are making.

2 Likes

i usually run everything on the conservative side when it comes to feeds and depth of cut. But i’ll keep an eye out for that… Right now, i need to troubleshoot a different issue, i think my settings are off on one of the axis. Not exactly missing steps, but alignment doesn’t appear to be correct. I’ll have to break out the scale and make sure 100mm movements are exactly 100mm :slight_smile:

Yea… so it turns out, not having sheilded spindle cable is causing something issues with the stepper motors.

With spindle off:
x = 100.003mm == Within expected range
y = 100.007mm == Within expected range
z= 10.001mm == Within expected range

With spindle ON at highest speed:
x = 100.311
y = 98.217
z = 9.998

I also tested at ½ and ¼ speeds, and the differences dropped, so i’m assuming that interference from unshielded motor wires is the culprit here.

Solution:
Don’t use random wires you have laying about :smiley:

Seriously, i’ll be headed to the box store later to pick up some decent shielded cable, luckily there’s one not too far that sells by the foot :smiley:

2 Likes

No, highest speed isn’t needed, but for testing purposes to try to track down the issue, i removed the bit, and manually sent commands to test the accuracy of movements while the spindle was on at various speeds.

i.e.
spindle @ 12,000rpm
send commands
x100 F500
check if x actually moved 100mm or not

then do it at 6k, 3k and see what the measurements are, then do the same for Y

Doing this let me determine that the spindle was causing the issue, once i replaced the spindle wire with shielded wire, it pretty much cleared up.

Not sure why you would need to ground your stepper motor shielding… It’s basically there just to keep outside interference from affecting your stepper signals.

1 Like

The specs of my spindle are detailed in the first post of this thread.

No. The control signals do not run in the wires to the stepper motors. The stepper motor wires only carry the voltage/current to energize the motor windings. The stepper motor wires are a major contributor to electrical noise. Grounding the shield of the stepper motor wires can help reduce noise, if done properly.

hrm… i haven’t had an issue with noise from the stepper wires that i’m aware of, but then again, i built my machine myself, i didn’t buy it, so when i bought wires for the steppers, i bought shielded 4 strand where each wire is shielded, and the group is also shielded with woven wire so it’s basically double shielding, and the woven may be acting like a faraday cage or something.

That’s correct LarryM, the voltage isn’t constant, it comes in pulses per step, this pulsing is what i meant by signals, my bad on improper terminology.

Anywho, semantics…

As far as grounding your shielding is causing noise, that sounds to me like you have a ground loop happening. You’re best bet is to look at your set-up, and make sure everything is grounded to a single point (also known as “star ground” or “star grounding”)

Usually, ground loops occur when all grounds are not quite a the same zero potential. This can actually induce noise… (kind of like when you touch an audio plug that’s plugged into an amplifyer, it will “hum” when you’re touching it)

What i did in my project box was to drill a hole in the metal case, and put a bolt, and several nuts on the bolt, that way i could run all grounding to that single point. The only real exception to this, is if you’re running like a plasma cutter or something, then you really want to make sure it’s grounded separately, and well away from your project box.

Here’s an image of how i did mine:

Not true. As you can see in the photo, the DC PSU does reference the chassis ground. Meaning my AC, circuitry, and my DC PSU both use the same grounding point.

But that’s really neither here nor their… If you’re getting noise when you ground your shielding, something isn’t right. We have to look at what exactly is causing the noise. My guess is the current pulses in the stepper wires, but if you ground all of them to the same point you could actually be just transferring the noise from one stepper wire to the next if at some point those shields are actually touching elsewhere, essentially creating a loop… hence grounding loop.

So you have to track it down, do a bit of trouble shooting:
If you have your spindle wires shielded, and your stepper motor wires shielded,

  1. If no shield wires are grounded, do you still get noise?
  2. If only the Stepper shields are grounded, do you still get noise?
  3. If only the Spindle wire shields is grounded, do you still get noise?
  4. If you ground to the common AC, or chassis ground, does that produce, or reduce noise?
  5. Does adding small 0.4µf @ 50v capacitor between shield and ground, does that eliminate noise?
  6. Are you certain your issues are noise related, and not a loose, frayed, weak connection?
  7. Are you positive no stray wires are touching things they shouldn’t be?

noise can be a real pain in the #$% to figure out.

after going through that same check list to find where my noise was coming from, this is the result:

Can a mod lock this thread please, and mark it as [Solved]
I feel we’ve accomplished all we set out to, and have actually started to veer off topic.