I tried to control servo motor by using servo library in Arduino and it is working fine. But when I use separate power supply and function generator, it is not working. It is go to end which means 180 degree.

I used SG90 servo motor. Separate power supply voltage is 5V like arduino. I used PWM 50Hz in Function generator and duty cycle 3%. If I set 1% duty cycle, it is also going to end. PWM peak voltage is 5V.

  • \$\begingroup\$ Did you remember to connect the Arduino ground and the ground to the servo power supply? \$\endgroup\$
    – JRE
    Commented May 26, 2018 at 16:08
  • \$\begingroup\$ Fist I used ardunio but second time I used separate power supply and function generator. \$\endgroup\$
    – saji indra
    Commented May 26, 2018 at 16:10
  • 1
    \$\begingroup\$ The ground of whatever generates the PWM signal and the ground of the servo MUST be connected together. \$\endgroup\$
    – JRE
    Commented May 26, 2018 at 16:12
  • \$\begingroup\$ Do you have your function generator grounded to the Arduino? \$\endgroup\$ Commented May 26, 2018 at 16:28

1 Answer 1


You better check your math. 1~2ms / 20ms is 5~10% not 1%

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.