PWM to relay conversion on Arducopter

Hi all,

I have a component which gives PWM signal. I want to give this as an input to pixhawk cube orange through one of the servo pins. And the pixhawk should convert this to a relay and emit on one of the auxiliary pins. I know it can be done externally through a pwm to relay converter. But want to avoid too many components on my drone.

Ask : Is there a way we can do this? if yes, can someone please guide me.

I don’t think you can input a pwm signal on a cube and read it.

You could call the “component” a Fuel Level sensor. There is support for PWM out versions. Not sure how you would trigger a relay from this, Lua Script maybe.

If you can read it as a “battery sensor” wich has support for pwm input than with lua you could switch relay you need on or off based on pwm input.

1 Like

Scripting
https://ardupilot.org/copter/docs/common-lua-scripts.html