trouble connecting bs2 to motor driver and 1 motor
raulduke1011
Posts: 17
I am trying to hook up a Sabertooth 2x10 motor driver (www.dimensionengineering.com/Sabertooth2X10RC.htm) with one motor (www.lynxmotion.com/Product.aspx?productID=186&CategoryID=11) and my bs2sx on a development board. I am of course failing at this miserably or I wouldn't be bothering the kind people of this forum. I have attached a photo of my setup. The motor(+) is hooked up to M1B on the Sabertooth and motor(-) to M1A, the 7.2NiMH battery(+) to B+ and (-) to B-. The brown/red/yellow wires are running from Sabertooth S1 to VSS/VDD/pin12 on the board(despite the picture where I originally had them incorrectly on S2). Nothing happens except for the motor rotating at about 2 rotations/sec upon turning on and the code which I have tried below has no effect. If anyone can assist it would be of great assistance as I can't seem to find any helpful info on this.
' {$STAMP BS2sx}
' {$PBASIC 2.5}
SyRen PIN 12 ' I/O Pin 1 is connected to S1 on SyRen
throttle VAR Word ' throttle variable used later on in loop
PAUSE 500 'wait for everything else to start up
PULSOUT SyRen, 750 'stop
PAUSE 2000 'stay stopped for a second
'---speed and direction control
PULSOUT SyRen, 500 'full reverse: 1000us pulse width
PAUSE 1000 'stay at full reverse for a moment
PULSOUT SyRen, 625 'half throttle reverse: 1250us pulse width
PAUSE 1000
PULSOUT SyRen, 750 'complete stop: 1500us pulse width
PAUSE 1000
PULSOUT SyRen, 875 'half throttle forwards: 1750us pulse width
PAUSE 1000
PULSOUT SyRen, 1000 'full forward: 2000us pulse width
PAUSE 1000
' {$STAMP BS2sx}
' {$PBASIC 2.5}
SyRen PIN 12 ' I/O Pin 1 is connected to S1 on SyRen
throttle VAR Word ' throttle variable used later on in loop
PAUSE 500 'wait for everything else to start up
PULSOUT SyRen, 750 'stop
PAUSE 2000 'stay stopped for a second
'---speed and direction control
PULSOUT SyRen, 500 'full reverse: 1000us pulse width
PAUSE 1000 'stay at full reverse for a moment
PULSOUT SyRen, 625 'half throttle reverse: 1250us pulse width
PAUSE 1000
PULSOUT SyRen, 750 'complete stop: 1500us pulse width
PAUSE 1000
PULSOUT SyRen, 875 'half throttle forwards: 1750us pulse width
PAUSE 1000
PULSOUT SyRen, 1000 'full forward: 2000us pulse width
PAUSE 1000