Pages: [1]   Go Down
Author Topic: wiring servo to external power  (Read 1823 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 78
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!

I just got Arduino Uno yesterday and have tried controlling a servo motor. It worked flawlessly, but I noticed that while servo was moving, the lights on Uno shined a little less, suggesting that motor draws a little too much power (its very small hobby servo, but still...). So I found a 3, 4.5, 6, 7.5, 9, 12 V 300mA power supply and tried connecting the servo's ground and power wires to that power supply with 4.5V set (within servo's range). When I plugged it in, the servo was moving very weird and Arduino IDE crashed, so I quickly disconnected it. Then I read that ground should also be connected to Uno, but I dont understand why. Could anyone please shed some light on this? Thanks!

Oh, one more thing. Even though the servo has reached its destination, its sometimes still emmiting sounds like its working. Does this indicate that the servo is bad? Thanks!
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16546
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!

I just got Arduino Uno yesterday and have tried controlling a servo motor. It worked flawlessly, but I noticed that while servo was moving, the lights on Uno shined a little less, suggesting that motor draws a little too much power (its very small hobby servo, but still...). So I found a 3, 4.5, 6, 7.5, 9, 12 V 300mA power supply and tried connecting the servo's ground and power wires to that power supply with 4.5V set (within servo's range). When I plugged it in, the servo was moving very weird and Arduino IDE crashed, so I quickly disconnected it. Then I read that ground should also be connected to Uno, but I dont understand why. Could anyone please shed some light on this? Thanks!

Because the servo is 'reading' a control signal from the arduino it needs to be electrically referenced to the arduino's voltage source, so the external power's ground should wire to both the servo ground pin and a arduino ground pin.

Lefty



Oh, one more thing. Even though the servo has reached its destination, its sometimes still emmiting sounds like its working. Does this indicate that the servo is bad? Thanks!
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 78
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But does that mean that servo's power supply must be 5V or is it irrelevant? What if I need to control two servos with different voltages and power supplies, do I connect both ground pins to Arduino Uno?
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16546
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But does that mean that servo's power supply must be 5V or is it irrelevant? What if I need to control two servos with different voltages and power supplies, do I connect both ground pins to Arduino Uno?

Most hobby servos require a power voltage of between 4.5-6vdc. The amount of maximum current a specific servo requires depends on the specific servo and what mechanical load it is being asked to move. I usually recommend as a general rule to use an external regulated +5vdc supply with a current capacity of 1 amp or more per servo being powered, so two servos should use a external supply rated at 2amps at least. There is only a need for one wire to be connected from the external servo power supply ground wire to a arduino ground pin, but of course each servo will require its own +5vdc wire and ground wire from the servo to the external power supply.

That help?

Lefty
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 78
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for this info, but for the core of my question: Sorry, I have formed the question a little weirdly. What I mean is, since Arduino Uno requires 5V power supply (which is usually USB), is it wrong if my servo requires, for example, 12V and so I connect it to power supply of 12V? Will that fry Arduino Uno when I connect the ground to it, since it is different voltage than Arduino Uno requires? Or is the voltage of servo's power supply irrelevant to Arduino Uno?

You said that you recommend 5V 1A power supply per servo. I have a lot of old adaptors at home that are from devices long gone, some of them are 5V and even more than 1A. Is it okay to use those to power servos?
« Last Edit: August 07, 2012, 08:55:46 pm by Terraviper-5 » Logged

0
Offline Offline
Tesla Member
***
Karma: 118
Posts: 8956
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Below is the basic servo external power setup.

Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16546
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for this info, but for the core of my question: Sorry, I have formed the question a little weirdly. What I mean is, since Arduino Uno requires 5V power supply (which is usually USB), is it wrong if my servo requires, for example, 12V and so I connect it to power supply of 12V? Will that fry Arduino Uno when I connect the ground to it, since it is different voltage than Arduino Uno requires? Or is the voltage of servo's power supply irrelevant to Arduino Uno?

I really haven't seen a standard servo that can handle 12 vdc directly, that will destroy most of them. So your questions kind of confuses me. An arduino can be powered by 12vdc via it's external power connector, but that doesn't deal with properly powering servos with an external power supply. So perhaps you should explain how you wish to power your arduino board (usb or external power connector) and what voltage your servos actually require.

 

You said that you recommend 5V 1A power supply per servo. I have a lot of old adaptors at home that are from devices long gone, some of them are 5V and even more than 1A. Is it okay to use those to power servos?
Logged

Rapa Nui
Offline Offline
Edison Member
*
Karma: 53
Posts: 1990
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The most current a servo takes is as it starts its movement. So you may try to buffer that current peek with a larger capacitor, see the picture below..


* servo.jpg (8.47 KB, 452x224 - viewed 185 times.)
« Last Edit: August 08, 2012, 07:25:00 am by pito » Logged

New Jersey
Online Online
Faraday Member
**
Karma: 50
Posts: 3429
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you need to connect something that needs its own power supply to your arduino, whether it be a servo or motor or whatever, you must connect the grounds if the arduino is to send signals to the device. The voltage of the other supply doesn't matter, as long as you're just connecting the grounds. As to your servo still straining at the ends of its travel, it may be stuck at the end stop but you're telling it to keep going. Servos vary, yours may not be able to accept the signals that the servo library issues for 0 and 180 degrees. Try reducing the range of angles you're using until you find the maximums that work with your particular servos.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 78
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you, my question is answered now smiley

As for 12 V servo, it was just an example I needed for my question.

That capacitor there is a good idea, yes.
Logged

Pages: [1]   Go Up
Jump to: