# PWM and CAN channels

Source: https://forum.modalai.com/topic/1842/pwm-and-can-channels
Category: Flight Core and Legacy VOXL (https://forum.modalai.com/category/9/flight-core-and-legacy-voxl)
Tags: flight-core-v2
Posted: 2023-02-16 20:39:15 UTC by preston.schipper
Replies: 3 · Views: 1239

## preston.schipper · 2023-02-16 20:39:15 UTC

Hello, we currently fly a VTOL fixed wing aircraft with PX4 and a cube autopilot. We use 8 pwm outputs for the motors and 6 more for control surfaces. We also use two CAN busses, one as a traditional bus and the second as a UAVCAN (dronecan) bus. I was interested in moving to the voxl2 for NDAA compliance and the computational power it offers. However I noticed to get CAN and PWM I need to add a flight core v2. However that still seems to come up short with only 8 PWM outputs and 1 CAN bus. 

So a few questions. Am I missing something in the documentation or are there really only 8 PWM outputs and 1 CAN bus? I know I could move to CAN or serial controlled actuators but was hoping to only change my autopilot hardware and not tear up everything else. 

Another question I have is how voxl2 and flight core v2 integrate together.

## Reply by Vinny (ModalAI staff) · 2023-02-16 23:01:07 UTC

Hi @preston-schipper 
We do have this solution which is meant to pair with Voxl2 or a FlightCore and can give you an extra 8 PWMs + S.BUS : https://docs.modalai.com/voxl2-io/

For your CAN.BUS solution however, I'm not 100% sure how to expand on that one. You might need an external widget/adapter, or you can experiment with putting multiple devices on the one  CAN.BUS port (it's supposed to be a daisy-chained/Multi-drop bus architecture).

When I do a search for USB to CAN, or UART to CAN, I find a lot of hobby-grade adapters out there, so it might be worth a shot.

When someone wants to pair a FlightCore with a Voxl grade "companion", the expected use is that the FlightCore performs all flight and attitude control (and interfaces with the ESC). Then, Voxl focuses on high-bandwidth data transmission (4G/5G, etc) and any sensor integration and computer vision applications.
I encourage you to take a look at some of the VoxlFlight and Seeker use cases where a Voxl V1 and FlightCore (V1) are paired together. Now imagine those bumped up with even more power and easier I/O and enhanced expandability that the V2 architectures bring. It's really a power-house solution, and we encourage you posting other questions on here.
Little tip: new forum posts for new topics are best, since everyone gets notified of a new post, but we do not all get notified of forum responses to an existing thread. 
Thanks!

## Reply by Filip Slezak · 2023-05-30 05:03:52 UTC

@Vinny Hi, is there any update on this CAN support through FlightCore V2? 

We're seriously considering the option instead of a PWM through the I/O board to control our motors. Unfortunately, I can't seem to find any code that would do this from the PX4 pilot - other than that the connector exists. How is this supported by the board interfaces? How would I go about sending commands to that bus?

Let me know if you need more info. 
Best

## Reply by Vinny (ModalAI staff) · 2023-05-30 15:08:44 UTC (in reply to Filip Slezak)

Hi @Filip-Slezak 
As far as I understand, FCv2 does indeed support CAN with no issues that I have heard of.

I'm not able to help with SW issues, so please review these pages, and if you get stuck, please try to post a new Forum topic so our SW engineers can see it as a fresh case and respond accordingly.
https://docs.modalai.com/flight-core-v2-user-guides/

Thanks!
