Steppers, Drives, Oh My! Adventures with replacement electronics and drives


(mikep) #1

I promised an update when I had things working… new steppers, drives, board and power.

4 DM542S 24-50v, 4A digital stepper drivers ($32 ea),
2 48V PSU’s (7.3 A each) ($23 ea)
1 Keyestudio GRBL board ($20) with GRBL 1.1f loaded.
3 [Nema 23 Bipolar 1.8deg 2.4Nm (340oz.in) 1.8A] (Yx2 and Zx1) ($25 ea)
1 stock stepper (on X - because I was short a pulley)
Total of: ~$255

The only changes SO FAR in the setup of GRBL between my standard board and this one is to reverse the X and Z axis. That could have been done by reversing the A and B coils on the steppers, but I didn’t. The other one was to double all the steps/mm settings - the drivers have a minimum of /2 microstepping.

Mechanical changes (or electrical, depends on how you look at it I guess)

  1. 4 adapters from the correct connectors on the keyestudio board to the steppers via a DB9 connector. I made these quite long (about 4 ft), and they are shielded. I also made a set of 6" DB9->molex adapters to be able to switch back and forth with the stock Shapeoko controller board (M-DB9 on the stepper cables, then F-DB9->Molex, and F-DB9->ferrules)
  2. I made an adapter the 3 homing switches plug into, to the appropriate connectors on the keyestudio board (JST)
  3. These steppers require a different pulley than stock

There was an ask when this came up a few weeks ago if I was seeing any higher forces. Then, it was only a little better than stock, and was using the stock power supply (20v) and stock board. Now, Yes. Yes I am. A lot. Using a luggage scale, I had over 90 pounds on the Y axis, it still hadn’t skipped a step, and my footing wouldn’t afford any more pull while still being able to read the scale. Remember, 2 steppers on Y. I can run some pretty high speeds compared to the stock setup without stalling Y and Z, but I need to do more work quantifying that. My goal here was faster rapids, not really any issue with cutting forces.

The steppers are very quiet compared to the stock setup. I’m not sure if that’s a result of the /2 microstepping, or just inherent in the digital drivers themselves. Stepper noise isn’t exactly a problem compared to router noise, but it’s interesting anyway.

What isn’t working? Spindle control (via PWM to an IOT switch) - What should be working according to the VERY sparse documentation on this board, isn’t. It’s also ugly as all heck, because it’s not in a chassis, so it has boards and cables laying all over. I won’t be able to use carbide motion going forward, but I switched to UGS some months ago anyway, so that doesn’t bother me too much.

Hardest part? Coming up with the right connectors, pins, and tools and building out the adapter cables. I could have just replaced the stock ends, and been done, but I didn’t want to make it hard to go back to the stock board when it all turned out to be a waste of time.

Why? Well, to see if I could I guess. I don’t have a better reason, and that was good enough for me. Oh, and I got my fast rapids.

Tidbits to pass on?

  1. Neat trick for determining which wires go to which coils: hold two wires together and see if the stepper is hard to move. If yes, those two wires go to the same coil. If no, pick one other wire and try again.
  2. If the stepper “turns backwards” after being set up on the drive, swap the two coils at the driver. The color codes on stepper wires are unreliable.
  3. Shielded 4 conductor cable is unreasonably expensive. It’s not horrific, but it’s a lot more expensive than equivalent unshielded cable. It’s also pretty stiff.
  4. Set up the shields right if you’re going to use shielded cable, only ground at one end.
  5. Know that high voltage supplies are much more expensive than low voltage supplies with the same current. Higher voltage allows more torque, but you still need the spec’d current on each stepper (No Ohms law advantage). There are diminishing returns, but 48V is a pretty nice compromise, and you can still get supplies with enough current to prevent needing one supply per stepper for a “reasonable” price for my chosen value of “reasonable.”

Hope this helps someone, I’ll follow up with some pictures/video and solid data in the next few weeks.


(mikep) #2

Update:
Everything is now working. Spindle control (hint, find the MOSI pin, it’s usually on a header, and connect your spindle pwm to that) - working great. Probe, switches, all working. I got a little over-aggressive with acceleration, and between that and high speed, broke a brand new belt. It’s significantly overpowered now. :slight_smile:

There is a bug in GRBL, if you set an X, Y, or Z speed above 32767, an internal variable overflows and it will likely crash (if you’re lucky). Don’t set maximum speeds above 32000.

How to set up the switches on a common stepper driver, like this one (I’m using exactly this one):


Switches 1-3 are for the current used by your stepper. Set to a value less than the spec for your stepper. For example, if you have a 2.1A stepper, use 1.91A,
(on, off, on) Switch 4 is for “holding” current, I recommend half current (off) - full current really isn’t necessary for this application, and the steppers will get pretty warm. Switch 5-8 is for microstepping. A 1.8 degree per step stepper (most of them) is 200 steps per rotation. For /2 microstepping, the first row of the table is used (off, on, on, on). Connect the “ENA+”, “PUL+”, and “DIR+” to the enable, step and direction signals from the GRBL board. Connect the corresponding “-” terminals to ground. Don’t forget to adjust the GRBL settings, and multiply the “steps per mm” for this axis to twice whatever value is entered. If the value is 39.456, set it to 78.912. Set up the coils, and motor power, and you are good to go. If the stepper turns backwards, either swap the two coils where they are connected to the driver, or invert the direction in the GRBL settings for that axis.


(Gerald Mackelburg) #3

Are you pushing 4 Amps into your motors? 90 lbf on the Y-axis didn’t break anything (V-wheels, etc.)? You should be good for 45 lbf on the X-axis and Z-axis then, have you tried that yet? How much machine deflection do you see at those force levels?


(mikep) #4

X still has an original stepper, like it says above, so no, haven’t tried pull X. “Machine Deflection” - isn’t something I’m too interested in, so haven’t measured. I’m already pretty deep into “can’t run it that hard” because I’ve broken brand new belts doing so. I think there were some burrs on the cable buckles that didn’t help that.

The steppers are rated at 1.8A ea. In theory, that means 3.6A. In practice, I haven’t measured nearly that much - the most I’ve seen (maybe more instantaneously, but I can’t measure that) is < 2A.


(mikep) #5

I promised some pictures, etc. Cabinet came in yesterday, so spent a bunch of time with that today. The XL fits perfectly on a 48" by 24.5" tool cabinet. I made some MDF spacers to support the machine, removed the feet, used a few dabs of silicone on the top and bottom of the spacers, and basically glued the machine to the top of the cabinet on the underside of the wasteboard. I mounted electronics in a large drawer at the bottom of the cabinet, so it’s all out of the way, protected, and easy to work on.
Here’s the machine placed on the tool cabinet, nothing cabled up yet (was on the countertop to the right) . Yes, it was a huge mess while I was moving that counter out, and the cabinet in.


The drives are the 4 black boxes, the power supplies silver, in the top right of the photo, and the keyestudio grbl board in the lower right. Cables come in through a hole in the bottom of the drawer. So far, works fine. Still need to take care of some cable grounds and things. The power supplies are plugged into a power strip, that strip is plugged into the power strip built into the cabinet. Turning the cabinet strip on and off controls power to the whole SO3, electronics, router, router control, etc.


(Stuart) #6

This looks great, thats a really good price on the drivers and board, I haven’t seen that one before.

I originally had to bail on the CarbideMotion board as I was consistently getting disconnects, I worked with C3D a lot to no avail. Would you mind starting and stopping a few power tools or shop vac on the same power board as the power supplies, while running some gcode just to see if it disconnects?

I ended up going with a Gecko G540 for about $350 + MESA 5i25 $89 + power supply, which is absolutely bulletproof, but can’t be run under Grbl without a second motion control board. It also requires a parallel port, or a MESA FPGA card (which is the route I went) on the control PC, which means no fancy lightweight touch screen laptop to run the SO3.

I’m thinking maybe a keyestudio board running the G540 would be a good option, that would give me USB control and use the 3.5A drivers on the G540.

Thanks for sharing your work, looks like it’s working well!


(mikep) #7

I had thought about Mach4 driven, but GRBL has been working well for me. I suspect the Gecko drives are a lot more robust, we’ll see how they hold up. I haven’t used it enough to know if I’m going to have EMI issues or not, but I’ve tried to keep things shielded. I could use some more runtime before declaring victory :slight_smile:


(Stuart) #8

I am using LinuxCNC, which is intimidating from the outside, but really quite easy to set up, and incredibly powerful. It’s also free. I looked at mach 3/4 but the cost for the software is significant (Mach 4 costs almost what you spent on your whole upgrade)

Would you say there is a noticable difference in the way the shapeoko cuts or runs since your upgrade? or is it fairly similar? I haven’t had any issues with mine, It definitely runs a bit smoother than the carbide board- I can still hook my Carbide Board up to compare, but don’t use it full time due to reliability/disconnects.


(William Adams) #9

Do you have some aluminum or plastic?

If so, please try cutting out my locking register calipers:

the outside curve should have been smooth, and visibly was so when cut using MakerCAM on my SO3 (before upgrading it to XL) w/ Grbl 0.9, but I could feel a slight discontinuity along the outer edge — I’d be curious if that were still the case with other G-Code interpreters. MakerCAM generated G2/G3 arcs, so it ought to be smooth.


(Luke) #10

I just got my new motors…