Dual Serial Motor Controller and Toy Motors
I'm trying to build a small robot that will randomly crawl around on a desktop but use IR to sense the edges. I'm using a Pololu Dual Serial Motor controller, 9V battery to drive the BS2 and 2 1.5v-3V hobby motors.
I've been having some trouble getting the motor controller to drive these hobby motors. Everything is fine if I swap out the 1.5V-3V motors for 6V motors. I'm not sure why I'm having trouble.
Here's some code snippet:
' {$STAMP BS2}
' {$PBASIC 2.5}
speed VAR BYTE
HIGH 4
LOW 5
HIGH 5
PAUSE 100
DEBUG "1st loop",CLS,CR
PAUSE 20
FOR speed = 0 TO 15
SEROUT 4,84,[noparse][[/noparse]$80,0,0,speed]
PAUSE 20
NEXT
DEBUG "2nd loop",CR
FOR speed = 15 TO 0
SEROUT 4,84,[noparse][[/noparse]$80,0,0,speed]
PAUSE 20
NEXT
DEBUG "3rd loop",CR
FOR speed = 0 TO 15
SEROUT 4,84,[noparse][[/noparse]$80,0,1,speed]
PAUSE 20
NEXT
DEBUG "4th loop",CR
FOR speed = 15 TO 0
SEROUT 4,84,[noparse][[/noparse]$80,0,1,speed]
PAUSE 20
NEXT
Again, I get no movement with the hobby motors (like I do if I use 6V motors).
Any ideas for improvement/configurations welcome.
Signed,
Stumped.
I've been having some trouble getting the motor controller to drive these hobby motors. Everything is fine if I swap out the 1.5V-3V motors for 6V motors. I'm not sure why I'm having trouble.
Here's some code snippet:
' {$STAMP BS2}
' {$PBASIC 2.5}
speed VAR BYTE
HIGH 4
LOW 5
HIGH 5
PAUSE 100
DEBUG "1st loop",CLS,CR
PAUSE 20
FOR speed = 0 TO 15
SEROUT 4,84,[noparse][[/noparse]$80,0,0,speed]
PAUSE 20
NEXT
DEBUG "2nd loop",CR
FOR speed = 15 TO 0
SEROUT 4,84,[noparse][[/noparse]$80,0,0,speed]
PAUSE 20
NEXT
DEBUG "3rd loop",CR
FOR speed = 0 TO 15
SEROUT 4,84,[noparse][[/noparse]$80,0,1,speed]
PAUSE 20
NEXT
DEBUG "4th loop",CR
FOR speed = 15 TO 0
SEROUT 4,84,[noparse][[/noparse]$80,0,1,speed]
PAUSE 20
NEXT
Again, I get no movement with the hobby motors (like I do if I use 6V motors).
Any ideas for improvement/configurations welcome.
Signed,
Stumped.
Comments
A schematic of how you have hooked up the motor controller to the motors, and the power supply, would be real helpful.
Regards,
Bruce Bates
Post Edited (Bruce Bates) : 1/2/2007 9:46:34 AM GMT
If that is the problem, your larger 6volt motors might have worked simply because they were not under load.
But theoretically, 9V *should* be enough to power the Stamp and the two 1.5V motors - right?
Either a fresh battery, or a separate power supply for the Stamp (with a common ground between it and the Pololu) may remedy the problem.
PAR