Relay ON/OFF for lights control out of pixhawk

Hi,

I have a set of light (not the lumens) and i wanted to activate them on demand.
I have a BR2 with the PIXHAWK, do i need to look for a relay ?
If yes do you now voltage of the PWM pins out of the pixhawk ? 3.3V or 5.5v ?
If you have used a relay for a similar purpose, i am interested in knowing which one you used.
Thank you very much
eric

Hi @eric84200 -
The pixhawk outputs 3.3V signals. It may be possible to use the lights, but more information is required. Are the lights controlled via a PWM signal, or are you simply trying to turn them on and off? If the latter, a solid-state relay that can be triggered by the low 3.3V signal is all you should need - see instructions here. These instructions should work for both the Navigator and the Pixhawk.

Hi Tony, thanks for your answer it is exactly the answer i was looking for :slight_smile:
Simply trying to turn them on and off
Have a good day
eric

Hi,
Unfortunately i have not succeed to trigger my relay…
As i connect the relay to the pixhawk it immiadiately switches on.
i tried all the aux port on my pixhawk and i have the same problem… it looks like signal is high on all aux ports.
you will find below pictures of my settings and i tried many others…
Do you have any idea on how to figure this out ?
thanks
eric



Hi @eric84200 -
I think the issue is using AUXOUT pin - try just putting the pin # of the channel you’re trying to use to control the relay (what channel is this?)

So you’ll set
RELAY1_FUNCTION to 1

and
RELAY1_PIN to 12 (if using AuxOut4)

Just like the picture in the instructions linked:

HI tony, i don’t see any RELAY1_FUNCTION
I only have the ones on my first picture…

Hi @eric84200 -
That’s strange - what version of ArduSub are you using?
Maybe try typing out Relay1 in the search field - you stopped part-way…

Hi @tony-white, version is : 4.1.2

should i upgrade it ?

You will see nelow the screenshot of what i get on autopilot parameters when i write RELAY1

Thanks for your time.

Eric

Hi again, so i upgraded my autopilot and this is what i get.
I changed settings as you mentioned before but can’t get it working… i attached a picture of the settings i have from autopilot parameters.
my relay is connected onto aux 4 on the pixhawk.
i tried all the others aux port too to be sure.
As soon as i connect it the relay triggers…
this is the one i use : Amazon.com: Teyleten Robot DC 1 Channel Optocoupler 3V/3.3V Relay High Level Driver Module Isolated Drive Control Board 3V/3.3V Relay Module for Arduino (Pack of 5) : Industrial & Scientific
thanks for your help
eric

Hi @eric84200 -
Can you share some pictures or a diagram of how you are wiring in that relay?
Does the state change if you change the Default?

Updating to 4.5 + on Pixhawk can cause issues, but may be worth a try. If it doesn’t update from BlueOS, you’ll need to connect the Pixhawk directly to your computer and use QGC to update (or downgrade if the update doesn’t get things working for you.)

Hi Tony,

You will find below my wiring diagram.

I tried to change default to 0 and to 1 but no changes.

The 4.5 update on the autopilot looks to work well.
Thanks
Eric

Hi @eric84200 -
That looks right, but I’d be interested to know where you’re tapping into 5V power - you wouldn’t want your driven load to interfere with the power to BlueOS!

Checkout this forum thread - it seems like you may need to use another port for this to work on Pixhawk…

1 Like

Hi tony my 5v comes out from a bec which supplies also the companion.
i downgrade my pix firmware and touched some setting and i got it to work on aux 5. after readind the forum thread you mentioned above.
thanks for your help.
now i need to set back up every settings since i reset to factory almost everything :slight_smile:

1 Like