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

  • The third picture is of the bottom edge of the LCD screen. Open the radio and remove the 5 screws that hold the screen in and tip it up and you will see the pins I soldered the wires to. The picture attached here shows where the connections are on the back of the main board. You can follow the wires to the back board and make your connections there. It's easier that way. The connection marked + goes to the Vcc terminal on the Pro Mini, the - connection goes to the any Gnd terminal on the Mini and the signal connection goes to terminal #10 on the Pro Mini.

    Taranis Programming;   (this is what I did to get it to work)

    page 5, chan 6 EDIT

        Input name=mode

       Source=TR1

    Page 6;  chan 6, EDIT

       Source=mode

       Weight=100

       Switch=  -----

       Multpx=Replace

    That should work using the program from Stefan Gofferje. Any momentary contact switch should work.

    The push buttons are really the hot setup. Fast and intuitive. I love them.

    I may put this and all the pictures on page on my website eventually.

    3702052491?profile=original

  • Awesome, thanks for those!  I'm still having trouble seeing exactly how you wired(interfaced) the arduino board to the taranis.

  • I connect inside the Taranis. I sent a bunch of pictures in a reply to your3702051966?profile=original PM. Let me know if you don't get them. I'm going to try to put them here too. They will do more good here than on my "comment wall", whatever that is.

    The way this handles pictures is kind of clunky but.......


    3702052154?profile=original3702051815?profile=original3702051451?profile=original3702051788?profile=original

  • Yes, I wanted to create a tx that was pretty rubust:)  So I noticed that you did the arduino mod to your taranis, can you tell me how you connected it please,  is it through the trainer port?

  • Holly smokes!! You've taken mods to a whole new level.

  • My custom Taranis x9d. Would someone be willing to explain to me how I would go about wiring in the Arduino pro mini to the Taranis, thanks.3702053047?profile=original

  • Don't know your details but I am running this code on a Taranis on ch 5.

  • Hello!

    Subscribe to the issue, is it possible to assign ppm on Channel 5?

  • Great.  It is a wonderful bit of code.  I am going to try it this weekend after I attempt to alter the the stream to output the mode change to channel 5...or is that ill advised?

This reply was deleted.