Jump to content
Sign in to follow this  
Guest kdarling

How to: super cheap multiple-rotary-encoders decoder

Recommended Posts

Guest kdarling

Greetings,Many of us want to have rotary switches for our avionics, but don't want to spend a lot of money on external decoders. Here's the solution I figured out, which my wife calls the "Darling Decoder". Buy a bunch of rotary encoders (e.g. Panasonic @ $1.35 in quantities of 10 at DigiKey... the type with two phases, and are off in the detent position).Take apart a cheap keyboard. Map out the rows/columns, as usual.Now here's the trick: Look for columns which have the SHIFT or CTRL keys... my keyboard had four. Wire the common pin of an encoder to such a column, the phase-B output to the SHIFT or CTRL, and the phase-A output to another character on that column.Therefore when you rotate CCW, you get SHIFT and then the character. Rotate CW, you get the character and then SHIFT, which works out as just the lowercase character.Add these keys to your FS2002.cfg file. For example, you might map "d" to increment the NAV radio MHz, "D" to decrement:NAV1_RADIO_WHOLE_DEC=68,9NAV1_RADIO_WHOLE_INC=68,8With luck and if you're okay to give up a lot of keys, you could get from 30-60 rotary encoders wired up this way... all for the price of an old keyboard. Multiple encoders are easy to wire, too, since the common and phase-B are the same for any column.Any columns without SHIFT or CTRL can of course still be used for other switches.At normal turning speeds as with radios, this works like a charm. For large OBS or HDG changes, you can stop turning halfway through the detent and let the keyboard repeat kick in.With this method, it cost me about $30 total to set up rotaries for nearly everything. In fact, figuring out how to make/buy cheap knobs was the hardest part!Have fun!Kevin Darling

Share this post


Link to post
Share on other sites

Kevin,This is brilliant. I especially like the way it can take advantage of the autorepeat feature of the keyboard controller.But I was wondering, if you turn the encoder very quickly in the direction that sends key-shift, do you run into any problem with it being interpreted as shift-key?Peter http://bfu.avsim.net/sigpics/PeterR.gifBFU Forums Moderator[table border=2 cellpadding=0 cellspacing=1][tr][td][table border=0 cellpadding=8 cellspacing=0][tr][td bgcolor=#540000]http://bfu.avsim.net/sigpics/logo75t.gif[/td][td align="center" bgcolor=#FFFFF6]Bush Flying Unlimited"At home in the wild"Looking for adventure? Come join us! * [link:bfu.avsim.net|Web Site] * [link:www.cafepress.com/bfu,bfu2,bfu3,bfu4|BFU Store] * [link:bfu.avsim.net/join.htm]Join!][/td][/tr][/table][/td][/tr][/table

Share this post


Link to post
Share on other sites
Guest

Kevin,You are a GENIUS!! I take my hat off to you. With this plus the MAX, I have everything I need...Thanks for the tip.Dave T

Share this post


Link to post
Share on other sites
Guest kdarling

>This is brilliant. I especially like the way it can take advantage>of the autorepeat feature of the keyboard controller.Thanks, guys. It was definitely one of those "doh!" (sound of hand slapping head) moments when I realized how easy it was. Heck, I'd already bought PIC dev kits etc to implement the rotaries, too, just before this method hit me late the other night. Whatever, it sure beats spending hundreds of dollars on commercial decoders. All you need is an old keyboard and the willingness to remap a bunch of keys, and you can easily hook up to a few dozen this way.Note that the autorepeat spot is rather hard to find sometimes, so people might want something different for OBS or HDG thingies.>But I was wondering, if you turn the encoder very quickly in the>direction that sends key-shift, do you run into any problem with it>being interpreted as shift-key?Not on the keyboard encoder I took apart to use. What happens if I turn too fast is that it simply stops outputting keystrokes, but never gets them wrong. Again, for radio tuning this seems quite okay.PS. I should write clearer. So again: Wire the common pin of an encoder to a Column that has the desired control key, the phase-B output to the control key Row, and the phase-A output to the Row for another character on that column.PPS. I drilled down the center of my Panasonic rotaries with an 1/8" drill, used some rods, spacers and standoffs and Radio Shack car radio replacement knobs, to make concentric encoders.PPPS. I'm thinking that one of those old programmable PC keyboards might be handy to get the maximum benefit.Again, happy tuning!Kevin Darling

Share this post


Link to post
Share on other sites
Guest

Do you have any photos you can post?Thanks,CK

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...