OpenTX on Arduino

Post Reply
DrStein99
Posts: 9
Joined: Fri Jun 02, 2017 9:59 pm
Country: United States

OpenTX on Arduino

Post by DrStein99 »

I would like to create my own controller, use the Arduino hardware. Is there a setup guide, tutorial, or more information for this ? I was on the WIKI and found very little about it.

User avatar
deaconFlyer
Posts: 76
Joined: Fri Apr 05, 2013 11:22 am
Country: Canada
Location: Ontario

Re: OpenTX on Arduino

Post by deaconFlyer »

I have triggered lighting sequences and servos using Arduino fired from a Frsky receiver.

There was a significant amount of material on the net and it was actually quite easy to do, for example: https://www.sparkfun.com/tutorials/348

I think I ended up with a mixture of several articles in my final routines. Took the routines over to a Nano easily.

I do use a power filter and independent power system for the Arduino but that is primarily because I worry about power spikes from lights, servos etc. through the Arduino. You also have to make certain to separate the power systems from each other.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: OpenTX on Arduino

Post by jhsa »

I think he wants to make his own transmitter using an arduino, that is why he mentions openTX :)
There was a project on this forums based on an arduino Due I think. And I also think it did run Ersky9x, not openTX? Can't remember.. :(

João

Sent from my thor using Tapatalk

My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: OpenTX on Arduino

Post by Kilrah »

There's support for a custom radio based on an arduino mega2560.

Some stuff in the repo here https://github.com/opentx/opentx/tree/2.2/doc/Mega2560
And discussion from some people here https://www.rcgroups.com/forums/showthr ... and-OpenTx

Note that the arduino alone costs more than a full board made for the purpose and supporting all expected modern functionality like ARUni, so it's not a very worthwile choice anymore unless you have real arduino love...
DrStein99
Posts: 9
Joined: Fri Jun 02, 2017 9:59 pm
Country: United States

Re: OpenTX on Arduino

Post by DrStein99 »

Kilrah wrote: Sun Jun 18, 2017 10:20 am There's support for a custom radio based on an arduino mega2560.

Some stuff in the repo here https://github.com/opentx/opentx/tree/2.2/doc/Mega2560
And discussion from some people here https://www.rcgroups.com/forums/showthr ... and-OpenTx

Note that the arduino alone costs more than a full board made for the purpose and supporting all expected modern functionality like ARUni, so it's not a very worthwile choice anymore unless you have real arduino love...
Thank you for the information. I buy Arduino MEGA 2560 board cost me $10.00. I have never seen "ARUni" board, just looked it up, will cost $27 to get started. I see there is "AR9X" board there too - I don't know the difference - if they both run the same open-source software. As long as I can access the standard size DUPONT header pins, I'm good.

If Arduino is NOT a worthwhile choice - why is that the case?

User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: OpenTX on Arduino

Post by jhsa »

That Mega2560 project is quite a few years old. Things changed a lot since then. I have a 9x radio with er9x that had the processor replaced by an Atmega 2561.

The Ar9x board and ArUni are basically the same but the Ar9x was designed to replace the stock 9x board. The ArUni was designed for those who want to build their radios from scratch or upgrade old radios.
Both are a lot more capable than the mega 2560 or 2561. Both support voice and many other features out of the box..

João

Sent from my thor using Tapatalk

My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
DrStein99
Posts: 9
Joined: Fri Jun 02, 2017 9:59 pm
Country: United States

Re: OpenTX on Arduino

Post by DrStein99 »

The arUni looks like a good option. I want to pick out my own screen, joysticks, and be done with this - also have option to change the code myself, hopefully it's not written in assembler.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: OpenTX on Arduino

Post by MikeB »

The arUni runs ersky9x or openTx firmware. Both are open source, so are available for you to change. Why would you want to change the code?

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
DrStein99
Posts: 9
Joined: Fri Jun 02, 2017 9:59 pm
Country: United States

Re: OpenTX on Arduino

Post by DrStein99 »

I am fine tuning the MIX, or elevon algorithm. I am using mine for skid-steer (tank style) rc. On turns, the opposing signal needs to drop below 0 (or 1500) to give the motor some power when the direction signal is at 50% or greater throttle. I would also like to change the end-point interface, and add options to change the behavior of the signals. I also can not re-assign signals easily - the "sticks mode" just isn't working out for me.

I do not know how the openTX system behaves, what the interface is yet, I haven't built one yet. I am using Flysky IA6, and I am sure the openTX has better options - but I am fairly certain the mixed-mode (elevon) could use some more settings.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: OpenTX on Arduino

Post by MikeB »

ersky9x and openTx have no pre-defined "sticks-mode", every output is completely free form mixes. I would be very surprised if you need to do any code changes to achieve what you want.

Have a look at eepskye (for ersky9x) or Companion (for openTx), the PC programs that let you set up models on the PC.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
DrStein99
Posts: 9
Joined: Fri Jun 02, 2017 9:59 pm
Country: United States

Re: OpenTX on Arduino

Post by DrStein99 »

The "MIX" mode I'm trying to describe, is the function where a channel is slaved to another channel, to process opposite signal - so I would use one stick for direction, one stick for steering on a car with two motors, right and left sided and no steering mechanism (or tank).

What I mean by assigning signals, is where I want channel #1 assigned to the left stick up/down for model #1, then assign Channel #1 to right stick, left right on model #2. I want to easily assign whatever channel I want to whatever device I want - connected to the unit - so I could actually assign channel signal #1 to a momentary push button on the back, if I needed to do that (for whatever reason). This feature would help me from having to manually hard-re/wire the signals on the receiver end of this when I am trying to make adjustments in the middle of a hot field on my knee's in the grass where I can't quite get at the wires without disturbing 20 other things.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: OpenTX on Arduino

Post by jhsa »

You do not understand what Mike is trying to say, which is:

BOTH OpenTX AND Ersky9x ALREADY DO all that PLUS MUCH MORE..

I for example, have 4 push buttons on the back of most of my radios, I have Ersky9x installed, and I assign them to whatever I want or need.
I am even able to automate stuff with my radios.
You are talking about modifying the firmware when you don't seem to even have looked at it..
Please don't compare openTX or Ersky9x with the Flysky i6. It is like comparing an old typing machine with a modern computer :D

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
DrStein99
Posts: 9
Joined: Fri Jun 02, 2017 9:59 pm
Country: United States

Re: OpenTX on Arduino

Post by DrStein99 »

No, I haven't built it yet - I am still deciding if I want to do my own code entirely or use that one. With my own code & hardware, I know exactly what everything does, can do, and how to change it.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: OpenTX on Arduino

Post by jhsa »

Up to you :) Good luck.. It is a lot of work.

OpenTX and Ersky9x have years of constant development.
If you base your project on one of them, please don't forget to give credit to the developers

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: OpenTX on Arduino

Post by MikeB »

As I said above "Have a look at eepskye (for ersky9x) or Companion (for openTx), the PC programs that let you set up models on the PC.".
These will show you what the existing firmware options provide.
I'm sure you will find either will easily do what you require. I have a twin motor 'plane (Mosquito), that was difficult to steer while taxiing. I've added mixes so a switch enables "differential thrust" allowing the rudder stick to be mixed with the throttle to reduce the thrust on one side. This is very close to, if not exactly, the sort of thing you require.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
DrStein99
Posts: 9
Joined: Fri Jun 02, 2017 9:59 pm
Country: United States

Re: OpenTX on Arduino

Post by DrStein99 »

One thing I would like to do, is swap the analog potentiometer stick signals, to quadrature encoder signals.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: OpenTX on Arduino

Post by MikeB »

I would think for that to work, you will need 3 digital inputs for each stick (A, B and Ref) instead of a single analog input. You may have trouble finding enough inputs unless you sacrifice some other functionality.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
DrStein99
Posts: 9
Joined: Fri Jun 02, 2017 9:59 pm
Country: United States

Re: OpenTX on Arduino

Post by DrStein99 »

2 axis for each stick, process 4 digital inputs. 8 total, 2 sticks.

How is it possible to take 1 analog value from a 2 axis potentiometer or hall effect sensor?

There are only about 40+ pins on Arduino mega 2560, I sure hope the software does not use 36 of them for less then a dozen switches, knobs.
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: OpenTX on Arduino

Post by Kilrah »

The software supports a heck of a lot of functionality and yes most pins are already used ether for basic or optional functionality. Some of that that you don't need could be removed to make room for what you want of course.

Again you'd better dig in the software and understand it now. Completely pointless to discuss modifying it when you don't even have an idea of what it currently does.
DrStein99
Posts: 9
Joined: Fri Jun 02, 2017 9:59 pm
Country: United States

Re: OpenTX on Arduino

Post by DrStein99 »

At this point, I believe all I want to use is the wireless module to push the serial data from my own hardware. Sifting through a large project to modify the code is more effort that writing it myself.
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: OpenTX on Arduino

Post by Kilrah »

Then nothing we do is involved in this.

Post Reply

Return to “openTx model setup”