Problems with both dual serial controllers

Dual serial motor controller kit AND micro serial motor controller:
Could someone please check my code. Basically what I am trying to do is turn two motors on full speed for a period. I am running the Tamiya Planetory gearbox. (2 3v motors.) I have tried both controllers. The motors run for a few seconds, then stop. Sometimes they stop but hum. I am using a basic stamp. Both controllers do get warm. I have also tried this with 12V motors.
’ {$STAMP BS2}
’ {$PBASIC 2.5}

MLFwd CON 5 'l forward’
MRFwd CON 7 'r forward’
MLRrv CON 4 'l reverse
MRRrv CON 6 'r reverse’
Sout CON 3 'serial line , pin 4 on Pololu motor controller
Reset CON 4 'reset line , pin 5 on Pololu motor controller
x VAR Word
’Reset_SMC:
HIGH SOut
DEBUG “reset”

GOSUB resetcontroller
’SEROUT Sout, 84, [$80,2,2] 'commented out.
Main:
DEBUG “accel"
FOR x= 1 TO 1000
GOSUB Forward
DEBUG DEC x,” - "
NEXT
DEBUG "end"
SEROUT SOut, 84, [$80, 0, MLFwd,0]
SEROUT SOut, 84, [$80, 0, MRFwd,0]
GOSUB resetcontroller
END

Accelerate:
SEROUT SOut, 84, [$80, 0, MLFwd,127]
SEROUT SOut, 84, [$80, 0, MRFwd,127]
PAUSE 20
RETURN

resetcontroller:
HIGH 14
LOW 15
PAUSE 1000
HIGH 15
PAUSE 1000
RETURN

I am using seperate power. 3.5 volts, or 5 volts. (tried both). I also have some 12v motors, with a seperate 6v supply, tested this, same. Believe it to be my code…

Hello,

Your “resetcontroller” code uses different I/O lines than the rest of your code. Also, your program calls the “Forward” subroutine that you do not show. At the end, you do send a stop command, so it’s possible that you are getting there and the motors are stopping because you tell them to.

You could also have electronics problems:

Overheating: the planetary gearbox motors can draw much more than the 1 A limit of the motor controllers. The micro motor controller will shut down if it overheats, but it should start running again in a few seconds once it cools off.

Noise: if you have electrical noise on your power lines, your motor controller and Stamp could be resetting. You can improve the situation by adding capacitors across the power lines. Also, how are you getting your 3.5 and 5 V sources? Both are not typical voltages you would get from batteries, so it sounds like you are going through a regulator. Will it support the current you need?

- Jan