Marlin icon indicating copy to clipboard operation
Marlin copied to clipboard

[FR] Interfacing with closed loop stepper

Open alexxy opened this issue 7 years ago • 7 comments

What is the best way to interface with closed loop stepper motor?

Currently I working on simple design for closed loop stepper comntroller that can be very cheap but will its work. So basicaly it is stm32 mcu with tmc motor driver and magnetic encoder. So the main question is interface between control board and comntroller. Ideas?

alexxy avatar Nov 20 '18 16:11 alexxy

See #11772 and the discussion in it.

comps avatar Nov 20 '18 17:11 comps

Good point. But idea is to make motor controller board to all of position control thing.

alexxy avatar Nov 20 '18 19:11 alexxy

There have been some discussion. https://github.com/MarlinFirmware/Marlin/issues/11113

paukstelis avatar Nov 30 '18 23:11 paukstelis

Its not user support question. I'm developing board similar to nano zero or machaduino. So I rise question about interfacing with Marlin.

So possibilityes are:

  • step/dir/enable interface + additional pin to report that movement done
  • step/dir/enable interface + spi or i2c
  • can bus to rule em all
  • i2c to controll everything
  • spi to control everything

Or any other suggestions? I think in case of using closed-loop drives marlin need some kind of feedback to know if movement finished or not, or it get an error.

I tested encoder resolution and stability: its ~0.02 degree (for example for 200 steps/rev stepper with 16 microstep we need ~0.1125 degree, so resolution is enough for 64-128 microsteps... )

alexxy avatar Apr 22 '19 10:04 alexxy

I now implementing interface in that way

  1. closed-loop board exposes step, dir, enable pins that are translated into step dir enable of driver
  2. closed-loop board exposes additional two pins: ready and error that are used for reporting status
  3. closed-loop board exposes spi for driver configuration (as well as uart)

alexxy avatar Apr 24 '19 14:04 alexxy

@alexxy
Why not consider like that TMC 4361 and TMC5160

crazyp1g avatar May 17 '19 15:05 crazyp1g

No, there is still plenty to be done around closed loop steppers. I just got a couple in 2 days ago to start playing with. The TMC motion controllers above would be hugely beneficial as well.

InsanityAutomation avatar Jun 22 '19 15:06 InsanityAutomation