>
>
> The motor is a 7.2V motor, which I am running off a 9.6v NiMH
battery pack. A
> 4V drop certainly suggests that this won't work, but what I'm not
> understanding is why the motors are flying at 127, but not moving at
126. I
> think I have a misconception as to how the output values from the OOPic
> translate into motor speed.
If you use the oDCMotor2 object the output pulse width varies. At low
speeds, the pulse width is narrow and at high speeds the pulse width
is wide. The total period (off time + on time) is related to the
frequency and, for PWM, that frequency is 19.5 kHz (call it 20 kHz).
So, the total period is about 50 uS and the pulse width can vary from
0 to 50 uS. Half speed would have a 25 uS wide pulse in a 50 uS window.
You can take the output pin, add a 220 ohm resistor in series with an
LED connected to GND and you will see the effect of larger numbers.
High numers = high brightness. Remember to connect the cathode of the
LED to GND.
Remove the motor from the output of the driver and substitue a
voltmeter. You should see the voltage vary up and down with the duty
cycle values. This is one place where an analog meter is nice: you
don't particularly care about the absolute value, you want to see than
change.
There is some relationship between motor voltage and motor speed.
You can also use that analog meter on the output pin to watch the
voltage change. It isn't really the voltage that changes, just the
duty cycle of the pulse. But, an analog meter will integrate the
pulses and display a voltage. A digital meter will work but you may
need to add a 220 ohm resistor and 1 ufd capacitor in series to
ground. Measure across the capacitor.
Forget the numbers! Measure the voltage at the motor terminals.
That's what the motor sees!
Don't forget to put capacitors between the motor leads and the motor
case and one across the motor leads (total 3). Use 0.1 ufd ceramic.
Make sure the motor case is connected to ground. Separately.
Richard
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/oopic/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/oopic/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
No comments:
Post a Comment