First, 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:
I'll attach design files for the PCB and the source code in the comments then.
Comments
Forgot: The 5V reg on the Mini Pro SHOULD handle up to 20V.
Yeah, I have a Turnigy 9x with OpenTX software. That allows free assignment, but in my code you can as easy have the values fed to Ch5 or 8. Just change 4 or 5 lines. I could even make the channel configurable via a #define statement.
So you grab the PPM stream from the TX, decode it, add your values, reencode it and then feed it to the TX module? That's quite some work for a poor small ATMega 368 ^^. I hope, you don't get jitter problems.
I like it, very nice . I think this is the step to full working coptit in GCS ...
Wow, I am almost done soldering my set up for a Hitec optic6. I assume that with your Tx you can program the trainer function as to with channels it switches? I thought channel 1 was for roll and mode on some other channel.
Any how, the Hitec trainer port ppm is at full bat voltage so I hacked directly into the Tx board to "intercept" the ppm stream at 5 v. All channels are read by Arduino mini and the control sticks are passed directly to the output ppm generator. Other channels can be changed/rearranged or generated from buttons pots ect. I originally developed this system for an imu3 head-tracker. To keep thing in sync the timing of the pulses is inteript driven using the "interrupt capture pin", D8. In fact it will only run if it is receiving a ppm signal. I am using the gear switch for mode selection. If there is a problem with the Arduino mini I have a bypass switch on the ppm line, so I can switch back to stock mode and will still have manual and one other mode with the 2 pos gear switch. Will post everything as done as the hardware is done and tested.
@R.D.:
The tray is from Hobby King - Link. It needs some improvement but it's a kit for $10 - if you anyways order something there...
@Göran:
I agree absolutely! That's one of the reasons why I started my integrated GCS project some time ago. The project is currently stalled because I'm waiting for materials and data, mainly from FrSky, but on my desk are already plans for extensions, as some components such as the Sky9X-board which I wanted to use are not available any more. I'm probably going to do the RC part myself also to have a truly fully integrated system. The mode switch was basically one step in my evaluating new possibilities - here, creating a stable PPM stream with an Arduino.
I like it Stefan, nice work!
Excellent idea and work! Thank you!
All your observations are true and I too am concerned about 'wrong mode' syndrome. This is probably the cause of many bad events reported here in the community.
I like your transmitter tray also. One is in the process of layout in my shop.
-=Doug
Beatifully done, very very nice!
The screen is a FrSky FLD-02. That has nothing to do with the mode switch, except that I take the 5V power from there, as I wrote.
I made in vertical deliberately, so I can reach all buttons with my left hand without removing my hand too far from the left stick. If it was horizontal, I would have to move my left hand around or even use the right hand, which is IMHO a NoGo on a mode 2 transmitter.
No attachments in blog posts?
Here are the files:
-
3
-
4
-
5
-
6
-
7
of 7 Next