I am using a DSMC with a basic stamp 2 to control a twin motor gear box. I have gotten through configuring and can control the direction of each motor separately but I am having some problems in my program, I think. When I send the motor controller a command to send one or both of the motors either forward or backward it starts the motors and at the right speed but after that first command it doesn’t seem to respond to any other commands.
So if I send both motors forward they go forward but I can’t get them to stop. Also once the motors are going the don’t stay at a costant speed. They kind of jerk to speed and then stop and jerk up to speed again. This same problem happens in for next loops too,like in the example program given. In this case though it seems to get stuck in the first loop and doesn’t respond to any thing else. It just seems like it gets to the first serout command and just keeps doing it without going on to the rest of the program.
I really need to know how to set up the program so that the motors go in the direction and speed I want them to and then stop went I want them to. I don’t really understand coasting and braking either.
I am running the motors off 6V (4AA’s) that also power my stamp, I have a board of education board.
I have also placed .1uF caps. across the motor leads. The amps seems to be fine as well at around .25A.
Any help would be great.


At 6V, the twin motor gearbox motors can draw quite a bit over 0.25 A, so you might check your measurements. The stall current is certainly well beyond 2 A, which is too much for the motor controller.

Also, your post does not make clear whether the motor controller does not reply to commands after the first few or if the Basic Stamp program stops running.

- Jan

I decided to check the most basic problem I could and changed my batteries. It solved everything. They had just enough power to run the stamp but when the motors started they couldn’t power both them and the stamp reset itself. I think that’s why it seemed like it was only running the first serout command. That would also explain the low amp reading. Thanks for the help and sorry for any inconvenience.
Dead batteries, go figure