New ESP32 simpleFOC "stick"

With huge thanks to the SimpleFOC team I now have a new ESP32 based board running.

Motivations for this board were simple. Most boards are out of stock and I need a long skinny board instead of a square one. More details coming once I can document it.


Great. Very educational. I have many questions but will wait first for you to finish.


Some vital statistics:

  • 100mm x 27mm
  • 5V → 12V operation. Limited by configuration.
    Driver can get to 24V+ with some different part choices.
  • Active overvoltage load shunt/dump.
  • 15mohm FETs. Good for maybe 10A and maybe more with a suitable heatsink.
    3V3 DC-DC for up to 500mA.
  • Option for 5V level translation for encoder inputs.
  • Low side current sense amplified through the driver.
    *Should be compatible with Hall, Encoder; I2C and voltage output position sensing.

Not as simple as a complete FET integrated driver but it does have a bit more capacity.
The design has a few minor flaws but is otherwise surprisingly functional.

Which FETs did you use?

Which driver you used?


First a disclosure because I am not allowed to offer any guidance without doing so. I work for Analog Devices as an FAE. This project is not sponsored by ADI in any way. My choice of devices is biased. My design choices are heavily biased towards parts available to purchase from Digikey. This is my personal choice only.

Also bear in mind that I have not finished tuning and testing yet. There may be unseen problems in my choices.

The FETs are one of a variety of dual 3x3mm 30V devices from Vishay. Take your pick on Rdson vs capacitance.

The gate driver is Trinamic/ADI TMC6140. It has availability and cost is sensible (in my opinion). Solution is compact with integrated 3V3 DC-DC and current sense amplifiers.


No worry, I’m well aware of the expectations. Where I work, we exchange NDAs before handshakes :grimacing:

Interesting choice. You probably talking about Si7218DN or very close. I was considering them at one point, but ultimately went for DMT3009LDT-7 in one of my small footprint designs. Much better stock availability and already a 1/2-bridge.

I can’t find that one on LCSC, that’s where I shop due to integration with JLC. There are so many nice drivers but all out of stock. I really like the driver integrated dc-dc, but I ended up making my own outside.

Well, post some more pics and videos if possible. It’s always educational.


1/2 Bridge. That is what I meant by dual. One device per phase. 3 total.

Considering the state of component supplies I will take drivers from wherever I can get them.

Well, you could always go for a N-P discrete mosfet 1/2 bridge and drive directly with 5v logic… I’m only half-joking here. At one point I was so frustrated I nearly did it, then stopped myself. As long as you don’t exceed 10A you could easily find a matching pair. HSBA4909, DMC4029SK4, etc.

Looking forward to the details. I had some success with the ESP32 and a TMC6200 driving FDMD8260L FETs but I managed to pop the TMC6200 (don’t ask) and can’t get more until September and I see the FETs are now EOL. So the project had stalled. Fortunately it looks like you have designed exactly what I was after so I’m hoping that you’re going to save me a whole load of redesign time :smiley:

@4nswer I have been abusing the driver while getting the configuration right and I have not broken it yet. There is short detection on TMC6140 and I trigger it pretty much any time I do something silly.

I have a DIY prototyping pick and place at home for making my own boards. I don’t have time to make extras. If you can produce your own boards from my design files then I might be motivated to share them.

My power supply is quite quick to respond to overcurrent. It has saved many of my projects. This might also contribute to saving the board:

@crashmatt fortunately I’m only looking for the schematics, I can build the boards myself. I could draw it myself too but if you’ve worked out the kinks then why duplicate the work? I’m happy to do a run of 10+ for anyone on the forum just for the economy of scale.

I’m running off a similar supply to what you posted albeit of dubious pedigree. It has been pretty reliable thus far.

I’m pretty sure the only reason I blew the 6200 was my own stupidity. I was winding up the current limit to get a stall torque measurement and, due to some bad PID tuning, managed to get the motor into a violent oscillation. I’m guessing that caused an overvoltage condition that fed back via the current sense circuit. Either way the only thing that happens now when I plug in the board is the 6200 gets hot which it never did before. I’ll keep the board and swap in a new 6200 as soon as they come back into stock but I need a simpleFOC test board in the interim.

Fair enough. Once I work out what the license is for all the different parts I used then I can find a way to share it.

Some of it was open source from Trinamics. Some of it was from Ultralibrarian.

There are some corrections I would make for rev 2.
I am having problems combining WiFi and simpleFOC which might be resolved by moving some pins.


Hey crashmatt,

i stumbled upon your post and im at the moment waiting on my components for an tmc6140+eps32 board i designed in the nema17 formfactor. And just wanted to ask how happy you are with the tmc6140 since nobody else seems to use it.
Also since you work for ADI do you have any inside on why the recommended bulk capacity of the tmc driver is so high (100µF per coil Amp) when you compared it for example to the drv8353 which only mentioned at least 10µF and in the new Odrive Pro its implemented with 328µF for up to 80A. With the tmc6140 you would need 25 times that. Is the 100µF/A just a safeguard? If you legally cant answer that no worrys im just courious why they are so diffrent.

Also, i can recommend the eps32 pico series. easy to implement and dont need so much space on the board.


1 Like