# How to attach a servo motor to VOXL 2

Source: https://forum.modalai.com/topic/4477/how-to-attach-a-servo-motor-to-voxl-2
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2025-06-03 10:52:41 UTC by ashwin
Replies: 4 · Views: 992

## ashwin · 2025-06-03 10:52:41 UTC

Hello,

I am currently working on a project involving the VOXL 2 platform and would like to control a servo motor within my existing system architecture. Below is a summary of the current configuration:

- RC, GPS, and Magnetometer are connected to the J19 port.
- An FPV ESC is connected to the J18 port.
- The M0151 expansion board is connected to a Doodle Labs module.

I am considering two possible approaches for integrating servo motor control:

- *Using the IO Expansion Board via a free UART Port on the M0151 Board*
I plan to connect the IO Expansion Board to an available UART port on the M0151. I would like to confirm whether this setup would support reliable servo motor control.

- *Connecting the IO Expansion Board to J19 and connecting receiver to J2 terminal of IO Expansion Board*

Could you please advise on the feasibility and potential limitations of both configurations? I would appreciate any insights or recommendations you may have.

Please feel free to reach out if any further clarification is needed.

Regards,
Ashwin

## Reply by ashwin · 2025-06-06 06:28:45 UTC

Hello,

Can someone kindly respond to this query?

Regards,
Ashwin

## Reply by Eric Katzfey (ModalAI staff) · 2025-06-06 15:58:12 UTC (in reply to ashwin)

@ashwin Are you looking to control the servo via PX4 or with some custom software? What will the servo be doing?

## Reply by Alex Kushleyev (ModalAI staff) · 2025-06-07 04:22:03 UTC (in reply to Eric Katzfey)

@ashwin 

Do you need to be able to control the servo from PX4 or it would be acceptable to have an API you could use on the CPU / Linux on VOXL2 ?

Alex

## Reply by ashwin · 2025-06-25 08:13:08 UTC (in reply to Alex Kushleyev)

Hello @Alex-Kushleyev @Eric-Katzfey 

I am looking to control the servo via PX4.
Essentially, it will be a command either from the RC or GCS to open / close the servo motor.

But, if that is infeasible, I can make it work via an API on the CPU / Linux on VOXL 2 to be controlled via SSH.

Regards,
Ashwin
