Shop OBEX P1 Docs P2 Docs Learn Events
Pololu Micro Dual Serial Motor Controller not working — Parallax Forums

Pololu Micro Dual Serial Motor Controller not working

Chuck ThomasChuck Thomas Posts: 39
edited 2007-11-06 23:57 in BASIC Stamp
Hello, I just got the Parallax Pololu Micro Dual Serial Motor Controller. I have wired according to the datasheet. I am trying the following code:

Stamp Pin 14 goes to the· Pin 4 of the controller (serial control input)
Pin 15 goes to the reset on the controller.
Stamp Vdd is connected to Pin 3 of the controller.

I have the Stamp powered by a transformer. The motors are powered by a varibale power supply set for 7 volts at 1 amp.
I have the power supply ground tied to Vss on the Stamp.

' {$STAMP BS2}
' {$PBASIC 2.5}


DEBUG "Number rest", CR
speed VAR Byte
HIGH 14
LOW 15 'reset motor controller
HIGH 15

PAUSE 100

·DEBUG "motor #1 fwd", CR
·PAUSE 100
·FOR speed = 30 TO 127
·SEROUT 14,84,[noparse][[/noparse]$80, 0, 0,speed]
·PAUSE 20
NEXT

DEBUG "motor #1 rev", CR
PAUSE 100
FOR speed = 127 TO 0
·SEROUT 14,84,[noparse][[/noparse]$80, 0, 1,speed]
·PAUSE 20
NEXT

DEBUG "motor #2 fwd", CR
PAUSE 100
FOR speed = 30 TO 127
·SEROUT 14,84,[noparse][[/noparse]$80, 0, 2,speed]
·PAUSE 20
NEXT

DEBUG "motor #2 rev", CR
PAUSE 100
FOR speed = 127 TO 0
·SEROUT 14,84,[noparse][[/noparse]$80, 0, 3,speed]
·PAUSE 20
NEXT

I can't get the thing to turn on the motors... help please?

The two motors are corrected to the motor controller.

Comments

  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-11-02 12:44
    I think your baud rate may be wrong... I have never had a problem with these great units... can you try this code and see if it works? The program assumes the following connections between the DSMC and the Stamp... Label 1 on the DSMC should go to I/O Pin 3 on your stamp, and Label 2 on the DSMC should go to I/O Pin 4.

    Also, check your battery supplies... for both the Stamp and for the Dual Serial Motor Controller... I assume you are using two seperate power supplies?

    '{$STAMP BS2}
    SPEED VAR Byte
    RESET_DSMC CON 3
    Counter VAR Word

    DEBUG CLS
    DEBUG "Reset Controller", CR

    ' Set Default Configuration for DSMC
    SEROUT 4,32,[noparse][[/noparse]$80,2,2]
    PAUSE 10

    ' Reset DSMC
    LOW RESET_DSMC
    PAUSE 10
    HIGH RESET_DSMC
    PAUSE 100

    'Start of tests

    DEBUG "Ramp Up Both Motors Forward", CR
    FOR SPEED = 0 TO 127 STEP 5
    SEROUT 4,32,[noparse][[/noparse]$80,0,0,SPEED]
    SEROUT 4,32,[noparse][[/noparse]$80,0,2,SPEED]
    PAUSE 50
    NEXT

    DEBUG "Ramp Down Both Motors Forward", CR
    FOR SPEED = 127 TO 0 STEP 5
    SEROUT 4,32,[noparse][[/noparse]$80,0,0,SPEED]
    SEROUT 4,32,[noparse][[/noparse]$80,0,2,SPEED]
    PAUSE 50
    NEXT

    PAUSE 1000

    DEBUG "Ramp Up Both Motors Reverse", CR
    FOR SPEED = 0 TO 127 STEP 5
    ·· SEROUT 4,32,[noparse][[/noparse]$80,0,1,SPEED]
    ·· SEROUT 4,32,[noparse][[/noparse]$80,0,3,SPEED]
    PAUSE 50
    NEXT

    DEBUG "Ramp Down Both Motors Reverse", CR
    FOR SPEED = 127 TO 0 STEP 5
    ·· SEROUT 4,32,[noparse][[/noparse]$80,0,1,SPEED]
    ·· SEROUT 4,32,[noparse][[/noparse]$80,0,3,SPEED]
    PAUSE 50
    NEXT

    END
  • Chuck ThomasChuck Thomas Posts: 39
    edited 2007-11-06 22:18
    Steve,

    Tried your program. No joy. I may purchase another controller and see if I got a defective one.

    Chuck
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-11-06 23:57
    Did you buy the kit version? Are you sure you installed the chips the correct way? Are you sure you installed the capacitors the correct way, Are you sure you installed the voltage regulator the correct way? Do you have any solder bridges? If you purchase another one, and it works, you can swap the parts one by one until you isolate the deffective part. If it is indeed defective, Pololu will certainly stand by their product and refund your payment for the defective unit.
Sign In or Register to comment.