Hi,
I'm using a FS5315M-900 servo motor (datasheet) in a personal project, and can't get it to rotate - the servo just vibrates quietly when it receives signal input.
I have two servos of this model and both don't work, so I'm doubting it's a manufacturing fault.
I've searched the forum but didn't find help.
Some details:
I use an external power supply with ground matching as following:
The Arduino is powered via a USB cable to the computer
When measuring the voltage and current on the servo, it seems like the voltage is ~4.8V and the current is ~400mA
The Code:
#include <Servo.h>
Servo myServo;
unsigned long previousMillis = 0;
const long interval = 2000; // Interval at which to turn the servo (milliseconds)
bool servoAtCenter = false;
void setup() {
// put your setup code here, to run once:
myServo.attach(11);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
unsigned long currentMillis = millis();
if (currentMillis - previousMillis >= interval) {
// Save the last time the servo was turned
previousMillis = currentMillis;
if (servoAtCenter) {
// Turn the servo back to its original position (500 microseconds)
myServo.writeMicroseconds(1000);
Serial.println("1000");
} else {
// Turn the servo to center position (1500 microseconds)
myServo.writeMicroseconds(2000);
Serial.println("2000");
}
// Toggle the servo position state
servoAtCenter = !servoAtCenter;
}
delay(10);
}
I've tried playing around with the Servo.writeMicroseconds function (changing the range, trying Servo.write() etc.) but nothing seemed to work so far.
I'm guessing I'm missing something, and will appreciate your help a lot.
Hi,
I'm using a FS5315M-900 servo motor (datasheet) in a personal project, and can't get it to rotate - the servo just vibrates quietly when it receives signal input.
I have two servos of this model and both don't work, so I'm doubting it's a manufacturing fault.
I've searched the forum but didn't find help.
Some details:
I use an external power supply with ground matching as following:
The Arduino is powered via a USB cable to the computer
When measuring the voltage and current on the servo, it seems like the voltage is ~4.8V and the current is ~400mA
I'm not using a breadboard in the connections, because of the high current.
The Code:
#include <Servo.h>
Servo myServo;
unsigned long previousMillis = 0;
const long interval = 2000; // Interval at which to turn the servo (milliseconds)
bool servoAtCenter = false;
void setup() {
// put your setup code here, to run once:
myServo.attach(11);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
unsigned long currentMillis = millis();
if (currentMillis - previousMillis >= interval) {
// Save the last time the servo was turned
previousMillis = currentMillis;
if (servoAtCenter) {
// Turn the servo back to its original position (500 microseconds)
myServo.writeMicroseconds(1000);
Serial.println("1000");
} else {
// Turn the servo to center position (1500 microseconds)
myServo.writeMicroseconds(2000);
Serial.println("2000");
}
// Toggle the servo position state
servoAtCenter = !servoAtCenter;
}
delay(10);
}
I've tried playing around with the Servo.writeMicroseconds function (changing the range, trying Servo.write() etc.) but nothing seemed to work so far.
I'm guessing I'm missing something, and will appreciate your help a lot.