| SimVimX | HARDWARE | CONFIG TOOL | TECH TIPS | | SimVimPanel | CONVERSIONS | B58/SIM

menu System description, plugin/firmware download

Main Configuration and Conversion Tool.

Download conversions for custom aircraft models (completed or in the process of conversion files).

Digital Output / LED Indicators in SimVimX


led

Digital outputs are a simple ON/OFF type of signals that can be used to control annunciators, lights, relays, power lines, flags - that is, all two-state output devices that are present in every aircraft cockpit.

Multiple LEDs can be combined into one “bargraph” indicator to display the value of a numeric parameter. You can get one of those LED bargraph indicators present on the market in different sizes, colors and sector numbers (see below on this page).


Note that some indicators in your cockpit do not require receiving any data from the simulator for their operation. Often this can be an indicator that only shows the current switch position/state (not the system state!) and can be directly controlled by this switch, as most "korry-type" push-button switches).



led

74HC595 Shift Registers used as serial LED driver

The main method for driving large numbers of LEDs in SimVimX is the "series-parallel shift" method using latched shift registers.

The easiest option is to buy multiple breakout boards with 74HC595 registers. All you have to do is solder the LEDs with resistors to the boards.

You can use from 1 to 8 registers connected in series, that allows you to have up to 64 LEDs on ONE output pin.

led led led
  • Connect the anode of each LED to the register output pin with a series current limiting resistor.
  • All LED cathodes must be connected to the common GND bus.
  • Two common SimVimX signal lines - D and L are connected to the related SER IN and L CLK (L_Clock) inputs on the first breakout board. The pin assigned as output for the serial LEDs in the plugin config tool should be connected to the CLK (Clock) input.

In the example below two pins #37 and #51 are used to control two register chains:

led

NOTE: Resistor values can range from 300 ohms to 1 kohms - you may want to start with a higher value to decide if the LED brightness meets your needs.

For example, when I built my Baron 58 panel (using the earlier ArdSim I/O interdace), all the LEDs in the audio panel had 1k ohm resistors, and the LEDs were more than bright enough:


As an option, you can buy 74HC595 register chips (about $1 for 10 ICs) and wire the LEDs directly to the register without PCB, or make your own custom printed board. Here is the connection diagram:

led

Specialized LED Drivers

Another option for driving multiple LEDs in a SimVimX system is to use DM13A constant current LED drivers, which are the same latch shift registers as the 74HC595 but have 16 outputs, use a common anode connection for the LEDs, and do not require additional resistors for each LED.

Instead of the DM13A driver, you can use any other similar drivers listed here.

The wiring is quite simple - you need to connect common GND, 3 signal lines - two common "D/L" lines and one control signal "PIN" connected to the pin assigned in the config tool or multiplexer output:

led

The driver has 16 constant current outputs and each single output can sink the current by 3 ... 60 mA. The LED operating current can be set with one reference resistor connected to the Rext input (terminal #23), that can have resistance between 1 ... 22 kΩ and defines the current (and brightness) for all LEDs. You can connect a variable resistor to adjust the current as needed and then replace it by a constant resistor.

The driver chip itself can be powered using +5V output pin located on the master board, but you amust use a dedicated source (+Vled +5V) for all LEDs powering. The amperage rate of this power supply must be sufficient to power all connected LEDs, for example, if one LED draws 20mA and you have 100 LEDs, the power supply must be rated at 2A, assuming they can all be lit at the same time.

Of course, you can simply use the same dedicated power supply +3.3 - 5V for all LEDs (+Vled) and chip's VDD (in this case don't connect VDD to the +5v pin on your Arduino!, only the GND should be wired together!).


Implementation options

If you think you need to make PCBs for each driver or driver set, no, you don't necessarily need them. You can use a bare DM13A chip inserted into the small "breadboard" that can be taped to any part of your cockpit, or simply glued near to the group of LEDs ( see an example).

Also, using DM13A drivers in DIP casing, you can solder thin wires directly to the driver pins. Then this driver can be attached to the surface near the LED group using thermo-glue or 2-side duct tape.

ledled

See more tips about wiring your cockpit on the "Wiring" page.


Serial LEDs output capacity

In SimVimX system you can have from 8 to 64 serial LEDs connected to one output, depending on the location of LED groups in your panels. For example, you may have 16 LEDs controlled by one single DM13A driver connected to one pin, and another group of 30 LEDs controlled by 2 daisy-chain connected DM13A drivers on another pin.

The 16-channel LED drivers doesn't require current-limiting resistors as in case of simple shift registers.

The maximum number of LEDs with serial shift control on one output is 64, for that you can use 4 daisy-chain connected DM13A drivers. For this you need to use the driver's Dout terminal #22 as "D" input signal for next driver in chain:

led

As such, you can have either one or several separate LED groups located in different areas of your cockpit. Each group has 3 input signal lines (besides power lines). You need to connect the "PIN" input to the Master board pin assigned as extended output for this group of LEDs. Two other signal inputs - "D" and "L" - should be connected to the corresponding common bus lines ("D" and "L" output signals).

As the LED drivers alternative, you can use 8x shift registers, such as 74HC595 chips or breakout boards.



led

LED driver output used as digital output signal

Same as for direct outputs, you can use a serial output as "On/Off" control signal for other circuits, relays, MOSFETs, etc.

For this, instead of LED, use a pull-up resistor 1k connected to +5v bus and use this terminal as output pin for digital control. In the picture you can see that output terminal #16 is used as digital output (all others can be used either for LEDs or digital outputs as well).


Using Output MUX

You can connect several Serial LED register chains to the output multiplexer, which can be used for 7-segment displays at the same time.

In the example below pin #42 is used for the Output MUX and its pin #15 is used to control the register chain:

led

In the plugin configurator, open the connected output multiplexer, then select the LED driver type (595 registers, DM13A Driver or LED Matrix) and click an empty multiplexer output (as #15 in the example above).



LED BarGraph Indicator

led

To display some parameter value as a linear or circle graph indicator you can use either series of individual LEDs arranged in the shape you need (circle or line) or ready-made LED bar graphs.

When assigning the LEDs you need to choose the "LED Bar Indicator" option in the plugin configuration window, select only the output number to which the first LED will be connected and insert the number of LEDs (sectors) your indicator includes.

The number of LEDs (sectors) in your indicator is limited only by the number of registers or drivers in the chain.

In the first diagram, a 10-sector LED bar is connected to HC595 register chain outputs #2–11, and the remaining outputs are used for individual LEDs. The second diagram shows a 6-sector LED bar connected to LED driver outputs #10–15, and driver output #8 is used as a digital control signal for some other electronic circuits:

led led


Note: The LED bar display modules with built-in voltage-controlled driver (like LM3914N) can not be used with digital outputs - you need to use PWM-controlled output for such displays instead.



LED-matrix Digital Output in SimVimX

SimVimX supports using the MAX7219 driver to drive up to 64 LEDs, but this can be more complex for the user since all the LEDs in your panel need to be connected in a matrix of 8 rows and 8 columns. The MAX7219 is the same driver used for 7-segment displays with 8 characters and 64 segments, but in the case of 64 LEDs, a lot of wiring is required.

It is not "Serial LED output" - all diodes are connected as matrix or "grid". To make using LEDs with MAX7219 easier, you can buy one of the MAX7219 dot matrix module (example link), which also is very convenient for testing purposes because it has detachable LED dot-matrix module. To test all your assigned annunciators you can use this dot matrix and then detach it and connect two rows of wires (anodes, cathodes) that go to your LEDs connected as matrix grid.

led

Configuration

First, you need to "connect" the Matrix Max7219 driver in the configuration window, either to pins #30-37 or to one the Output MUX pin, selecting the "LED MATRIX" extension type

Then you can assign LEDs and datarefs for them as usual.


Brightness Control

If you need to control the LEDs brightness, link the assigned LED matrix module with one of the brightness knob in the configurator, just like for 7-segment indicators with software-controlled brightness.




Direct Digital Output control

If you only need to add a few LEDs, either permanently or temporarily for testing, you can simply connect the LEDs (or other digital devices) directly to the output pins of the Mega2560 board, taking into account some limitations described below. A single Mega2560 pin can be configured as digital output to control one LED.

When controlling the "On/Off" type of output device directly with controller pins all you should worry about is its power consumption. According to AVR tech spec, the maximum ("damage") current for a single pin in output mode starts with 40 mA, that is quite enough to drive most LEDs used as indicators. Likewise, any other directly connected device (actuator, integrated circuit, relays, etc) should sink the current no more than 20-40 mA.

  • To use a common low-power LED, simply connect it to the pin (anode) and to the ground bus (cathode) using a series resistor that can vary from 100 Ω to 1 kΩ depending on the indicator brighntess you need.
  • You can use a digital output as control signal for different integrated circuits and circuit boards. For example it can control a driver for high-power LEDs, or be used as an "On/Off" signal for 7-segment display, etc.
  • Only a low-current relay coil can be controlled directly from the controller pin, otherwise you can use relay module that has a buffered input (with a transistor or optocoupler on its input).
led

Powerful output devices that have high-voltage or high-current consumption cannot be controlled directly from microcontroller pins, you should always use some kind of buffer circuit for such devices.

This can be a PNP transistor, a MOSFET or a relay. If you use a relay, make sure that it has buffered input itself (as mentioned above) or it's a low current relay having a coil with higher resistance:

led
Support the project by subscribing to our Patreon

dwn dwn dwn
RealSimControl / SimVim / SimVimX 2012 - 2023