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.

Monday, November 26, 2007

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

The oDCMotor2 uses the oPWMH to create the pulses and the oPWMH object
defaults to 19.6 kHz. This is because the PWM.period is set to 254 or
(20 MHz / 4 / 254 = 19,685) and the .prescale is set to 0.

Unless you look specifically at the old oPWM object, the new
documentation doesn't tell you that you can control the prescale and
period properties.

PreScale = 0 -> 5 MHz base frequency
PreScale = 1 -> 5 MHz / 4 base frequency
PreScale = 2 -> 5 MHz / 16 base frequency

Period = 1..255 -> PWM frequency = base frequency / period

This works with V6:

Dim m as oPWM 'NOT oPWMH

sub main()

m.PreScale = 2 ' divide by 16
m.Period = 255 ' divide by 255 (256?)
m.DutyCycle = 127 ' 50% duty cycle
m.IOLine = 18 ' or IOLine = 17
m.Operate = 1 ' fire it up

end sub

End result is a 50% duty cycle at about 1 kHz.
Does the H-Bridge still work with the original motor?

Post a link to the new H-Bridge so we can look at it before you buy.

I think you will be better off to dump the oDCMotor2 object (and/or
the oPWMH object) and just use the oPWM object. This will allow you
to get a low frequency and the driver may work better. Of course,
you will have to control the two signal lines separately to get
forward/reverse/brake. Unfortunately, it will be audible as the motor
runs at very low speed.

I don't know why the .prescale and .period properties were dropped
from oDCMotor2 and oPWMH but it can certainly cause a problem.

Richard


--- In oopic@yahoogroups.com, Shaggy <charrington@...> wrote:
>
>
> Off the top of my head, I don't know. However, I would expect that
would not
> be an issue since the LCHB is sold by RogueRobotics to go with their
OOPic
> board. I would not expect them to be including the LCHB if it won't work
> with the board they are using. I believe it was working as expected
when I
> had it attached to the ATS motors, which are smaller than the Robotics
> Connection motors I am currently using.
>
> I'm leaning towards too much power draw. I'll try to look at that this
> evening. The motors can certainly draw too much power for the LCHB,
so it is
> looking like I will have to replace that, regardless of whether that
is my
> specific problem. After all, the 754410 is getting a bit warm, even
with a
> heat sink, when I run the motors for 10s.
>
> Therefore, if anybody has a recommendation, I'll take a look at it.
> Otherwise I might just go with the H-Bridge sold by the same company
that
> sold me the chassis and motors. I'm pretty sure that one will take
enough
> power, though I will still have to look it over some.



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: