Topics

The TMC2209

Howard Dutton
 
Edited

I've never tried these but I took a look at the design and spec's, they are really quite compelling...

1. Current handling is good due to the wonderfully low RDSon (0.2 OHMS.)  They say it handles 1.7A RMS (2.4A peak) in the SSS form (datasheet rated 2.0A RMS, 2.8A peak.)
2. Better selection of micro-step modes on the MS1/MS2 (aka M0,M1) pins.  This allows on-the-fly mode switching between (8X,16X,32X,and 64X) which is a much better selection of modes vs. the TMC2208 or TMC2100.
3. Ability to switch between spreadCycle and stealthChop using the SPREAD (M2) pin.
4. Price is not too bad either, for me ~$12 ea. delivered on eBay.

So I've added experimental TMC2209 support to the master branch OnStep.

In addition to the usual stepper driver settings, for TMC2209 there's support for setting the TMC_MODE, for example:

#define AXIS1_TMC_MODE STEALTHCHOP
#define AXIS1_TMC_MODE_GOTO SPREADCYCLE
#define AXIS2_TMC_MODE STEALTHCHOP
#define AXIS2_TMC_MODE_GOTO SPREADCYCLE

Note this doesn't use SPI (or UART) but rather simply sets the M2 control line for each stepper driver LOW or HIGH to allow these settings.
Omit the above lines and TMC2209's will default to SPREADCYCLE.

Khalid Baheyeldin
 

On Thu, Sep 12, 2019 at 10:09 AM, Howard Dutton wrote:
In addition to the usual stepper driver settings, for TMC2209 drivers there's support for setting the TMC_MODE, for example:

#define AXIS1_TMC_MODE STEALTHCHOP
#define AXIS1_TMC_MODE_GOTO SPREADCYCLE
#define AXIS2_TMC_MODE STEALTHCHOP
#define AXIS2_TMC_MODE_GOTO SPREADCYCLE
Instead of this divergence in configuration schemes, I think it is best if we standardize on one configuration scheme.

For example, we use the same scheme as the TMC2130, e.g TMC2209_VQUIET, TMC2209_QUIET, ...etc.

Or make the TMC2130 just the model name (like all other drivers) and use the extra AXISn_TMC_MODE like what you said.

Howard Dutton
 
Edited

On Thu, Sep 12, 2019 at 07:15 AM, Khalid Baheyeldin wrote:
On Thu, Sep 12, 2019 at 10:09 AM, Howard Dutton wrote:
In addition to the usual stepper driver settings, for TMC2209 drivers there's support for setting the TMC_MODE, for example:

#define AXIS1_TMC_MODE STEALTHCHOP
#define AXIS1_TMC_MODE_GOTO SPREADCYCLE
#define AXIS2_TMC_MODE STEALTHCHOP
#define AXIS2_TMC_MODE_GOTO SPREADCYCLE
Instead of this divergence in configuration schemes, I think it is best if we standardize on one configuration scheme.

For example, we use the same scheme as the TMC2130, e.g TMC2209_VQUIET, TMC2209_QUIET, ...etc.

Or make the TMC2130 just the model name (like all other drivers) and use the extra AXISn_TMC_MODE like what you said.
This new code was/is nothing but an extension to the existing configuration scheme.  To start with I renamed a few things and did away with passing TMC SPI mode programming parameters in AXISn_TMC_MODE bit fields because that technique was ill-equipped to deal with the added complexity required to make this (flexible current settings) work.  Then I broke the stepper driver validation code into individual .h files for each stepper driver since Validate.h was getting too large/complex.  And finally, I added in the "macro" translation code (along with more validation of that translation) to finish it off.

The settings given in the prior posts still work and are consistent across all stepper drivers that support the features (and is outlined in the AdvancedDriverSetup.txt file.)  That is the flexible back-end the "macros" _QUIET _VQUIET (etc.) lean on to work.

The "macro" translation code for AXIS1 with a TMC2209:

#if AXIS1_DRIVER_MODEL == TMC2209_QUIET
  #undef AXIS1_DRIVER_MODEL
  #define AXIS1_DRIVER_MODEL TMC2209
  #define AXIS1_TMC_MODE STEALTHCHOP
#elif AXIS1_DRIVER_MODEL == TMC2209_VQUIET
  #undef AXIS1_DRIVER_MODEL
  #define AXIS1_DRIVER_MODEL TMC2209
  #define AXIS1_TMC_MODE STEALTHCHOP
  #define AXIS1_TMC_MODE_GOTO STEALTHCHOP
#elif (AXIS1_DRIVER_MODEL == TMC2209_LOWPWR) || (AXIS1_DRIVER_MODEL == TMC2209_QUIET_LOWPWR) || (AXIS1_DRIVER_MODEL == TMC2209_VQUIET_LOWPWR)
  #error "Configuration: AXIS1 _LOWPWR option isn't supported for TMC2209 stepper drivers."
#endif

Howard Dutton
 
Edited

These are all still present and can be used as required (for both AXIS1 and AXIS2)...

#define AXIS1_TMC_MODE STEALTHCHOP      // use SPREADCYCLE or STEALTHCHOP mode when tracking
#define AXIS1_TMC_MODE_GOTO SPREADCYCLE // use SPREADCYCLE or STEALTHCHOP mode during slews
#define AXIS1_TMC_INTPOL true           // true to use 256x interpolation
#define AXIS1_TMC_IHOLD 1250            // current during standstill;  in milli-amps, use these values for current limiting Vref setting via the trim-pot on driver
#define AXIS1_TMC_IRUN 2500             // current during tracking;    alternatively set Vref = 2.5V (TMC2130) and enter the currents you would like in mA here
#define AXIS1_TMC_IGOTO 2500            // current during slews
#define AXIS1_TMC_RSENSE 0.11+0.02      // standard Rsense for TMC2130, for the TMC5160 use 0.075, other devices may be different

Alex F
 

Hello, my first post here, long time lurker!

I've been working on a Skywatcher EQ5 conversion with an STM32 kit with TMC2130s for a few months now. Everything has been working great with a multiple test nights under the belt. I was thinking of doing a write up of my experience and setup in a little while when I've got everything worked out at a point I can call it "done".

I ordered a pair of TMC 2209s direct from Watterott last week to replace the Fysetc TMC2130 v1.2 SPI from aliexpress I had been using so far. After seeing the specifications and the newly added support in the latest OnStep builds I jumped at the chance to give them a test.

Having just installed, configured and given them a (daylight) test run I can confirm that they are working perfectly with the latest OnStep master build. They are quieter, cooler and generally more pleasant sounding running in both Stealthchop and Spreadcycle modes when slewing and run near-silently up to just shy of 2 deg/s. Given that I have seen no other examples of testing that of these new drivers on the group I thought I'd quickly check-in with some real world results.

Quick run-down of testing conditions:
  • Standard EQ5 configuration 3:1 Belt + 144:1 Worm
  • TMC2209 driving NEMA 17 0.9deg 0.9A from Stepperonline driven at 24V from a 24V/5A switching supply
  • STM32 Blue Pill kit
  • OnStep 2.24e latest commit f7adfbd

Relevant Config file settings, Spreacycle slews up to 3 deg/s with no vibration:
DesiredBaseSlewRate      2.0
AXIS1_DRIVER_MODEL TMC2209_QUIET
AXIS1_MICROSTEPS 32
AXIS1_MICROSTEPS_GOTO 8
AXIS2_DRIVER_MODEL TMC2209_QUIET
AXIS2_MICROSTEPS 32
AXIS2_MICROSTEPS_GOTO 8

Also tested with full Stealthchop, with a fairly noisy vibration creeping in at 3 deg/s:
DesiredBaseSlewRate      2.0
AXIS1_DRIVER_MODEL TMC2209_VQUIET
AXIS1_MICROSTEPS 32
AXIS1_MICROSTEPS_GOTO 8
AXIS2_DRIVER_MODEL TMC2209_VQUIET
AXIS2_MICROSTEPS 32
AXIS2_MICROSTEPS_GOTO 8

Observations compared to TMC2130:
  • Quieter during slews at higher speeds
  • Silent up to 1/2 Max speeds with Stealthchop
  • Cooler motors and drivers (with large heatsinks)
  • On-the-fly mode switching means I can use different microstep modes for slews and tracking vs the TMC2130s is excellent knowing that there will be no missed steps, and a lower resultant MaxRate makes me happier vs running the STM32 right at the edge of its capabilities
  • Stealthchop can reach higher slew speeds before hitting mid band resonance and stalling
  • Spreadcycle slews are almost as quiet as Stealthchop slews so I am switching from _VQUIET to _QUIET which I couldn't do without a fairly unpleasant noise on the TMC2130s at full speed
  • Potential scope for up-rating stepper motors in the future with the increased current handling capabilities, I feel the 1.68A motors would be a good match for these drivers with their wonderfully low phase Resistance of 1.65ohm and inductance of 4.1mH - Maybe my next purchase!
Just need to wait on the weather to clear up for a proper test under the stars, which is looking bad until possibly Sunday night before I can give you a full report on their performance during tracking and guiding.

Khalid Baheyeldin
 

Thanks for this write up, I added it to the showcase page.

Your comparison of TMC2130 vs. TMC2209 is detailed and very useful.

Howard Dutton
 

Great to hear they perform as expected and OnStep is working with them.  I see them on eBay for about $10 delivered now too, not bad.

They are a compelling alternative to the TMC2130 in some ways.

Ironically the TMC2130 is even nicer now though in that you can set Vref for 2.5V and program the current from the configuration file, including separate current settings for stand-still, tracking, and goto.  It's nice to be able to experiment with those settings without opening the case etc.  Especially with a MaxPCB2/MiniPCB2/etc. since they have heat transfer blocks stuck down with thermal tape covering the drivers so getting to the Vref pots is a pain even after opening the case. 

And now with this SSS TMC2209, SSS TMC5160, and soon the SSS TMC5161, it's nice to have options.

Alex F
 

Re: The TMC2130 configuration file current/Vref setting
I had a little play with this on my TMC2130s when you introduced it and would have definitely stuck with them if I wasn't such a sucker for trying to fine tune everything for my setup; namely the stiction present on these EQ5s and their bearing-less DEC axis. A matter for a more detailed write up in a few days when I get the time!

Admittedly a large reason for my testing of the TMC2209s was I was never fully happy with the Fysetc branded TMC2130 drivers, you can never be entirely sure if you've been shipped a genuine article with quality components from aliexpress or similar. The Watterott TMC2209s should hopefully be top quality or at the very least more consistently produced.

After I have finished my current projects (12V power distribution hub with 5.1V rail for my new RaspberryPi 4 4GB and an OnStep powered motor focuser) I think I'll give the 400 Step 1.68A motors a try as they too are very compelling with those specifications when combined with the TMC2209 or TMC5160/1 and may be a good candidate for providing a bit more headroom in both tracking torque at high microsteps as well as faster potential slew speeds, I'll keep you updated!

Khalid Baheyeldin
 

On Wed, Sep 25, 2019 at 05:09 PM, Alex F wrote:
I think I'll give the 400 Step 1.68A motors a try as they too are very compelling with those specifications when combined with the TMC2209 or TMC5160/1 and may be a good candidate for providing a bit more headroom in both tracking torque at high microsteps as well as faster potential slew speeds
Since you are using the 400 step 0.9A motors, I would say that the 1.68A are not necessary, given your mount is an EQ5.

You are already using the winning formula: 400 step 0.9A motors + 3:1 pulleys, and it has been tried over and over with many mounts converted to OnStep. The only variable in your case is TMC5160 drivers, which you are the pioneer of.

Having said that, it would be nice to test the other motors with the same drivers and pulleys and verify if there is a tangible benefit (or not).

Howard Dutton
 

On Wed, Sep 25, 2019 at 02:09 PM, Alex F wrote:
Re: The TMC2130 configuration file current/Vref setting
I had a little play with this on my TMC2130s when you introduced it and would have definitely stuck with them if I wasn't such a sucker for trying to fine tune everything for my setup; namely the stiction present on these EQ5s and their bearing-less DEC axis. A matter for a more detailed write up in a few days when I get the time!
What current setting were you using for the TMC2130's?  What setting for the TMC2209's?

Alex F
 

On Wed, Sep 25, 2019 at 04:52 PM, Howard Dutton wrote:
What current setting were you using for the TMC2130's?  What setting for the TMC2209's?
With the TMC2130's it was about 0.6-0.9A during tests. Values used during the last time I was imaging were about 0.85A and the drivers themselves were running pretty hot.

Right now the 2209's are set to 0.8A on both axes, but I've only been able to test slews and manual guide commands which seem responsive. Things also seems to be running much cooler so far. I had intended trying the settings as they are, and iterating from there when I can get some actual data to work with on a clear night. I had thought about trying things at the full 0.9A RMS Vref of 1.25V if temperatures seemed to be okay.

Ant No
 

I think Alex has pinpointed the potential benefits of the proposed motors precisely:

"...providing a bit more headroom in both tracking torque at high microsteps as well as faster potential slew speeds"

Knowing if this translates to tangible benefits as Khalid mentions would be interesting. I suspect they will.

There is no doubt that the tried and tested "Standard Setup" works well and has been reliable over some time for many people.

Even so, these could be better in use and have greater reliability and durability as the years pass. I am biased towards the Victorian style of bullet proof boiler plate (over)engineering though. I live in a Victorian brick built mill with walls two foot thick at the base (no it's not mine). 150 years and counting despite a neglect of routine maintenance and a fix it if it breaks approach in modern times.

Anthony

On 26 Sep 2019 02:51, "Alex F" <phobos226@...> wrote:
On Wed, Sep 25, 2019 at 04:52 PM, Howard Dutton wrote:
What current setting were you using for the TMC2130's?  What setting for the TMC2209's?
With the TMC2130's it was about 0.6-0.9A during tests. Values used during the last time I was imaging were about 0.85A and the drivers themselves were running pretty hot.

Right now the 2209's are set to 0.8A on both axes, but I've only been able to test slews and manual guide commands which seem responsive. Things also seems to be running much cooler so far. I had intended trying the settings as they are, and iterating from there when I can get some actual data to work with on a clear night. I had thought about trying things at the full 0.9A RMS Vref of 1.25V if temperatures seemed to be okay.

Howard Dutton
 

On Thu, Sep 26, 2019 at 02:49 AM, Ant No wrote:
"...providing a bit more headroom in both tracking torque at high microsteps as well as faster potential slew speeds"
Faster and quieter slews are likely from what I saw in my tests.

At low speeds those 1.7A omc-stepperonline.com motors are rated for a little more torque but not that much, how they work for tracking/guiding remains to be seen.  Other NEMA17 400 step motors are out there too (for a little more $):

https://catalog.orientalmotor.com/item/2-phase-bipolar-stepper-motors/42mm-pkp-series-2-phase-bipolar-stepper-motors/pkp245md15a2 (86 oz-in. holding, 400 step, 1.5A)
https://catalog.orientalmotor.com/item/2-phase-bipolar-stepper-motors/42mm-pkp-series-2-phase-bipolar-stepper-motors/pkp246md15a2 (116 oz-in. holding, 400 step, 1.5A)

...there is a trade-off with the longer body motors of a given frame size where the inductance goes up so they don't like to run as fast/smooth vs. a shorter body motor, for a given current.  Similarly smaller frame sizes like to run faster vs. larger frame sizes, again for a given current.  Still, both of the above are significantly lower inductance vs. the 0.85A motors I use.

Alex F
 

I think it all really boils down to how much one is willing to fiddle for that 'perfect' combination for their unique setups. I'll agree the 'standard' OnStep builds works incredibly well as-is, but these newer drivers open up a few more options for those that enjoy the configuration and tinkering.

As Howard said in a previous post the updates made to the TMC2130/5130 drivers with configuration through simple config file changes are probably one of the most user-friendly updates OnStep has had recently. Especially considering new users and those without previous electronics skills fiddling with Vref settings and potentiometers with screwdrivers and multimeters around powered drivers and their freshly built PCBs. That and every time you open that enclosure up you increase your chances of doing some sort of damage.

Back onto the TMC2209's I had a few more dry runs this evening. Tested some extended slews for over an hour across the meridian, a few changes in DesiredBaseSlewRate etc. and everything is working great visually, again I can confirm that everything feels much cooler to the touch which is nice alongside the aforementioned sound reduction. Without a temperature probe and sound meter I can't confirm anything empirically though

I've got clouds, winds and gusts of 30-40mph forecast the next four nights at least though which is fantastic... Plenty of time for more work on my power box I guess!

Khalid Baheyeldin
 

On Thu, Sep 12, 2019 at 10:09 AM, Howard Dutton wrote:

2. Better selection of micro-step modes on the MS1/MS2 (aka M0,M1) pins.  This allows on-the-fly mode switching between (8X,16X,32X,and 64X) which is a much better selection of modes vs. the TMC2208 or TMC2100.
Although the official Trinamic TMC2209 documentation lists microstepping as 1/8, to 1/64, the BigTree Tech TMC2209 from AliExpress, and the V1.1 on eBay, both say it is 1/2, to 1/16.

OnStep uses the former. Howard and Alex F use it, so perhaps the latter range is a typo?

Howard Dutton
 

On Mon, Dec 2, 2019 at 11:36 AM, Khalid Baheyeldin wrote:
OnStep uses the former. Howard and Alex F use it, so perhaps the latter range is a typo?
The TMC2209 datasheet says:
MS2, MS1: 00: 1/8, 01: 1/32, 10: 1/64 11: 1/16

And now we know that the SPREAD pin isn't brought out so OnStep can't switch between spreadCycle and stealthChop, except on the Watterott SSS TMC2209.  Shame the clone manufacturers choose to do that but...

It looks like the FYSETC TMC2209 v3.0 will fix that error (scroll all the way to the bottom of the page):

https://wiki.fysetc.com/Silent2209/

Alex F
 

On Tue, Dec 3, 2019 at 04:23 AM, Howard Dutton wrote:
...except on the Watterott SSS TMC2209.  Shame the clone manufacturers choose to do that but...
That was a bizarre change I found when looking to buy the TMC2209 from anyone other than Watterott. But as far as I can tell, you'll be paying a similar price to Watterott as with ebay or aliexpress in the UK at least. I think shipping might cost more across the Atlantic though, so the difference in price might be more severe.

With that in mind I would definitely recommend the Watterott TMC2209 v2 which have been working flawlessly for me since installation now if someone wants on-the-fly mode switching with increased current handling and excellent thermal/heat levels.

I've only had one short actual imaging session between tests/tuning since my last post though so my full write-up is still pending but here's 7x180 seconds on Andromeda with an old stock Canon 400D, which is incredibly noisy! Since that night I've had no more time to gather more data unfortunately. Hopefully I'll have a full report on my build with the TMC2209 before Christmas, depending on the British weather!

Howard Dutton
 

On Tue, Dec 3, 2019 at 10:06 AM, Alex F wrote:
But as far as I can tell, you'll be paying a similar price to Watterott as with ebay or aliexpress in the UK at least.
Yea, at Digikey the Watterott costs nearly $15 ea + shipping which is just too much when the SSS TMC5160 can be had for about the same money.  These have to be the low cost option to find a place in the market.

Aliexpress has TMC2209 v3.0 modules, with the silkscreen problem where the pins are marked wrong per their Wiki, which hopefully would work.  For qty 4 they are $24.8 delivered which is a much better price:
https://www.aliexpress.com/item/33025237114.html?spm=a2g0o.productlist.0.0.5d1237df4rwXpk&algo_pvid=1078daa4-d4f3-4a4e-9d84-2ec06f93fbab&algo_expid=1078daa4-d4f3-4a4e-9d84-2ec06f93fbab-14&btsid=0c25f5b1-66f7-4cd8-9c79-0cb2f2825301&ws_ab_test=searchweb0_0,searchweb201602_2,searchweb201603_52

Khalid Baheyeldin
 

I added a comment about the TMC2209 versions here

https://onstep.groups.io/g/main/wiki/StepStick-Driver-Summary

Also a general comment on what models are recommended.

One disadvantage currently in OnStep is the overwhelming number of choices, and subtle variations and limitations (be it in driver models, or jumpers for various boards, and so on).

This causes lots of questions that could be avoided if we only encourage new users to use only a subset of the best supported drivers (TMC5160, TMC2130, LV8729 and S109).
We should actively discourage the use of other models for new builds.

Howard Dutton
 

On Tue, Dec 3, 2019 at 03:57 PM, Khalid Baheyeldin wrote:
I added a comment about the TMC2209 versions here

https://onstep.groups.io/g/main/wiki/StepStick-Driver-Summary

Also a general comment on what models are recommended.

One disadvantage currently in OnStep is the overwhelming number of choices, and subtle variations and limitations (be it in driver models, or jumpers for various boards, and so on).
I don't want to make exact recommendations in the driver summary, I get more specific in the PCB build instructions where we know something about the budget and what they are plugging into.