I read https://ardupilot.org/copter/docs/common-relay.html and tried to control a relay, https://img.filipeflop.com/files/download/Datasheet_Rele_Songle_SRD-05VDC-SL-C.pdf,
First I setup the channel in my transmitter, for this I am using channel 6. No problem here, just go and setup the input and mixer pages. After that I went to user params in mission planner and selected the relay on/off for rc6_option.
I even confirmed in full parameter List that RELAY_PIN is set to 54(54:AUXOUT5).
And it seems it’s not a problem in the transmitter, because I tried using the Servo/Relay option in Mission Planner and the relays still does not turn off.
Anyone can advise how to solve this?
If it’s appropriate for the FC you are using do you have Auxout5 configured for GPIO?
Hello, I am using a cube black and the relay is connected to it via a signal pin, the power and gnd are external to the cube.
Below some images from my configurations:
Those are all the parameters I could find in mission planner related to relay, aux, and rc. I dont know if its connected but it seems my switch for emergency stop is also not working, while the switch for flight mode is.
if those are not sufficient, what other parameters should I look
Not all. To allow Aux5 out to be GPIO BRD_PWM_COUNT has to be 4 or less. But this is likely already true as 4 is default I think for Cube Black. Also, you know that the relay output is 3.3Vdc right? Post your parameter file if you like.
I know the relay output is 3.3VDC, it works, when I plug in the signal pin the relay connected to it makes nose. The problem, is that when I try to send a low signal to turn it off, it doesn’t happen.
You wrote following: Hello, I am using a cube black and the relay is connected to it via a signal pin, the power and gnd are external to the cube
Is your gnd somewhere connected to the cube?
Hello, I said are external, but all the grounds in the system are the same
Hello, I am working on the development of a Rover, I have the same problem using the relay, I tested gnd and the signal it always keeps with voltage.
activating the relay and they do not turn off.
i’m sorry for my english i’m brazilian and i’m not good in english
I noticed something. My relay that is connected to the relay pin, it’s not just a relay, it’s more like a relay board. I deleted my mode from transmitter and tried to bind, and after testing the switch for the channel 7, that I used for the relay, I noticed a very weak change in the light from the relay board. So at least it’s connected and something is happening? Dont know why it just become weaker and not turn off
Connect a voltmeter only to the output and test it. The Relay function is very simple. If it works with the meter, which has high input impedance and it doesn’t with whatever you are driving then it’s not an issue with the relay output on the FC.
On one of the screenshots, you have RPM_PIN set as 54 (aux 5). Change that to -1 so it’s not conflicting.
Did you check BRD_PWM_COUNT as the wiki page suggests?
yes, it is 4 as default, it should be working
So using the relay control panel from mission planner, I put in low and high and then I used a voltmeter to test both. Low i got 1.3 V and high I got 3.8. So definitely there is something strange because according from the https://ardupilot.org/copter/docs/common-relay.html, it should be between 0 and either 3.3 and 5.
Maybe I need to drive the pin using mosfets? But shouldn’t the pin allow to set zero through MP?
When I configure a bench Pixhawk (similar in this respect to Cube Black) as you have described it, and per the attached parameter file, the Aux5 output toggles between 29mv and 3.27V with a ~1800us threshold on Chan 6.
Relay.param (16.9 KB)
which firmware do you use?
This one. I flashed, configured and tested it just before making the previous post: