Go Down

Topic: Problem testing Parralax and Vex servos (Read 1 time) previous topic - next topic

MattW

I'm working on an az-el antenna rotator for Ham Radio satellite tracking, but before I go all out and decide on motors vs. servos, I wanted to test how to drive a servo using two I had on hand. My first servo is a Parralax "standard servo" manufactured by Futuba. When I'm driving it with the Servo library, all I hear is a faint hum from inside the servo, but no motion whatsoever. I next hooked up a Vex Robotics servo which uses PWM instead of the standard servo pulsing with the same result. I checked the wiring several times against the online specifications for each servo (power, gnd, signal) and they're both properly wired in.
Right now, the +5v is being drawn from the Arduino which is drawing its power from a USB port. Even though the servos have no load on them, could it be a current problem?
In case it helps, I'm posting the code I used for the two servos (obviously, one or the other would be commented out while testing).
Thanks for any help,
Matt
Code: [Select]

//Vex Servo code
void setup()
{
  //stuff
}
void loop()
{
  analogWrite(2,0);
  delay(500);
  analogWrite(2,127);
  delay(500);
  analogWrite(2,255);
  delay(500);
  analogWrite(2,127);
  delay(500);
}

//Parralax servo code
#include <Servo.h>

Servo azimuth;

void setup()
{
  //pinMode(52,OUTPUT);
  azimuth.attach(52);
  azimuth.write(180);
}

void loop()
{
  azimuth.write(0);
  delay(500);
  azimuth.write(90);
  delay(500);
  azimuth.write(180);
  delay(500);
  azimuth.write(90);
}

MarkT

The documentation for the Parallax standard servo specifically warns against running from the same supply as a microcontroller.  Try using a separate positive supply that can provide more current.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

MattW

Wow. Pulling separate power off a second USB port directly to the servos' power lines did the trick. I had no idea a small unloaded servo had so much power drain off an Arduino.
Thanks.

zoomkat

Quote
Right now, the +5v is being drawn from the Arduino which is drawing its power from a USB port. Even though the servos have no load on them, could it be a current problem?


That should be common knowledge. You need a seperate power supply for the servos. If you load the servos you may shutdown your pc USB ports.
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

Go Up