measuring current of a PWM voltage with non-true RMS DMM
StefanL38
Posts: 2,292
Hi,
first of all - as this is not a direct propeller related question -
what's your opinion: am I allowed to ask such a question?
I want to measure the PWM-voltage of a stepper motordriver (L298)
The frequency is 16 kHz.
I don't have a true RMS DMM. How big will the deviation be?
On what parameters does the deviation depend on?
The backround is propeller related . I'm building a CNC-control with a propeller for a small
CNC-mill.
best regards
Stefan
first of all - as this is not a direct propeller related question -
what's your opinion: am I allowed to ask such a question?
I want to measure the PWM-voltage of a stepper motordriver (L298)
The frequency is 16 kHz.
I don't have a true RMS DMM. How big will the deviation be?
On what parameters does the deviation depend on?
The backround is propeller related . I'm building a CNC-control with a propeller for a small
CNC-mill.
best regards
Stefan
Comments
I am interested, and other stepper motor newbies might be also. Please continue.
Andy
thanks for replying. You wrote about the voltage 0 to 3.3V direct out of a propeller-IO-pin.
Maybe I have to add some more information.
I'm measuring the current of the output-stage of a choppered H-bridge of the driver-chip L298 combined with the logic-chip L297 who does the choppering.
I'm measuring a current of 200 mA up to 800 mA. I inserted the amperemeter in the powersupply-path supply-voltage 38V. The voltagedrop-resistor of the ampere-measuring circuit is 0,1 Ohm.
Under these parameters does the DMM still average the current correctly?
best regards
Stefan
Andy
Edit: When I rethink it, it depends on the way the coil is driven. If it is an unipolar stepper motor the above can work, if the motor is bipolar then the DC-current mode gives not the right result.
thank you very much for pointing me towards the crest factor. l read the wikipedia article about it.
it says for PWM-signals the crest factor is square-root of period divided through on-time.
I have a UNI-T UT61B DMM. which can measure the relative on-time. I measured 34%.
This would result in a crest factor of square-root (1/0.34) = 1.7
If I measure the voltage-drop over the current-sensing resistor (0.5 Ohm) I mesuare 0.3V as the peak-value on my oscilloscope.
So does this mean the averaged value is 0.325V / 1.7 = 0.191 V
and then the averaged current is 0.191/0.5 Ohm = 382 mA?
The DMM measures 430 mA. So there is a quite a differenz between the two values.
If I scope the current as voltagedrop across the current-sensing resistor I can see spikes and shorter pulses
in an unregular pattern. Does this cause the differenz between 382 mA and 430 mA.
Does somebody know if a UNI-T 61B DMM can compensate non-flat-DC currents?
Can somebody give me further advice on how to measure?
best regards
Stefan
maybe you should explain a bit more what you actually want to do. If you measure current to control the torque of a motor then you don't have to worry about RMS, just take the average current. If you want to do something more sphisticated like stepper stall detection or I²t protection then true RMS should be measured. Ripple current doesn't contribute to torque but does to motor heating.
No I do nothing special or sophisticated. I'm just modifying an existing L297-L298-board which is "hardwired" with fixed resistors to give a current of 230 mA to a NEMA17 motor which is specified for 800 mA.
No I want to replace the existing 4 Ohm current-sense resistor through a 0,5 Ohm and the chopper-control-reference-voltage-divider with other values and include a potentiometer to make the current adjustable.
I want to measure the current to set it to 750 mA (close to the max-limit the steppermotor is specified for.) The motor heats up to around 60°C if I measure 400 mA.
This is half of what the motor is specified for. Does this mean the motor can stand 80°C or even more in the long run? Or might it be that my measuring is factor 2.5 wrong and I'm already at 1000 mA making
the steppermotor so hot?
best regards
Stefan
stepper motors are designed to run at higher temperature, because they are always driven in a stalled mode. The windings show a given resistance, the flowing current creates a magnetic potential and the rotor is balanced in the potential dell. In place the rotor doesn't generate any torque, that's why he stays in place ;-). External torque moves the rotor, a back driving force is generated due to moving uphill out of the dell. As the dell must be changed in position to have the rotor following (moving) the potential is created by magnetic forces generates by current through resistors generating heat. So a stepper motor has no efficiency, as he dissipates power without generating mechanical power. (and the efficiency is not much better as he rotates). Knowing the windings resistance, the current to create the magnetic field and the heat resistance of the motors fixture the motors temperature can be determined.
To get some data connect both motor windings in series, connect them to a current controlled power supply and measure the temperature raise. This is the method of choice to determine true RMS: a AC current of any form, that changes exactly as much heat as an constant DC current.
Normally there is no danger for the windings, the main problem with temperature is the grease in the bearings. This has to be a high temperature type for save operation.
So, as I may suppose I must be this "forum soup nazi", and that doesn't bother me at all, though I haven't the "false triggers", and you've expressed trepidation, then I have a question or several.
Why wouldn't you (want to) ask this question in General Discussion? Is it because you reckon that's a trite area? Or the Propeller Forum somehow imparts a certain je-ne-cest-quoi, some high-brow cachet? All your friends are over here? Some combination?
Anyway, the old DC-voltmeter being used to "measure" PWM provides an estimate, considering the frequency of the PWM, the DC-voltmeter's frequency response, stuff like that. That's why they make oscilloscopes.
BTW, "rms", root mean square, implies a sine wave, always; it doesn't establish accuracy, reliability, or appropriateness in/for the measurement of non-sine signals (120V square waves, etc.)
prof_draino,
Any gratuitous comparison to Nazis is wholly emotionalist, a capitulation to the irrational.
Um... NO. "rms" is a simple way of calculating an equivalent DC value that if passes through a resistor would dissipate the same average power. (see Wikipedia for an explination heavy on the math fonts.) In general rms is valid for any periodic function. (PWM satisfies this at steady-state) It's also useful to calculate rms values for certain non-periodic waves. I.e. noise powers are often expressed as rms values.
Back on topic, your DMM 'should' average out the pwm signal correctly. Unfortunately the DMM is a sampled digital system, so aliasing effects can screw up readings. Your DMM should have a low pass filter on it's input to prevent aliasing, but it's often left off because the DMM will mostly work without one and this saves money. A "true RMS" DMM would improve the chances of getting a good result as they take many samples and compute an RMS value from them, but these meters are usually designed for dirty AC mains power so lots of extra signal at 16KHz is likely to produce erratic results. The most reliable method is to toss together a low frequency RC filter to put between the DMM and what you are measuring.
Lawson
Anyone, of course, is free to imagine what he likes since this is the Propeller Forum, afterall.
When you really need to know, you get an oscilloscope; when nothing really matters then you indulge in assumptions and make it up as you go along, feelings being foremost.
http://www.hifi-writer.com/he/misc/rmspower.htm
Here is the maths, from here, a calculator can do it for you :
http://licn.typepad.com/.a/6a01156f9658cc970b0147e1724b64970b-pi
RMS may matter, for thermal budgets and I^2*R losses.
A great calculator is here :
http://www.zoesoft.com/console-calculator/
Hello Stefan,
most stepper motor manufacturers define the following conditions for their specs:
when two windings are driven simultanously with the nominal current (pure DC) of the motor then it produces the nominal stall torque and heats up to the maximum allowed temperature (usually 80°C @ 25°C ambient) in free air convection.
That means if your motor is rated for 800mA and has (for example, just a guess) 2 ohms winding resistance then it can take 0.8A²*2ohms=1.28W of thermal load per winding, or 2.56W for the whole motor. This is a theoretical value only, because in practice you have to plan for ambient temperatures >25°C and additional iron losses (magnetic hysteresis and eddy currents) that you don't have with pure DC drive.
As a rule of thumb it's a good idea to only load the motor with its rated current on ONE winding (or 0.71 times the rated current for both windings simultanously) as this leaves enough headroom for iron losses. They depend on the PWM method (fast or slow decay), frequency and the power supply voltage.
Iron losses are hard to calculate but you don't have to. Just measure the average DC current drawn by your stepper driver from the power supply. The power drawn without mechanical load should be less than the motor's thermal capacity given by the above formula (plus the losses of the power stage). For example if your supply is 24V then everything is fine as long as the driver draws less than 0.106A (assuming your motor can take 2.56W). No need to measure true RMS.