Hi all,
I want to control the JX Servo PDI-6225MG-300 Degree using Arduino.
IF I put the angle number, the motor should go the exact angle.
For example, IF I put the 200, then motor will be located in 200 degree.
BUT, when I tried to use my code, it is not working well.
I mean the motor showed weird moving. Please check the below link. (I want to upload the video but I don't know how to upload it.)
#include <Servo.h>
int servoPin = 9;
int val = 0;
Servo servo;
void setup() {
Serial.begin(9600);
servo.attach(servoPin);
}
void loop() {
if(Serial.available()){
val = Serial.parseInt();
}
if(val > 0 && val <= 300){
val = map(val, 0, 295, 544, 2400);
servo.writeMicroseconds(val);
Serial.print("Current Val : ");
Serial.println(val);
}
}
I used JX Servo PDI-6225MG-300 Degree motor and spec is follows.
Brand Name: JX Servo
Item Name: PDI-6225MG-300 Degree
Max Angle: 295°
Dead Band: 4μs
Maximum Pulse Width: 500-2500us (for control board)
Motor: Iron core
Voltage range: 4.8V-6.6V
Speed (4.8V): 0.25 sec / 60 degree
Speed (6V): 0.21 sec / 60 degree
Torque (4.8V): 19.9 kg.cm
Torque (6V): 25.3 kg.cm
Size: 40.5 x 20.2 x 38mm
Weight: 62g
Cable: JR 265 mm
Bearing: 2BB
Output Teeth: 25T (Futaba Universal)
I used extra power supply. I also put the model in the youtube. The OUTput voltage is 5v and 3~5A.
EV-K1205 DC-DC converter
(Buy at low prices in the Joom online store)
It will be awesome If I solve this problem.
Many thanks