I/O co-processor

Hi Dev experts,

I can see that some Ardupilot (mostly linux boards) boards have I/O co-processor to manage PWM, SBUs,ADC,…etc and maybe to read sensors as well.

This is very good idea in case the board doesn’t have many peripherals.

Can someone point me to documentation and code of such library to have a look on its protocol?

The code for the I/O coprocessor is in library AP_IOMCU:

1 Like

Linux boards have coprocessor as they cannot do pwm signals correct just from the cpu… So that defer to anoter chip.

Thx all for the reply. Is there any detailed documentation that I can read.

I am still trying to understand the peripheral used for communication. Is it UART or SPI?

Is it also possible to include the GPS and IMU data to be transferred from IO co-processor to Flight controller?

There are many Flight Controllers with an IOMCU for redundancy. Read the docs:
I/O

Look for PCA9685 that is the chip that is used generally

I didn’t get you. What is the relation between IOMCU and the PCA9685?

I already read this page and couldn’t find any answers to my questions :frowning:

It can be done 2 ways, one way is with a IO coprocessor as it has ADC and timers for servos, or it can use separate hardware like a PCA9685 i2c servo driver and i2c ADC,

That is good hint

I am aware about OBAL board and I am working on update to it.

Let me specific here. In case IOMCU is STM32 , Is there any standard communication protocol with IOMCU with FCU ?

look again at my post above… The communication between FMU and IOMCU is via uart.

you mean the code on github?

Yes, that’s the code for an STM32 coprocessor.
I doubt that there’s any other documentation for the pixhawk IOMCU.
What exactly do you want to accomplish?

I don’t have many peripherals(CAN, PWM, ADC,…etc) of my RPI 4 so I want to extend its capability via IOMCU.

I would like to implement IOMCU that collect all information from sensors ( ADC, GPS, IMU,…etc), RCInput, safety switch, and can configure ESC ( PWM Normal. DShot,…etc).

The RPI shall take care of camera, wifi and floating point processing of AP.

Sounds like you just want a standard flight controller (FC) with the PI as the “companion computer” (CC). The FC talks to the CC over a serial port using the mavlink protocol.
https://ardupilot.org/dev/docs/companion-computers.html

Nop,

IOMCU has limited capability in terms of computational power. it is only rich in I/O.

The FCU shall be more powerful and can make the Quaternion, PID and EKF calculations.

I want to use my RPI 4 as FCU not as companion computer.

But the IOMCU does NOT support IMUs… and it’s an integral part of the Flight Controller.
Are you planning to design a custom PCB with an STM32 and IMU sensors?
BTW, there’s a good reason the inertial sensor data doesn’t go through the IOMCU.

The IOMCU shall be bridge for sensors.
it shall not consume the sensor measurements.

yes, I am creating some PCB prototypes for that.