2025-09-19 4:34 AM
Hi there;
I'm trying to muddle my way through my first design with a motor driver that includes current sensing. This is for a battery-powered device, operating with an stm32f4 at 3.3v. My motor is a small gimbal-style motor, which I intend to run at 3.3v, and which I estimate will draw current ranging from 0.1-0.4A. I think I would like to run at a PWM that is at least 20kHz, though it would be nice to go faster to avoid switching frequencies that might be irritating to pets. Maybe that's 25-40kHz (center-aligned PWM)?
The STSPIN233 seems very appealing to me, but - because I'm new to this - I'm struggling a little navigating the ADC front end amplification necessary for this.
I'm aware I need amplification of some sort - I have several dozen tabs open in my web browser here to try to understand the differences between using an op-amp vs. a current sense amplifier for this. I am having trouble finding many specific resources for this in ST's library. TI has a ton of stuff, but they often seem to jump back and forth between high-speed op-amps (e.g. the OPA835) and current sense amplifiers (e.g. the INA303) without explaining why.
One thing I notice from browsing TI's parts is that the current sense amplifiers seem to have a notable Iq - it seems undesirable of me to choose a power-optimized part like the STSPIN233 and pair it with a sense amplifier that's not similarly designed for low-power use. But I'm finding it tricky to browse parts that would be good pairings for this device.
My question(s) then:
I've had trouble finding example designs that use this device with properly-broken-out sense capabilities (there are a lot of hobbyist builds out in the world, almost all of them either forego current sensing entirely or wire all three sense outputs together and route them through a single shunt, which seems outright incorrect to me).
Thank you so much!
2025-09-24 1:49 AM
Hello @sb_st,
You can refer to the X-NUCLEO-IHM17M1 power board based on the STSPIN233.
2025-09-24 2:55 AM
I'm not a hardware designer and didn't play with motor driver designs yet, but I did a few smaller amplifier and signal conditioning boards for my projects.
> This is for a battery-powered device, operating with an stm32f4 at 3.3v. My motor is a small gimbal-style motor, which I intend to run at 3.3v, and which I estimate will draw current ranging from 0.1-0.4A. I think I would like to run at a PWM that is at least 20kHz, ...
> Maybe that's 25-40kHz (center-aligned PWM)?
I would think the easiest way is a single-rail, low-voltage type like a LM358, which I mostly used.
The bandwidth is more than sufficient, and I wouldn't fuss about a few uA or even mA of quiescent current.
Or put a socket in, and try a few different types.
But despite the 3V/0.1-0.4A motor, potentially generated voltages follow dI/dt. In other words, I would not economize on input protection.
2025-09-24 4:16 AM
Thank you for this! This is super helpful.
Are you able to answer some questions I have about this board/design? In the time since I initially posted this question, I've been learning about current sense amplifiers. My (rudimentary) understanding is that a CSA might be useful in the context of three-shunt current sensing, because it simplifies the BOM and also minimizes variance across the three amplifier networks needed to implement this.
Would you agree with this? I am curious why the Nucleo board you mentioned uses op-amps instead?
(I'm aware that with almost everything hardware design, most things boil down to "it depends on what you want", but in this case I am still trying to learn what to prioritize. So any color you may be able to offer on the choice of current sense amplifiers vs. op-amps+supporting circuitry would be so helpful!)
Thank you! It's great to have an example to which I can refer.
2025-09-24 6:37 AM
Hello @sb_st,
The X-NUCLEO-IHM17M1 power board provides OpAmp to interface with MCUs that do not have internal OpAmp IPs.
For the amplification path design, use the MCSDK 5.4.8 tool (available here). Load the "B-G431B-ESC1 electronic speed control" example. Click on the Current Sensing box and change the Rshunt value according to your requirements.
Click in the Analog Input and Protection box, in Sensing OPAMP part, click on Calculate to display the Amplifying Network Gain Calculator graphical tool.
2025-09-24 8:59 AM
Hm, thank you - I'm on a macbook, so will need to figure out how to get ahold of a windows machine in order to try this tool. It does seem like it might be useful.
However, I'm not sure if it directly answer my question: What would be the reason(s) to prefer an op-amp solution vs. a current sense solution as it relates to this device?
Thank you!
2025-09-26 12:40 PM
Maybe you could help me answer this question about the X-NUCLEO-IHM17M1: is this design for bidirectional or unipolar current measuring? It's not clear to me that a bias/offset voltage is being applied anywhere, so I *think* this board is intended to only read the shunts when a positive voltage is formed across them...is that right?
2025-09-26 10:44 PM
When i verified the schematic, the below section is used for current sensing
The equation i get is
Vout = 0.9 Vshunt + 0.9 V
So the offset is around 0.9V when 0 amps is flowing, anything below 0.9 will be negative current. So positive current will be upto 0.9 + 0.9 = 1.8V
Maximum Ishunt current you can measure is
if we put Rshunt = 0.1 Ohm
Ishunt = Vout/(0.9 * 0.1) = Vout /0.09
Vout max will be 0.9V
Ishunt max will be 10 amps.
This is my analysis please reverify from your end.