…for screwing up 🙂
Ok, been struggling with this for a couple of days in a WTF! kind of way.
Have bunged in lots of capacitors. Nope. Don’t work.
Changed the main ATmega328 this morning.
Nope. Don’t make no difference 🙁
Right, job be jobbed, I think. I can now run the motors at any speed without it crashing. Has to be a result. I do wish I understood this better but I’m having this as a “fact” for now – maybe the previous 2 “revisions” of this project would have worked if I tried this before. Dunno. Don’t really like “dunno” since it isn’t an answer.
So, we add 0.1uF caps across the motor leads
Seemed to help, but everything still crapping out frequently when the motor speed got up to nothing like “11”
I learned that you get a better effect by adding “moar caps” from motor leads to metal thingies
Nope. It was better but not much better 🙁
On the verge of giving up, I recalled some stuff I read about resistors on the I2C bus. Not sure I understand what I seem to remember but I had a play – starting point was 4K7. Tried 3K5 and it was much more stable. Have since tried 2K2 and it just, er, works 🙂
So, my problems have been (I surmise) due to noise on the I2C bus – I hope all the caps I’ve thrown at this in the hope that something “sticks” have helped. Don’t really care. It works! W00t!
Need to de-solder the 4K7 resistors and replace them with the 2K2 ones. Shouldn’t be too hard. “De-solder” may involve a bit of brutality with some wire snippers 🙂