I have a stepper motor. I'm driving it with microstep. The supply voltage is a known value (but may change). I'm going for 40 volts (for now) - but it's a requirment for this to work in a given voltage range.
Each winding is driven by an Hbridge, commanded in PWM (20khz, 800 steps). What I want to do is measure the current going into each winding, or overall, into the motor. I could use a sense resistor, or a current monitor, but since I'm driving this on PWM and not DC, I might need some way to smooth it out. An analog filter with an opamp (if using a sense resistor) perhaps?
Any ideas or schematics?
Thanks!