Hardware Setup

The Big Picture

Arduino board are dedicated to manage digital inputs and outputs, as well as analog inputs, servomotors and stepping motors. However, one thing is clear, no single Arduino board can handle the very large numbers of inputs/outputs requested by a home cockpit. The biggest Arduino Board, the DUE can handle 54 inputs or outputs or servomotors. So, how to go further ? By multiplying the board capacities :

An Arduino DUE is a clever board with an efficient ARM processor, on the other hand there exist on the market low level boards that can expand digital inputs/outputs. Cockpit builders are often familiar with the Opencockpits cards (OC), for example. An OC “Mastercard” can expand to 72 inputs and 45 outputs, and an OC “USB expansion card” can handle 4 mastercards. The USB expansion card is driven by a very old, obsolete, PIC processor which can easily be thrown to the bin and emulated by an Arduino DUE card. We can even drive two USB expansion cards with an Arduino DUE, which is depicted in the figure below.

Overall setup for controling the hadware with one Arduino DUE board

Using such design, we now can control 8 x 72 = 576 digital inputs, 8 x 45 = 360 outputs, read 12 analog inputs in 12 bits resolution and control 10 servomotors. This is not the ultimate limit, but is my own choice at this time.

Connecting everything

OK, so how do we link the arduino DUE to the OC cards, and the simulator (XPlane in my case, but can be changed easily for any other simulator) ?

The Arduino DUE replace the old PIC 16C745 on the usb card, so we need to replace this component by a connector. On the Arduino DUE, we use a homemade connection card, made from a commercial arduino development shield, on which we installed two connectors for the OC usb cards.

To link with the simulator, a simple arduino ethernet card shield is used. The arduino will “pre-process” the data for the simulator and link directly to it. No need for an additionnal PC to manage the hardware, the Arduino will take care of everything. The arduino is also fitted with an ethernet shield, which enable direct network communication between the arduino and the flight simulator. In the simulator, we have to add a plugin/driver which will communicate the Arduino DUE to exchange the data. At the present time, I have already written this plugin for XPlane 11, and I know perfectly how to write it for FSX. I have no experience right now with P3D, I don’t have it, but I imagine it must be close to FSX enough.

Opencockpit USB card, fitted with a HE 26br connector, and the arduino DUE (below) with the connection shield above and the ethernet shield on top.

In the picture above, only one USB card is connected at the moment. The ethernet cable is visible (red). The ethernet shield also include an SD card, which is used to store the configuration file describing all the inputs, outputs, gray encoders, displays, servomotors and their interaction (See the configuration page). The black USB cable is only used during development for debugging purposes. 4 analog inputs can be connected on the OC USB card, but are just forwarded to the Arduino DUE, where they are sampled on 12 bits (here, spoiler and Throttles are connected, white cable bottom left). Four more can be connected directly to the arduino leading to 12 analog inputs in total.

The Arduino DUE, not visible (situated below) in the picture above.
A closer view of the ethernet/connecting plate/arduino DUE stack (DSTACK)
Same, seen from below

The OpenCockpit USB expansion card modified, with the IC1 PIC16C745 and replaced by a 26 pins connector. Unnecessary components dedicated to the PIC clock and the USB connector have been also removed.