737 Prosim Mobiflight
737 Prosim Mobiflight
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
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.
Page 3 of 22
Version: 1.0
WWW.737DIYSIM.COM
Page 4 of 22
Version: 1.0
WWW.737DIYSIM.COM
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.
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
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
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.
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
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
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
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.
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.
Page 15 of 22
Version: 1.0
WWW.737DIYSIM.COM
Press Ok, Select the active check box from the Input Screen,
And press run.
Page 16 of 22
Version: 1.0
WWW.737DIYSIM.COM
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
Page 18 of 22
Version: 1.0
WWW.737DIYSIM.COM
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
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
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.
Page 21 of 22
Version: 1.0
WWW.737DIYSIM.COM
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