Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    MG996R + PWM 3V3 **SOLVED**

    Scheduled Pinned Locked Moved WiPy 2&3
    wipiservopwm
    5 Posts 2 Posters 2.7k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      livius
      last edited by livius

      Hi,

      have someone connected succesfully servo MG996R?
      I try but without success.
      What i have tested already:

      1. separate power supply for Wipy and separate for servo (GND connected between)
      from machine import PWM
      pwm = PWM(0, frequency=50)   #50???
      pwm_c = pwm.channel(0, pin='P7', duty_cycle=0.5)
      
      1. tested direct driving pwm from wipy to servo
      2. tested with level shifting by 2N7000 on PWM signal

      i can not got succesfull :(
      With arduino it was so simple - i suppose that here should be same..
      and i think that i have missed something obvious

      think about people first, then computers

      RobTuDelftR 1 Reply Last reply Reply Quote 0
      • RobTuDelftR Offline
        RobTuDelft @livius
        last edited by

        @livius

        From the spec sheets:

        0_1491340199230_duty cycle.PNG

        You seem to use a different duty cycle than is required?

        I believe duty cycle is only 10 or 20 %?

        Without data you're just another person with an opinion.
        Hackster | About me

        L 1 Reply Last reply Reply Quote 1
        • L Offline
          livius @RobTuDelft
          last edited by

          @RobTuDelft
          yes - thats it - i supposed that it is from 0 to 100%

          i have max right on

          pwm_c.duty_cycle(0.034) 
          

          i have max left

          pwm_c.duty_cycle(0.127) 
          

          thank you

          think about people first, then computers

          RobTuDelftR 1 Reply Last reply Reply Quote 0
          • RobTuDelftR Offline
            RobTuDelft @livius
            last edited by

            @livius Great! What voltage is the final PWM signal? Are you just using the raw pin output?

            Without data you're just another person with an opinion.
            Hackster | About me

            L 1 Reply Last reply Reply Quote 0
            • L Offline
              livius @RobTuDelft
              last edited by

              @RobTuDelft
              5V i use 2N7000 NMOSFET transistor for level shifting for testing
              for final i use smd BSS138

              think about people first, then computers

              1 Reply Last reply Reply Quote 2

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • 1 / 1
              • First post
                Last post

              Pycom on Twitter

              Pycom