top of page

Controlling Relays with PROSIM

Writer: Okan Saçlı
Okan Saçlı
May 16, 2021
4 min read

Updated: 9 hours ago

As some of the sections of this project involves working with 220VAC, take extreme caution when working with 220VAC circuits. Never do or re-do wiring under live voltage, always unplug your 220VAC source prior to wiring, re-wiring controlling.

Danger 220 volts warning sign

The goal of this project is to control various types of relays with my PROSIM software (www.prosim-ar.com) using an Arduino MEGA 2560 and Mobiflight software (www.mobiflight.com) . With relays I can simulate various components to be turned ON / OFF of the simulator such as lights and lamps, simulate contactor sounds etc. there are absolutely no limits.


The fist attempt is to control the Main Instrument Panel lights and the Dome Lights according to the power status of the airbus, which is perfectly simulated by PROSIM.


According to FCOM of Airbus A320 ;


  • Main Instrument Panel Left section is powered via DC ESS bus

  • Main Instrument Panel Right section is powered via DC1 bus

  • Dome Light Right is powered vid DC ESS bus

  • Dome Light Left is powered via DC GND/FLT bus (I modelled DC1 bus here)


A320 bus equipment list showing which electrical bus powers each cockpit light

In PROSIM , Configuration, Combined config section, Electrical Gates section , I have assigned the following ;


  • Bus Power DC1 sets 8 bit unsigned FSUIPC offset 5526 bit 0

  • Bus Power DC ESS sets 8 bit unsigned FSUIPC offset 5526 bit 1

  • Cockpit AC active sets 8 bit unsigned FSCUIPC offset 5526 bit 3 (for now, this is just to control a heavy duty contactor for the contactor closing sound)

Please note that the offset 5526 is just a dummy/free offset (not used by PROSIM or any other FS or P3D variable)


PROSIM electrical gate configuration for relay control

For the electronics interfacing, I have used the following components ;


Arduino MEGA 2560

Arduino Mega 2560 board used to control relays from PROSIM

5VDC controlled mechanical relay module (8 channel).

5VDC 8-channel mechanical relay module

5VDC controlled solid state Relay module (8 channel)

5VDC 8-channel solid state relay module

A 230VAC coil 3P contactor (for closing AC loads)

230VAC coil 3-pole contactor for switching AC loads

For controlling 220VAC loads (such as the 220VAC coil of a contactor), the mechanical relays did not work. After doing some research over the net, I either had to design a snubber circuit using 0.1 uF condansator and 100 ohm resistor, use ferrite core rings. There are many documents available over the net on this topic. The easier solution was to control the 220VAC loads, lamps etc via 220VAC solid state relays.


For DC loads / lamps I will using the mechanical relays and for AC loads / lamps I will either use the Solid State Relays or the legs of the contactors.


The wiring of various components are done in the following manner.


The connections from the MEGA2560 to the mechanical relays can be seen below. Basically the low level triggered pins of the relay module are connected to pins 22-36 and the VCC pin of the relay module is connected to the 5V pin of the MEGA 2560. IF there is jumper on the VCC - JD-VCC pins of the relay module, this is to be removed a seperate 5VDC power supply is connected to GND and JD-VCC pins.

Wiring diagram: Arduino to mechanical relay module with separate 5VDC supply

The connections from the MEGA 2560 to the Solid State Relays can be seen below, in a similar manner, the IN1-IN8 of the SSR is connected to the PIN 53 - 59 of the MEGA 2560 and a separate 5VDC power supply is connected to the Dc- DC+ pins of the SSR.


Wiring diagram: Arduino to solid state relay module with separate 5VDC supply

The finished board looks like below, the power contactors are in place but not wired in this photo. I have added some plastic cable conduits for tidying things up.


Arduino Mega, relay modules and contactors wired with cable conduits

My Main ınstrument panel lamps are 12VDC lamps. So the left side MIP lamps are connected to OUT7 relay NO (normally open) Leg and the right side MIP lamps are connected to OUT 8 relay NO leg as seen below ;

Wiring diagram for the right MIP lamps on relay output 8

In the future I will connect other DC loads to the remaining terminals.


My overhead DOME lights are 220VAC controlled, I I control these lamps via the SSR as seen below.


  • OUT 1 of SSR closes the circuit of the coil (A1-A2) of contactor 1.

  • OUT 2 of SSR closes the circuit of the coif (A1-A2) of contactor 1. My DOME-R lamp is connected the 5 - 6 legs of the contactor. SO when OUT2 closes the cirbuit of A1-A2, a contactor turns the DOME-R to ON state.

  • OUT 3 of SSR closes the circuit of DOME-L directly (ie. without any contactors)

Please note that you are free to connect which way you prefer ! this is my preference of connection.


Relay wiring diagram for A320 home cockpit lights

I have placed my relay logic board in a metal enclosure (320x320x130mm) as seen in the photos below.


Relay logic board in a 320x320x130 mm metal enclosure

Arduino Mega and relay modules inside the metal enclosure

Currently I am using Mobiflight connector software version 8.0.2. The software and logic operations so that the boards can interact with PROSIM are done as follows;


I added OUTPUT devices and associated them with the relevant MEGA2560 pins, the first 8 outputs are connected to the mechanical relay module, the second 8 (output1ac to output8ac) are connected to the SSR.

MobiFlight output settings for the relay board

The OUTPUT definitions are done is a following manner ;


Please note that in my setup (for now.. this may change in the future when I add other components.. such as backlight control etc) ;


  • OUT 7 is Main Instrument Panel L light which is powered via DC ESS

  • OUT 8 is Main Instrument Panel R light which is powered via DC1 bus 1

  • OUT1AC is contactor 1 (currently linked to COCKPIT AC Active, 5526 bit 3)

  • OUT2AC is contactor 2 currently powering DOME R which is powered by DC ESS buıs

  • OUT3AC is direct connection of DOME L light

MobiFlight output mappings for the A320 cockpit light relays

Just as an example for OUT7, MAIN instrument L light powered via DC ESS bus, the FSUIPC settings are as follows;

MobiFlight config wizard settings for an FSUIPC offset

I have also made a comparison setting as seen below so that the relays stay unpowered is the relevant bus is unpowered. Feel free to do it as you wish.

MobiFlight config wizard compare tab for bus power logic

Some finished photos are seen below;


Finished PROSIM relay control box

Relay control box installed in the A320 home cockpit

PROSIM is simply a fantastic software suite enabling to control almost all parameters of my simulator. It is possible to interact PROSIM with many hardware vendors. Even though there is no direct support of mobiflight and adriuno ,by using free offsets you are able to control almost everything (mobiflight has no support for analogs yet) . I will upload a video soon so that the sounds of contactors pulling and releasing can also be seen. Just imagine and do it with PROSIM !


Here is a photo of DC ESS bus failure MIP-L and DOME-R are gone.

A320 home cockpit during a simulated DC ESS bus failure, MIP left and dome right lights off

Here is a photo of DC1 bus failure MIP-R and DOME-L are gone.

A320 home cockpit during a simulated DC1 bus failure, MIP right and dome left lights off






Comments


@engineerslife by Okan Saçlı

Welcome to my website. I am an Istanbul based senior mechanical engineer with extensive know-how on datacenter technologies (design, certification, contruction and operation), power plants and privately building an Airbus A320 simulator at home. So please enjoy my website.

Please subscribe to my website to receive updates from my Airbus A320 project, engineering projects and achivements and life in general

Join our mailing list

bottom of page