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, ! 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