High-Power Stepper Driver 36v4 and Current Sensing for simpleFOC

I’ve been looking at upgrading my open-loop cnc setup by using the simpleFOC software, and have some of the Pololu 36v4 drivers as they suit my voltage/amp requirements and are drivable via 4xPWM, which should work with simpleFOC nicely. The advantage of simpleFOC is that it, with the addition of rotary encoders and (optionally) current sensing, the steppers can be treated as closed-loop servos, with quite a low cost per axis.

SimpleFOC can run without current sensing, but I understand that FOC is far more effective with it. It seems that the 36v4 already has a subsystem for current sensing built into it, but as far as I can tell, the current data per phase isn’t broken out to any pins as it would need to be to send current data back to the microcontroller. I’ve been looking at the ACS711EX current sensor board which is nice and cheap and I think would probably do what I need, but is it possible to get the current sense data out of the 36v4? Is it available over SPI, and if so where would I go to learn about how to access that data?

I hope someone can help! Many thanks in advance.


I moved your post to the motor drivers and controllers section of the forum. Unfortunately, the current readings taken by the 36v4 driver are not available on an external pin or through the SPI interface. An external sensor is a good idea, but the ACS711EX is meant for +15A currents, so its resolution is lower than some of our lower current sensors. You might consider our ACHS-7121 or ACS724 instead.


Thank you so much for your reply. It’s been pointed out to me by someone on the simpleFOC forums that ACS711EX was also not suitable for the other reasons that it’s either a high-side or a low-side (I think low-side if I’ve understood well?) current sensor, whereas the simpleFOC application requires an in-line current sensor. I believe that this is to do with how they respond to PWM signals but this is a bit beyond my understanding. Can you recommend a suitable product? 5A is good, 50-100V is good, and I think needs to be able to cope with a PWM frequency within a range of 30-100kHz (though, again, I don’t know what I’m talking about re. the difference between hi/low-side and in-line, only that what I need is an in-line current sensor).
Many thanks,

Hi, Andy.

I am not familiar with simpleFOC, and I do not understand the distinction you are making between high-side or low-side and in-line, so i can’t make any recommendations. All of our current sensor boards are meant to be placed in line with the load (i.e. by disconnecting one side of the load and adding the sensor), and they do not expect any particular voltage at either current sensing terminal. Could you link to the simpleFOC forums?


The simpleFOC forum is at https://community.simplefoc.com/.

Honestly, it’s a distinction I wasn’t aware of until I started looking at the simpleFOC forums. In looking for an explanation I found this:

[Overcome the Challenges of In-line Phase Motor Current Measurement | Electronic Design]

and that brings up the topic of PWM-rejection circuitry which appears to be crucial to getting the inline sensing to work. There are a couple of devleopment boards around that showcase inline current sensing with PWM rejection but they’re a far higher cost than their key components; I have no significant experience with designing and making circuit boards so was hoping to find a board like many of the pololu products where the work of component design, routing, pin header and screw terminal connection etc. are all done so I can wire headers together to make the system I’m after.