DC motor effecting all pin voltages

Hi everybody,

I'm currently undertaking a small robotics project for the sake of learning. I am making a small mobile robot using a 4WD kit advertised as arduino compatible as well as the arduino uno and arduino motor shield R3. I have bent the vin connect of the motor shield so the arduino uno and DC motors are powered separately. The problem is, when the motors are turning (either because they are powered or i am turning them by hand) they effect the voltages on all the digital pins on the board, as well as the analog pins when they are acting as digital pins, in the range of hundreds of millivolts. These small voltages are effecting the signal voltages of the ultrasonic sensors i am using. This is causing them to return altered measurements to my code, which in turn confuses my robot. Everything i have read online indicates that at the least digital pins 5, 6, and 10 as well as analog pins 2, 3, 4 and 5 should not be effected by the motor shield. I am not sure what is causing this behavior. Have i rigged the motor shield improperly in some way?

Kevin

Show use good pictures of the wiring.

White wires from dc motors to channels A and B on shield. Red and black wires to motor power. White wires connecting ultrasonic sensor. White wires in back currently not being used. While i have been attempting to fix the problem i've been powering the arduino through usb and the motors with a half amp 12 volt power supply. That's pretty much all there is to it.



Those long wires to the ultrasonic aren't such a great idea (aerials).

I have bent the vin connect of the motor shield so the arduino uno and DC motors are powered separately.

So how are you powering the Arduino?
I see nothing plugged into it's power connector.

Right now i'm powering the arduino through the usb port while i attempt to get to the bottom of this problem.

Try placing a .001uF decoupling capacitor right at the pins of the ultrasonic sensor.
EDIT: across 5V to 0V

Right now i’m powering the arduino through the usb port

I recall having similar problems when powering my circuit from the USB. Try plugging in your wall wart. It cleaned up a lot my problems.

But also heed the advice re the capacitors thou.

Pat.