Relay Switch Doesn't Turn on

I’m trying to configure a digital relay switch to turn on a fan during flight. The input is connected to a 12 VDC supply, the output connected to the fan, and the receiver signal input is connected to the M8 PWM port on my flight controller (CUAV 5).

The relay documentation specificies that ‘If the width of the pulse is more than 1600us, the mosfet switch will close, if less than 1400us, the mosfet switch will open.’ The actual pulse width at which the switch opens is dependant on the amplitude of digital signal, so it may be different for different flight controllers. I verified that the switch works by connecting the signal input port to servo tester and measured 0.5 V to be the the signal voltage at which the switch opens.

When I wire the switch to the fan and flight controller and connect to Mission Planner, manually toggling the pulse width from min (100 us) to max (20,000 us, corresponding to 3.3V) in Data → Servos/Relay → output 8 does not turn on the switch.

Is there an additional parameter that needs to be configured in the params list or anything that I’m missing here?

Have you checked if your SERVO8_FUNCTION parameter have any other function associated to it?

1 Like

Related to what Bruno suggested, or configured as GPIO.

1 Like

Maybe to clarify - if you are using a PWM triggered relay, do not set it up as a relay in the parameters, since that will negate the PWM output on the configured pin (I hope that makes sense!).


@Yuri_Rage , @dkemxr and @BrunoBagarini I have SERVO8_FUNCTION set to 0, so it should be configured to output PWM signals, but it’s still not turning the switch on. I also verified with an oscilloscope that M8 is indeed sending an output signal when commanded in the GCS.

Just to be sure what does the banner message show on the messages tab after connecting? Starting with RCOUT

It’s also possible that you have a voltage problem. Most modern RC devices will trigger on 3v3 logic, but some require 5V. The autopilot will only output 3v3 logic levels. (though rereading your first post…perhaps you’ve already ruled that out)

It also appears you may have misplaced a decimal in your parameters. Use SERVO8_MIN=1000 and SERVO8_MAX=2000. If using RC passthrough, ensure that your transmitter is commanding roughly 1000-2000µs.

I use a higher quality PWM relay from Dimension Engineering on some of my builds, and it always functions properly.

1 Like

Here is the output: ‘RCOut: PWM:1-14’

So I think I may have found the issue… I’m measuring 12 mV (basically 0 V) between GND and + pin on M8 port. Should this not be close to 3.3 V?


To clarify the original post - the 12V is the supply to the power input port, not the signal port (I’m using 12V to power the fan which is downstream of the relay). The input signal port power is whatever the flight controller is running off which I believe should be 3.3 V.

To clarify the 20,000 PWM output - I set this arbitrarily high for checkouts to make sure I was testing the max PWM output voltage.

The + rail is not powered to allow you to supply any voltage within reason. You must apply positive voltage to any pin on the rail if you wish to use it for servo power.

20000 microseconds may well be beyond the ability of the hardware to recognize as a valid signal. Use 2000. You are conflating voltage with pulsewidth.

1 Like

Appreciate the clarification @Yuri_Rage. I was not aware that the flight controller doesn’t supply power to the servo rail. Looks like that’s my issue as the relay requires an external power supply.

1 Like

With regards to your comment on ‘conflating voltage with pulse width’:

When mentioning ‘PWM output voltage’ I am referring to the resulting average voltage of the signal when the pulsewidth/duty cycle is changed. When mentioning ‘input voltage’ I’m referring to the voltage upstream of the relay which is used to power the fan.

Understood 20000 may be above the limit, but the intention was to set to 100% duty cycle. Concerns noted, will stick to 2000.

To close the loop here, It looks like all I need to do is connect an external power supply or BEC (tapped off from main battery) to the servo rail (via one of the available Aux ports). Wanted to clarify that this will not cause issues on the FC (given that it is powered by the main module) or impact the performance of other flight critical servos/ESCs.

It should be fine to power your servo rail with +5V.

If this still not works, most probably you are running into this issue @Yuri_Rage commented above.

1 Like