Serial LED Output
Matrix LED Output
Digital Output, Tech Notes

Digital Output, Annunciators, LED Indicators

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.

In addition, you can combine several LEDs into a single "graph" indicator to display the current value of a numeric parameter. Or, you can take one of those LED bar 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).

Direct Digital Output control

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).

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:

Single and Multiple LEDs Control

So, any Mega2560 pin can be used as a single 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.

To dramatically increase the number of digital outputs, you should use the serial or matrix extension 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).

2. Option: Registers wiring

Though no doubt that using 16-bit LED drivers 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.

Notes about some indicators that don't require output from simulator

© Copyright 2012-2018 - SimVim