Skip to content
Snippets Groups Projects
Jake's avatar
Jake Read authored
02e0431b
History
Name Last commit Last update
datasheet
images
mkstepper
.gitignore
README.md

MachineKit Stepper Driver

Uses TMC2130
Uses ATSAMD51

Has AS5047 backpack ?

IC Spec'ing

Step Driver

I like the Trinamic TMC2130 and TMC262 - the 2130 has h-bridges built in and is suited to NEMA17 size motors - fairly common. The TMC262 is a very similar chip, but only has pre-driving circuitry for external bridges. This means I can use very similar layouts for two 'sizes' of driver - however, they have different register tables, which is a bit of a bummer. I would be writing twice the software (ish). The other option is to roll a board with the TMC626, using very tiny external mosfets and then later very trivially using much larger mosfets, in the rare case that I want a, say, NEMA 34 or 42. Also, I can roll one off the bat that will be solid for NEMA 23s - normally about 2.5 amps of current. This should be no problem.

OK: so - TMC262 w/ external fets, here we go.

tmc262

Mosfets

I also need: Mosfets then, as I'm going for external option. 8 per board: 2 full bridges. I'll look for arrays - like two or four in a package, this should help keep things small. I like two, for each h-bridge... There is a nice 4.1A continuious / 14A peak DirectFet in a small package - this might be appropriate for a big driver. As it turns out, there's this appropriate-looking full H-bridge in a small package that will drive 8 Amps at 60v. That's enough for even fairly large steppers... It's got a reasonable RDSon and pretty tiny gate charge... so I feel OK about this as a first shot. Bueno. I am ready to get a schematic going and build library parts.

Sense Resistor

Sense resistors generally need to scale with the expected motor current - so I want to find a package size that I can use for large and small motors...

Microcontroller

This stepdriver is part of another project on networked machine control (I am calling this MachineKit, although I may have to change this as I am now realizing that machinekit.com is taken). My favourite new microcontroller for those endpoints is the ATSAMD51, so it's the stand-in. I would also consider the ATSAMD21 (these are both very well supported by 'the community') and the 51 is newer, faster, etc, at a price increase from $2 -> $4. But, in the interests of only dealing with one set of registers, bootloaders, packages, etc - I am just going to not think too hard and pick the ATSAMD51 for this bb, as well. Future firmware-writing self will thank me.

To Encoder or not to Encoder?

Mechaduino is a really excellent project that Sam and I are fond of. They use an AS5047 encoder to resolve more-steps-than-should-be-possible-with-a-stepper. In combining this with the fancy drive technology in the TMC chip, we can basically arrive at a low cost closed-loop motion control solution, so that's pretty rad. I'm familiar with this chip and use it in my brushless motor controller, so it's feeling quite likely I will implement it here as well. My one quam is the added complexity, etc. I could mount it right in dead-center of the board, use side-mount leds for indication and then have a nice clean backplate... (I am trying to avoid a two sided board). I had also thought I would perhaps have the possibility for an external encoder-only board... but, again, less complexity the better. Backplate mounter. OK.

Form Factor

A-la Mechaduino and many other solutions, this beckons to be mounted on the arse-side of the motor it is responsible for... that way, it looks neat, and we can just glue a magnet on the back of the shaft to read position with our encoder. In the future, I really want to also control NEMA8 and NEMA11 motors (because they're cute as heck) but for the immediate future NEMA17s are OK and I can always use a laser-cut adapter to mount the same board onto a NEMA23. OK, again, simplicity wins, we go for the NEMA17 board, but spec drivers to NEMA23 size.

Board Design

OK, I only have two major footprints left to draw / place - the AS5047D and the sense resistors.

Done, now schematick-ing ...

  • power selectors & vccio

  • swd

  • reset line

  • bfc ? 100uF smd ?

  • gates & sense r -> smaller sense r?

Then I have the big, dubious challenge of picking a network interface port for this whole next rev of work. Oh my. Then I will be doing schematic layup and will be on my routing way. Hurray.

Ordering

FETS https://www.digikey.com/product-detail/en/on-semiconductor/FDMQ8203/FDMQ8203CT-ND/3908189 Smaller Reset https://www.digikey.com/product-detail/en/c-k/KMT211NG-HF-LFS/CKN9433CT-ND/1886651 2010 2W Shunt (do 50mOhm) https://www.digikey.com/product-detail/en/vishay-dale/RCWE1020R100FKEA/541-2516-1-ND/5357840 2512 3W Shunt (do 50mOhm) https://www.digikey.com/product-detail/en/bourns-inc/CRA2512-FZ-R100ELF/CRA2512-FZ-R100ELFTR-ND/1775034 100uF Cap https://www.digikey.com/product-detail/en/panasonic-electronic-components/EEE-FTH101XAP/PCE5024CT-ND/2652079