Dual Rotary Encoder with Pushbuttons

The dual rotary encoder with pushbuttons can be operated in rough air and keeps your screen tidy. It can be placed wherever you find a suitable place in your cockpit, no matter if oriented horizontally or vertically. Stefly Rotary Module

Operational Principle

The dual rotary encoder with pushbuttons uses USB-HID (Human Interface Device) to send keystrokes to the OpenVario Flight Computer. The keystrokes are generated by an inexpensive Arduino Pro Micro, which is connected to the pushbuttons and the rotary encoders. The Arduino comes with an USB-Interface, which allows very convenient communication with other devices, e.g. the OpenVario. The Arduino Pro Micro can be programmed directly via the USB, so there is no need to buy a dedicated programmer hardware. The code was inspired from the following examples:

http://www.loiph.in/2014/09/arduino-leonardo-atmega32u4-based-usb.html

http://playground.arduino.cc/Main/RotaryEncoders

https://www.arduino.cc/en/tutorial/pushbutton

Arduino Pro Micro Code Example

Arduino Leonardo Pro Micro Code ready to use

The pushbuttons are connected via 10 kOhm resistors to +5V, this method of wiring is called pullup. It provides reliable logical states at the inputs of the Arduino. Another important detail is to have a reliable GND for both, the rotary encoders and the pushbuttons. Two separate GND-connections and short wiring are recommended to achieve reliable operation. Builders who are interested in some more technical details will find valuable information about debouncing, detecting the direction of rotation and much more on the Arduino-Website.

Required parts for the rotary module

Event File

The xci-event file defines, how XCSoar reacts when it receives keystrokes. You can customize the xci-file with an editor to perfectly match your personal needs. You can find a xci-event file example for xcsoar in the following directory:

/home/root/.xcsoar/openvario.xci

Material used

  • 2 x E33 Encoder from Elma with 2,5 Ncm torque and 6 N pushbutton Datasheet 4.7 MB
  • 2 x 15 mm Knob for 6 mm shaft Datasheet 0.2 MB
  • 3 x SKSTAAE010 from Alps with 4 N pushbutton Datasheet 0.9 MB
  • 3 x Cover-Buttons for the microswitches
  • PCB
  • Visible Cover
  • Back Cover
  • Arduino Pro Micro board
  • USB-cable

A ready to use dual rotary encoder input device can be obtained from http://stefly.aero/openvario/ All pictures and the Arduino code have been provided by Stefan Langer for the OpenVario project, thanks a lot!

The dimensions of the SteFly-Rotary Module can be found here:

http://stefly.aero/wp-content/uploads/2014/07/57OV_Rotary_V3.pdf

Backside view of the Stefly Rotary Module

Here is a nice video on youtube showing the operation of the SteFly Rotary Module: https://www.youtube.com/watch?v=qppuKiylH_Y

Alternative Rotary Encoder Solutions can be found in the XCSoar-OpenVario-Forum https://forum.xcsoar.org/viewtopic.php?f=30&t=3106

Go to Remote Stick

Go to Touchscreen

Go to Variants