rotary encoder with Open9X?

openTx has introduced a range of new features, ideas and bling. It is fast becoming the firmware of choice for many users. openTx will run on ALL current hardware platforms, including the gruvin9x and sky9x boards. Work has already started to support the new FrSky X9D radio!
User avatar
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: rotary encoder with Open9X?

Post by kaos »

jbeebo: here is the link that the rotoary encoder been discussed in ersky9x:
viewtopic.php?f=7&t=1084

rdeanchurch: I recall there is some discussion about your question in the same thread too. (don't hold me to that , just out of my memory which is not very god nowadays ;) )

jbeebo
Posts: 107
Joined: Mon Nov 05, 2012 6:31 pm
Country: -
Location: Los Angeles burbs, CA

Re: rotary encoder with Open9X?

Post by jbeebo »

Thanks kaos, that discussion is exactly what prompted me to start this thread about getting encoder capability in Open9x! Also, I saw your links to encoder from Digikey in that other thread, I'm going to order mine from Mouser - same part number...
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: rotary encoder with Open9X?

Post by bertrand35 »

jbbak wrote:Bertrand, i sent you what was pictured today. You should have in 6-10 biz days. Cant wait to see it incorporated into open9x.
Thanks for the rotary encoder, I really hope I will find the time to install it on my Sky9x Tx during the week-end. About the FW I am not sure to understand what is missing. The rotary encoder should be already supported, did you enable it in General Settings (REa)?

Bertrand.
Buckmaster
Posts: 36
Joined: Sat Nov 03, 2012 4:53 pm
Country: -
Location: New Lenox, Il

Re: rotary encoder with Open9X?

Post by Buckmaster »

I didn't realize the encoder was already supported by the firmware, that's great!! Does that mean it will work if the encoder is hooked up through TelemetrEZ, or does that require additional firmware support? If so does the firmware support it already or would that still need to be added?
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: rotary encoder with Open9X?

Post by bertrand35 »

It's supported with the additional boards. I didn't enable it on stock. However it could be done with an extra option.

Buckmaster
Posts: 36
Joined: Sat Nov 03, 2012 4:53 pm
Country: -
Location: New Lenox, Il

Re: rotary encoder with Open9X?

Post by Buckmaster »

Ahhhh.... that's it, I use the factory board.
jbeebo
Posts: 107
Joined: Mon Nov 05, 2012 6:31 pm
Country: -
Location: Los Angeles burbs, CA

Re: rotary encoder with Open9X?

Post by jbeebo »

@bertrand, yes please enable it for stock board!
So you mean to say the FW already has capability to read the LCD lines as input? This is the functionality implemented in ER9X and I assume would need something identical in Open9X for encoder on stock board.
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: rotary encoder with Open9X?

Post by bertrand35 »

I will nose Mike's code. LCD lines as inputs OH... it answers one of my questions (micro switches on sticks) remained unanswered I think :)
jbeebo
Posts: 107
Joined: Mon Nov 05, 2012 6:31 pm
Country: -
Location: Los Angeles burbs, CA

Re: rotary encoder with Open9X?

Post by jbeebo »

yes, I suppose the encoder uses up 3 of LCD lines as inputs, so there are a few left over for some other fun stuff like your stick-switches, or perhaps another 3-way switch (hint, hint!) ;) LCD lines cannot be polled so frequently but enough for some inputs...
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: rotary encoder with Open9X?

Post by jhsa »

We also have the audio board connected to the LCD lines..
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: rotary encoder with Open9X?

Post by MikeB »

Bertrand: Ypu need the function :
void pollRotary()
from er9x.cpp. This automatically uses the top three LCD lines as rotary encoder inputs, but also lets an encoder on the TEZ board override them, no option neede to select which is in use.

I think all 8 LCD lines could be read as inputs at this time, even those used for the audio board. The audio board doesn't load them, and is connected to the 3.3 volt signal.

To use LCD lines as inputs, you need a switch, wired to 5V on one side and through a resistor (3K9 I think, but might be 3K3, check in my encoder details) to an LCD output pin on the processor, not the resistor junction. The pollRotary function could then read all the inputs, not just the top 3.

This does mean a lot of wires on processor pins though.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
jbeebo
Posts: 107
Joined: Mon Nov 05, 2012 6:31 pm
Country: -
Location: Los Angeles burbs, CA

Re: rotary encoder with Open9X?

Post by jbeebo »

I heard jhsa is an expert at soldering processor pins, maybe he'll open a fab/hack shop? ;)

If it means having encoder and extra 3pos switch in Open9x - well... I'm warming up my soldering iron right now! :mrgreen:
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: rotary encoder with Open9X?

Post by jhsa »

Ha Ha Ha.. This was my first chip with more than 20 pins.. :D and the first SMD one lol..
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
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: rotary encoder with Open9X?

Post by bertrand35 »

@Mike
Thanks!

Who wants to test the first (under the trees, it will be a beta binary)?
Please send me a PM with an email address!

Thanks!
Bertrand.
jbeebo
Posts: 107
Joined: Mon Nov 05, 2012 6:31 pm
Country: -
Location: Los Angeles burbs, CA

Re: rotary encoder with Open9X?

Post by jbeebo »

Bertrand, I am a willing volunteer but I will be very slow. My encoder is on order and I'll be away from my radio on travels for a couple weeks. Probably won't be able to give feedback until mid or end of March.

haha, my soldering iron takes a long time to heat up I guess!
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: rotary encoder with Open9X?

Post by bertrand35 »

I have beta testers on sky9x / gruvin9x / stock with telemetrEZ, but not stock without telemetrEZ. Any volonteer?
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: rotary encoder with Open9X?

Post by jhsa »

what about the stock board with Atmega 128?
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
kaos
Posts: 3247
Joined: Wed Dec 28, 2011 1:15 am
Country: United States

Re: rotary encoder with Open9X?

Post by kaos »

I am going to stall the wheel encoder for my stock tx in the next few days. By that time if you still need a tester I will be glad to test it. One thing holding me back from open9x is the wheel encoder which I think is way cool and easier to use. ;)
I will let you know when encoder is installed and confirmed working with er9x.
jbeebo
Posts: 107
Joined: Mon Nov 05, 2012 6:31 pm
Country: -
Location: Los Angeles burbs, CA

Re: rotary encoder with Open9X?

Post by jbeebo »

I'm running completely stock board without TeZ, and am a willing volunteer, but like Kaos will not be fast. I am very interested in this adaptation.

Earliest I could realistically provide feedback is mid March, as I have parts on order and am currently on biz travel. Let me know if you'd like me to test...
bertrand35
9x Developer
Posts: 2764
Joined: Fri Dec 30, 2011 11:11 pm
Country: -

Re: rotary encoder with Open9X?

Post by bertrand35 »

jhsa wrote:what about the stock board with Atmega 128?
Perfect! You would PM your email?
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: rotary encoder with Open9X?

Post by jhsa »

I think you finally caught me :)
Will do..
we should have a little chat you and I about some features ;) :mrgreen: :mrgreen:

Are you sure you want to be on my nagging list?? :mrgreen: :mrgreen:

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

Re: rotary encoder with Open9X?

Post by jhsa »

Bertrand, the first thing I've noticed (apart from other stuff not working :( ) is that the short press on the center button is very sensitive.. if you press for a little too long it will behave as a long press. I suggest allowing a little more time for the short press..

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
jbeebo
Posts: 107
Joined: Mon Nov 05, 2012 6:31 pm
Country: -
Location: Los Angeles burbs, CA

Re: rotary encoder with Open9X?

Post by jbeebo »

Hi Bertrand,
I'm finally digging myself out of a massive career related hole which has severely impacted the fun stuff. As I'm resurfacing, I see there is an issue with Open9X (RAM constraint). Was wondering, before I hack my 9X to install the rotary encoder - is there still encoder support in latest or upcoming versions of Open?

If features will be implemented and maintained, I could have the encoder installed by weekend and test/prove the functions (if not too late already!)
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: rotary encoder with Open9X?

Post by Kilrah »

Encoder support is there and has been considered "stable" for a while already :)

The RAM thing only impacted the higher number of flight modes, custom switches and custom functions that were added to the atmega128 version over stock by "mistake". Those were removed, but no existing functions are leaving.
jbeebo
Posts: 107
Joined: Mon Nov 05, 2012 6:31 pm
Country: -
Location: Los Angeles burbs, CA

Re: rotary encoder with Open9X?

Post by jbeebo »

thanks for confirmation. So I can break into the LCD lines, add 3k9 resistors and have the encoder functional on a totally stock board w/ stock ATmega64! Me thinks nice activity for the wknd...

Post Reply

Return to “openTx”