0% found this document useful (0 votes)
513 views14 pages

737 MCP Guide

The document provides instructions for setting up an Arduino Mega and Mobiflight interface to control 7-segment displays and read data from Prepar3d or PMDG simulations. It discusses buying the right Arduino Mega card, setting up the software, connecting and configuring 7-segment displays and MAX7219 chips to display data from the simulation, and obtaining offsets and IDs needed to read specific data from the sim. Screenshots provide examples of configuring displays in Mobiflight and PMDG to display altitude.

Uploaded by

adulfo03455
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)
513 views14 pages

737 MCP Guide

The document provides instructions for setting up an Arduino Mega and Mobiflight interface to control 7-segment displays and read data from Prepar3d or PMDG simulations. It discusses buying the right Arduino Mega card, setting up the software, connecting and configuring 7-segment displays and MAX7219 chips to display data from the simulation, and obtaining offsets and IDs needed to read specific data from the sim. Screenshots provide examples of configuring displays in Mobiflight and PMDG to display altitude.

Uploaded by

adulfo03455
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/ 14

MCP GUIDE 21 MAY 2016

737 MCP USING ARDUINO MEGA & MOBIFLIGHT

Introdution.
Mobiflight
Download Mobiflight at:- Let me start, by saying I am a complete novice. I have put this
guide together to help people take that first step forward. My
Mobiflight.com
hope is that is gets you past, the many hurdles that arise which if
somebody had simply said if you do it like this, then it’s that
My Software simple. I spent hours of trying different interfaces and learning
FSUIPC SOIC. However, nothing compares to the simplicity of
Mobiflight and the mega. (Unless you buy Plug and Play).
Prepar3d
There are lot of experts out there, who I hope will read this,
PMDG 737 update, correct and make it even easier to understand. Please feel
free to email if you need hi res drawings, pictures or corrections
Early mega cards at [email protected]
2560
At the start, i bought several cards
at version 1 of the mega 2560.
However , i soon learned that
Software Setup
sometimes they refused to operate This is quite straight forward, once the arduino software has been
periodically. A quick google initially installed. Start up mobiflight and plug in the arduino
search revealed a flaw in the card mega. Mobiflight will detect the card and ask to install its
and i have now updated all my
cards to the 16AU R3 version. software (basically an arduino sketch). The mega can be
This has removed the crashing converted back to arduino use at any time. For any more detail,
cards. I also bought 5 cheap mega visit the Mobiflight website which has great tutorials.
2560 16UA R3 cards from china
on ebay for £5.80 each. Only 1 had
Once the card is ready, it’s time to start selecting and imputing
a fault where the power adapter
was mounted at a strange angle values. I started by adding one item at a time which allowed me
and would not fit into its case. to get the values correct and when the device worked with the
However, they all worked without
sim, greatness is achieved.
fault.

Don’t waste Pins !


In the begining i had each 7
Setting up 7 segment displays
segment display using 3 pins each. These are amazing little things and put the biggest smile on my
At that rate, it would have needed face when I finally got them working. However, they have nearly
a lot of interface cards. I soon
learned that the 7 segment displays bought me to tears, and literally hundreds of hours of fault
could be daisy chained and all 5 finding.
units controlled by just 3 pins on
the arduino.

[email protected] 1
MCP GUIDE 21 MAY 2016

Your going to need a


seprate power supply.

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 dispalys to an external
I tried several variants from ebay. This is where I learned the
5v power source.
quality really does depend on who you buy from. Make no
mistake, I went cheap from china and it took several attempts to
find the right one. The biggest problem I found, was that they
worked fine individually, but some just refused to daisy chain.
Push on the PCB and it would work fine. Release the pressure
and utter disaster.

Here’s some tips on buying the right MAX7219:-

 Ensure it has 5 pins at both ends to allow daisy chaining.

 Look for the units that have the display units with
This is the unit I went for from sockets rather than soldered. This will allow you to split the
ebay. Cost around £5 and keeps displays and place them where ever you want by using
the voltage steady regardless of
additional wiring.
load.

http://www.ebay.co.uk/itm/31-  Its great when you also find the ones that come with the
Types-Switch-Power-Supply- PCB mounting screws and stand offs included.
Driver-5-12-24-48V-1-2-3-10-15-
20-30-40-50-60-70A- Note: I was not bothered about the colour of the LED segments,
/311001005100?var=&hash=item as this was just a prototype to see if it would even work. It was
48691abc2c:m:m8v71tU-
OFy5AmtW_4aSkrg more a matter of getting it done cheaply and effectively.

Once I found the right supplier of MAX7219, I bought in bulk,


20 in fact, at an incredibly cheap price and free shipping.

Below is a picture of how to daisy chain the 7 segment displays. As stated 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 four units, but i have connected upto 7. (I could only fit four on the screen)

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 to display the CAPT Course and the second four, to display the FO course.
These being connected by wires from the the PCB to the display units. This is why its good to have
detachable units.

[email protected] 2
MCP GUIDE 21 MAY 2016

Configuring the 7 segment displays.

Here is a screen shot from mobiflight settings page, I


connected the 7 segment daisy chain to pins 8,9,10. The
number at the end is the number of 7 segment displays
connected in daisy chain.

Note: When you get used to adding devices, always


remember to upload them, otherwise you can add several
click ok and nothing happens!

Note: I found after uploading, mobiflight needs to be


restarted to make sure everything works correctly.

Configuring the 7 segment displays with PMDG.


Under the outputs tab, add a new
line and enter the description for the
display. Mine was MCP ALTITUDE.

Then click edit at the end of the line.

[email protected] 3
MCP GUIDE 21 MAY 2016

Enter the following details for the altitude offset under the FSUIPC
FSUIPC OFFSETS tab:-
You are going to need these in
order to tell mobiflight what it’s
looking for in FSUIPC. A quick
Google search and look for an
attached PDF file. Print and
use.

PMDG OFFSETS
PMDG offsets are different to
the standard FSUIPC ones.
Again your going to need this
list if you are using PMDG.

PMDG Event ID’s


Yet another list of essential data,
this time primarily for inputting
data. Google and print.

Then switch to the display tab and enter the following details:-

Altitude Display
On my setup, the 1st, 7th & 8th
units are masked. So i only need to
display 2-6.

The altitude display is configured


on the 2nd unit in the daisy chain
of 5.

Run !
Once the display is working, stop
test. Head to the front page, and
select run so the program talks to
the sim.

Click test and the display should light up.

[email protected] 4
MCP GUIDE 21 MAY 2016

Splitting a 7 segment display to show two different


events.
This time I want to use one MAX7129 to diplay the CAPT course on the first four digits and the heading
display on the second four digits. This is where the detachable units come in handy.

Two new lines are created on the outputs tab:-

MCPC APT COURSE

MCP HEADING

Click the edit button, to enter the config tabs.

[email protected] 5
MCP GUIDE 21 MAY 2016

For the CAPT Course I select display 1-3.


Then move on and edit the Heading line,

Now we have one unit displaying two events.

[email protected] 6
MCP GUIDE 21 MAY 2016

LED BUTTONS Setting up a momentary push


button with led indication.
Add a new line to the outputs tab, this time I’m going to use N1
switch with led indication.

These are the two non latching


buttons I bought from ebay. I
know they look nothing like the
real thing, but yet again, I went
cheap for my prototype. These
can be bought cheap and in
bulk. Initailly I used the upper
Edit the line, and open the fsuipc offsets tab.
type fir a swquare background,
but can not seem to find them
anymore. However, the lower Enter the offset.
type I prefer as you can Remember , this
actually print the text behind
the screen. They look way
time to change the
more effective. byte size to 1.

Don’t work about the voltage of As stated by the


the LEDS either. In both types I
fsuipc/pmdg list.
just removed the bulds and
fitted normal white LED’s.

LED intenisty.
Don’t forget that resistor! Initally i
used a 100Ω resistor for
brightness. But in a dark cockpit
you get blinded. Go for a 220Ω
rersistor. Dimmer and longer life!

[email protected] 7
MCP GUIDE 21 MAY 2016

Enter the pin the led is located on. Click test to make sure it works.

Now moving onto programming the non latching switch to accompany the the LED.

Switch to the inputs tab.

As you can see, we are going to need two lines per non latching switch. Create the first, then just
duplicate it.

This is because we need to state what happens if the switch is on or off, when pressed.

Open the fsuipc tab.

Enter the following conditions:-

[email protected] 8
MCP GUIDE 21 MAY 2016

If the N1 LED if OFF (0), it will push ON.

Switch to the input tab and enter the PMDG event ID.

[email protected] 9
MCP GUIDE 21 MAY 2016

Click OK button to return to the main inputs screen. Open the duplicate N1 line (N1 copy).
This time enter the details for if the condition is (1) or On.

Switch to the inputs tabs and enter the same event ID.

Done now all should be working, the light turns on/off as the button is pressed. Having problems?
Ensure you restart Mobiflight.

[email protected] 10
MCP GUIDE 21 MAY 2016

Rotary encoders Changing the Altitude with


rotary encoders.
Enter a new line on the inputs page, I called mine ALT RE.

I used KY-040. Againi bought


bulk buy from china. These are
great and if you can get the
ones with the attachment nuts
included, all the better. Simply
connect the 5V and GND to
your external power source.
Connect the DT & CLK to the
arduino. If you want to use the
push switch add the SW to the
arduino too. This is particular
handy if you want to add a sub
function while pressing and
turning.

Parameter
selection ?
I got these to work easily but
finding the right parameter has
been a nightmare. If you know a
better way to set these up or better
input values please share and i will
update this guide.

Knobs

These are realistic, but on a


budget, they work great and if you
didnt know what the real think
looks like, china has the answer.
Cheap and able to get in large
quatinty.

[email protected] 11
MCP GUIDE 21 MAY 2016

No preconditions required at the moment.

Enter the input tab. On the left enter the parameter 8196 and the event ID. On the right, enter the
parameter -1 and the event ID.

[email protected] 12
MCP GUIDE 21 MAY 2016

My Master wiring diagram.

You may notice that in this prototype, I have no F/O encoder for course. Its fitted but not wired. Also
I missed the disengage switch.

However, this really was version 1 and a lot of lessons were learned. I now own a rather large cnc
machine has been cutting panels non stop. The MCP is now added to the list.

If your starting out and want a reasonable finish, printing the MCP diagram out and placing it
between two clear perspex panels is very effective and looks good.

If you need hi res copies or feel free to adjust mine, please email and I will send the files.

[email protected] 13
MCP GUIDE 21 MAY 2016

Prototype 1.

[email protected] 14

You might also like