Servos and DC Motor

Hi all,

I'm doing a project where I need to use both servos and DC motors.

I have the DC motors wired like in this tutorial How to Spin a DC Motor with the Arduino - dummies
exept that I use an external power supply instead of the USB power over the arduino, because I of the 400mA Limit that is on the USB power. In total, I will most probably exceed 400mA by just having one servo and one DC Motor, anyway.

The servo is connected to the power supply and a Output pin on the Arduino. The two grounds (Arduino and external power) are connected together to make a common ground.

On the Arduino, I am running the Standard Firmata sketch, and controlling it via Unity (Uniduido). This enables me of setting Pins to Servo (it uses the Servo library), digital In or Out, and analog In or Out (PWM).

Now, my problem is that when I run the DC Motor, the Servos start moving. I guess this is due to noise created by the Motor, but I do not now enough about this to know for sure. Would I want to separate the DC Motor circuit from the Servo circuit (having a separate power supply for each), or would I want to add a decoupling capacitor somewhere in my circuit? (which I don't know a whole lot about either). I've tried to ask all-knowing Google for help, but I guess I don't have enough knowledge about circuit separation and noise reduction to apply what I have found.

Would this be the way to go: Pololu - 9. Dealing with Motor Noise ?

I hope I've given enough info, thanks in advance for any help!

Just give up on powering motors or servos from USB power completely - its a recipe for
a damaged computer or laptop.

Also don't attempt to power motors from the same supply as logic chips, its usually trouble,
just have separate supplies and only run control and ground signals between the motor
driver and the Arduino. A separate rechargable 6V battery pack perhaps.

Hi MarT,

thanks for your reply. That's basically what I am doing, I have the Arduino powered over USB and everything else (servo and dc motor) over an external power supply.

exept that I use an external power supply [for the DC Motor] instead of the USB power over the arduino

The servo is connected to the power supply and a Output pin on the Arduino

My power supply has 5V 0.8 Amps; my next step is getting a more powerful and reliable supply, as I don't know exactly how much current the DC motor and the servo are drawing.

My question was whether I should try to reduce noise from the Motor or have two separate power supplies, one for the Motor and one for the Servos.

Thank you very much, I'll keep you up to date!

Don't waste time on anything else until you have a suitably generous power supply. Your problems might just go away.


Hi Robin2,

sorry for the late response.
It worked perfectly with the new power supply; the servos were using up more power than I had thought.

Thanks a lot!

I have 2 servos going in a project and looking to add a third. I had a noise issue. I added a 25v 2200uf capacitor and it smoothed the operation, just in case you want to try something else.