0% found this document useful (0 votes)
1K views22 pages

737 Prosim Mobiflight

This document provides guidance on setting up an Arduino Mega 2560 to interface with Prosim flight simulation software using Mobiflight. It recommends using an Arduino Mega over smaller boards due to its greater number of input/output pins. It describes daisy chaining multiple 7-segment displays together using only 3 Arduino pins and powering the displays from an external 5V power supply to avoid overloading the Arduino. Tips are provided on buying high-quality 7-segment displays and MAX7219 boards from eBay that allow easy daisy chaining and mounting.

Uploaded by

tobypham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views22 pages

737 Prosim Mobiflight

This document provides guidance on setting up an Arduino Mega 2560 to interface with Prosim flight simulation software using Mobiflight. It recommends using an Arduino Mega over smaller boards due to its greater number of input/output pins. It describes daisy chaining multiple 7-segment displays together using only 3 Arduino pins and powering the displays from an external 5V power supply to avoid overloading the Arduino. Tips are provided on buying high-quality 7-segment displays and MAX7219 boards from eBay that allow easy daisy chaining and mounting.

Uploaded by

tobypham
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Version: 1.

WWW.737DIYSIM.COM

INTRODUCTION
Software used:
One of the most common questions I receive is how to get the Arduino to
work with Prosim. I have put this guide together, to help people take that first
step forward. I hope to get you past, Some of the many hurdles that arise.
If somebody had simply said, “if you do it like this, then it’s that simple”. I Prepar3D
spent hours trying different interfaces and learning SOIC. However, nothing
compares to the simplicity of Mobiflight and the versatility of the Arduino
mega.
https://www.prepar3d.com
Originally, I started out with PMDG, and although the process is pretty much
the same, the selection of events is different. Prosim really does make it easy
to interface with your sim. As I have not used PMDG for several years, I
cannot remember how to programme it anymore. This guide is based on
Prosim and Mobiflight. PROSIM

Arduino Mega 2560 R3


https://prosim-ar.com

FSUIPC
http://www.schiratti.com/dowson
.html

Initially, I had an Arduino Uno and a Nano. Both appeared to work with
Mobiflight, but I realised that many more I/O (Inputs/Outputs) were needed
for my application.
MOBIFLIGHT
I discovered the Arduino Mega while using the Mobiflight website. When I
started, I bought several Genuine Arduino Mega cards at version 1. However,
I soon learned that sometimes they refused to operate periodically. A quick
google search revealed a flaw in the card and I have now updated all my cards https://www.mobiflight.com
to the 16AU R3 version.
I no longer use the older cards and have removed them from my sim despite them being genuine Arduino
Mega’s. From that point on, I bought 3 Sainsmart Mega cards (They are good quality, but there are much
cheaper ones available on ebay). I also bought 5 cheap mega 2560 16UA R3 cards from china on ebay for
£5.80 each.
Page 1 of 22
Version: 1.0

WWW.737DIYSIM.COM

I have found that quality varies greatly. Some have misaligned connectors and every now
and then I have found an output which is permanently stuck on or refuses to work.
Despite this I now own 10 Sainsmart and 15 cheap ones found from ebay. All seem to be
7 Segment Colour working very well on my full size sim.

During my prototyping
and my build of version
Components - 7 Segment Displays
1 SIM, I was not
bothered about the
colour of the LED
segments, as this was
just a prototype to see
if it would even work. It
was more a matter of
getting it done cheaply
and effectively. Red is
the most common
colour and readily
available. It also
appears to be the
cheapest. Ed usually
comes with the I tried several variants from eBay. This is where I learned the quality really does
Max7219 Boards.
depend on who you buy from. Make no mistake, I went cheap from china and it
As time progressed, I took several attempts to find the right one. The biggest problem I found, was that
discovered other they worked fine individually, but some just refused to daisy chain. Push on the
colours. Blue, PCB and it would work fine. Release the pressure and utter disaster. Some just
Yellow/Amber & white, decided they would rather heat up and burn out.
depending on your
preference. I now have
a blue MCP, but also
have the option of
Here’s some tips on buying the right MAX7219:-
yellow as I bought •Ensure it has 5 pins at both ends to allow daisy chaining.
multiple colours,
recently. •Look for the units that have the display units with sockets rather than
soldered. This will allow you to split the displays and place them where ever
you want by using additional wiring.

•Its great when you also find the ones that come with the PCB mounting
screws and stand offs included.

•Buy in Bulk
Once I found the right supplier of MAX7219,7I bought in bulk, 20 in fact, at an incredibly
cheap price and free shipping. Your going to need plenty of these when you full on, From
MCP to radios and other panels. It also means you have spare for when you find an
unserviceable one.

Page 2 of 22
Version: 1.0

WWW.737DIYSIM.COM

Arduino Pins
In the beginning I had each 7 segment display using 3 pins each of the Arduino. At that rate, it would have needed a
lot of interface cards. I soon learned that the 7 segment displays could be daisy chained and all 5 units controlled by
just 3 pins on the Arduino (in-fact you can daisy chain up to 8).

The only Pins that don't appear to work at the moment with Mobi Flight are the 13 Analogue pins. This has had no
effect on my sim as of yet.

DAISY CHAINING MAX7219 BOARDS


Below is a picture of how to daisy chain the 7 segment displays. I connected the 5V and ground to an external power
supply. The DIN, CS & CLK then get connected to the Mega. You may notice that there is only 5 units, but you can
connect upto 8 from 3 Arduino pins.

Page 3 of 22
Version: 1.0

WWW.737DIYSIM.COM

Test, Test & Test


Again!
Always test your 7 segments in the
configuration your going to use
before putting them into anything.
This includes the length or the cables,
the amount you wish to daisy chain.
Are you still having problems with
strange digits after all this? One final
thing to check is the power at the last
7 segment unit. Ensure its at 5V. If
not adjust your power supply until it
reads 5V. “CAREFULLY!”

One 7 Segment Board - two different displays

With the detachable displays, you


can also use one unit for two
displays. Each display having 8
figures. So, in my case, I used the first
four could be used to display the
CAPT Course and the second four, to
display the FO course. These being
connected by wires from the PCB to
the display units. This is why its good
to have detachable units.

Page 4 of 22
Version: 1.0

WWW.737DIYSIM.COM

Components – Power Supply

A lot of People have stated that, they are running up to 30 max 7219 boards
direct off there Arduino Mega Board. However, from my personal experience.
Running all those LED’s, 7 segment display’s and encoders is just too much
from the Arduino mega. I tried at first, but strange things started to happed, I
would turn an encoder and the whole unit would switch off and restart. Very
annoying at best. The other fault was that the 7 segment displays started to
indicate gibberish. This was all fixed by wiring the encoders and 7 segment
displays to an external 5v power source. This is the unit I went for from eBay.
Cost around £5 and keeps the voltage steady regardless of load.
http://www.ebay.co.uk/itm/31-Types-Switch-Power-SupplyDriver-5-12-24-
Components – Switches 48V-1-2-3-10-15-20-30-40-50-60-70A-/

Switch type really doesn’t matter. From large toggle switches to tiny tactile switches, they will all work with the Arduino,
Mobiflight and Prosim. The Big toggle switches are used everywhere in a 737. From overhead to MIP. The tactile
switches and mini toggle switches are mainly used the various panels.

Buying from eBay in bulk from china is very cheap. Afterall, even if you are not after a replica Boeing, you can still have
52 switches on each Arduino to command as you like.

Components – LEDS

Page 5 of 22
Version: 1.0

WWW.737DIYSIM.COM

These come in various sizes and colours. You can get Bi and Tri Colour
LEDS if require. Very handy for the AFDS lights where yellow and red
are needed in a single bulb. 3 & 5mm LED’s are predominately used in
my Sim. For panel backlighting I prefer warm white to cool white. But
that’s just a matter of personal preference.

Remember to always use a resistor with the LED from the Arduino
board. Normally a 220 Ohm resistor is perfect for the 5v Arduino
power. The resistor can be fitted in either the 5v or ground line. It can
also be fitted in any direction. They are not polarity sensitive unlike
the LEDS.

Just remember the long leg of the LED is the Anode (+).

Components – Encoders
I started with the KY-040 encoder (on the
right), they have the debounce circuitry built
in and are easy to mount. Either by the PCB
holes or the central fixing nut.

If your buying these, 10 or 20 in bulk are


much cheap on eBay. They are also used all
over the cockpit.

I have now discovered dual Encoders by


www.propwashsim.com. They are the
cheapest I have found and come with the
correct knobs. They work brilliantly, even more so than the ky-040.

Did you Know, the Arduino can also control Servos very easily via
Prosim. Although they are not currently covered in this guide.

Page 6 of 22
Version: 1.0

WWW.737DIYSIM.COM

The Arduino Test Build


Below is a picture to get you started and will be used as a guide. It consists of all the components mentioned above and
we will use some of these to create a radio panel in Prosim.

Which Pin?
You can you any pins for any component, apart from the Analogue pins labelled A0 to A15. (Mobiflight Restriction)

Page 7 of 22
Version: 1.0

WWW.737DIYSIM.COM

The Components are connected as follows:


ARDUNIO COMPONENT Pin Number
Max7219 8 Digit Display - DIN 23
Max7219 8 Digit Display - CS 25
Max7219 8 Digit Display - CLK 27
Encoder 1 - Pin A 8
Encoder 1 - Pin B 9
Encoder 2 - Pin A 10
Encoder 2 - Pin B 11
Toggle Switch 12
Tactile Switch 7
LED 1 49
LED 2 51
LED 3 53

PROGRAMMING:
First you need a set of free offsets or HEX codes to programme with or utilise. Hexidecimal codes are a numeral system
with a base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A,
B, C, D, E, F to represent values ten to fifteen. Hexadecimal numerals are widely used by computer system designers and
programmers.

The free offset range available to get you started are:


HEX CODE
CONFUSED? NUMBERING: 66C0 to 66FF
All you really 66C0 For example, the following table shows what items in the cockpit have
need to know is 66C1 been assigned to that hex address. Each 4-digit hex address having 8
that, This 4 digit 66C2
code is capable
bits, these can be used for a light or switch (or more complicated items
66C3
of operating 8 described later). You decide what item you want to assign to the
66C4
switches or 8 address.
66C5
toggle switches. 66C6
These can be a 66C0 0 Landing Gear Left
66C7
combination of 1 Landing Gear Nose
66C8
both. As long as 66C9 2 Landing Gear Right
the code for both 3 MASTER CAUTION F/O LED
66CA
prosim and
66CB 4 6 PACK AIR COND F/O LED
Mobiflight
66CC 5 6 PACK ANTI ICE F/O LED
match, That’s
66CD
half the battle! 6 6 PACK APU CAPT LED
66CE
66CF 7 6 PACK DOORS F/O LED

Page 8 of 22
Version: 1.0

WWW.737DIYSIM.COM

Prosim Setup
Open Prosim, and this panel should appear:

Select Config,
FSUIPC must be purchased
Select Drivers tab: and registered for it to work

Ensure FSUIPC is selected.

Page 9 of 22
Version: 1.0

WWW.737DIYSIM.COM

Programming LED’s:
In the Arduino test build with have 3 LED’s at Pins 49, 51 & 53.

In PROSIM,
Select the Combined Config tab.
Here are where you find all the items that can be programmed.

Eventually, I will
publish my entire sim
offset codes for
Scroll Down to Landing Gear, Prosim. Just in case
Select the arrow next to landing gear, you just want to
Select indicator arrow follow along and enter
the data.

Page 10 of 22
Version: 1.0

WWW.737DIYSIM.COM

Scroll down to Gear Left:


Select FSUIPC 8 bit U
Enter the code: 66C0.0 (Hex address 66C0, bit 0) 66C0 0 Landing Gear Left
1 Landing Gear Nose
Scroll down to Gear Nose: 2 Landing Gear Right
3 MASTER CAUTION F/O LED
Select FSUIPC 8 bit U
4 6 PACK AIR COND F/O LED
Enter the code: 66C0.1 (Hex address 66C0, bit 1)
5 6 PACK ANTI ICE F/O LED
Scroll down to Gear Right: 6 6 PACK APU CAPT LED
7 6 PACK DOORS F/O LED
Select FSUIPC 8 bit U
Enter the code: 66C0.2 (Hex address 66C0, bit 2)

Push ok.

Page 11 of 22
Version: 1.0

WWW.737DIYSIM.COM

Over to Mobiflight:
Ensure the Arduino is connected. Open Mobiflight, Select add device,
Select Led/Output,
Select pin 49,
Now Click Upload

Select the extras tab:

Select settings, Mobiflight Modules

Add two more Led Devices at pins 51 & 53,


Name the outputs as required.

Page 12 of 22
Version: 1.0

WWW.737DIYSIM.COM

Upload and click ok. This brings up the Bit Selection Box,
Double click in the Output Description Box Deselect all, but the required bit for the LED
Enter the name of the LED to configure (anything): as stated in Prosim. In this Case for Landing
Gear Left Led its bit 0.

Click on Edit at the end of the Line:

In the FSUPIC OFFSET Enter: 66C0


Ensure size in Bytes is: 1
Value Type is: Int
Select the dotted box next to mask with value:

Click the Display Tab:


Select the Arduino Board
Select Use type of: PIN
Select your output from the list:
Select Test: Your LED should Light up.

Page 13 of 22
Version: 1.0

WWW.737DIYSIM.COM

Click OK,
On the Main Screen, Click Active check box. Then Hit Run.
Repeat the above steps to add more LED Outputs.

Now what is displaying in Prosim, is now displaying in Mobiflight, and your LEDS.

Programming Switches
This is pretty much the same procedure for LEDS.
Open Prosim Config Page, Find the Switch you want to connect. For example, I have chosen Landing gear Up.
I’m going to assign the next free offset Hex code: 66C1.0
Select: FSUIPC 8 BIT U

Page 14 of 22
Version: 1.0

WWW.737DIYSIM.COM

Once the data has been entered, open Mobiflight Select Action Type: FSUIPC Offset
and select the extras tab, select settings,
Enter the offset: 66C1
Mobiflight Modules.
Enter the Set Value to: 1 (on when Pushed)
Add the switch (also known as Button) you have
0 (off when Pushed)
connected and assign the pin that you have
plugged the switch into. In our test example
its pin 7.

Don’t forget to upload before pushing OK. Select the Mask value button, and deselect
Select in the Inputs tab, enter the description and all but the required bit. Bit 0
click edit.

On the edit screen, Forget about the precondition tab


and select the Input Tab. Chose the Arduino Board,
and Device (switch).

Page 15 of 22
Version: 1.0

WWW.737DIYSIM.COM

Select Ok, but unlike LEDS we now need to state what


happens when the switch button is released.
Select the On release Tab.
Enter all the same data as the On press Tab,
But this the Set Value is 0.

Press Ok, Select the active check box from the Input Screen,
And press run.

Now when pressed, Prosim reacts to the button press.

Repeat with any more switches/buttons you require.


Selecting a different bit number and hex address as
they start to fill up.

Page 16 of 22
Version: 1.0

WWW.737DIYSIM.COM

Programming 7 Segment Displays.


These are slightly different because they need 4, full hex offsets
to work correctly. In this example we are going to display the
Captains VHF radio values. Both the active and Standby Freqs.
We will use the free offset: 66E0 for the Active display
But because we are going to use 4 bytes, we can not use the
next 3 offsets:

66E1
66E2
66E3
So, for the Standby freq we must use the offset: 66E4
This then uses the next 3 offsets:

66E5
66E6
66E7
In Prosim:
Open the combined config, find the comms numerical and enter the hex offset in the Capt Active value: 66E0
Select: FSUIPC 32 bit S

Page 17 of 22
Version: 1.0

WWW.737DIYSIM.COM

In Mobiflight: Enter the following details on the FSUIPC Tab:

Open the Extras tab, settings, Mobiflight Modules Offset:66E0


Add the device LED MODULE, I used the Pins 23, 25 & 27 Size in Bytes: 4
Select Num: 2 (There are 2 modules connected in
daisy chain/Series)

Upload and press OK.

Select the Display Tab:


Select the Arduino board
Select the Use type Of: Display module
Select Module Number: 1 for the Capt Active Display
Select the required digits. The radios only need 6 of the
8 digits. The decimal point needs to be after digit 3.

Back at the main screen, Enter the details in the output


Description and press edit.

Page 18 of 22
Version: 1.0

WWW.737DIYSIM.COM

Click Test to ensure the display lights up correctly.


Click OK.

When Setting up 7 segment displays, you normally have to save the config and start Mobiflight. Ensure the line is active,
then click run. Your display should now indicate the same as Prosim.

Repeat for the Capt Standby Freq, This time using the offset 66E4 and the display num:2

Page 19 of 22
Version: 1.0

WWW.737DIYSIM.COM

That’s it! Both displays should now be working!

Programming Encoders
Encoders have two Pins and primarily use 2 Hex offsets
For this example, is will use the free offset: 66F0
This means because it’s a 2 byte offset we can not use the offset 66F1
The next free Offset would be:66F2

In the Prosim Config, We find the Encoder we want in the comms section. Select: FSUIPC 16 bit S
And enter the offset: 66F0

Page 20 of 22
Version: 1.0

WWW.737DIYSIM.COM

In Mobiflight we add the device in the settings page and upload:

My encoder has a 2 detent per cycle, your might be different. A bit of trail and error may be required to find the sweet
spot unless you know the specs.

Edit the input description and click edit:

Page 21 of 22
Version: 1.0

WWW.737DIYSIM.COM

On the Input tab, Select the Arduino board, And device.

On Left Tab, Enter the offset 66F0 On Right Tab, Enter the offset 66F0
Size in Bytes:2 Size in Bytes:2
Set value:1 Set value:-1

Click OK,
Ensure the Line is active and run is pressed. I Hope this
Helps! And
Wish you the
best of luck
for your SIM
Build.

Clarkey
www.737DIYSIM.com

Page 22 of 22

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy