Pololu Micro Dual Serial Motor Controller not working
Chuck Thomas
Posts: 39
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.
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
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
Tried your program. No joy. I may purchase another controller and see if I got a defective one.
Chuck