1
\$\begingroup\$

My servo is classic SG90. I connected +5V and gnd correctly to a dc power supply. Then I connected output of a signal generator which generates 0-5 V pulses at 50Hz (checked by oscilloscope).

I know that the duty cycle determines the position of a servo motor. I can vary the duty cycle between %20 and %80 from the settings of the signal generator and I can observe that pulse is changing accordingly via the oscilloscope. However, servo does not responds. What am I missing?

\$\endgroup\$
8
  • 1
    \$\begingroup\$ Is the GND of the signal generator connected to the GND of the servo? \$\endgroup\$ Commented Oct 9, 2019 at 12:47
  • 3
    \$\begingroup\$ THe servo specs indicate 1 ~2ms which is 5 to 10% at 5V , otherwise 0V for PWM with 20ms cycle =50Hz \$\endgroup\$ Commented Oct 9, 2019 at 12:55
  • \$\begingroup\$ @MichaelKaras yes all gnd's are common at one point. \$\endgroup\$
    – muyustan
    Commented Oct 9, 2019 at 12:58
  • 1
    \$\begingroup\$ RC servos use the time of the pulse width, not the duty cycle (ratio between on timeand period). The valid range is 1ms to 2 ms for a high pulse with 1.5ms being the center. They dont care about actual frequency too much as long as they get a high pulse often enough so that they do not "forget" their position. \$\endgroup\$
    – DKNguyen
    Commented Oct 9, 2019 at 13:09
  • \$\begingroup\$ @DKNguyen so you say that 250 Hz %25 to %50 duty cycle will do the job? \$\endgroup\$
    – muyustan
    Commented Oct 9, 2019 at 14:27

1 Answer 1

4
\$\begingroup\$

Based on your question, your PWM may be way too high. A typical hobby servo might need a signal at 50-60 Hz. Let's take 50Hz as an example. That means that every 0.020 second, it might need a pulse around 1.5ms (0.0015s) to seek "center" position. So, that equates to about 7% duty cycle. Try a lower PWM range to get pulses of 0.0010s to 0.0020s at 50Hz.

And as the comment suggests, the GND connections must be common.

\$\endgroup\$
5
  • \$\begingroup\$ Don't any of the duty cycle values between 20 and 80 correspond any position? \$\endgroup\$
    – muyustan
    Commented Oct 9, 2019 at 13:00
  • 2
    \$\begingroup\$ No, they don't. That's way out of spec for the servo. \$\endgroup\$
    – Dave Tweed
    Commented Oct 9, 2019 at 13:01
  • \$\begingroup\$ @DaveTweed thanks, it was my silliness, now I checked the specs and you are right even 4 ms(%20 dutycycle) was greater than 180° position. So is there any way that I can get valid duration of pulses considering my signal generator does not allow between 0-20 and 80-100 duty cycles. \$\endgroup\$
    – muyustan
    Commented Oct 9, 2019 at 13:04
  • 2
    \$\begingroup\$ There are many examples of 555-based and MCU-based test circuits for servos on the Web. This is also something that an Arduino can easily do for you. \$\endgroup\$
    – Dave Tweed
    Commented Oct 9, 2019 at 13:06
  • \$\begingroup\$ @DaveTweed yes microcontroller is a nice and realistic solution, just dont have one available at now and just doing some trials not a big concern. But when it didnt work I just wondered why. Thanks again. \$\endgroup\$
    – muyustan
    Commented Oct 9, 2019 at 13:08

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.