Running leds from Pokeys - F
Some of you probably remember the extensive posting I did in the Pokeysthread regarding issues I had running a led matrix.
Now I got it solved and would like to post a small tutorial for those who are
as unfamiliar with this electronics stuff as I am. A bit in followup of my
earlier post on the Pokeys PoExtBus.
Running leds from Pokeys To use leds with a Pokeys 56U, you have several options: 1-to-1 wiring,
using a led extension board for external power, or use a led-matrix.
1-‐to-‐1 Each led has a long and short side, an anode and a cathode. You need to
provide the power (positive, +) to the long/anode side, and connect the
short/cathode side to ground (negative, -).
You can test a led with e.g. a flat battery of 3.5V by connecting
anode/cathode to the correct sides of the button battery and it will light up.
The 1-to-1 method is to attach each led to a Pokeys terminal separately.
So connect the anode side to a Pokeys port (in this example, port #1), and
the cathode side to a ground (in this example one of the Pokeys gnd ports,
between #44 & #45 in this case). Open the Pokeys interface and select the
In the middle section, select "digital output".
Positive sides: each led has its own terminal so easy to write down and
Negative sides: Pokeys has a max of miliAmps it can pull from the usb port.
For each led/terminal max 4 mA and a maximum of 100 mA in total. So you
can't attach and light up all leds from a whole pit with that.
Extension board That brings us to a second option. By using an intermediate board, you can
still control the output signals via Pokeys, but the power is pulled from an
external 5V source instead of from the limited Pokeys/USB.
In my example, I bought a Led extension board from Flightsimspart, which is
only a 25min drive from work.
It has 24 outputs and can drive multiple led's per output for a maximum of
200 mA per port (that's double the mA form the entire Pokeys!). It still is a
one to one connection for each led. But instead of attaching the led directly
to the terminal, you connect it to a pin on the extension board. All the rest
remains the same.
Positive sides: same as above (1-to-1), more power available and not reliant
on max output of USB port or Pokeys card.
Negative sides: still use a pin for each led, so you lose 24 pins on the Pokeys
board for 24 leds.
Matrix board You can also use a matrix.
Then you attach leds in a common anode or common cathode rows &
columns. With a led segment extension board you can then drive the leds via
Then you need software to control the output going to a specific row &
column to light up a specific led.
In this example I'm using a 7-segment controller board of again
FlightSimParts, based on the recommendations of Doc in the Pokeys thread.
So we start with connecting the extension board d/in/c ports with Pokeys
ports 9-10-11 or 23-24-25. In this case I used 23-24-25, the black (or brown
in my case) wire for ground conveniently goes in to the GND port that is next
to port 23.
For the 5V power supply I will use the 5V from Pokeys itself for this example,
it is recommend to use a separate power supply however. Pokeys 5V port is
the last available slot above #55. Beware, on the other side is also a power
slot but that only servers 3.3V. (nice to know: you can add a flat 3V battery
on the Pokeys board to help power that 3.3V port and not use USB power).
For the gnd I used the port between #44 & #45 to make a clear difference,
as that is on the same side of the positive 5V wire.
The custom PCB with leds is from Henkie (pep-11.nl/viperpit). The url to his
website explains the whole setup in detail. Important part to remember is
that all leds are wired in an 8x8 matrix, wired in common cathode, and he
provided 2 leds per indicator (so for one indicator we need to activate row
<x> and columns <y>+<z>).
Next we connect the wires 12-3-4-5-6-7-8 to the matrix rows, and the ab-c-d-e-f-g-dp to the matrix columns. The last 2 on the a-dp part is the
power supply, which we already connected to the Pokeys.
Positive sides: Pokeys can run 2 matrices of 8 rows x 8 columns each. So
8*8*2= 128 leds from one Pokeys. With the used segment board, that
means 128 outputs with only 2*3 (+gnd) = 6 pins/terminals of the pokeys
used!. Plus you can chose to connect a separate power source to the board.
Negative sides: leds will shine less bright when more then one is active at
the same time because the leds are actually not on the whole time but the
power is alternately send to each of the leds (at a speed higher then we can
Note: the board from flight imparts requires common cathode wiring,
common anode will not work!
Now we can start up Pokeys interface and go to "Peripherals" -> "LED
In the popup window select the matrices you want to set up and set the
amount of columns & rows of each matrix. In this case we only have 1 8x8
matrix, on the ports 23-25.
On the bottom part, select "Live test display" of the matrix you want. By
clicking on the row/column (left click: activate/black; right click:
deactive/grey), you can instantly send power to that connect led.
Note, I have "Mirror horizontally" active so it is like looking to the PCB from
behind, not the front of the caution panel. So left upper square is actually
right upper led if viewed from in the pit towards the panel.
When you click "All set", you can test if all leds are working and if all wires
are connected correctly.
Controlling led output from Falcon 4 BMS For interfacing with the sim, I use a nice free program by Alambic:
F4toPokeys. It's the same I used for my other test with the PoExtBus.
The software just lets you chose what BMS bit in the shared memory should
trigger what port. It can handle single leds, matrices, PoExtBus, 7 segment
displays (all Pokeys) and servo controllers (think Trim panel) from Polulu
For the 1-to-1 option or with extension board. See a screenshot of that in my
tutorial post on the Pokeys PoExtBus.
For the matrix in this case, we go through it step by step.
First open up F4toPokeys by right clicking on the icon on the bottom right in
your task bar. Chose 'configure'.
I leave the sampling interval on the default 100ms. That is the interval at
which the program looks up all the states in the BMS shared memory.
Then click "Add a Pokeys". In my example I only have 1 connected to my
computer, so we start with the first one (named 0).
Then chose "Add a matrix LED output".
Then we can start by adding BMS states to trigger the leds output. We chose
the correct matrix, in this example the one on ports 23 to 25. And then we
can select which row & column we want to set.
As said above, the panel made by Henkie provides 2 leds for 1 indicator, so I
have to set to columns to the same BMS trigger.
The program also shows a warning (red exclamation mark) when you chose
a matrix or row/column combination which shows no connection.
On the left of the BMS trigger menu, you notice an ON/OFF button. That is
very handy because by clicking ON, it sends power to the led. That way you
can immediately verify if you have the correct led set to the BMS value you
Then all you have to do, is fire up BMS and have fun.
In the video below, I started the jet and then tested the following:
* Seat: arm/safe
* Stores config: catI/III
* Test: overheat
* Test: obogs
* Test: mal & ind
* Test: probe heat