1. To control a low-power LED with Arduino simply connect it to output pins (anode) and to the ground (cathode) with serial resistor. This resistor can be varied from 50 to 1000 ohm for common LEDs with 10-30 mA current (maximum current for Arduino I/O pin starts with 40 mA). You can select a suitable resistor by trying and checking the brightness you need. You can use about 20-30 LEDs (20mA each) if they could be turned ON all at once ( or more if there will be no one moment of such simultaneous powering ).
If you need to control a high-power LED (more than 40mA) or several parallel LEDs with Arduino (or filament lamp), use any suitable n-p-n transistor (or MOSFET) as power switch.
Use additional power source (+U) for this connection if connected LEDs have summary power consumption more than +5v power supply for Arduino can provide or if your LED require higher voltage (6-12 V)
You can use one of the "LED" output as an output signal to control the group of LEDs with "conditional" signal, for this you can connect LEDs with a simple 2-AND gate IC (7408, 7409 - this is just an example to show you the way to control LEDs with additional parameter, you can use any other ICs that can serve as the "gate") :
- In the configurator, assign some Arduino pin as "Digital Output" (either direct or serial) and select as parameter the bus voltage
(for the bus that powers the set of indicators in your airplane). - Select the voltage range for this bus in which the displays can work with (for example "10 ... 25V"). When the bus voltage is within these limits, the selected Arduino pin will be set to HIGH, and will be used to let outputs to the LEDs.
Serial digital output uses several shift registers (74HC595 ICs) to extend outputs count to any number and minimize the usage of Arduino pins for output.
This type of output can be used for groups of indicators (LEDs) connected to Arduino using chain of registers 74HC595. It can be used as output to control any other digital output devices (On/Off type)
This is a bit more complex then direct, but widely used method of LED output with Arduino. The data is transmitted to registers from one output pin of Arduino, 2 other pins (common "D" and "L") are used for strobe and latch data.
ArdSimX includes inbuilt functions to support of multiple shift-and-latch register ICs (74HC595) in chain connection that allow you to extend the number of LEDs to 8 with one register, 16 with two, 32 with 4 registers and so on..., and use only 3 Arduino output pins for all these LEDs (D, S , L signals in diagram below). More registers can be added to the chain in any time.
The first register is on the left side of the diagram (left-to-right numbering). In this example a total of 32 LEDs can be connected, LED #1 is on the left, LED #32 on the right.
Note: Use additional +5v power source for registers if you have more than 2-3 of them.
Shutting off LED groups can be done using the common OE pin of the registers (see below on this page).
If you don't want or can't make boards with registers yourself (or use a breadboard), you can buy some breakout boards that include 595 register with headers or contact pads, like this one from SparkFun, or this one from Greetech - (just add a resistor for each LED).
Using the common OE pin (#13) of the registers you can shut all indicators off, not the registers controlling them, so that they still will display the same data when turned on again.
ArdSimX supports only one method of 7-segment displays - using the shift registers without multiplexing, when each 7-segment indicator is connected to its own shift register with latch (storage), and every next register is connected in a chain to the previous one. This method allows the use of single 7-segment indicators of any size and combining as many of them as needed into one display.
As default, the 74HC595 shift registers are used for displays. But you can use other similar functionally registers or use the DM13A LED drivers as described on the "Numeric 7-segment LED indicators" page.
One output pin is configured as "S signal" for each particular display. Other two pins ("D" and "L" signals) are configured once and used for all registers connected to one Arduino. See the "Config Guide".
Online configurator allows you to set any suitable display mode - number of digits in display, dot type and placement, indicator type (common cathode or anode), reversed digits order (if you have modules with backward indicators wiring) etc.
Shutting off displays can be done using the common OE pin (#13) of the registers (see below on this page). The brightness can also be controlled with this pin using PWM, or by connecting the power of the 7-segment indicators through a potentiometer or a MOSFET.
Using the common OE pin (#13) of the registers you can shut 7-segment indicators off, not the registers controlling them, so that they still will display the same data when turned on again.
The indicators will now shut off when bus voltage failure occurs.
Take a double linked switch for your Master Switch. Use one pair as usual, one wire on the ground, and the other on the Arduino input pin configured for "Master Avionic" switch control in X-Plane.
The second contact pair is used to connect/disconnect the previously described bus voltage indication pin with the registers OE input (to disable the indicators).
This video shows how it works (demonstrating the Master switch ON/OFF and Bus power lost:
You can power each 7-segment display using voltage (current) regulator to change the brightness of each display independently manually.
You can easily make displays of any size yourself, you need to buy single 7-segment indicators, 74HC595 registers for each indicator and resistors. The 74HC595 registers can be bought for 1$ per 20 pieces. Any suitable indicators can be used, with either common cathode or anode.
If you don't want or can't make boards with registers yourself (or use a breadboard), you can buy some breakout boards that include 595 registers.
Also, you can find completely assembled modules with installed registers and 7-segment indicators, that can be used for ArdSimX without any modifications, like these ones: 7-seg LED Modules