ArduSub v4.5.3 and Relay!

Hello

I have update to new ArduSub v4.5.3 now the relay is not working anymore.

Relay is working with Cockpit v1.12.2 ,BlueOS v1.3.1 and ArduSub v4.1.1

I have also tried ArduSub v4.5.0,but is not working ?

Hi @an-ron,

Our documentation on this is definitely lacking. ArduSub 4.5 introduces some different parameters for managing servo outputs and relay options, so to configure a particular relay you’ll need to set:

Parameter Value
RELAY*_PIN output channel number (e.g. AUXOUT1 (50) for Pixhawk Aux 1; Navigator just uses the servo output numbers directly)
RELAY*_FUNCTION Relay (1)
RELAY*_DEFAULT As preferred
SERVOn_FUNCTION GPIO (-1)
Note: “n” is the selected output channel number for the relay (e.g. 9 for Pixhawk AUX 1 (factoring in the 8 MAIN pins), or the pin number for Navigator)

For clarity, the old BRD_PWM_COUNT parameter no longer exists, and the old RELAY_PIN* parameters (where * is a number) have been renamed to RELAY*_PIN for consistency with other similar parameters.

@an-ron -
You an find step by step instructions for this process, post update, here.

There is something i am missing in settings,i can’t get relay to work with ArduSub v4.5.3

I use a phidgets SSR Relay Board 3052_1 to pin 14 on navigator board and button 15 to toggle relay.


Hi @an-ron -
That relay you’re using requires a 5V control signal, and the Navigator only provides 3.3V! It is never going to work as a result…

You can verify you’re switching the output from 0 to 3.3V with a multimeter, I’d expect it is working fine! (Do this with your relay disconnected.)

There are definitely relays that can be controlled via a 3.3V signal, like this one. Keep in mind the amount of mA the Navigator can provide is fairly low - check the Technical Details
Technical Details
on the product page for more info.

Now I don’t understand,you misunderstand me.
I have use these relays in ArduSub v4.1.1 with Navigator and i working.
yes,requires a 5V control signal same as a Servo.

I’ve just tested this and the relay configuration on 4.5.3 seems to work fine for me.

I tried pins 9 and 14, and both showed up with the expected 1/0 values in the corresponding SERVO_OUTPUT_RAW values in MAVLink[1]

and also both output 3.3V on the relevant pin as expected (verified with a multimeter).

The SERVOn_FUNCTION parameters didn’t seem to make a difference (relay seems to just ignore and override whatever is configured), so I just left it as GPIO to be more clear for future modifications.

Some potential causes for the issue you’re running into:

  • Attempting to use joystick commands while Cockpit’s joystick configuration page is open
    • This doesn’t send commands to the vehicle, so isn’t expected to work
  • An electrical connection is not being made
    • Check the relay is plugged into the same pin you’re configuring, and the signal wires and connector aren’t damaged/broken
    • Make sure the signal ground and power supply ground are connected to each other
  • There is an incorrect or missing voltage
    • Double check your power connections and voltage level - switching is irrelevant if there’s no power being supplied
    • If you’re powering the relay from the Navigator’s + servo rail then make sure there is power supplied to it (e.g. via the AUX 5V pin)
    • From an online search your relay does seem to expect a 5V signal, and the Navigator does output 3.3V on its signal lines (as Tony mentioned), so it’s possible this is a problem, although depending on the switching threshold a 3.3V signal may be sufficient
      • If 3.3V signalling has worked previously then it can probably be expected to continue working, although may be somewhat flaky, and could fail if other peripherals are connected that cause the voltage to drop even slightly
  • The Navigator signal pin you’re using has had too much current pulled from it at some point, and is burnt out
    • Compare reported SERVO_OUTPUT_RAW 1/0 vs multimeter voltage reading
  • The relay is broken
    • Try with a different power supply and/or signal source to verify

Every component is different - you need to look at the specs of what you have.

There are many servo motors that can be powered with 5V (or a range of voltages) while still operating fine with (and being rated to use) 3.3V command signals.


  1. I was testing with Cockpit’s Plotter widget, but you can also use your MAVLink inspector of choice ↩︎

now I went back to ArduSub v4.1.1 and everything works.

There is nothing wrong with relay or power,relay is working with ArduSub v4.1.1.

There must be something in the settings that has been changed in ArduSub v4.5.3

I’ll try a little more and see.

Have now tested a little with ArduSub v4.5.3

When I choose Relay1_DEFAULT ON restart the Autopilot,the relay is coming ON and same procedure again only with OFF, relay is coming OFF.
so relay is working but when i use button 15 to relay 1 toggle nothing happens.

I have tested these versions and none of them work with the button :frowning:
4.1.2
4.5.0
4.5.1
4.5.2
4.5.3

Only versions 4.1.1 is working with relay 1 toggle button 15 :grinning_face:

Hi @an-ron -
Sorry for the issue and my misunderstanding of the hardware previously working! Can you try just the Relay 1 On/ Off mapped to buttons, rather than toggle, and see if that makes any difference?

I have now try Relay 1 On/Off mapped to buttons 15 and is working :grinning_face:

Something wrong with mapped toggle?

1 Like

Hi @an-ron -
It would seem so! I’ve noticed similar behavior from the Arm toggle - we’ll dig into it and see about a fix moving forward. Thanks for your patience and understanding - I’m glad we found a workaround!

Then I only use 2 buttons instead of 1 button to activate relay,until you fix problems with toggle button.
Thank you very much for your help.