I have confirmed a suspicion i have had for a while. Apparently the victor 884’s do not have a linear PWM input vs. voltage input.

A DVM was attached to a victor and the values recorded while incrementing the PWM input by a set number every 6 seconds. The reason for the initial values being a bit sketchy is that i was using a cheap digital meter that fluctuated a bit. As time went on, i got a little better at figuring what number it was hovering around. http://pictar.net/Victor-Response2.gif

Here i attached an unloaded motor to a victor and measured its speed vs. victor PWM input. The speeds were determined using a 1024 count optical encoder encoder. The motor was a fisher-price motor w/gearbox.
The test was automated and did the following:
1.set victor output
2.wait 2 secs for speed to stabilize
3.count encoder ticks for x secs. (I think the test was set to wait 3 seconds at the time this data was taken).
4.output data
5.increment pwm output and goto step 2 unless finished

Note that since the motor is unloaded, motor models dictate that speed should be directly porportional to the input voltage of the motor. http://pictar.net/Victor-Response.gif

I should mention that these tests were done on a single victor 884 and i cannot guarentee that all victors behave similarly although i believe that they do. I also believe that this curve is a feature of their design.

There will be higher resolution data as well as code examples of how to compensate for this to come. It will probably be a while as i am busy with other things and will be out of town all this week.

You are suggesting that perhaps this is an issue with the controller PWM output being nonlinear? I didn’t think of that. This is something else i will test.

I think this is actually good news for most FIRST applications. Power is, of course, proportional to voltage squared and this curve looks to be approximately 1/x^2 so that way, PWM values are close to proportional to power.

I rather doubt that the controller is non-linear and, the more I think on it, it does not matter. This non-linearity does shed some light on some phenomena I saw working with autonomous mode last year. I’m thinking a lookup table to linearize the output may be in order this year.

Erm, so I’m confused. I was under the impression that the Vics have a PWM output instead of a variable voltage output. As such, you can’t really measure the output with a standard multimeter. This would be why Mike Betts was talking about checking it with a scope.

This has not bearing on if the RPM output is linear, however. I think I’ll do a Simulink model tonight and see how RPM varies with duty cycle, if I can get enough data on motors and the PWM output.

Exactly,
It’s general knowledge that the Victors pulse 12V to the motors to control their speed. Except at the extremes when the FET’s give the full 12V. It would be very difficult to measure this on a general purpose multimeter.

I am extremely skeptical of the voltages you are getting. A better test would be to see if the frequency is linear. I plan on checking that when I get back to the lab after the holidays.

Exactly,
It’s general knowledge that the Victors pulse 12V to the motors to control their speed. Except at the extremes when the FET’s give the full 12V. It would be very difficult to measure this on a general purpose multimeter.

I am extremely skeptical of the voltages you are getting. A better test would be to see if the frequency is linear. I plan on checking that when I get back to the lab after the holidays.

Wouldn’t these numbers make perfect sense in these instances? how at around 0 it went flat… and untill that point it was near the bottom, and when it was near full 12v it was at the top? It would be taking the pulse average?

And with it fluctuating, it would confuse the meter?

Ah, I didn’t think of that. That makes much more sense that the frequency chaging.
Either way, we have an HP scope in the lab that will tell us duty cycle. Thanks for the heads up.

At the extremes? Yes. The duty cycle would be 100% or closer and the meter would easilly be able to read the value. His data does indeed show that motor will get full voltage at the extremes.
However, the change from 0 volts to 12 volts is definitely not linear and more exponential. I think most of us have operated under the assumption that the change was linear.

EDIT: If anyone has taken an electronics course, Jim’s graph looks very similar to an RC circuit charging and discharging.

Actually, if the Victors will work down to five volts, you could feed the waveform back into a robot controller running suitable software to give you the information you want. This is pretty much what last years IR receiver software did.

The both the input and the output are PWM. I was asking about the input.

The output is a PWM whose duty cycle varies from 0 to 100% so it can be easily read with a multimeter.

The input is a RC compatible PWM. See (Servo Basics) for a good explanation. A multimeter will not necessarily give good results. That is why I suggested a scope.

Measuring voltage is not going to tell much. PWM varies the power to the motor not voltage. A motor under no load takes very little power to run at full speed. It would be interesting to see a plot of rpm vs current draw. I would expect to see much different curves with a motor under load. A better measure of the victors would be to put the motor under a constant load and measure the power ouput of the victors motor system as the robot controller steps through the pwm variable.

This would be true if a motor were strictly a resistor but it is not.
Power output of a motor at a given time is given by:
power = ((V-speed*kv)^2)/armature resistance
where speed is in rads/sec and Kv is the motor’s CEMF speed constant.
as you can see power output is not porportional to the square of voltage unless you assume your robot is always moving at a single speed.

First off PWM DOES vary equivilant voltage NOT POWER. Any EE or anyone with any knowledge on these forums will back me up on this. in order for the speed controllers to vary power they would either have to have some sort of closed feedback loop based on current and voltage or have some knowledge of the system they are controlling including either feedback from a speed or torque sensor and the necessary system constants.

Secondy a plot of RPM vs. Current draw would be meaningless to say the least. Current draw cannot be related to speed without integral calculus, the moment of intertia of the driven system, the current torque constant of the motor, the armature resistance of the motor, the CEMF speed constant of the motor, the input voltage to the motor, etc.

The output of the victor is a duty cycle modulated square wave but its’s frequency is high enough that for out purposes as well as modeling purposes it can be treated as if it were variable voltage DC. Since it is a square wave and it is of sufficiently hihg frequency its “RMS voltage” can be measured with accuracy without a “true RMS” meter.

If you want to model a PM DC brush motor, the relevant equation is as follows.

torque output=(Kt(Vin-speed*Kv))/r
where:
Kt is the torque voltage constant in newton-meters per amp
Kv is the speed CEMF constant in volts per radian per sec
r is the armature resistance in ohms
Vin is the input voltage in volts
if you plug this into our friend newton’s second law and solve for speed vs time for a particular voltage input, you will find that when there are no other forces in the system(ie motor is spinning freely), speed will be porportional to voltage input(after time for acceleration/decelleration is allowed).

Whoa Boys,
I stop looking at the boards for a few minutes and things go a little crazy on me. The PWM output (or input for that matter) is not able to be accurately read on most multimeters as Kevin specified above. The input circuitry for most meters, Fluke general line included, is designed to measure AC signals below 400Hz in most cases. The conversion electronics are designed to give reasonable RMS datum on nearly pure sine waves. With the Victor output being a PWM square wave at a much higher frequency than 400 Hz, very few meters will give any indication that would be linear. Two methods that would give you accurate data would be to measure the duty cycle with a scope or with a PWM to average convertor. The second may be easy to build. Check out the ARRL Radio Amatuers Handbook for full wave bridge power supplies. Build up the bridge and capacitor filter, (two components from Radio Shack, bridge rectifier and 100 microfarad capacitor) and add a little load resistance (say 470 ohms at 1/2 or 1 watt.) in parallel with the cap. Measure the voltage across the resistor for different PWM inputs and you should see what you are expecting to see in linearity. (Give the output a chance to settle a few seconds before making the measurement.) The bridge will also allow you to measure reverse currents as well since the bridge will automatically make the switch for you. Remember that this test is only looking for representative numbers, not absolute, dead nuts, accuracy. It is just easy to build and get valid, representative data.
Mike, the RMS value of a square wave of varying pulse duration can be calculated for each pulse by averaging the voltage over the pulse repetition, i.e. the duty cycle. If the duty cycle is 40% then a 12 volt pulse would average 4.8 volts, a 10% pulse would be 1.2 volts, etc.(average is the secret word here!) You can, of course, write an integral that describes the action or even use Fourier transforms for other than pure sine waves. Since RMS is theoretically intended to give the same “heating power” of an AC signal as the equivalent DC voltage would. (pure sine wave or not) True reading RMS voltmeters as Kevin suggested above actually make this measurement. The 0.707 * PEAK Voltage only holds true for pure sine waves and is the solution to the integral for a pure sine wave. Add a little distortion to the signal and you can throw your calculations out the window.

But isn’t speed proportional to voltage for a given load? (ie speed=V*someConstant). In that case, we have

power = ((V-Vkkv)^2)/armature resistance
and hence
power = ((V*(1-k*kv))^2)/armature resistance

Anyway, I think there is some very obvious and simple evidence that your data is wrong. I would guess that most of the community gathered data for RPM/torque/current curves were gathered using Victors to control voltage, and all these curves report the expected linear curve, and therefore, the Victor must be outputting a linear voltage.