Stock/er9x Rotary Encoder

er9x is the best known firmware. It has a superb range of features and is well supported by the community. Well worth trying out.
Iksbob
Posts: 121
Joined: Wed Dec 28, 2011 1:06 pm
Country: -

Re: Stock/er9x Rotary Encoder

Post by Iksbob » Sat Nov 12, 2016 1:31 pm

MikeB wrote:Using a test meter measure the voltage on the connection on the Arduino.
To expand on that:
Get a multimeter, preferably a digital one. Harbor Freight (a bargain tool store in the US) sells them for less than $10, so hunt around a little and you should be able to find something affordable.
Plug the black test lead into the COM socket on the meter, and the red one into the V / Ω / everything but A socket.
Set the meter to volts DC (VDC, or sometimes a solid line with dashes under it:). There may also be just positions for volts (V) and a switch for DC/AC. If you have a manual-ranging multimeter, there will be several numbered positions (ranges) for volts. The number represents the maximum value the meter can read on that range setting. The lower the range, the more precise the meter is, so pick the range just above the highest voltage you expect to encounter (5V in this case). If your meter only has one setting for V or VDC, it's an auto-ranging meter which will pick an appropriate range value for you.
Open your radio and power it up. Touch the black/COM test probe to the GND pin of the Arduino, or bare metal/solder of the wire connected to the GND pin. Touch the red test probe to the (bare metal/solder of the) wire you want to test, in this case one of the encoder wires, button wires and/or encoder common wire.

User avatar
OctavioS
Posts: 578
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: Stock/er9x Rotary Encoder

Post by OctavioS » Sat Nov 12, 2016 5:22 pm

Iksbob wrote:
MikeB wrote:Using a test meter measure the voltage on the connection on the Arduino.
To expand on that:
Get a multimeter, preferably a digital one. Harbor Freight (a bargain tool store in the US) sells them for less than $10, so hunt around a little and you should be able to find something affordable.
Plug the black test lead into the COM socket on the meter, and the red one into the V / Ω / everything but A socket.
Set the meter to volts DC (VDC, or sometimes a solid line with dashes under it:). There may also be just positions for volts (V) and a switch for DC/AC. If you have a manual-ranging multimeter, there will be several numbered positions (ranges) for volts. The number represents the maximum value the meter can read on that range setting. The lower the range, the more precise the meter is, so pick the range just above the highest voltage you expect to encounter (5V in this case). If your meter only has one setting for V or VDC, it's an auto-ranging meter which will pick an appropriate range value for you.
Open your radio and power it up. Touch the black/COM test probe to the GND pin of the Arduino, or bare metal/solder of the wire connected to the GND pin. Touch the red test probe to the (bare metal/solder of the) wire you want to test, in this case one of the encoder wires, button wires and/or encoder common wire.
couldnt have a better explanation, thx for your time.
3 x - 9X TX with 9xtreme board;
Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s.
Too much radios? Yes too much damn radios. No more please.

"Sometimes you just have to take a leap and build your wings on the way down."

User avatar
OctavioS
Posts: 578
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: Stock/er9x Rotary Encoder

Post by OctavioS » Sun Dec 04, 2016 5:44 pm

Hi Mike, i measured the voltage and its 3.31v.
3 x - 9X TX with 9xtreme board;
Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s.
Too much radios? Yes too much damn radios. No more please.

"Sometimes you just have to take a leap and build your wings on the way down."

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

Re: Stock/er9x Rotary Encoder

Post by MikeB » Sun Dec 04, 2016 7:48 pm

Does it switch to 0V when you press the encoder switch?

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

User avatar
OctavioS
Posts: 578
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: Stock/er9x Rotary Encoder

Post by OctavioS » Mon Dec 05, 2016 6:16 pm

No, it stays the same. No voltage change.
3 x - 9X TX with 9xtreme board;
Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s.
Too much radios? Yes too much damn radios. No more please.

"Sometimes you just have to take a leap and build your wings on the way down."


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

Re: Stock/er9x Rotary Encoder

Post by MikeB » Mon Dec 05, 2016 6:45 pm

OK, please remove the wire connecting the switch to the Arduino, then measure the voltage on the Arduino and also on the wire.

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

User avatar
OctavioS
Posts: 578
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: Stock/er9x Rotary Encoder

Post by OctavioS » Mon Dec 05, 2016 9:54 pm

Hi Mike, i measured the voltage: on the arduino (wires from I2C) there were the same 3.31v. From the same GND to switch wire (the wire going to IO4), it measured -0.15volts and from the GND next the IO2 and the switch wire it was oscilating between 0.42v to 0.45v.
3 x - 9X TX with 9xtreme board;
Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s.
Too much radios? Yes too much damn radios. No more please.

"Sometimes you just have to take a leap and build your wings on the way down."

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

Re: Stock/er9x Rotary Encoder

Post by MikeB » Mon Dec 05, 2016 10:53 pm

I'm not certain the firmware in the Arduino is running. Can you read the contents of the flash to a .hex file and 'post it for me to look at?

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

User avatar
OctavioS
Posts: 578
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: Stock/er9x Rotary Encoder

Post by OctavioS » Mon Dec 05, 2016 11:40 pm

Mike what i did to get this was: went to arduino prefernces, checked the compilation at show verbose output during: and went to the file location to get the .hex
I2Cencoder.ino.hex
(5.93 KiB) Downloaded 126 times
3 x - 9X TX with 9xtreme board;
Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s.
Too much radios? Yes too much damn radios. No more please.

"Sometimes you just have to take a leap and build your wings on the way down."

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

Re: Stock/er9x Rotary Encoder

Post by MikeB » Mon Dec 05, 2016 11:59 pm

What Arduino IDE version are you using?

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

User avatar
OctavioS
Posts: 578
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: Stock/er9x Rotary Encoder

Post by OctavioS » Tue Dec 06, 2016 12:23 am

Its 1.6.12
3 x - 9X TX with 9xtreme board;
Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s.
Too much radios? Yes too much damn radios. No more please.

"Sometimes you just have to take a leap and build your wings on the way down."

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

Re: Stock/er9x Rotary Encoder

Post by MikeB » Tue Dec 06, 2016 12:32 pm

I've just posted a specific test version for the 9Xtreme. This counts how many times the I2C encoder on the Arduino responds to the request from ersky9x. The counter is displayed on the "Debug" menu (UP LONG, then RIGHT several times). On the 5th line you should see "I2C= 0000" on the right. The number will count up if the Arduino is responding correctly.
Please flash this test version to your radio, connect the Arduino to the I2C signals and see if the counter is changing (no need to have the encoder connected to the Arduino for this test).

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

User avatar
OctavioS
Posts: 578
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: Stock/er9x Rotary Encoder

Post by OctavioS » Tue Dec 06, 2016 4:49 pm

Yes Mike, the number changes very fast.
3 x - 9X TX with 9xtreme board;
Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s.
Too much radios? Yes too much damn radios. No more please.

"Sometimes you just have to take a leap and build your wings on the way down."

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

Re: Stock/er9x Rotary Encoder

Post by MikeB » Tue Dec 06, 2016 7:06 pm

Ok, that means the Arduino looks to be working on the I2C side. It should count be counting 20 times per second. As it is a "hex" number this means the second digit represents 256 so should take just over 12.5 seconds to change.

Have a look on the "DiagSwtch" menu. At the top left you should see a value for "Enc". This should be a '1'.
If you connect the IO4 pin on the Arduino to ground, this should change to 0, although if it stays grounded for a "long press" time, the radio will take it as an "Exit" operation and leave the menu.

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

User avatar
OctavioS
Posts: 578
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: Stock/er9x Rotary Encoder

Post by OctavioS » Tue Dec 06, 2016 9:19 pm

Yes it's "1" in the diagSwtch. But the "1" is highlighted as if it was pressed. I also see that when I press down, the left and down are highlighted at the same time. I think I will have to trim the case a little bit more, because I noticed that the up key has little down movement.
3 x - 9X TX with 9xtreme board;
Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s.
Too much radios? Yes too much damn radios. No more please.

"Sometimes you just have to take a leap and build your wings on the way down."

User avatar
OctavioS
Posts: 578
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: Stock/er9x Rotary Encoder

Post by OctavioS » Tue Dec 06, 2016 10:31 pm

Mike i removed the board and trimed the inside of the case area where the edges of the rotary rest and the problem with pressing down and simoultaneouly activating left is solved.
3 x - 9X TX with 9xtreme board;
Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s.
Too much radios? Yes too much damn radios. No more please.

"Sometimes you just have to take a leap and build your wings on the way down."

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

Re: Stock/er9x Rotary Encoder

Post by MikeB » Tue Dec 06, 2016 11:05 pm

OK, I got what you should see a bit wrong, I just double checked on my 9Xtreme.
With nothing connected to IO4, it should be at 3.3V and the "Enc" value on DIAGSWTCH should be '0'.
When you connect IO4 to ground, then the "Enc" value should change to '1' and be highlighted.

I suggest have a good look at the IO4 pad and make sure there is no short to anywhere on it.

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

User avatar
OctavioS
Posts: 578
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: Stock/er9x Rotary Encoder

Post by OctavioS » Tue Dec 06, 2016 11:16 pm

IMG_4020.JPG
IMG_4020.JPG (39.7 KiB) Viewed 2427 times
Mike this is the wiring i followed, is it right?
The Ground goes to arduino GND
The center switch goes to IO4
And the other ones i dont recall right now which is wich. Is it right so far?
3 x - 9X TX with 9xtreme board;
Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s.
Too much radios? Yes too much damn radios. No more please.

"Sometimes you just have to take a leap and build your wings on the way down."

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

Re: Stock/er9x Rotary Encoder

Post by MikeB » Wed Dec 07, 2016 12:16 am

I think that is correct, to be certain I'll need to find one of my (unused) 7-way switches.
If you have IO4 disconnected, you should see '0' beside the "Enc" on DIAGSWTCH.

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

User avatar
OctavioS
Posts: 578
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: Stock/er9x Rotary Encoder

Post by OctavioS » Wed Dec 07, 2016 12:43 am

I already soldered it back, never checked without IO4 disconnected, but ill have a look.
3 x - 9X TX with 9xtreme board;
Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s.
Too much radios? Yes too much damn radios. No more please.

"Sometimes you just have to take a leap and build your wings on the way down."

User avatar
OctavioS
Posts: 578
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: Stock/er9x Rotary Encoder

Post by OctavioS » Wed Dec 07, 2016 12:55 am

I forgot to mention that when I power on the radio the menu pop up shows up. this must be related to the diagswtch 1 showing hilighted. i will check all the wiring tomorrow.
3 x - 9X TX with 9xtreme board;
Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s.
Too much radios? Yes too much damn radios. No more please.

"Sometimes you just have to take a leap and build your wings on the way down."

User avatar
OctavioS
Posts: 578
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: Stock/er9x Rotary Encoder

Post by OctavioS » Wed Dec 07, 2016 6:00 pm

Hi Mike, i've unsoldered the switch wire from the arduino and enc goes to 0 in the diagswtch menu. but when i solder it again, the same problem persists. I've checked the wiring for possible shorts, but found nothing weird. Im out of options. I really dont know what to do. i'll put the radio to rest untill. There has to be a faulty rotary or even the arduino. Ill try with another arduino later. Thx for your time and patience.
3 x - 9X TX with 9xtreme board;
Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s.
Too much radios? Yes too much damn radios. No more please.

"Sometimes you just have to take a leap and build your wings on the way down."

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

Re: Stock/er9x Rotary Encoder

Post by MikeB » Wed Dec 07, 2016 6:16 pm

I think the Arduino is working OK. I suggest, disconnect the IO4 signal, then measure the resistance between the wire you removed and ground. It should be open circuit (very large resistance) unless you press the centre button on the encoder.

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

User avatar
OctavioS
Posts: 578
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: Stock/er9x Rotary Encoder

Post by OctavioS » Wed Dec 07, 2016 8:37 pm

Ill give it a try as soon as i have some time.
3 x - 9X TX with 9xtreme board;
Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s.
Too much radios? Yes too much damn radios. No more please.

"Sometimes you just have to take a leap and build your wings on the way down."

User avatar
OctavioS
Posts: 578
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: Stock/er9x Rotary Encoder

Post by OctavioS » Thu Dec 08, 2016 12:17 pm

I've tested the resistance and there's nothing, no value.
3 x - 9X TX with 9xtreme board;
Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s.
Too much radios? Yes too much damn radios. No more please.

"Sometimes you just have to take a leap and build your wings on the way down."

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

Re: Stock/er9x Rotary Encoder

Post by MikeB » Thu Dec 08, 2016 12:25 pm

What about when you press the centre button, do you then get a (near) zero resistance?

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

User avatar
OctavioS
Posts: 578
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: Stock/er9x Rotary Encoder

Post by OctavioS » Thu Dec 08, 2016 4:25 pm

Mike, i just checked resistance. When the I put the leads, the value is 1, then when the button is pressed the value goes up to 500 and above and comes back to 0. A little bit the opposite of what you say.
3 x - 9X TX with 9xtreme board;
Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s.
Too much radios? Yes too much damn radios. No more please.

"Sometimes you just have to take a leap and build your wings on the way down."

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

Re: Stock/er9x Rotary Encoder

Post by MikeB » Thu Dec 08, 2016 5:32 pm

I think the wiring to the PCB is incorrect. Having measured the connections on a 7-way switch of mine, then the signal you show as Gnd (on the picture a few post back) one of the encoder connections. The next one is (correctly) the centre switch, then Gnd then the other encoder connection.

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

User avatar
OctavioS
Posts: 578
Joined: Sun Aug 17, 2014 11:54 pm
Country: Portugal
Location: Madeira

Re: Stock/er9x Rotary Encoder

Post by OctavioS » Thu Dec 08, 2016 6:30 pm

Mike, my connections are pcb gnd to Arduino gnd/ pcb center switch to IO4 and the other connections from pcb to IO2 and IO3. I didn't get which one is wrong.
3 x - 9X TX with 9xtreme board;
Turnigy 9XRpro ;
Frsky Taranis & Taranis +;
Horus x10s;
Horus x12s.
Too much radios? Yes too much damn radios. No more please.

"Sometimes you just have to take a leap and build your wings on the way down."

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

Re: Stock/er9x Rotary Encoder

Post by MikeB » Thu Dec 08, 2016 6:56 pm

On the PCB itself, you have:
Rotary - Rotary - Switch - Gnd.
I think these should be:
Rotary - Gnd - Switch - Rotary.

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

Post Reply

Return to “er9x”