Having a really interesting problem that I've managed to get around very badly.
We have a fairly simple setup: a hall-effect sensor is acting like an encoder, which is attached to an interrupt on a 32 bit PIC uC (It's one of those PIC32 based Arduino Mega lookalike boards, the Digilent Chipkit max32). The rest of the circuit is set up exactly like the "connection diagram" part of this website: http://www.dfrobot.com/wiki/index.php?title=MD1.3_2A_Dual_Motor_Controller_(SKU:_DRI0002),
with more or less all of the same components.
For some reason, sometimes, the interrupts will trigger the uC board to start rapidly oscillating voltage from on to off (Note: probably NOT "high to low". I'll explain more below). This caused a massive set of rising edges, and my interrupts would trigger thousands of times per second, essentially saying that the motors had turned around 30 times and destroying the effectiveness of my PD controller.
Now, the reason I said on to off, and not high to low, is because once we put a pull-up resistor on the interrupts, the strange noise spikes never went away (although they are much harder to trigger now), but the interrupts stopped triggering when the noise was there. I suspect that the board power is rapidly switching between on and off, so the circuit opens, and the pull-up keeps the interrupt pin at the HIGH level. When the pullup wasn't there, the interrupt was floating, and we got the weird behaviour.
Since this circuit is so simple, I don't understand how these noise spikes can happen. Also interesting is, once the noise spikes occur, I just need to send the robot another command and they go away. Probably resetting the uC, I don't know, but it doesn't take very long for that to happen.
Any thoughts? There are no moving parts in the board, so it's not like we're physically breaking connections. I've tried on multiple interrupts with multiple robots and things still spike. When I am NOT using interrupts (ie: I'm just dumping PWM into a motor) nothing happens, no noise spikes or anything.
My solution (the pullups) is a bit of a hack: sure, we're supposed to pull up the inputs, so now I can at least USE the robot, but it's still not fixed since the noise spikes are still present.