Servo hacked and tested

Today I hacked a standard servo (found the manual to hack it somewhere in the internet). The main Idea is to get rid of the limitation to rotate only from 0° to 180°. You have to open the servo, cut the connections to the poti, instead of the poti solder a voltage divider 1:1 and then close the servo again. Now you are able to use the servo as a motor that you can control precisely.

 

#include "mbed.h"

PwmOut servo(p21);

int main() {
    servo.period_ms(20);
    while(1) {
        servo=0.026;
        wait(3);
        servo=0.1;
        wait(3);
        servo=0.026;
        wait(3);
        servo=0.1;
        wait(3);
    }
}

If you are on a low duty cycle (in this example: 0.026, which was arbitrarily chosen), my servo rotates counterclockwise. At higher duty cycle (here 0.1) it rotates clockwise.

 

-> Is there a setting, where it does not rotate? ... no Idea... but in Principle it should be.

The servo is connected to 6V and during rotation it has a consumption of about 0.26 A.

The minimum Voltage, where the servo starts working is 2.8 V (Current=below 0.1 A)


(Edit: found out, that at a duty cycle of  "servo=0.0892;" the servo is not rotating anymore but still taking about 0.1A) hmmm...


2 comments

16 Jan 2011

Hi Andreas,

did you have a look to

   http://mbed.org/cookbook/Servo

I think you also should use an external power supply.

Regards, Vadda

 

16 Jan 2011

Hi Vadda. :-)

Thank you, In fact, I haven't looked at this page. But to provide the 6V for the servo

user Rainer Krugmann wrote:

Hi Andreas,

did you have a look to

http://mbed.org/cookbook/Servo

I think you also should use an external power supply.

Regards, Vadda

 

Hi Vadda. :-)

Thank you, In fact, I haven't looked at this page. But to provide the 6V for the servo I used an external power supply. (I was afraid of too much current flowing to the microcontroller).

As I understand it, the microcontroller only provides the (low current) pwm signal, and the high current is coming from the external power supply.

Best regards,

Andreas

You need to log in to post a comment