Hello,
I'm using an Arduino Mega and the Parallax Feedback 360° Servo. I have tried everything that I 'm capable of, but I hit a wall. I'm a beginner (only stated with Arduino coding for about 2 months). The end goal is to use it for an compass in combination with the servo. I’ve to come across this particular servo, as it’s capable of 360° rotation with angle control via a hall sensor.
For the connection it’s like in the photo:
I tried using a condesator to possibly smooth the voltage.
The issue is that there is a dead zone. From about 36 to 360°, the servo is perfectly capable to position itself. However, if you try to hold the servo between 1 and 36°, the servo gets stuck in an endless loop.
Another issue is that once the servo is finished with its code, it keeps rotating clockwise. And when it gets to the dead zone it gets stuck again.
I tried reading the datasheet and from what I can see, the header file uses the exact same calculations as proposed in the data sheet. I’m using the following library:
I looked on this forum and, on the internet, but I’ve have yet to find the solution. I chose this servo because I need the angular positioning AND the 360° rotation.
The library I use is the following:
The Parallax datasheet is as follows:
https://www.robotshop.com/media/files/pdf/parallax-feedback-360-high-speed-servo-datasheet.pdf
The code is is as follows:
#include <Wire.h>
#include "FeedBackServo.h"
#define FEEDBACK_PIN 2 //Servo1 - Define feedback signal pin (Yellow wire)
#define SERVO_PIN 3 //Servo1 - Define control pin (White wire)
FeedBackServo Servo1 = FeedBackServo(FEEDBACK_PIN); //Servo1 - Set feedback signal pin number
int Cycle = 0;
void setup(){
Serial.begin(9600); //Baud rate
Servo1.setServoControl(SERVO_PIN); //Set servo control pin number
Servo1.setKp(1.0);
}
void loop(){
for (int i=360; i>40; i-=5){
Servo1.rotate(i,1);// move servos to center position -> 90°
Serial.println(Servo1.Angle());
//delay(500);
}
}
If I leave the lower limit of the for loop above 40, it works just fine. But as stated, I need the full range. If you rotate through the deadzone, without stoping there, it also works fine. For example if you cycle though the angles from 0 to 180°, there is no issues.
Any help would be appreciated.