Shop OBEX P1 Docs P2 Docs Learn Events
Help with the Micro Dual Serial Motor Controller? — Parallax Forums

Help with the Micro Dual Serial Motor Controller?

vanmunchvanmunch Posts: 568
edited 2010-01-22 05:00 in Robotics
Hello,

I've been having some trouble with getting the Micro Dual Serial Motor Controller to work. I'm using the example code that comes with the controller for the BS2 along with a couple of Debug commands just to make sure that the program is executing (see below, the debug commands indicate that the program is running). I've also made sure that the motor works by directly connecting the leads to the BS2 Vin and Vss. I've attached some pictures of the wiring just to make sure everything in connected correctly. (I've also made sure that there aren't any shorts, especially with the motor leads) Any help would be great!

The pins on the controller are:

Pin 1 to Vin
Pin 2 to Vss
Pin 3 to Vdd
Pin 4 to P14
Pin 5 to P15
pin 6 to motor
pin 7 to motor

The code is:

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

speed VAR Byte

DEBUG "running" ,CR
PAUSE 500
DEBUG "go!"
HIGH 14
LOW 15
HIGH 15

PAUSE 100

FOR speed = 0 TO 127
SEROUT 14, 84, [noparse][[/noparse]$80, 0, 0, speed]
PAUSE 20
NEXT
DEBUG "one done"

FOR speed = 127 TO 0
SEROUT 14, 84, [noparse][[/noparse]$80, 0, 0, speed]
PAUSE 20
NEXT

FOR speed = 0 TO 127
SEROUT 14, 84, [noparse][[/noparse]$80, 0, 1, speed]
PAUSE 20
NEXT

FOR speed = 127 TO 0
SEROUT 14, 84, [noparse][[/noparse]$80, 0, 1, speed]
PAUSE 20
NEXT

DEBUG "done"
2955 x 2216 - 1M
3283 x 2462 - 1M

Comments

  • ercoerco Posts: 20,256
    edited 2010-01-22 01:15
    Did you configure the motor controller before using it? Are you using the right motor numbers? Defaults are 2 & 3.

    Read every page of the manual: http://www.pololu.com/file/download/smc02b_guide.pdf?file_id=0J36



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
    960 x 685 - 143K
  • vanmunchvanmunch Posts: 568
    edited 2010-01-22 05:00
    Hey erco,

    Thanks for then Hint. I changed the code and it works! Of course, my wife is completely surprised that it would have been something as simple as reading all of the manual. The manual, always a good place to hide something. [noparse]:)[/noparse]
Sign In or Register to comment.