Well it was a close run thing in the end. I added the flyback diodes but it made absolutely no difference. They’re a useful thing to have anyway so I’m glad that’s covered now. I also got rid of some dodgy connections (the serial lines to one of the BabyO boards just fell off and some of the motors had fairly ropey looking extension wires soldered on to their main wiring). None of that made any difference either.
Here are the diodes on a bit of proto-board that fits inside the robot:
After doing this, the symptoms were exactly the same – the Arduino locked up as the motor speed increased. I put the oscilloscope on the I2C bus and saw a few oddities where the data voltage shot below GND. The single-wire serial connections looked fine – they just stopped when the Arduino stopped responding.
Extra ground connections made no difference – everything is already grounded as it should be, I just wanted to add some redundancy in case of bad connections (which I don’t think I have).
Finally, since I’ve had problems with the proto-board picking up noise I disconnected the blinkM clone board (it provides the RGB LED) and tried again…
So the problem was with the tiny85 I2C slave (or the board it’s on, or, er, whatever). Disconnecting that fixed things. I replaced the Uno with the Gertduino and tested again. It still works so I’ll go with this configuration.
And from the top:
I must admit I nearly gave up just before I took off the blinkM clone. That really was the last roll of the dice!
Not going to do anything else on it today – have a few other things I’d like to look at. Next step will be cleaning up the arduino and python code to remove all the stuff that I’m not using anymore. Tomorrow…