Hi,
I'm doing a project controlling multiple motors with some push buttons. I have my program setup so when the button is held down, the motor angle increments by 1 degree every 5mS. Now, this is also being sent to my serial monitor so I can view if it's working correctly.
This is a new issue now, for some reason, when the motor is actually plugged in, sometimes the signal stutters. For ex. I hold the push button down, it writes to the servo (increments the angle) about 5 times, and stops for a second or two before doing the same thing again. The signal is not being sent to the motor continuously. The weird thing is, sometimes it works fine and it actually used to work 100% fine. The next thing is, if I unplug the motor, the arduino sends the signal perfectly (as viewed in my serial monitor) with no stutter at all. The only time the signal gets sent to the motor in a choppy fashion is when the motor is actually plugged in.
Edit: Okay, I figured out how to fix it, but it doesn't make much sense.
The first time it started happening I had only the USB powering the Arduino. I also plugged in the 5V jack and it started working fine.
This time, I have both the USB and 5V jack plugged in and it's choppy. I unplug the 5V jack and try to power the arduino straight through the USB, same problem occurs. I plug in the 5V jack and unplug the USB, the motor responds just fine.
There's some kind of quirky issue going on here. Anybody else ever experience this?