Go Down

Topic: hacked Servo, speed getting slower (Read 1 time) previous topic - next topic

kyonglee

I have HD-1581HB .
https://www.pololu.com/product/1042

I hacked the servo to make it rotate-  just opened the servo and get rid of plastic tap to block the rotation.

i didn't do anything - disoldering or soldering -to control board to be safe because i don't understand what it means.

somehow, it rotate with code. however, speed get slower and stop eventually.



Code: [Select]

#include <Servo.h>
 
Servo myservo;  // create servo object to control a servo
 
int potpin = 0;  // analog pin used to connect the potentiometer
int val;    // variable to read the value from the analog pin
 
void setup()
{
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
   // scale it to use it with the servo (value between 0 and 180)
  myservo.writeMicroseconds(1500);
    delay(100);
}
 
void loop()
{
  // scale it to use it with the servo (value between 0 and 180)

 myservo.writeMicroseconds(2000);                 // sets the servo position according to the scaled value
  delay(100);
  //myservo.write(0);                  // sets the servo position according to the scaled value
  //delay(100);                           // waits for the servo to get there
}



how can i solve this problem?
Do i need some change in the control board?

Zapro

What did you do with the pot? If you do not remove the pot and replace it with 2 resistors, no one know what happens.

Also, sometimes it's impossible to modify modern digital servos for continous rotation, as the controller inside will sense that something is wrong if the servo don't reach it's intended position in a set amount of time.

// Per.

ShapeShifter

What did you do with the pot? If you do not remove the pot and replace it with 2 resistors, no one know what happens.
The other option is to leave the pot in the circuit, but remove it mechanically from the geared drivetrain. The advantage to this over using a fixed resistor divider is the ease of calibration:
  • With a fixed resistor divider, you have to calibrate the "stop" setting by adjusting the PWM pulse width.
  • With the pot, you can output your desired "stop" PWM pulse width, and the adjust the pot until the servo stops moving. Sometimes, just adjusting a pot is easier than experimenting with a bunch of PWM values trying to find the stop value


But yes, if the pot is still mechanically and electrically connected, the position-seeking feedback is still in place, and removing the physical stop doesn't really accomplish much.

Go Up