janelia-arduino / TMC2209

The TMC2209 is an ultra-silent motor driver IC for two phase stepper motors with both UART serial and step and direction interfaces.
Other
152 stars 24 forks source link

Setting current on the driver #33

Open puneeth-kvsk opened 11 months ago

puneeth-kvsk commented 11 months ago

I'm not able to understand the current setting procedure from the datasheet. The readme file of this library has been more understandable regarding this matter than the datasheet provided by TMC.

According to this library's readme file, I can achieve current control using two ways:

  1. Analog scaling
  2. Automatic tuning

What is the hardware configuration that I can use for Analog scaling?

Can a common hardware configuratiom be used for both of these current tuning methods?

If possible can somebode share a sample schematics please?

Can I change current during runtime in either of the two ways?

Note: I'm using the IC standalone and not the driver module.

Less important question - What is a prefereable hardware configuration to drive Vref, can I do it using GPIO of a microcontroller or do I specifically need to source the current for the same from another 12V/24V?

issuefiler commented 9 months ago

“Analog scaling” (what Trinamic calls it), or more precisely speaking, “potentiometer-based manual current strength adjustment,” is not used when the driver is in the UART mode. You either configure the current strength by setting registers through UART in the UART mode, or by manually turning the potentiometer in the standalone mode.