Making the MPCNC more reliable | TMC 2209´s StallGuard + physical dual endstops

Hi community,

I´d like to introduce myself and get your opinions on a problem I´m facing on my MPCNC.

I am a former location sound mixer located in western Germany working on film & tv productions. Half a year ago I started studying mechanical engineering and built a MPCNC in my garage workshop. It´s got a working area of 950x550x80mm, runs GRBL on an Arduino Uno + CNC shield with three DRV8825 stepper drivers making use of 1/16th microstepping.

In the near future I´ll be switching to a Arduino Mega + RAMPS running the GRBL-Mega-5X firmware to get repeatable and precise dual endstop homing.

Now to my problem. I like using that machine at its upper limit in terms of speed and tool load. Therefore I´m loosing steps quite often. Having read a little bit about the TMC 2209´s StallGuard feature I could imagine getting five of these, wiring up all of the DIAG pins to shields FEED-HOLD-pin. According to the datasheet, the pin goes high on stall detection. Also I´d configure the StallGuard with a relatively high threshold. That way, whenever a lost step is detected I could abort the programm, re-home the machine using the physical dual endstops, maybe lower the overall feedrate and continue at the exact line of code. This would combine mid-run step loss detection with the precision of physical endstops.

I´d love to hear your opinion on that idea. Do you consider it possible? Do you have experience with the TMC 2209? Or would you suggest a different solution?

Janik






4 Likes

I don’t have information about StallGuard, but based on posts on this forum, I don’t think it will have much impact. The two changes that appear to have the most impact in speed area are:

  1. the speed of the processor on the control board
  2. the voltage used to run the steppers

The most extreme example of performance improvements I’ve see are Steve M Potter’s build detailed here.

I also see at least one posts that a typical MPCNC build using an SKR Pro board running at 24V which had substantial performance improvements over the 8-bit boards like Arduino Mega boards running at 12V.

2 Likes

I don’t have a lot of confidence that noticing a missed step and correcting after the fact will result in good cutting results. You’ll be able to reset and continue the job, but you’ll already have the mistaken cut on your workpiece. I’d much rather run a bit slower and reliably.

If you’re losing steps, you need to either reduce the load (not desirable from your comments), or increase motor torque. The easiest way I know of to increase torque is to increase voltage on the motor side, which in turn provides more current for the drivers to send to the motors. I believe switching to RAMPS from the CNC shield will be a step backwards in this respect, as the RAMPS is limited to 12V where the CNC Shield can handle up to 35V. What voltage and amperage is your current power supply able to provide? You may be able to get a step up in performance without a complete controller replacement by moving to a beefier power supply.

2 Likes

My first big improvement was to run RAMPS at 24V (drv8825 drivers). To do that, all I changed was to bend out the motor Vcc pins on the drivers and supply 24V straight to them, not using the PCB. EASY!

But as Robert said, the biggest improvement was using a faster processor (Teensy 4.1) and 40V.

Having a 3-phase spindle that does not slow when working hard is a big plus.

1 Like

First of all, thanks for your helpful thoughts and ideas.

Up to now I´ve been using a 12V 6A power supply and totally forgot that the CNC shield is capable of way higher voltage. Thank you @ttraband and @robertbu for pointing that one out.

Now I also get why my stepper drivers didn´t get warm even without heatsinks on. :man_facepalming: …well, I guess this is one of the valuable lernings I signed up for when I chose the MPCNC as a project. :wink:

@stevempotter bypassing the board to power the drivers is a really clever idea I hadn´t thought of. This might be one great solution. Also I wasn´t aware of the existence of grblHAL. Really sounds interesting since I like GRBL for its simplicity. I´ll have a look into that one.

To sum it up, I´ll definitely be upgrading my supply voltage either way. I don´t know yet, wether its gonna be RAMPS with bypassed power to the drivers or the Teensy with grblHAL. But I´ll share my results here. It only could take a while since it´s exam period and I don´t have much spare time.

gonna be RAMPS with bypassed

Steve can correct me if I’m wrong, but it is more than just bypassing the Ramps board. If you are going to be using DRV8825 drivers, you will also have to upgrade the capacitor for each stepper driver, and you will need new fusing for the drivers as a whole. If you considering that route, maybe consider purchasing five TB6600 drivers instead. They run about $9 USD each, will handle 40+ volts, and that takes you partway down Steve’s path. If you decide to upgrade the board, you’ll already have the drivers.

Now I also get why my stepper drivers didn´t get warm even without heatsinks on.

Given the same current settings, upping the voltage will only draw more power for rapid moves. If your drivers and steppers are running cool, you might have some headroom to increase the current on your drivers. Between running at a higher voltage and upper the current on your drivers a bit, you may get what you want without changing the control board.

2 Likes

Robert, your concerns merit investigating; My RAMPS board (from V1 Engineering) is populated with 35V caps throughout, so no problem with using a 24V (6A) supply for Vmot. It is important to add a fuse to any power supply that does not already have one. The TB6600 drivers are the very ones I upgraded to next, when I went to 40V, but they do take up a lot of space in my portable electronics carrying case. But I love the DIP switches to adjust microsteps and current. Even more expensive drivers let you do that with software.

I totally agree about upping the current to where the drivers (with small heatsinks and a fan) and steppers are running a bit hot. My steppers are always about 40-45C. My drivers sometimes go up to 50C when roughing fast, then the cooling fan kicks into high gear for a few seconds.

Because these drivers control current by chopping, a higher supply voltage allows them to get to that threshold faster. That translates into faster and more effective pulses out to the steppers.

1 Like

I set the DRV8825s VREF to ~800 mV which results in 1.6 A to the motors. I guess I was scared to up that current even higher. But that´s a good point. Damn, now I want temperature monitored motors AND drivers all the way :grin: … okay, that might be a later upgrade.

I will be adding fuses to the next upgrade, good idea.

I don’t agree with this, Tom. The drivers provide a constant current by turning the voltage on and off. When stationary, or moving slowly, they will have more than enough voltage at 12V to provide the max current setting (from the trim pot on the drv8825s). When the motors move at high rpms, they resist more, and at some point, the driver has connected the 12V straight through to the motors to get that max current. After that speed, the increased voltage would still provide max current. Whereas the 12V would provide less than the max current. That speed depends on your configuration, but it’s pretty high (over 20mm/s, at least. It is worse when wired in serial).

Higher voltage equates to higher torque at higher speeds, but the same torque at lower speeds.

As for the current setting, you want it as high as you can go. As you go higher, pay attention to the heat of the motors (they should not exceed 50C) and the heat of the drivers (they should have a fan pointing on them, and they should not get so hot that they go into overheat protection, which shuts them down for 30s or so). 1.6A should be a lot. The drivers should be getting warm.

Janik, Are you sure your motors are wired in series and not parallel? And what kind of speeds and depth of cut are you trying to get?

The skr boards have 32 bit processors and can step faster than any MPCNC can move. I still haven’t seen good evidence that the 8 bit isn’t stepping fast enough (I have seen 8 bit boards move at 100mm/s, which seems very very fast to me).

I think the stallguard would be an interesting experiment. It has similar problems to the closed-loop steppers though. The feedback needs to be at least as accurate as the open-loop, and open-loop steppers are really accurate, until they skip steps.

1 Like

@jeffeb3 - thank you for explaining how and when the additional power from a larger power supply will get used by these drivers. I had a very knuckle-dragger understanding of the use of higher voltage power supplies.

1 Like

Great explanation, thanks.

I think so. The handsoldered pcb to wire up the motors to the drivers looks like this:

There´s no definite target, but I can give you two examples I remember:

  • 2d adaptive pocket clearing in MDF with a 6 mm 2-flute straight cut endmill, 5 mm depth of cut, 4800 mm/min feedrate, 2.4 mm width of cut worked out fine.
  • Full slotting MDF, same endmill, 2 mm depth of cut and 6000 mm/min feedrate resulted in a massive loss of steps right at the start. Reduced the depth of cut to 1 mm and it worked out fine.

80mm/s. That’s very fast. 6000mm/min is 100mm/s. Wow.

Generally, because of the moving mass, accelerations, as well as at the current/voltage relationship I was talking about, it is better to go deeper and make fewer passes than to go faster with only 2mm DOC.

At those speeds, 24V+ may be a big help, as well as a 32bit microcontroller. But I would also suggest experimenting with deeper cuts and slower speeds instead.

1 Like

That looks like serial to me.