Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. Using GPIO/I2C as pwm from voxl for payload

Using GPIO/I2C as pwm from voxl for payload

Scheduled Pinned Locked Moved Ask your questions right here!
17 Posts 5 Posters 2.3k Views 5 Watching
  • 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.
  • Aldo Castro FreireA Offline
    Aldo Castro FreireA Offline
    Aldo Castro Freire
    Regular
    wrote on last edited by
    #1

    Hi guys, I wanted to avoid dealing with the px4 side of things to control a payload actuation, that requires a PWM modulation using LTE. Apparently mavsdk does not support control of a payload.

    I wanted to know if this is possible in the voxl:
    https://www.aranacorp.com/en/using-a-pca9685-module-with-raspberry-pi/
    or this one
    https://learn.adafruit.com/adafruit-16-channel-servo-driver-with-raspberry-pi/using-the-adafruit-library

    Using the pca9685

    1 Reply Last reply
    0
    • modaltbM Offline
      modaltbM Offline
      modaltb
      ModalAI Team
      wrote on last edited by
      #2

      Hi @Aldo-Castro-Freire ,

      VOXL has an I2C port (3.3VDC logic levels) that you can use so in theory yes:

      Link Preview Image
      VOXL I2C

      ModalAI technical documentation for VOXL and VOXL 2 Companion Computers for PX4 and ArduPilot Obstacle Avoidance and GPS-denied navigation, assembled in the USA

      favicon

      ModalAI Technical Docs (docs.modalai.com)

      Let me know if you need more details, here's the port:
      https://docs.modalai.com/voxl-datasheet-connectors/#j10-uart-or-i2c-off-board-external-sonar-or-imu-sensor

      1 Reply Last reply
      0
      • Aldo Castro FreireA Offline
        Aldo Castro FreireA Offline
        Aldo Castro Freire
        Regular
        wrote on last edited by
        #3

        Thank you I can use that. One more question is it possible to implemented with the pca9865 that requieres a format like this one:

        Link Preview Image
        Build software better, together

        GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.

        favicon

        GitHub (github.com)

        If so, what method can I use to program it?

        1 Reply Last reply
        0
        • Aldo Castro FreireA Offline
          Aldo Castro FreireA Offline
          Aldo Castro Freire
          Regular
          wrote on last edited by
          #4

          base on my research:
          https://learn.adafruit.com/16-channel-pwm-servo-driver?view=all

          Based on that we need to install
          sudo pip3 install adafruit-circuitpython-pca9685
          sudo pip3 install adafruit-circuitpython-servokit
          would that be possible to do, or do have to run it on docker if so I am not sure on how to connect to external i2c ports

          1 Reply Last reply
          0
          • tomT Offline
            tomT Offline
            tom
            admin
            wrote on last edited by
            #5

            This isn't something we have tried. Python3 isn't on VOXL by default but you can follow the instructions here to get it going

            1 Reply Last reply
            0
            • Aldo Castro FreireA Offline
              Aldo Castro FreireA Offline
              Aldo Castro Freire
              Regular
              wrote on last edited by
              #6

              How do I build the ipk image mentioned in the first step ?

              tomT 1 Reply Last reply
              0
              • Aldo Castro FreireA Aldo Castro Freire

                How do I build the ipk image mentioned in the first step ?

                tomT Offline
                tomT Offline
                tom
                admin
                wrote on last edited by tom
                #7

                @Aldo-Castro-Freire If you haven't yet, you will want to follow the steps here to get voxl-docker installed on your desktop in order to use voxl-emulator which allows you to build IPKs for VOXL on your desktop machine.

                • First you will run voxl-docker -i voxl-emulator
                • Then in the docker container you will run ./build.sh
                • Next, also in the container you will run ./make_package.sh
                • Create a directory to store ipks if you haven't adb shell mkdir -p /home/root/ipk
                • After, this you can exit the docker container and push the ipk to your VOXL with adb push Python_3.6.9_8x96.ipk /home/root/ipk/.
                • Lastly, you can install the ipk with opkg install /home/root/ipk/Python_3.6.9_8x96.ipk
                M 1 Reply Last reply
                0
                • Chad SweetC Offline
                  Chad SweetC Offline
                  Chad Sweet
                  ModalAI Team
                  wrote on last edited by
                  #8

                  To be clear though, @Aldo-Castro-Freire you will still need to use voxl-io to communicate with the peripheral

                  Aldo Castro FreireA 1 Reply Last reply
                  0
                  • Chad SweetC Chad Sweet

                    To be clear though, @Aldo-Castro-Freire you will still need to use voxl-io to communicate with the peripheral

                    Aldo Castro FreireA Offline
                    Aldo Castro FreireA Offline
                    Aldo Castro Freire
                    Regular
                    wrote on last edited by
                    #9

                    @Chad-Sweet I am confused now, I thought the point of the library is that so I will not have to deal with the low-level logic. vox-i2c Basically I still wanna be using the pca9865 to convert to PWM that I can use to control
                    using this:
                    https://learn.adafruit.com/16-channel-pwm-servo-driver/python-circuitpython

                    right now I am not sure. how to connect those two together.

                    1 Reply Last reply
                    0
                    • Chad SweetC Offline
                      Chad SweetC Offline
                      Chad Sweet
                      ModalAI Team
                      wrote on last edited by
                      #10

                      Yes, sorry for the confusion, voxl-i2c is a part of voxl-io. You will want to use voxl-i2c to communicate with an i2c peripheral

                      1 Reply Last reply
                      0
                      • Aldo Castro FreireA Offline
                        Aldo Castro FreireA Offline
                        Aldo Castro Freire
                        Regular
                        wrote on last edited by
                        #11

                        My question is there a driver for pca9865 that I can use? Cause right now it seems I have not way of accessing the i2c port even if I use the libraries from adafruit.

                        So my question is can I run a python program that uses the i2c port to control the pca9865 that will allow me to control servos or payload actuation as an IoT device basically.

                        1 Reply Last reply
                        0
                        • Chad SweetC Offline
                          Chad SweetC Offline
                          Chad Sweet
                          ModalAI Team
                          wrote on last edited by
                          #12

                          No, that is not currently available. What you described would require coding in python to make the appropriate voxl-i2c calls per the pca9865 specification

                          1 Reply Last reply
                          0
                          • Aldo Castro FreireA Offline
                            Aldo Castro FreireA Offline
                            Aldo Castro Freire
                            Regular
                            wrote on last edited by
                            #13

                            Is there any other module that I can use to control something using the voxl. As I see I am not sure if voxl support any other devices.

                            Do you have any recommendations?
                            Looking for a way to trigger servos without having to install another computer.

                            1 Reply Last reply
                            0
                            • tomT tom

                              @Aldo-Castro-Freire If you haven't yet, you will want to follow the steps here to get voxl-docker installed on your desktop in order to use voxl-emulator which allows you to build IPKs for VOXL on your desktop machine.

                              • First you will run voxl-docker -i voxl-emulator
                              • Then in the docker container you will run ./build.sh
                              • Next, also in the container you will run ./make_package.sh
                              • Create a directory to store ipks if you haven't adb shell mkdir -p /home/root/ipk
                              • After, this you can exit the docker container and push the ipk to your VOXL with adb push Python_3.6.9_8x96.ipk /home/root/ipk/.
                              • Lastly, you can install the ipk with opkg install /home/root/ipk/Python_3.6.9_8x96.ipk
                              M Offline
                              M Offline
                              MattO
                              wrote on last edited by
                              #14

                              @tom said in Using GPIO/I2C as pwm from voxl for payload:

                              @Aldo-Castro-Freire If you haven't yet, you will want to follow the steps here to get voxl-docker installed on your desktop in order to use voxl-emulator which allows you to build IPKs for VOXL on your desktop machine.

                              • First you will run voxl-docker -i voxl-emulator
                              • Then in the docker container you will run ./build.sh
                              • Next, also in the container you will run ./make_package.sh
                              • After, this you can exit the docker container and push the ipk to your VOXL with adb push Python_3.6.9_8x96.ipk /home/root/ipk
                              • Lastly, you can install the ipk with opkg install /home/root/ipk/Python_3.6.9_8x96.ipk

                              Hi Tom - I just wanted to let you know, after following these directions, I think there may be an error in the step for pushing the IPK to VOXL. Basically, what happened to me using the push command above, is that the contents of the Python_3.6.9_8x96.ipk file got put into a file named "ipk", and the reason is I'm pretty sure I did not have an "ipk" directory yet in /home/root (never pushed an ipk up prior to this). Basically, I had to delete the ipk file that was created, and mkdir an ipk directory in /home/root/. Then, I ran the command below to push the package, and the last step to install worked perfect.

                              adb push Python_3.6.9_8x96.ipk /home/root/ipk/Python_3.6.9_8x96.ipk

                              Might want to fix the instructions/README in the "voxl-python-3.6.9" in github too. Hope this helps!

                              Thanks

                              1 Reply Last reply
                              0
                              • tomT Offline
                                tomT Offline
                                tom
                                admin
                                wrote on last edited by
                                #15

                                @MattO Thanks for the heads up! I will take a look at this.

                                tomT 1 Reply Last reply
                                0
                                • tomT tom

                                  @MattO Thanks for the heads up! I will take a look at this.

                                  tomT Offline
                                  tomT Offline
                                  tom
                                  admin
                                  wrote on last edited by
                                  #16

                                  @tom It's not required to push the ipk to a specific directory, that was just an example of a location that I like to use.

                                  1 Reply Last reply
                                  0
                                  • tomT Offline
                                    tomT Offline
                                    tom
                                    admin
                                    wrote on last edited by
                                    #17

                                    @MattO The instructions should be more clear now: https://gitlab.com/voxl-public/other/voxl-python-3.6.9#installing-the-ipk

                                    1 Reply Last reply
                                    0

                                    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
                                    Reply
                                    • Reply as topic
                                    Log in to reply
                                    • Oldest to Newest
                                    • Newest to Oldest
                                    • Most Votes


                                    ModalAI
                                    Categories Recent Tags ModalAI.com Docs
                                    © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
                                    • Login

                                    • Don't have an account? Register

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • Users
                                    • Groups