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
//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);
}