Arduino-based mode switch

FILE0080.jpg?width=750First, I used combinations of switches to select the mode of my APM. But IMHO, there is hardly anything more counter-intuitive and if things hit the fan, you can be sure to switch to the wrong mode out of pure hectic.

Next, I replaced a pot of my transmitter with a 6-position switch and variable resistors. That is already better, but to get to one mode, you likely have to switch through other modes. Also, without any markings, again, not very intuitive and it's impossible to see at one glance which mode you are in.

Finally, I hacked together a small board with 6 pushbuttons, 6 LEDs and an Arduino Pro Mini. The Arduino creates an 8-channel PPM stream of which channel 1 contains the data for the mode. The whole thing connects to the trainer port of my 9x. Additionally, I steal 5V from the display output of my FrSky module but theoretically, the Arduino could also be powered by the 3S transmitter LiPo. The program is pretty easy. Check the buttons and set the respective PPM value. The LEDs are not set by the buttons but by the actual value of PPM1 - just to be safe, in case e.g. the Arduino resets or something.

Here's the schematic:

APM_mode_switch_schem.png?width=750I'll attach design files for the PCB and the source code in the comments then.

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • I fixed the downloads. Should work now.

  • I am not sure what that means....However, I just got the code.  Thank you very much

  • RobC  my comments to your page have been "moderated"?

  • I figured i will never need twelve switches and sliders but I sure need the APM buttons in handy spots. I use the buttons for flaps on a non-APM Bixler 2 and the buttons on my APM B2 and everything is internal. If anyone is interested in this I can take pictures of the inside. By the way, all the radios I've put together using the Arduino board have used the code from Stefan's original Arduino Mode project. It works flawlessly. Thanks again Stefan

  • I have put together a setup with my Taranis using the illuminated push buttons I used on my 9XR that works pretty good. I have a copy of the code too, or I could3702009539?profile=original upload it from one of my controllers.

  • Stefan, I was trying to download the code for your arduino-based mode switch, but your website says the file is missing a mime extension and won't allow download (although the Gerber files transmit). Would love to see the code. Thanks

  • With Taranis you can use 6 momentary pushbutton switches rather than the cumbersome 6-position rotary switch. You need to program 12 logical switches, 6 special functions, and a global variable. The pushbuttons don't light up as they are pushed, but that's no negative if you've got voice announce, flight mode on telemetry or OSD...

  • Cool!

  • This looks great, Stefan! 

  • I have Taranis, right before flight I use my 2 switches to remember my flight modes. Also the external display is,,,well horrible looking IMO

    IMO the announcements of the flight modes is worth its weight in gold (probably not if your only using say 3 flight modes), but I use minimum of 8 flight modes and the voice announcements are a big plus for me (it also lets others studying my flight w t h is going on.

    And another note, with Taranis, you don't have to take your fingers off the sticks to flick a switch, big plus when a hairy situation pops up, YMMV.

This reply was deleted.