(solved) Adding 3-pos switches to 9XR on openTX 2.1

Cant get your radio to work? General Hardware issues?
Rolf
Posts: 27
Joined: Sat Feb 14, 2015 11:58 am
Country: Germany

(solved) Adding 3-pos switches to 9XR on openTX 2.1

Post by Rolf » Sat Jun 15, 2019 5:43 pm

Dear all,

while waiting for a new Taranis board I reactivated my old 9XR. I have gotten so used to the two 3-pos switches on the left hand side, I use them in nearly all my models (on the left I have throttle, so that hand is more or less free to move switches whereas I never, never take my right hand away from the gimbal). Now with the 9XR, although I love it much, I have a problem: no 3-pos switch there.

I ordered some switches after very briefly searching if it's possible to add on more 3-pos switches. Now they arrived and build in as ELE D/R and RUD.D/R and only now I searched in detail on how to connect them.

I use Companion 2.3 for the Taranis. After trouble with that software and the 9XR I found this radio is only supported up to Companion 2.1. In this software I don't see any way to activate additional 3-pos switches. I further can't find the "Hardware menu" on the radio and think now, that's only applicable for the er9x firmware.

So Question 1: Can anybody confirm, that I can not add 3-pos switches to a 9XR running on openTX?

While searching I found this:
https://github.com/opentx/opentx/issues/3258

Question 2: Why would somebody add that to a 2.2 milestone if the radio is only supported up to 2.1?

Qquestion 3: In case I can't go the openTX way: Is there an easy way to transform openTX models to er9x?

Thanks & enjoy your weekend,
Rolf
Last edited by Rolf on Tue Jun 18, 2019 5:42 am, edited 1 time in total.


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

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by jhsa » Sat Jun 15, 2019 7:10 pm

I don't think openTX ever supported extra hardware like switches on any radio.
You might have a better chance with Er9x which still supports that radio. Although I have never seen an older 9XR with extra switches, it might very well be possible, but only a couple, and only with Er9x.
I have a couple extra switxhes on my er9x radio, one of them being an old 2 position switch converted to 3 position. Also, the voice module I have built for it allows for 2 more switches. I use them as pushbuttons..

João

Sent from my BLN-L21 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
jhsa
Posts: 18956
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by jhsa » Sat Jun 15, 2019 7:12 pm

Ahh, and no, you cannot easily convert openTX models to Er9x. They are not compatible..

João

Sent from my BLN-L21 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

Rolf
Posts: 27
Joined: Sat Feb 14, 2015 11:58 am
Country: Germany

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by Rolf » Sat Jun 15, 2019 7:30 pm

jhsa wrote:
Sat Jun 15, 2019 7:12 pm
Ahh, and no, you cannot easily convert openTX models to Er9x. They are not compatible..
Yeah, I expected that answer. Thx anyway João. I'll try my best and programm the FunJet first. See where this brings me to.

Rolf

Rolf
Posts: 27
Joined: Sat Feb 14, 2015 11:58 am
Country: Germany

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by Rolf » Sun Jun 16, 2019 10:02 am

I am lost. Have flashed er9x and can find the settings in the hardware menu. Have ground connected to the middle pins of the two 3pos switches and the original signal cable on bottom pins. But where to connect the 'new' upper pins to?

I searched and searched (both the forum and my radio ;-)) but can't find any J31, Pin7, LCD_WR, J2 or Pin2 .

Just to get this right: I have a plain 9XR. No Pro, no 9xtreme, no skywhatsoever....


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

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by jhsa » Sun Jun 16, 2019 11:25 am

Yeah, your radio has the backlight control already built in, right?. In that case PB7 wouldn't be available.
You don't have haptic installed, right?
How many switches you need to convert?
You could try pin 33 L-RW, I think, pin 43 PG2. I am not sure pin 35 is available on your radio's processor, probably not.
What processor does it have? Atmega128?
Pin 35 is only available on the Atmega2561 I think.

João
Attachments
introduction-to-ATmega128 (1).png
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: 16578
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by MikeB » Sun Jun 16, 2019 11:37 am

PG2 is not used on the 9XR. This is pin 43 so you would need to connect directly to that processor pin.
PC0 is available, pin 32 35 of the processor. This is connected to pin 9 of U6 so that is an easier place for a connection.
LCD-WR is on PC4 (pin 39). To use this you would need to remove the resistor to which it connects (R505?), then connect either to processor pin 39 or the pad of the removed resistor which connects to pin 39.

PG5 is only available on a '2561 processor.

Mike
Edit: Correct PC0 pin number.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

Rolf
Posts: 27
Joined: Sat Feb 14, 2015 11:58 am
Country: Germany

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by Rolf » Sun Jun 16, 2019 12:11 pm

Thanks guys for the quick reponse.
jhsa wrote:
Sun Jun 16, 2019 11:25 am
Yeah, your radio has the backlight control already built in, right?.
Right.
jhsa wrote:
Sun Jun 16, 2019 11:25 am
You don't have haptic installed, right?
Right again.
jhsa wrote:
Sun Jun 16, 2019 11:25 am
How many switches you need to convert?
Two
jhsa wrote:
Sun Jun 16, 2019 11:25 am
What processor does it have? Atmega128?
And right again (Do you have a camera installed in my room?).

Ok, then I will go for PC0 & PC4. Which settings in the hardware menu would that correspond to?

Cheers,
Rolf

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

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by jhsa » Sun Jun 16, 2019 12:23 pm

The settings would be L-WR and PC0 in the hardware menu. You might have to check the setting to make L-WR an input.

And no, i don't have a camera installed in your room :mrgreen: I asked about the processor because the earlier 9XR was sold with the Atmega64 processor. later it was sold with the Atmega128.. :)

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
jhsa
Posts: 18956
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by jhsa » Sun Jun 16, 2019 12:27 pm

MikeB wrote:
Sun Jun 16, 2019 11:37 am
PG2 is not used on the 9XR. This is pin 43 so you would need to connect directly to that processor pin.
PC0 is available, pin 32 of the processor. This is connected to pin 9 of U6 so that is an easier place for a connection.
LCD-WR is on PC4 (pin 39). To use this you would need to remove the resistor to which it connects (R505?), then connect either to processor pin 39 or the pad of the removed resistor which connects to pin 39.

PG5 is only available on a '2561 processor.

Mike
Mike, is the picture i posted above wrong? In the picture, PC0 is pin 35, and pin 32 is PD7..

Thanks

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

Rolf
Posts: 27
Joined: Sat Feb 14, 2015 11:58 am
Country: Germany

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by Rolf » Sun Jun 16, 2019 1:09 pm

As my experience with soldering on or near the cpu is ... hm, lets say, not so good, I would like to double check with you what I am doing. Here is an Image of my cpu:
cpu2.png
Pin39 = PC4 is connected to what looks like R50. Remove R50 and take empty pad connected to the cpu for one switch

Pin 35 is described as PC0 in many different images I found. But it's not connected to anything (yet). I presume I could solder there although my stomach starts to itch when I only think about it (remember the mess I did to my Taranis).

Pin32 = P07 is connected to R31.

Mike, can you confirm wether P35 or P32?

Edit: Before removing R50 I think I go for P35(PC4 PC0) and P43(P02 / PG2). That's just adding 2 wires to 2 Pins. Even I should manage to do that without breaking another radio.

User avatar
MikeB
9x Developer
Posts: 16578
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by MikeB » Sun Jun 16, 2019 1:40 pm

PC0 is on pin 35 (I've corrected my post above).
PC0 is connected to pin 9 of U6 so that is an easier place for a connection. You may check with a meter.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

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

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by jhsa » Sun Jun 16, 2019 1:42 pm

Thanks for confirming Mike..

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

Rolf
Posts: 27
Joined: Sat Feb 14, 2015 11:58 am
Country: Germany

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by Rolf » Sun Jun 16, 2019 2:42 pm

OK, ELE switch is on Pin 35 and works like a charm (read about U6 only afterwards).
The RUD switch is on Pin 43, but I can't set it in the hardware menu? The AIL switch is there, and so are PB1 and PB2, but no RUD switch. Noooooooo ... There is also PG2 Input and PG7 Input. I activated PG2 Input but I see no difference. I also tried Long press Menu since I read a post from you, Mike, to you, João, somewhere about this, but no luck.

I guess I could swap the RUD and AIL switches but if its possible I prefer not to.

Rolf

Edit: for now I routet the RUD switch Signal to the AIL switch and visa versa. Works, I have now two 3pos switches on the left side. Lets hope I dont forget at some stage I swapped the switches …

On to programming …

Edit2: No big deal, but I wonder if this should be like this: If my ELE switch is pointing up, I get the up arrow in the DiagSwtch Menu. Same for mid and bottom Position. So I think wiring is ok. But I do get a switch Alarm for ELE on Startup. To avoid the alam I have to set the ELE to the bottom position on startup. Strange?
Last edited by Rolf on Sun Jun 16, 2019 5:44 pm, edited 1 time in total.

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

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by jhsa » Sun Jun 16, 2019 5:30 pm

Rolf wrote:
Sun Jun 16, 2019 2:42 pm

The RUD switch is on Pin 43, but I can't set it in the hardware menu?
Set it to PG2. that is pin 43. Check the picture i have attached above. You need to solder directly to the pin.
The AIL switch is there, and so are PB1 and PB2, but no RUD switch. Noooooooo ... There is also PG2 Input and PG7 Input.
Forget PB1 and PB2. they don't apply to your radio unless you build a voice module.
PB7 is the pin that is controlling the radio backlight, so, also forget about it.


You can also try pin 39 as Mike said.. That means you should have enough pins for the switches you need :)

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

Rolf
Posts: 27
Joined: Sat Feb 14, 2015 11:58 am
Country: Germany

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by Rolf » Sun Jun 16, 2019 5:48 pm

João, the RUD switch is not in the Hardware menu, so I can not set it:
IMG_4301.png

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

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by jhsa » Sun Jun 16, 2019 7:01 pm

Ahhhhh, yes.. I see.. All my 9x radios except one use other hardware :)
Then I think it is only possible to convert the AIL and ELE switch to 3 position. Perhaps Mike could add the RUD switch as well if possible?

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

Rolf
Posts: 27
Joined: Sat Feb 14, 2015 11:58 am
Country: Germany

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by Rolf » Sun Jun 16, 2019 7:22 pm

Mike, yes , please ;-)

User avatar
MikeB
9x Developer
Posts: 16578
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by MikeB » Sun Jun 16, 2019 7:50 pm

That will take a bit of time to write and test. I hadn't realised it wasn't supported, but then I haven't been using a 9X for a while. My main radio for flying is a Taranis X9D+, with a QX7 for some indoor models.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

Rolf
Posts: 27
Joined: Sat Feb 14, 2015 11:58 am
Country: Germany

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by Rolf » Mon Jun 17, 2019 12:52 pm

Last night both switches worked, today the switch connected to pin 43 does not work (as expexted):
  • Up position: original signal wire switched to ground, gives me arrow up in the DiagMenu: OK
  • Down position: pin 43 switched to ground, gives me arrow down in the DiagMenu: OK
  • Mid position: None of above switched to ground, still gives me arrow down in the DiagMenu: NOT OK
When I check voltages on pin 35 I see 5 V when the switch is not connecting it to ground. On pin 43 I always have 0V, no matter of switch position.

Could that be because pin 43 is "hanging in free air" when the switch is in middle position?
So sometimes its high, other times low, depending on the weekday and position of Mars?
Should I add a 1k or better 10k resistor to +5V so pin 43 has always got a defined level?

Thanks,
Rolf

PS: Taranis board has arrived today. It has to wait though, I want the 9XR up and running first

User avatar
MikeB
9x Developer
Posts: 16578
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by MikeB » Mon Jun 17, 2019 2:03 pm

The processor should have an internal pullup resistor on pin 43 (PG2). Have you set PG2 as an input in the hardware menu?

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

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

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by jhsa » Mon Jun 17, 2019 2:04 pm

Check your soldering. You might have shorted pin43 to ground somehow..

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

Rolf
Posts: 27
Joined: Sat Feb 14, 2015 11:58 am
Country: Germany

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by Rolf » Mon Jun 17, 2019 3:17 pm

MikeB wrote:
Mon Jun 17, 2019 2:03 pm
The processor should have an internal pullup resistor on pin 43 (PG2)
That means I should be able to measure ~5V there, when not connected to ground via switch?
MikeB wrote:
Mon Jun 17, 2019 2:03 pm
Have you set PG2 as an input in the hardware menu?
yes
jhsa wrote:
Mon Jun 17, 2019 2:04 pm
Check your soldering. You might have shorted pin43 to ground somehow..
triple checked that, but will do again. As mentioned, it worked yesterday. But I will hunt that solder blob or wire or whatever it is. Will keep you updated

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

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by jhsa » Mon Jun 17, 2019 3:28 pm

Use your multimeter to check for a short from pin 43 to ground. turn the radio power off first, you don't want to damage the regulators or the processor by sorting something ;)

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

Rolf
Posts: 27
Joined: Sat Feb 14, 2015 11:58 am
Country: Germany

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by Rolf » Mon Jun 17, 2019 5:06 pm

I have 5.8 mega ohm between pin 47 and Ground. Checked again there is no short to neighbouring pins either. Damn. If I can't find it I think I'll got for pin 39. R50 to be removed was correct?

Rolf

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

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by jhsa » Mon Jun 17, 2019 5:09 pm

Not pin 47, pin 43.. :)

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

Rolf
Posts: 27
Joined: Sat Feb 14, 2015 11:58 am
Country: Germany

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by Rolf » Mon Jun 17, 2019 5:31 pm

äh - yes, I measured the right one, just gave him the wrong Name ...

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

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by jhsa » Mon Jun 17, 2019 6:10 pm

It there is no short to ground, if there is no voltage, then check your settings again. Unless you blew up the internal pullup resistor of course.. :o

But I would check the settings. Please post a picture of your hardware menu. The page where you configure the extra switches..

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

Rolf
Posts: 27
Joined: Sat Feb 14, 2015 11:58 am
Country: Germany

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by Rolf » Mon Jun 17, 2019 9:13 pm

8C8CD7D4-1FF9-4B4A-BE48-4184F91EE348.jpeg

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

Re: Adding 3-pos switches to 9XR on openTX 2.1

Post by jhsa » Mon Jun 17, 2019 9:34 pm

Ok, please check that little box at the bottom that says" PG2 Input".. I wonder how it did work before without you checking it.. :)

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


Post Reply

Return to “Hardware”