Pages: [1]   Go Down
Author Topic: Servo Off External PowerSupply  (Read 1533 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello. I have a project where I need to power a 12v Stepper motor and a 6v high torque servo. The servo draws to much current from the arduino so I wanted to have them both powered from the same external power supply. I used a 12v 2 amp DC power supply. The stepper works fine and I have a 5V voltage regulator to lower the voltage for the servo, which I figured would work fine off 5v. With power and ground in the servo does nothing. But once the input pin from the arduino gets connected it goes crazy and turns sporadically and makes noise. The sample sketch is simple.

#include <Servo.h>

Servo myServo;

void setup()
{
 Serial.begin(9600);
 myServo.attach(2);
 myServo.write(0);


I tried it with a smaller servo that works fine when powered from the arduino and also goes crazy when using the external 5v. I know I am doing something very simple wrong. All help is appreciated.

Thanks.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33373
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Google supply decoupling , basically you need extra capacitors on the power rails.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, that's most likely it. Thanks!

Question- how is a bypass capacitor different than a regular capacitor? Or is bypass capacitor just the term for when a capacitor is being used in that method.

Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17262
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Or is bypass capacitor just the term for when a capacitor is being used in that method.


yes, it's a cap in a bypass application. Other application might be used as a coupling capacitor, or as part of a L/C tank circuit, etc.

Lefty

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Please post details of how this works out...  I have the same issue on an up coming project!!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Gladly! Ill be stopping by radioshack first thing in the morning. If it works I'll post pictures/other resources I found online.
Logged

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9470
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds like you don't have a common ground between the external servo power supply and the arduino. Below is a typical power setup. Bottom is how I get better servo performnce when using a 7805 reguator chip for power.



Logged

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

Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

After not finding the right capacitor at radio shack I tried the common ground method and it worked great, thanks zoomkat! However, only for the small servo, not the bigger one. The larger one has no static though, it just does nothing. Which is still better than before.

Any reason why one servo would go and the other wouldnt?

here is the spec for the larger one...    
4.8V 6V
Torque: 266.5 oz-inch 333 oz-inch
Speed: .20 sec @ 60° .16 sec @ 60°
Size- 2.6 x 1.18 x 2.25 in. (66x30x57mm)
Weight- 128g (4.52oz)

Logged

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9470
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Any reason why one servo would go and the other wouldnt?

Bad wiring, inadequate power supply, possibly damaged by operating without a proper ground, bad code, lot of possibilites.
Logged

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

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33373
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
After not finding the right capacitor at radio shack I tried the common ground method
Common ground isn't an alternative method it is essential, you need the capacitors in addition. See this link for why:-
http://www.thebox.myzen.co.uk/Tutorial/Power_Supplies.html
Logged

Pages: [1]   Go Up
Jump to: