SER0044

Relationship between Angle & Analog
value
SER0044 Servo
Formula: Actual angle = Analog value degree *0.47-33.4
Before Usage
There will be some error between each servos. If you want to use the servos with scenes that
require precise control, you can calibrate them separately. A quick three-point calibration method is
provided here:
1. Drive the servo to 90 degrees (1500us), record the actual angle as reference angle A, and record
the corresponding feedback analog value a;
2. Drive the servo to 0 degrees (500us), record the actual angle as reference angle B, and record
the corresponding feedback analog value B:
3. Drive the servo to 270 degrees (2500c), record the actual angle as reference angle C, and record
the corresponding feedback analog value C
The following formula gives the relationship between Analog value & Angle:
Actual angle = m * Analog value + n
m=[(A-B)/(a-b)+(C-A)/(c-a)]/2
n=[(Ab-Ba)/(b-a)+(Bc-Cb)/(c-b)]/2
If you doesn't need such accurate value, you can use m=0.47;n=-33.4 directly.
Tutorial
Requirements
Hardware
DFRduino UNO R3 (or similar) x 1
SER0044 DSS-M15S 270° Metal Servo
M-M/F-M/F-F Jumper wires
Software
Arduino IDE, Click to Download Arduino IDE from Arduino®
Connection Diagram
SER0044 Arduino Connection
Sample Code
void setup()
{
Serial.begin(9600);//Set Baud Rate to 9600 bps
}
void loop()
{
uint16_t val;
double dat;
val=analogRead(A0);//Connect Analog pin to A0
dat = (double) val * 0.47-33.4;
Serial.print("Position:"); //Display the position on Serial monitor
Serial.print(dat);
Serial.println("Degree");
delay(100);
}
Expected Results
Arduino will drive the servo with D9 pin, and receive the Analog feedback from A0 port.

SER0044

Mfr. #:
Manufacturer:
DFRobot
Description:
DFRobot Accessories DSS-M15S 270 15KG DF Metal Servo with Analog Feedback
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet