• Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Using PWM Output from Raspberry

    Scheduled Pinned Locked Moved Unipi 1 - First Generation
    5 Posts 2 Posters 2.3k Views
    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.
    • J
      juergschwarz
      last edited by

      Im am using openplc with unipi 1.1 and raspberry 3. The unipi output A0 is only analog 0-10V and not a real digital PWM signal.

      To control a servo i need a real digital PWM signal. How is it possible to use this in parallel to unipi?

      J 1 Reply Last reply
      Reply Quote 0
      • J
        juergschwarz @juergschwarz
        last edited by

        Ok now i send a pic and a video

        Bildschirmfoto von 2022-01-17 16-17-33.png

        And here the video

        https://link.eu1.storjshare.io/jwsnlnnvc4qlkvuxqltk7kygvoaq/freigabenallgemein%2FVID_20220117_161837.mp4

        As can be seen, the frequency changes rather than the length of the period

        Martin KudláčekM 1 Reply Last reply
        Reply Quote 0
        • Martin KudláčekM
          Martin Kudláček @juergschwarz
          last edited by

          Hello @juergschwarz,
          none of the outputs are capable of being drived by PWM signal. The analog output has a filter + amplifier to create smooth(ish) output. This cannot be bypassed.

          Other outputs are the relay outputs - and if your frequency is not in tens of seconds (or better in minutes), then I would not advise to use PWM to drive them.

          You can try using some I2C expander connected to the external I2C bus.

          Best regards,
          Martin

          J 1 Reply Last reply
          Reply Quote 0
          • J
            juergschwarz @Martin Kudláček
            last edited by

            @Martin-Kudláček said in Using PWM Output from Raspberry:

            Hello @juergschwarz,
            none of the outputs are capable of being drived by PWM signal. The analog output has a filter + amplifier to create smooth(ish) output. This cannot be bypassed.

            Other outputs are the relay outputs - and if your frequency is not in tens of seconds (or better in minutes), then I would not advise to use PWM to drive them.

            You can try using some I2C expander connected to the external I2C bus.

            Best regards,
            Martin

            Ok i forgot this info: I try to use the raspberry output %QW0 separately to generate this PWM signal and not the A0 from unipi. I my video you can see the output of %QW0.

            J 1 Reply Last reply
            Reply Quote 0
            • J
              juergschwarz @juergschwarz
              last edited by

              @juergschwarz Ok it works. had to change the position in raspberry.cpp to the end of
              void initializehardware()

              and the Initial values higher (4000 and 6000)

              Thanks

              1 Reply Last reply
              Reply Quote 0
              • A AVsetula locked this topic on

              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
              • First post
                Last post