Problem with Micro Motor Controller

I’m trying to make a Micro Dual Serial Motor Controller
work with a Basic Stamp II.

At this point, I’m just trying to get the simple demo
from the User’s Guide to work.

It’s working, after I download the program from the
Basic Stamp editor. But when I power off and then on,
again, nothing happens. Well, debug messages show up, demonstrating
that the program is running. But the motor never runs.

Best I can figure is that the stamp isn’t resetting.

I noticed on one of the project pages that the serial line should be brought high
before the reset line is brought low, but that doesn’t seem to fix it.

Hello,

Some users sometimes forget to connect the logic and motor supply grounds. Are you sure you are using an adequate supply for your motors and that its ground is connected?

Also, you might try a lower baud rate, such as 9600 (SEROUT parameter 84 for a BS2).

- Jan

Grounds and VINs are correct - and work correctly when the program is downloaded from the Stamp Editor.
When I ran the sample program at the 19200 baud it specified, the motor speed drop at certain speed settings, but that went away at lower baud rates.

I’ve found that if I put in a 100 ms pause, before I toggle the reset line, everything seems to work fine.
Could it be that the controller gets confused, if it sees input before it’s finished its power-on process?

I am experiencing similar troubles with the microcontroller. I used a baud rate of 9600, different power supplies, and have double checked the wiring. The sample code is running, but my motors are idle.

Any ideas?

What I did was to make sure there was a delay between powerup and doing anything to the controller chip.

I do some other stuff, unrelated to the Pololu chip, then I wait for 100ms.

Then I set the serial and reset lines to output.

Then I bring the serial line high, toggle the reset line, and carry on.

I’m hypothesizing that the chip takes some time to stabilize on powerup, and that any activity on its input lines confuses it in some way.

It was interesting reading the comments here about initialization. I seem to have gotten past that point without a problem, but have been experiencing some other odd symptoms.

I’m using a Motorola HC908 to drive the dual motor controller. One output line goes to the reset line, another is used as a serial output. The serial output routines are interrupt driven off the PIT timer and I’m 100% sure they work okay.

After running the motors for a while, usually about a minute, they both stop. Reading the voltage on the reset line indicates about 1.7 volts. If I break the connection between the reset and the microcontroller, the microcontroller is definitely pulling the line to +5. It appears something is confusing the dual motor controller, and it pulls its own reset line to ground.

The motors are the stock ones with the Tamiya 70097 gearset. Each has a 0.05 uf disc cap at the motor, and another right by the dual motor controller. The power to the robot has a 10uf electrolytic cap between +5 and ground.

When the motors fail, it’s almost always when I am NOT sending any commands to the controller. From what I can observe, the dual motor controller gets into a weird state.

Has anyone else seen this?

Bob

Okay, I just wiped out the second motor controller when it enters into this crazy state. Jan, I tried your suggestion of pulling the reset line high through a 1K resistor… the motor controller fries itself once it goes into the state where it attempts to pull the reset line low.

With all the scopes and logic analyzers connected, I can’t see any power supply problems and the serial commands are definitely correct. The controller enters into a state where it tries to drive the reset line low, which will eventually destroy it.

The Pololu products are cute, but not robust. It’s time to get some serious controllers which can handle the job.

Hello,

I am sorry to hear about your experience with our motor controller. However, as nobody else has ever reported such problems, it might be possible that there is something wrong with your setup or with those particular motor controllers.

When you say that the motor controller “fries itself”, what happened? Which of the two ICs on the module broke? In your first post, you said your controller entered the bad state when you were not sending any serial data. Is that the case with the 1k pullup on reset? Is the sequence of events then: power up, send some commands, motors run for a bit, reset goes low on its own, and motor controller breaks?

- Jan

Okay, I’m calm now, and will try to describe what happens a bit more rationally.

The basic symptom is that I send a command to turn on both motors with a reduced speed (0x60). I can then (via a keypad) tell the motor to stop, go the opposite direction, etc. The software prevents someone from suddenly changing directions, so it’s not a matter of changing directions while the motors are running.

After a “short time”, usually about 20 - 30 seconds, both motors suddenly stop turning. The reset line (from an I/O port on the HC908 microcontroller) is suddenly at 1.5 volts. If I disconnect the reset line from the I/O port, I see +5 on the I/O port and ground on the reset. I’ve watched the motors suddenly stop spinning even though I wasn’t sending any commands at the time.

I spoke to you a few weeks ago and one of your suggestions was to use a 1K pullup to +5 on the reset line, so I tried that. When the motors stopped spinning, the voltage on the reset line dropped a bit. After powering down and restarting the whole robot (ie, powering down/up both the motor supply, 4.5 volts, and the logic supply, 5 volts), the controller never responded to any more commands.

So, basically, yes, the scenario you described is what happens. Assuming the motors are producing a ton of high-frequency noise, I’ve tried everything from 0.1 uf to as small as .01uf across the motor leads. Nothing seems to prevent the problem.

The microcontroller and its associated power supply are on the bench, and connect to the robot via a 4’ ribbon cable. At the motor controller, I have a 10uf electrolytic and 0.5uf disc cap to see if that solves the problem.

Adding all the capacitance has helped, and the motors run a lot longer than they originally did.

BTW, I will be buying more controllers, since my 6 year old is anxious to see the robot work again, :slight_smile: ! If I was destroying 50 cent transistors, this wouldn’t bother me, but a $23 part is annoying after a while.

I can’t tell what actually blows. No smoke comes out. All I know is that the motors don’t turn. This might be an idea for a future enhancement… some sort of heartbeat signal on the board that could be monitored with a scope; if it’s ticking, then the processor is alive. No need to bring it out to a pin.

Any thought to the idea that I should be using smaller caps, possibly 0.1 uf, and soldering one to one motor lead, the other to the motor case, and doing the same for the other motor lead? This seems to be common with guys who have battery-powered model airplanes.

Thanks for your help
Bob

Hello,

I’m not sure from your description if you still have a connection from the reset line to your motor controller. Did you ever try using the motor controller without connecting the reset line (just pulling it up)? If you continue having similar problems, it might also help to put a capacitor between the reset line and ground to help filter out any glitches.

The 4-foot ribbon cable does not sound that good. Are you doing anything to shield the signal lines (for example, grounding every other wire in the ribbon cable)?

If there was no spectacular failure (or even any heat on either chip), it is possible that the motor controller IDs got changed inadvertently. Are you testing with the universal motor numbers of 0 and 1?

Please keep in mind that the motor controllers are static-sensitive; if you do happen to zap one, it could lead to problems like the reset line not working properly.

You can also send back your motor controllers for us to test or repair. We offer replacement units at $13.80 plus shipping if you send back the broken controllers.

- Jan

Hi

I’m new here and I just started to use the micro dual motor serial controller with an OOPIC-R.

Everything worked fine with a 3V motor supply. I tried a 4,5V motor supply and now the two motors stop after 2 seconds. When they stop the motor controller isn’t hot. I put some resets in my loop and now it work, but I need to reset the motor controller several times per second…

When the backup routine starts (in reaction to the whiskers) the motor go full reverse and the motor controller becomes REALLY hot but work fine.

So if the overheating is not the cause of my initial problem, what is it?
(sorry for my bad english)

thanks

Hello,

Cheap DC motors can be very (electrically) noisy, meaning that they put unwanted voltage fluctuations on your system. This problem is exacerbated by higher motor voltages, which might explain your problem. The bigger fluctuations at higher voltages might be interfering with the serial communication between your OOPIC and the motor controller. If the serial data gets corrupted, the motor controller can no longer understand the commands you are sending it. Frequent resets might be helping to bring the motor controller back to a known state, allowing it to function for a few more commands.

If your motor controller is getting hot in reverse, it indicates that you might be running the controller close to its limit. Because the electrical noise described above is affected by the mechanical interactions between the motor’s commutator and brushes, the noise level is not necessarily the same in forward and reverse.

Because of the heating issue, it might be good to lower the motor voltage. You can also clean up your signals by putting a 0.1 uF capacitor right across the motor leads and multiple capacitors across your power lines (motor power and logic power). The power capacitors can be 0.1 uF caps in parallel with bigger capacitances (the bigger the better).

- Candice