Shop OBEX P1 Docs P2 Docs Learn Events
HB25 Motor Controller — Parallax Forums

HB25 Motor Controller

kenwtnkenwtn Posts: 250
edited 2008-04-28 14:48 in BASIC Stamp
After hooking up the controller I found I could only make it function by sending each command twice 20ms apart. Any ideas as to what is going on here?

' {$STAMP BS2}
' {$PBASIC 2.5}
HB25· PIN 0···'Motor Controller HB25
M_Stop· CON ·750·'Motor Full Stop
M_Fwrd· CON ·850·'Motor Half Speed Forward
M_Revs· CON·· 650·'Motor Half Speed Reverse
LOW HB25
PAUSE 5

GOSUB MotorStop
GOSUB MotorFwrd
Do
Loop
END

MotorStop:
· PULSOUT HB25,M_Stop
· PAUSE 20
· PULSOUT HB25,M_Stop
· PAUSE 20
RETURN
MotorFwrd:
· PULSOUT HB25,M_Fwrd
· PAUSE 20
· PULSOUT HB25,M_Fwrd
· PAUSE 20
RETURN
MotorRevs:
· PULSOUT HB25,M_Revs
· PAUSE 50
· PULSOUT HB25,M_Revs
· PAUSE 50
RETURN

Comments

  • FranklinFranklin Posts: 4,747
    edited 2008-04-28 01:41
    How do you have it wired and where are your jumpers? See if mode of operation on pages 2 and 3 of the manual apply.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • kenwtnkenwtn Posts: 250
    edited 2008-04-28 01:45
    I have 7.2Volts attached to + and - post. I have the motor attached to M1 and M2 post. I have servo cable connected to BRW and on the Board White connect to Pin0 and Black to VSS. I have tried it with and without jumper. Seems to only work when jumper is removed.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2008-04-28 13:48
    kenwtn--

    You should probably follow Parallax's HB-25 documentation upon startup. In other words, if it all possible bring the Stamp up first, then the HB-25. The code looks a lot like this . . .

    DO : LOOP UNTIL HB25 = 1···············
    LOW HB25
    PAUSE 5································

    So, you are only missing the first line.

    Good luck and have fun. The HB-25 is a great little machine.

    --Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    You are what you write.
  • kenwtnkenwtn Posts: 250
    edited 2008-04-28 14:48
    Thanks I will give that a try
Sign In or Register to comment.