Go Down

Topic: Servo Off External PowerSupply (Read 1 time) previous topic - next topic

Sloth6

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.

Grumpy_Mike

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

Sloth6

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.


retrolefty

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


mndless

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

Go Up