This Forum is Dedicated For all The Object Oriented PIC Lovers .......... The concept behind OOPic is straight forward. Use preprogrammed multitasking Objects from a library of highly optimized Objects to do all the work of interacting with the hardware. Then write small scripts in Basic, C, or Java syntax styles to control the Objects. During operation, the Objects run continuously and simultaneously in the background while the scripts run in the foreground telling the objects what to do.

Sunday, November 25, 2007

Re: [oopic] H-Bridge issue...maybe.

Ok, this morning I set up the bot so that I could measure the voltage to the
motors. When I set the motor speed at 127, the voltage across the motor pins
was 8.7, which is pretty reasonable. When I changed the motor speed to 120,
the voltage across the pins was just below 1. It held steady around 0.6V.
That's certainly a bit low for those motors.

The second time I tested this, I got the same voltage at 127, the same at
120, about 0.4V at 100, then I tried 126. The voltage first showed about 2V,
at which the wheels bumped forward some, but the voltage dropped rapidly
down to 0.8V.

That's not a very smooth curve. Can you point me towards a solution?

rtstofer wrote:
>
> --- In oopic@yahoogroups.com, Shaggy <charrington@...> wrote:
>>
>>
>> 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
>
>
>
>

--
View this message in context: http://www.nabble.com/H-Bridge-issue...maybe.-tf4867316.html#a13936854
Sent from the OOPic mailing list archive at Nabble.com.


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:

http://docs.yahoo.com/info/terms/

No comments: