Problems controlling motors with SMC

Using the Pololu Low-Voltage Dual Serial Motor Controller, BasicStamp (BS2), and the Tamiya 70097 Twin-Motor Gearbox Kit, I am having buggy problems.

The example code in the user guide works fine. But, I cannot set a high speed with a command like:
SEROUT 9,84,[$80,0,4,100]. The SMC LED will flicker and the motor will move then stay off.

I also cannot run two motors at the same time with commands like:
SEROUT 9,84,[$80,0,4,20]
SEROUT 9,84,[$80,0,6,20]

The result is similar where neither motor will run.

Using the following command which works:
SEROUT 9,84,[$80,0,0,15]
I can use an oscilloscope, to look and the SMC pins. I see a very noisy logic supply when the motor is running.

I have the recommended capacitor on the motors across the terminals. I am using 26 AWG wire from the SMC to the motors. Each pair is twisted and about 7 inches long.

Any thoughts as what I need to do to get clean, consistent results?


The motors are really noisy, so I recommend putting all three capacitors across each motor (or better yet, use replacement motors). Your noisy power supply is most likely the problem, and it’s great that you have an oscilloscope with which you can see the noise since you’ll be able to see what helps. You haven’t said at all what your power setup is, posting that would help us help you. I’d start with adding caps to the logic supply.

- Jan

Well - I came across some other posts that cover this problem and I was able to apply some of the recommendations. I shortened the motor wires, reroutes them away from the signal lines and the kicker was changing the motor supply to the battery input instead of sharing it with the logic supply.

All seems to be working although I haven’t tested it completely.