Dual motor controller problems


Hi have a Pololu dual motor controller that I’m trying to use to control a Tamiya 70097 twin motor gearbox.

I’ve built two circuits - a test circuit and the robot for which the motors and controller are eventually destined.

The problem is that I’m getting very erratic results. The test circuit has a pic16f818 clocked at 4Mhz powered by a 6V DC mains supply. The code is written in picbasic, and is a variation of the code in the back of the controller manual. Intially it worked fine - that’s to say the motors powered up and seemed happy running indefinitely. But now I get very inconsistent results. Generally if I plug in the power supply the motors will kick for a fraction of a second before stopping. (I know the circuit is still operating correctly because I have an LED pulsing as the code cylces.) If I continue to switch the circuit on and off sometimes the motors will run a little longer each time, and eventually operate indefinitely speeding up and down as intended!

The circuit for the robot controller is a little different: A pic16f876a clocked at 20mhz. Two sets of 4 AAs (producing ~6V each) power the system - one set of 4 goes through a low dropout 5V regulator (with suitable capacitors) and powers the PIC, and the other pack of 4 goes unregulated to the motor controller. The grounds of the two packs are connected together. I get similar results with this set up. At the moment it’s programmed to run the motors at half speed for 3 seconds to verify everything’s working ok. In fact when switched on most of the time the motors just kick before stopping, but a couple of times they’ve run for the full 3 seconds at programmed.

If I consistently just got the motors kicking I’d presume I was drawing too much power, but the fact that sometimes it works absolutely fine is really throwing me. At this stage I’m wondering if my motor controller has a fault.

A couple of other pieces of information that may be relevant: The controller was purchased pre-assembled. It only seems to get warm to the touch after a period of successful operation. I’ve tried powering the test circuit off 4.5V with the same (inconsistent) results. The motor gearbox is configured to a ratio of 203:1, and is well subricated.

Any suggestions? I’m totally perplexed!

Thanks very much for any help - it’s really appreciated.



The Tamiya gearbox motors can draw much more than the motor controller limit, so we recommend the low-voltage motor controller for those motors.

That said, your results indicate a noise problem. If you have access to an oscilloscope, it would be good to see what your logic power and reset lines are doing. The motors generate a lot of noise, and we have seen many-volt spikes on some of our customers’ logic lines. It sounds like your program keeps running, so it’s more likely that the motor controller is resetting. Try putting a 0.1 uF capacitor from the reset line to ground so that a very fast spike on that line doesn’t reset the motor controller.

- Jan

Thanks for the reply.

I’ve tried putting a 0.1uf capacitor accross the ground and reset. Unfortunately I’m getting exactly the same behaviour, i.e. when repeatedly connecting and disconnecting power most of the time the motor just kicks for a second, but sometimes will run as per the code, cycling both motors full reverse and forward indefinitely.

And unfortunately I don’t have an oscilliscope…

It seems to me it can’t just be a matter of the motors drawing too much current, or they would consistently not work. Presuming you’re right about noise being the problem, is there anything more I can do to reduce the noise from the motors?

Thanks again for your help!


I forgot to ask–do you have 0.1 uF caps across your motor leads?

- Jan

I have a 0.1uF capacitor between the two terminals of the motor, that’s all. Is this what you mean? I read somewhere else that this could reduce noise.

And of course I have the 0.1uF cap on the motor controller as suggested by you.

Thanks again.

Can you write a program that will send a motor on command every few seconds? I want to make sure it’s the motor controller that is resetting; if it is, you should see it run until it resets, then start running again at the next command. Once you have that, try disconnecting the reset line from your PIC (just pull it high through a 1k-10k resistor) and see what happens.

- Jan