New open source high end closed loop driver klipper compatible

Good morning.

I recently developed an high end driver closed loop/ servo board based on tmc4671 with absolute 16bit magnetic encoder, full foc field of control , Velocity Control, Position Control, torque control with canbus and usb connection plus Application SPI + Debug (UART, SPI). It can deliver up to 48v 10 amp in a small form factor for direct mount on nema 17 and nema 23.

it can handle 1 endstop ,1 thermistor, 2 fan

The goal is to provide a device for the community to increase speed, acceleration, precision, reliability, efficency and thermal stability at low cost.

it uses STM32G0B1CBT6 so it is compatible with ebb42 firmware

The driver is compatible with this relase GitHub - andrewmcgr/tmc-4671: TMC 4671 driver for Klipper

is someone interested on the device? do you want to test it?

best regards

4 Likes

Very very cool. Is anyone working on improving the driver software you linked?

You should also post in this thread.

the last update is 1 month ago from the owner.

it has no bugs as far as i know .

Interesting nice work, I read the datasheet of that driver a while ago and thought that driver might have the potential to bring 3D and CNC machines to even more accuracy. Why didn’t you choose the well established industrial format “step stick”?


Less components and many 3D/CNC boards could support such a step stick driver based on a TMC4671.

The TMC4671 handles only the logic, and its standard reference size is typically too large for this format. It requires numerous additional components to function—for instance, an encoder must be mounted on the motor to monitor position in real-time. While the standard size for these devices is usually 10 cm x 10 cm, my greatest challenge was miniaturizing it to fit directly onto a NEMA 17 motor, while also shielding the logic board from EMF and encoder interference. Regarding accuracy and reliability: you will never lose steps again, and the driver will push every motor to its physical limit. it can boost every printer around 4x with pratically no noise. i’m actually using it on a custom idex machine 800x800x800 at 700mm/s 30.000 mms2 with 0.8mm nozzle.

1 Like

Did you have to pre configure the driver for each motor/load like
https://ez.analog.com/ez-blogs/b/engineerzone-spotlight/posts/driving-a-linear-stage-with-the-tmc4671-controller-tuning

Or just PID tune in klipper?

I’m talking about the “step stick” format with a TMC4671.

Yes, like the TMC5160 Configuration reference - Klipper documentation.

No.

Those components will fit on the “step stick” format.

Ok, why not.

Yes, I understood that when I first saw it.

Oh yes, that driver has potential.

to handle your needs is possible to use an adapter to get out s/d controls from that format, but is not recomended. as now the minimum format phisically possible is 42x42mm in a stack.

The TMC4671’s capabilities are dependent on an encoder. If it could be wedged into a “stepstick” you’d need a header to attach an encoder. THEN run the interference prone encoder wires in parallel with the motor coil wires which create RFI like crazy.

Mounting the TMC4671 near the motor and encoder makes much more sense. What we really need is a toolhead version for pancake motors with a PT1000 interface and a heater mofset. Packaging that won’t be simple though.

2 Likes

Ok, thanks. Again, nice work.

Since you don’t provide any schematics. Did you take these schematics


and convert them to a new form factor? You should make a PR to integrate your driver to Klipper. Nice driver for extruders. Two PCBs are too much. I guess a good layouter could easily integrate your layout to one 42x42mm board.

What are the values of that capacitor?

I guess RFI is radio frequency interference?

I totally agree with you. But we can take action to suppress that. Anyway, first has to come a Chinese company with a step stick with that IC :wink:

I totally agree. the encoder on the toolhead will encrease the print quality 10 times. I can work on that format, but has to be separated encoder and board because of space. 10 cm between encoder and board with good shielding may work

Can I ask how you quantify this?

I’m curious as to how you measure the quality of the print from a 3D printer with open loop steppers (ie typical ones). I’m guessing you are expecting to improve/smooth out the step graduations in the X/Y Axis during print.

Now, I’m running the X/Y axis on one of my printers with 20 toothed gears with a GT2 belt with 64 microsteps on a 1.8 degree stepper. This means that the expected movement is, theoretically, 3.123μm per step. This is the smallest possible difference between points for line/curve graduations on a print in the X/Y axis.

So, with the set up your proposing, I would be able to expect this difference to now be 0.3Îźm?

hello , the cap is 680uf .

I’ll relase skematics after some test, just to be sure that is safe.

no, it does not follow any schematics.

the double stack layout also consider thermal dissipation.

all in one will need a 6 or more layer with buried vias that will make it much more expensive

1 Like

To clarify, my mention of a ‘10x improvement’ was intended to highlight the significant gain in reliability rather than a specific linear resolution metric.

While your calculations regarding X/Y resolution are correct, the primary advantage of integrating an encoder on the extruder is the transition from an open-loop to a closed-loop system. At high print speeds, increased nozzle back-pressure often leads to incremental step loss or mechanical slippage that the controller cannot detect. By using an encoder, we provide real-time feedback to ensure that the actual material deposition matches the commanded volumetric values, effectively eliminating under-extrusion caused by these variances

1 Like

yes, every motor has to be tuned with the driver to create a “perfect match”. This is the most complex step, but has to be done just once.

I assume this process is for the motor as installed. Any significant change in the inertia of the controlled axis would require re-tuning?

If you accelerate the print speed to a point where the open loop system looses counts then your the advantage far exceeds 10x. Also Trimec claims higher efficiency (cooler motors) and lower audible emissions. These add value even with no improvement in dimensional accuracy. Is that 10x? not to me but many users may consider it >10x.

If you accelerate the print speed to a point where various open loop steppers lose step counts then your running the hardware beyond its capabilities.

Putting in a closed loop system in this case is not a “quality” or “reliability” improvement, it’s replacing hardware that doesn’t meet overall system requirements.

Sorry, I’ve got too many years behind me as a quality/reliability manager to let claims like these go without comment.

2 Likes

In a closed-loop system, step loss triggers a change in a status pin, which allows the printer to pause automatically. In a professional machine a step loss is never allowd

1 Like

I don’t want to criticize anyone; I’m just making the points.
I’m fine with “I did cool stuff”.
I would be leery of “It’s superior of ..”.

My humble opinion:

  • FOC is cool, yes.
  • Encoders cool, yes.
  • More sophisticated driver somewhat better than the less sophisticated ones.

Statements about skipping steps in exctruder would be better if there is data behind them.
I can believe there is filament slippage possible.
But that extruder motor has to produce at max about 1-2Kg force and normally should be able to produce 5-7Kg.
*The motor is geared, and the extrusion force is what we can be concerned about

Force can be verified with a spool, mass on the spool, or a load cell in the toolhead.
(Extruder should be able to lift a 1kg spool off the floor at least.)

The encoder can be mounted to the motor, or better, to the geared shaft.
Klipper has support for encoders.

Thats said.

Normally, I think,
Printers are limited not by the motors, but by the shapers.
Example, I can do 50k+ acceleration with 1000mm/s on my humble RatRig V-Core 3.1 400x400. But practically, because of Y-shapers, it is running at 10k.

So, losing steps is a mystical issue. It is handy to appeal, yes. But it is a weak argument, as pointed out above, about machine limits.

Motor speed is limited by the BackEMF, regardless of what sort of control you use.
BLDCs have higher RPS than Steppers, simply because they have fewer magnet poles.
(And fewer electrical rotations per rotor rotation per se).
Motor torque, limited by the magnet/coils and controlled with electrical current through the coils, which can be further limited by backEMF (So, we lose torque with speed, every motor does).

If the rotor is aligned with the magnetic poles torque is zero, this is the limitation on open-loop control. The rotor can drift a little until the torque/angle equilibrium settles.

FOC is a cool hack; it is supposed to make BLDC motors rotate.
For steppers, it works, but it does not provide so many benefits.
It is true that motor torque is proportional to the lag between rotor poles and coil poles.
FOC allows us to guarantee that the torque is always high, where normally we have enough torque to ignore that.

Again, you can connect encoders to the Klipper and can collect data from them.

Normally, with nominal current, motor lag is pretty low and depends on the speed/friction.

It can be interesting information if you provide data on “versus” how your machine performs with and without such drivers with your stepper motors.

Again, boards are cool, driver is cool, you are cool.
Yes, it can run motors cooler and save 10W per motor, I guess.
But I suggest generally showing the data first before any strong statements.

If there is a will, to have the ability to pause the machine, if the motor loses steps, it is possible with just encoders: Question with respect to the implementation of closed-loop feedback in Klipper - #2 by nefelim4ag.

With best regards,
-Timofey


Strictly speaking, a stepper shaper that can compute that lag for spread (we’ve tried) will perform close to the FOC, as long as predictions are correct.
For SpreadCycle, it seems that lag is mostly created by the friction in the motion system, and it is larger with lower current.. Implement stepper shaper


I guess the appealing FOC side, is that it should theoretically cancel mid-range rotor resonances, and maybe belt VFA a little bit.

4 Likes