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.
Undoubtedly, the main purpose of digital output signals in you cockpit is to control all annunciators and various mode indicators.
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).
You can configure as many LED indicators for your cockpit as you need because RealSimControl can control multiple LEDs with one controller output pin using the common "serial-to-parallel shift" method. The register chip connected to this output receives N bits of information one-by-one, sequentially shifting them to the corresponding parallel N outputs and "latching" them at the end of the data sequence.
The 16-channel DM13A LED driver is used in RealSimControl Interface to provide multiple digital outputs. This driver is a shift register with a latch (memory), that also provides constant-current outputs for 16 separate LEDs or LED bars. Besides the DM13A you can use any other similar drivers listed on the "Components" page.-------- Wiring ------>
The wiring is quite simple (see the diagram above) - 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 configurator (or multipleser output). 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 itself can be powered using +5V output on the master board, but for all LEDs you need to have another power source (+Vled) that can vary from 5 to 15 V, depending on your LEDs type.
NOTE: the "pull-down" resistor connected to the PIN input with a value of ~1...3 kΩ is used if you have long wires to prevent the LEDs from being randomly lit on start or during work because of wiring/power interference.
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..
See more tips about wiring your cockpit on the "Wiring" page.
In RealSimControl 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 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:
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.
To "connect" a Serial driver in the configurator, click an empty pin on the master board and select the "Add LED Driver, Serial" extension type. This pin should be wired ti the PIN input of the driver chain.
Also, you can connect a Serial driver chain to the output multiplexer, that can be used for 7-segment displays at the same time. In the configurator, open the connected multiplexer, then click an empty multiplexer output and select the "Add LED Driver, Serial" extension type:
In the configurator image map or parameter table, select any parameter suitable for digital output (such as annunciator) or variable parameter for linear LED graph indicator, and assign it to one of the LED Driver outputs (from 0 to 63)
To display some parameter value as a linear or circle graph indicator you can assign it as "LED Bar Indicator (series of LEDs)" in the configurator. Then, you have to select only the output number to which the first LED will be connected and then insert the number of LEDs your indicator includes.
In RealSimControl you can configure several digital outputs for a multiple-LED indicator to display the current value of any numeric parameter as a linear or circle graph. This can be just 3 separate LEDs for 3 positions or a LED bar indicator with 3 to 64 sectors. In this example diagram the LED bar with 6 sectors is connected to outputs #10 to #15, and output #8 is used as digital control signal for some other electronics:
All LEDs forming this indicator should be connected to the first specified digital output and all consequent outputs without skipping. You can use either separate LEDs arranged in the form you need (circle or linear) or LED bar graph indicators.
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.
Another method of controlling multiple LEDs is using a LED matrix. You can have up to 64 LEDs using one MAX7219 driver. It's the same driver that is used for 7-segment displays.
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.
First, to "connect" the Matrix Max7219 driver in the configurator, click an empty pin (only #30-37 can be used) and select the "Add LED Matrix, Max7219" extension type
In the configurator image map or parameter table, select any parameter suitable for digital output (such as annunciator) or variable parameter for linear LED graph indicator, and assign it to one of the LED Matrix outputs (from 0 to 63).
If you want to control the LEDs brightness, just "link" the assigned LED matrix module with one of BRT#_Ctrl knob in the configurator, as described here for any device with program-controlled brigtness.
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.
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:
So, a single Mega2560 pin can be used as digital output when one output pin controls one LED. If your panel has just a few annunciators, you can simply connect the LEDs (or other digital devices) directly to Mega2560 board output pins, taking in account some limitations as described above. This is a simple, but inefficient method.
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).
Though no doubt that is more efficient and doesn't require a lot of current-limiting resistors as in case of simple shift registers, you can use 74HC595 8-bit shift registers if it is more appropriate for you (for example, you have completed modules with lot of common-cathode LEDs).You can extend a digital output using up to 8 registers in series, or just one chip if you need to have only 8 outputs on the selected pin. When using HC595 ICs you need to connect each LED to the register output terminal with a resistor in series (resistor can be 300 Ω to 1 kΩ ). Three input signal lines - PIN, D and L are connected the same way as for LED driver described above.
You can just buy several HC595 register ICs (about $1 for 10 ICs) and simply wire registers directly to the panel LEDs or make a printed board. The wiring diagram is here in the picture.
Another option is buying breakout boards with 74HC595 registers. You can find sample links on the "Components" page. All you need is to solder LEDs with resistors to the board outputs.