|
|
| |
How To Wire Up Rotary Encoders to an Input Module
|
|
|
|
|
|
|
|
|
| |
 |
| |
...How To Wire Up Rotary Encoders to an Input Module
|
Summary
This tutorial will show you how to wire up both
mechanical and optical rotary encoders to a SIM-board USB Input Module,
and then show you how to test the encoder in the SIM-board Universal
Controller, and how to assign an action to the encoder in the software
to control the autopilot altitude window in Flight Simulator 2004.
You will need...
This "Show Me How..." tutorial is provided in addition
to the SIM-board USB Help Documentation.
It is recommended you refer to both this tutorial and the Help Documentation
for your modules.
|
Step 1: Connect your Encoder
|
(For best results, we recommend the use of "quarter-wave"
rotary encoders. These types give one signal pulse per detent click.
Check the datasheet of the encoder you intend using to see what
type is it. The SIM-board USB Input Module can decode all of "quarter",
"half" and "full" wave encoders, but you will
get best results with quarter-wave ones.)
A rotary encoder often has 3 pins, comprising of 2 signal pins
(usually referred to as the A and B pins) and a common (ground)
pin (sometimes referred to as the "common" or C pin).
Usually they are arranged on the device such that the common pin
is the middle pin of the 3.
If your encoder is an optical encoder, then it may have 4 or 5
pins. One of the extra pins will be the 5V pin. If there are 5 pins
on your encoder, then the remaining 5th one may be unconnected -
check the data sheet for your device to be sure.
To connect the encoder to the Input Module, connect the 2 signal
pins (described above) to pins 7 & 8 of the bank marked "BANK
Z" on your Input Module (the red and yellow wires in the example
picture).
Then connect the common (C) pin of the encoder to any bottom pin
of any BANK A to BANK Z block. In the picture example, the common
pin (black wire) is connected to a bottom pin of the same "BLOCK
Z" for convenience.
(The picture below shows an encoder connected to the module
using wires that have been crimped onto metal crimps, and then inserted
into a 2-way plastic housing. This makes for an easy individual
connection straight onto the pins of the module.)
Repeat this procedure for as many encoders as you need, working
right to left across the top pins of the module, from "BANK
Z" to "BANK W". These 4 banks along the bottom side
of the module will allow for up to 16 encoder signal pair connections
(assuming the module you purchased allows for this number of encoders).
|
|
|
|
Step 2: Connect the 5V terminal (if required)
|
If your encoder has only 3 pins, then you can skip this step
and go straight to step 3.
If your encoder has 4 or 5 pins, then it is an optical encoder.
You should check to make sure that it is a standard 5V optical encoder
before using it with any SIM-board Input Module.
Assuming it is a 5V optical encoder, you will need to connect the
5V pin of the encoder to a 5V source. Check your encoder's datasheet
to find which pin is the 5V pin, and then connect it to the top
pin of the pin pair marked "5V OUT" on the SIM-board USB
Input Module. This top pin is a 5V supply source direct from the
module, saving you from having to connect an external power supply
to use these encoders. The bottom pin is a ground (negative) pin
and should not be connected to anything.
Note: there is only one 5V OUT pin pair on each Input Module.
If you are connecting multiple optical encoders to the same module,
you will need to connect a wire to the 5V OUT top pin and connect
each 5V terminal of each encoder to this wire as a "common
5V" line, in order that each encoder can get a 5V supply.
The picture below shows the 5V OUT pin pair. The top pin of this
pair is the 5V source.
|
|
|
|
Step 3: Connect the Master Module and Input Module together
|
Now that we have made our encoder connections, we can connect our
SIM-boards together.
Using a USB cable (A-male to B-male), connect the A-male end of the
cable (flat end) to the USB socket marked "TO FIRST SIM-BOARD"
on the SIM-board USB Master Module.
|
|
 |
Step 4: Connect the Master Module and Input Module together
(part 2)
|
Connect the other end (the B-male or box end)
to the USB socket marked "FROM PREV" on the SIM-board USB
Input Module.
|
|
 |
Step 5: Connect the Master Module to your PC
|
Using a second USB cable, connect the B-male (box) end of the cable
to the USB socket marked "TO PC USB PORT" on the SIM-board
USB Master Module.
Finally, connect the other end of the cable to a free USB socket
on your PC.
|
|
 |
Step 6: Install the SIM-board USB drivers
|
(If you have already installed the Windows driver file for SIM-boards
USB, skip this step and go straight to Step 7).
If this is the first time that your SIM-boards have been connected
to this USB port on your computer, Windows will attempt to identify
the hardware item. A few seconds after you connect the Master Module
to your PC, Windows will pop up a "Found New Hardware" dialog
box.
You should follow the instructions detailed in the "How
To Install the SIM-board USB Windows Driver file" tutorial,
which you can access here (it will pop up in a new browser window).
|
|
 |
Step 7: Load the SIM-board Universal Controller software
|
Now load the SIM-board Universal Controller application in the normal
way.
A few seconds after loading, a new "USB Connection" will
be listed in the left hand side of the window, and the Input Module
will be listed as "Module 01".
Click on the "Module 01" Input Module entry in the list
to display this module's nodes for configuration.
|
|
 |

Step 8: Set Module Function
|
Before using the encoder, the Input Module must be configured to
allow encoders to be connected to it. If you have purchased an Input
Module other than the MAXI module, you can skip this step and go
straight to step 9.
If you have an Input Module MAXI version, then you should select
one of the options from the Module Function drop-down list to make
sure that some encoders are available to be used. In this example,
we have selected the 112 switches / 8 encoders / 8 potentiometers
combination for this module.
|
|
|
|

Step 9: Test the Encoder
|
To test the encoder, select the tab titled "(Encoders 1-8)"
to reveal the encoder nodes. Then click on the green round circular
disc next to the "Node 1" text to reveal the encoder test
window.
Then twist your encoder. As you twist it, short and long lines
will be drawn in a circular fashion in the test window. You should
check that for each physical click detent of the encoder, one line
is drawn. If more than 1 line is drawn per detent, or it takes several
detents of movement to draw a single line, then the encoder you
have connected is not "quarter-wave". In this case, click
on OK to close the test window, then click on "Node 1 : Encoder"
to reveal the encoder properties list, and change the "Encoder
Type" to another selection. Then re-test the encoder again
by clicking on the circular disc to bring up the test window. If
the new selection does not produce one line per detent click, go
back and select another "Encoder Type".
If you find that twisting your encoder in a clockwise direction
produces lines going anti-clockwise in the test screen, then you
can either swap the signal pin connections around on the "BANK
Z" connections (swap the positions of the red and yellow wires
in the example picture from step 1), or you can set the "Invert
state?" property of the encoder node to "Yes" which
will reverse the signals in software.
If this test performs correctly, you have successfully wired up
your encoder to the associated node.
|
|
|
|
Step 10: Assign a Flight Simulator function
|
Having verified that the encoder is operating correctly in test
mode, you can now assign a function to have it control functions
within flight simulator.
For this example, we will use the encoder to control the setting
of the default sutopilot altitude window for the default B737 aircraft.
Click on Node 1 to expand the node and reveal its configuration
settings. Then click on "Change action" and from the list
that pops up, select "FS AP Alt Change" from the "FS
: Autopilot" subsection. This action will command the encoder
to adjust the altitude value in the autopilot window when the encoder
is twisted. Click "Select" to assign this action to this
node.
|
|
|
|
Step 11: Load Flight Simulator
|
Load Flight Simulator on your PC, or if you are using WideFS over
a network, ensure you have Flight Simulator and the appropriate applications
of WideFS running and connected properly.
Once loaded, select the default Boeing 737 aircraft model as the
active aircraft.
|
|
 |
Step 12: Run your test project
|
From the left hand side of the SIM-board Universal Controller window,
select the "Run Project" option. Your simple project will
begin to run, meaning that it is now active. If there is a problem
with the project, or an error occurs, the details will be shown in
the message area at the bottom of the window.
To test your project, minimize the SIM-board Universal Controller
window and twist your encoder. As you do so, you should see the altitude
value in the FS autopilot window change in 100-foot increments.
Congratulations! You have now made your first project using encoders
with a SIM-board USB Input Module.
To stop your project, click on "Stop Project".
|
|
 |
Step 13: Use the Floating Help Icon
|
You will notice that as you move your mouse over the nodes, a "floating
help" icon appears which when clicked, offers you in-program
help with connecting your devices. Help is provided for each node
type for each module available in the SIM-board USB series, and will
offer you further Step-by-Step instructions on how to wire the given
node that you have clicked on.
|
|
|
|
|
| |
|
|
|
|