Arduino Radio Panel for M$ FSX
Using the ARDUINO UNO or MEGA Card.
This project will only work using “Link2fs_Multi” (v5c upwards)
UPDATED Oct 2013 ,, Now the diagram shows the connections for driving the backlight LED in some LCD’s.
Radio Panel Project.
The start ,,,,
The is actually an old project that I made for the “InOut” program where I wanted to have a complete radio setup using
the minimum of hardware ,,, just to prove it can be done.
You can see a real early prototype actually going here ,,,,
I converted it to Link2fs_Multi type code and it works a wee treat.
You can see how I put a “Front” on it here ,,,,
First you need ,,,
An Arduino Uno or Mega card
1 LCD display (1602)
1 Potentiometer 10K linear. (Variable resistor for Contrast)
1 Rotary switch 7 position. (A cheap 12 position switch but used only on 7 positions)
1 Rotary Encoder with push switch (You push the knob and a switch closes)
1 Momentary push button switch’s. (Normally open type)
1 box or a wee panel to set this all up on.
For the Mega ,, you have the option of including the annunciators so for the extra hardware have a look here ,,,
If you have a UNO card ,,,,
Wire up your bits and pieces as per this,,,
Or ,, if you have a MEGA card ,,,,
With the Mega you have the option to just wire it the same as the Uno (taking particular note of the location of pins 14 to 21) or you can combine it with a set of annunciators as shown on ,,,
There is no need to actually wire up the annuciators to make the radio work ,, it’s just included in the INO for easy expansion.
As the Mega has lots of spare pins ,, I have included code so you can easily add more switchs or LED’s etc.
An obvious addition would be the audio buttons for the radio and send the commands straight to simconnect.
These codes are already in the “Multi” and I have marked where they would go in the “INPUTPINS” void.
Wire up your bits and pieces as per this,,,
In the download there are better pictures so you can zoom into the detail while you build it.
(The “png” files have the best resolution for zooming in on)
Note that pin 13 is connected to GND. (Stops it “fluttering” in the “read pin state” loop)
There is nothing complicated about it ,,, just do one thing at a time and all will be well.
In the case of the Mega ,,do the radio first and add the annunciators later if you want.
You can download this project here ,,,,
The package contains the INO’s for the Uno and Mega, and a copy of this webpage.
These INO’s were compiled using Arduino’s IDE version 1.1
Next ,,, load the appropriate INO (Uno or Mega) file into your Arduino ,, if you don’t know how to do that then read,,,,
( An INO and a PDE are the same thing ,, it’s the code that gets put into the Arduino)
For the rotary encoder you will need the rotary encoder library “quadrature2” available here ,,,,
Make sure you get “quadrature2.zip” ,,, it is modified to suit the later versions of the Arduino software but you
are free to modify my code and use any encoder library you want.
Serial data flow ,,,,
This project recieves a lot of data from FSX especially in the “refresh” cycle ,, and it can push the Arduino’s serial receiver buffer beyond it’s limit.
What happens is it will chop off any serial data that is in excess of the buffer limit. You can see the affects of this when you first connect and the radio might light up fine but has some of my identifiers (= or ? etc) in the text screen for some readouts (ADF or xponder) ,, or in the case of the Mega ,,, same thing or the gear indication wont indicate if the wheels are down when first connected. So read this ,,,
All was fine then.
After editing it ,, you need to recompile and load your INO into the Arduino again.
Next, download my “Link2fs_Multi” program ,,,,
(I haven’t included it with this download as I am continually updating the “Multi” at the moment.)
It is NOT an “install” but a stand-alone program ,,, you make a folder and just unzip the “Multi” into that new folder.
Ignore all the “Demo” INO’s etc that came with the Multi” ,, all you need is the “Link2fs_Multi.exe” program.
Start “Link2fs_Multi” and check in “Extractions” that it is receiving data from FSX. (FSX needs to be running !! )
If it don’t run at all then you’ve done something wrong OR you need to install the “.Net” framework into your computer (Minimum, framework 2)
or fiddle your UAC settings or right click on it and “run as administrator:” etc etc ,, your on your own here I’m afraid.
Have the Arduino INO loaded and the Arduino connected to the computer.
I used the BARON for all my setting up so until you get used to what is happening and understand how to change the parameters ,, use the BARON.
OK lets set all the ‘Link2fs_Multi’ settings ,,,,
In “SimConnect Extractions(1)” tick ,,
In “SimConnect Extractions(2)” tick ,, (If used ,, Mega only)
?Y (Gear position simple)
In “Annunciators” tick ,, ( If used ,, Mega only)
/B1 (Overspeed flaps @ 140) (Set the actual figure to suit the plane later)
/C1 (Overspeed Gear @ 160) (Set the actual figure to suit the plane later)
/D1 (Overspeed Frame @ 180) (Set the actual figure to suit the plane later)
/E1 (Airspeed Stall @ 80) (Set the actual figure to suit the plane later)
/H1 (Total Fuel under 5%)
In “Communications Settings” set ,,
Cycle time to 100
Refresh time to 10 (Once your all set you can actually turn this off if you like. (0)
Now ,, sure nothing else on any of the other pages are ticked ,, then hit the SAVE button.
Now go back to the “Communications Settings” page and connect to your Arduino.
If you’ve done everything properly ,,, it should now be working ,, hit SAVE again.
You should see data going “to” the card and when you turn the encoder, you will see data coming back “from” the card. (It needs to be set on a radio frequency)
Happy testing and fiddling.
If things DON’T work then check everything you have done ,,, this worked for me and what I’ve posted here works fine in my setup.
I don’t offer any help with INO’s ,, your on your own on that one.
These INO’s are not really “Starter” INO for some-one to learn from ,, they do however show the huge advantage of using separate voids.
There are plenty of starter files included with the Multi download but if that is too much then go back to my site and download the older “InOut”
program and learn basic INO programming with it or play with the Arduino using Arduino’s own samples.
Also note that I am using pins 2 to 7 to drive the LCD which is not the way the Arduino boys show on all their diagrams.
It seems to work fine tho but it may be compromising a bit of speed ,, I don’t know ,, I never tried it the “Arduino way”.
The same as all my other stuff,,,
Use at your own risk.
There is NO support.
This is what I done ,,, It worked for me.
If it don’t work for you, then go and try something else.
Updated 6 Oct 2013 added wiring for LED backlit LCD’s
Dated 19 July 2013