Stepper Motor Hall Effect Current Monitor

Have questions about the equipment used for macro- or micro- photography? Post those questions in this forum.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Stepper Motor Hall Effect Current Monitor

Post by mawyatt »

This is somewhat related to the Motor Controller thread since I've needed a way to evaluate the actual motor coil currents during the ongoing development and evaluation with many different motor/controller/rail configurations.

At first I used a DVM with RMS Current Sensing, this worked OK but required two DVMs. Then tried a simple series resistor (see images) for the two motor coils, this works with a floating (galvanically isolated) DVM (also required 2 DVMs) but not well with a o-scope...and you need to measure differentially so both o-scope inputs are taken.

Later I used a traditional current probe (see images), this worked well and allowed a single o-scope input to view the waveforms, but requires 2 probes to view both coils.

Monitoring stepper motor current is not easy since they are commutated by the driver/controller "H bridge" at a high rate, so the motor coil voltage on one side switches from ground to the motor supply voltage, while the other side of the same coil switches in the opposite direction.

At this point I decided to try another method based entirely upon the semiconductor "Hall Effect". Allegro has developed these and the ACS724 Hall effect-based linear current sensor with +- 5 amp was selected with the Pololu ACS724 board. I put some circuitry around this and added two ACS724 to sense the Sine and Cosine motor coils and run directly from the motor supply.

The two motor coils are operated with Sine and Cosine tables as you can see in the o-scope image that is from the developed Current Sensor. I've reduced the bandwidth of the output to ~ 900Hz to help reduce the switching coupling from the motor current switching commutation. The image is from a 500 micron movement with a typical NEMA 17 400 step motor controlled by a Trinamic high current controller (TMC5161).

These current monitors are not expensive to build, parts probably cost ~$30 and have dual Sine and Cosine input/output. If enough folks are interested I might get some custom PCBs built.

Directly from "Mike's Labs" :D

Best,


Motor Current sensing methods, Current Probe, Resistive and Hall Effect
Image
Hall Effect Motor Current Sensor with some Controller PCBs
Image

Hall Effect Motor Current Sensor Close Up
Image

Sine and Cosine Motor Current Waveforms (500um movement, Scale Factor 1.25A/Div)
Image

Sine and Cosine Current Waveforms (1.25A/Div)
Image

Here's what the Motor Voltage looks like! Note scale, 5V/Div.
Image
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

A couple folks have indicated they are interested in this Hall Effect Stepper Motor Current Sensor so I went ahead a developed a more advanced circuit and a Printed Circuit Board. Here's the 1st cut at the PCB.

If things work as planned it will produce both Sine and Cosine outputs motor current outputs with a scale factor of 1V/A. The motor commutation pulses and noise will be significantly cleaned up with an active 2nd order low pass filter on each coil and the offset and gain are trimmable with 25 turn precision potentiometers. Outputs can swing both positive and negative around 0 volts with the builtin negative supply converter, rather than being offset with a unipolar supply. So expect clean waveforms and precise measurements.

I'm probably only going to get 5 PCBs fabricated, so only a couple will be available if anyone is interested.

Best,

Image
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

The PCBs finally arrived and I was able to assemble a board. Got all the parts soldered in for the +-2.5A version (still waiting on one part for the +-5A version) and did a preliminary check to make sure everything was in order and powered up.

I've included the ability to power the sensitive analog circuitry 4 op amps from the filtered motor supply or the regulated +5V, and the DC to DC converter negative analog supply voltage from the same (just in case). +5 volts is required for the Hall Effect sensor. The entire design is based upon precision differential techniques which don't depend on precision components, nor supply or regulator voltages to a 1st order. Techniques learned over my career with precision electronics, applied to keep from using expensive precision components.

Checked the 5 volt regulator output and installed the jumpers to power from this initially. Set the negative DC to DC converter voltage, and then the offset potentiometers to 0.000 volts for the Sine and Cosine outputs. Switched the jumpers to the motor supply (~12V), the offsets remained at 0.000 volts, then changed the negative supply from -5 to -10 volts, the offset remained at 0.000 volts. This is what should happen based on the design concepts, almost complete independence for supply voltages.

Then hooked up a stepper motor and 1% sense resistors and went through a brief calibration. Hooked up a O-Scope and the waveforms looked really nice, quick response but not much chopper noise thanks to the dual 3rd order active filters.

Now came time to evaluate the current measurement precision. Used a Fluke 87 and 77 to measure current and voltages, along with some 1, 0.47 and 0.22 ohm 1% resistors. Use my very old lab supply to supply the current, and did a calibration at 1000ma for both Sine and Cosine for 1.000 Volt/Amp. Then ran the current from 0 to 1.7amps (range of my motors) to check the linearity and precision, judge for yourself.

Current Input ma, Current Reading mv:

0, 0.0
12.12, 12.3
30.13, 30.3
50.6, 50.9
76.0, 76.2
100.8, 101.0
125.8, 125.8
168.9, 168.9
200.3, 200.2
256.5, 256.3
301.0, 300.7
350.3, 350.0
401.3, 401.0
451.0, 451.0
500.0, 500.0
600.0, 600.0
700.0, 700.0
800.0, 800.0
900.0, 900.0
1000, 1000
1100, 1100
1501, 1500
1700, 1698


From 100ma to 1700m the error is less than 0.2%.

Best,


Image
Image
Image
Image

Hall Effect Motor Current Sensor/Probe Outputs
Image
Image
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

Post Reply Previous topicNext topic