Please help me design a 6A Stepper Motor board

I am in the design stage of a new board and can use some guidance.

My application requirements are:

  1. Drive this 6A NEMA 34 Stepper Motor at 430 RPM
  2. Allow freewheeling. The motor needs to freewheel without damaging the driver.
  3. Be Wi-Fi capable (ESP32 will be used for this)
  4. Have current sensing as a safety feature (More on this at the bottom).

Right now, the TMC6200 and ESP32 look like the perfect combo for this (But I hear a lot of bad things of the ADC). I need Wi-Fi, so maybe I can use two ADS1115, or use some sort of software noise reduction.

I am also looking into the DRV8412 but it is significantly more expensive ($11 vs $5 for TMC) and requires two external current sense amplifiers ($3 each for INA241).

Current sensing: In addition to using current sensing for FOC, I need to use it as a stall feature and safety feature. When I press the calibration button, I need the IC to monitor the current over a distance of 1 meter and save the values in a table. Then when the same movement is made, the current values need to stay near the saved values or the motor needs to stop. For example, if the IC finds that 1A of current is required to move the motor at 10cm of the 100cm distance, and this value changes to 1.5A at the same location, it means there is an obstruction in the way and motor needs to stop.

Any suggestions or holes in my ideas are very appreciated. Thank you

Hi @dfrenkel

This is a very ambitious project. You may want to approach it in stages, in a bottom-up approach. I have designed a similar board, and sent it to you in the past. I’m not sure you can find people here that will help you design a board from scratch however, but let’s see. This type of work is very highly specialized and people won’t just do it for free. I might be wrong, or at least I hope I’m wrong on that.


@Valentine I understand, I think I didn’t articulate what I need help with. I’ve already got most of the board designed and laid out from a previous project that uses a TMC5160 stepper driver and it works very well. I don’t need help with the actual board, I’m just really struggling to understand the main components required to switch from a stepper driver to SimpleFOC.

I have your design and have already used it to swap out my TMC5160 design, so thank you for that.

I just ended up coming across the TMC6200 and am left wondering why that isn’t used more often around here, it seems to have great features, especially the built in current sense circuits.

I guess all I really need to know is whether people would recommend the DRV8412 vs TMC6200 for a 6A stepper motor?

well, I think if you want this chip you will need 2 of them for StepperDriver4PWM, and this is already pretty expensive. I don’t think there is a huge benefit here for using an integrated package over going for a discrete design with 4 half bridges and 2 current sense amplifiers, and likely would come out cheaper.

1 Like

Are you referring to the TMC6200?

Yes, sorry for being vague.

Understand. I have no experience with the TMC6200, so no feedback from me.



I’ve begun integrating your board, so thank you, it’s very appreciated. I just started it but I’ll post updates to this thread as I make progress. Maybe someone will spot a problem as I go, or it’ll help other noobs

In the spirit of your naming conventions, I call it HammerTime

1 Like

Did you see this TMC FOC driver. It may suit your needs, but the firmware is closed terrain

1 Like

Hey @dfrenkel ,

I am starting the design of a card very very similar to the one you propose to develop.

In my case the idea is to develop a board that can be placed on the back of a NEMA17 stepper motor and that works running SimpleFOC.

My design incorporates a DRV8412 as a controller, an STM32F103 as a microcontroller, and a MT6835 as a position sensor.

I am in a VERY early phase of the project. I have finished the schematic design and in the next few weeks I will start to verify the configuration of the microcontroller using an L298N as a test controller.

This is the schematic I’ve developed based on the reference design from the DRV8412 datasheet, in case it helps.

If someone sees something wrong or can be improved… all help is welcome :slight_smile:

Regards !!!

1 Like

At LCSC you can find the DRV8412 for $8…not a huge savings vs. $11…but every penny counts.

I did see it and have been torn on which direction to take (DRV8412 custom designed, or TMC). It does look like it can simplify my ESP32 current sensing problem (Due to poor ADCs on the ESP32).

I also found a library someone made for it which looks to be quite thorough.

I just noticed the Step/Dir interface which would make it much easier to switch over from my stepper motor code. So if I want to use my ESP32, have true FOC torque control for a stepper motor, and not modify my code very much, I should use the TMC

1 Like