In Denmark the law states that an alarm should be mounted on a multi-copter when used professional.
The alarm should sound when the multirotor goes into Failsafe RTL or RTL from RC-Tx.
I have a alarm (with built-in driver) that sounds like a burglar alarm and a small servoswitch. When it is connected to a servo output and looses the RC-Rx signal or goes low, it triggers a relay and sounds the alarm. The alarm is powered by 12 volt via a relay.
I need help to make a servo-output from/on the Pixhawk flight controller to my servoswitch, when Pixhawk goes in to RTL mode. It doesn't matter if the servo out is high or low.
This task is the final check, and absolutely critical, for me to get my final checkout to receive my commercial license in Denmark. Any help will be greatly appreciated :-)
Best regards, Martin
Air Spot, Denmark
Replies
Hi,
I plugged a discovery buzzer on a spare channel of my Rx and set the F/S level of that channel high enough to trigger the buzzer. Only works on radio F/S though. I am also able to manually trigger the buzzer if I loose sight on my quad (landing in trees or field for instance)
Yes, I have this working too but in order to get my permit, the alarm has to be triggered by the flight controller in case of RC Tx/Rx failure/failsafe.
Cheers, Martin
Hi Martin,
You could do this by adding this code:
relay.on(0);
in failsafe_radio_on_event() in ArduCopter/events.pde.
That would just be a fix for your local use however. To have a chance of being accepted by Randy for a release it would need a parameter to enable/disable this behaviour. Probably a parameter called "FAILSAFE_RELAY" would make sense. It would be an integer which would say which relay to change on failsafe events. The default would be -1, meaning don't set any relay.
Using the relay object will give you a TTL voltage high on failsafe and low when no failsafe. That should be pretty easy to hookup to your alarm.
Cheers, Tridge
Wow. Great reply :-) I knew it was a simple task for the right people ;-)
Is this something I can apply locally myself with the right guidence, or should I hope Randy will see this reply. I have no experience in FC code/programming.
Regards, Martin
why don't you have a go at building it yourself first. Have a look at dev.ardupilot.com for instructions on building firmware.
If you get completely stuck then myself or one of the other devs could help you out I'm sure.
Cheers, Tridge
Thanks for your reply, Andrew.
I don't like to sail in uncharted waters and for me to add coding to my skills would take a lot of time as I don't know anything.
As I posted in my first thread, this task is critical for me. I am willing to "reward" any solution that is easily applied to my flight controller. I feel so close to the solution now.
Please help!? Anybody?
Best regards, Martin
I've added a FS_RELAY parameter here:
https://github.com/tridge/ardupilot/commit/72e18e1cc427d4146e37828a...
and built a Pixhawk firmware for it here:
http://uav.tridgell.net/copter-fs-relay/
this is completely untested. I don't fly copters much at the moment (I'm the plane/rover maintainer), so if you want to actually be confident this would work you'd need to wait for Randy to have a look at it.
Also note that the firmware I've built is based on current git master, so it is a bleeding edge firmware without as much testing as a full release. If you want to wait for a full release with this feature that is likely to take a while.
You may like to open an issue for this so it doesn't get forgotten.
Cheers, Tridge