CDU project for PMDG 737/747/777 Data and Events Server
Author: Ireneusz Niemirowski
I started this project with the intention of building a home simulator based on PMDG 737 NGX. The idea of CDU was born after the completion of electronics to 737 MCP. I installed Peter’s Virtual CDU and began to think about whether it could be implemented on a platform that would allow running a stand-alone CDU with its own screen and keyboard, communicating with PMDG NGX Data and Events Server.
After searching the Internet, the most convenient platform seemed to be Raspberry Pi, the more so – as it turned out – it could work on Windows 10 IoT core. I wrote about it on the forum, and Peter confirmed that he was also thinking about something like that. Encouraged by him, I decided to try, naively thinking that it would be enough to compile the code of his Virtual CDU for RPi processor (ARM). Unfortunately, reality turned out to be more difficult.
As Windows IoT (Internet Of Things) is intended for mobile devices and various types of “smart” devices, applications running under this system are written in the new Universal Windows Platform interface. It is to ensure that applications can be run on a wide range of devices. So it became clear that Peter’s Virtual CDU needs many modifications to migrate to UWP. As my knowledge of C# was none (and in general, my programming skills are at basic level), the case seemed hopeless. Nevertheless, I decided to work on this topic. Starting from learning C# syntax, I slowly read the Virtual CDU code to understand the principle of how the program works and how it communicates with PMDG Data and Events Server.
Getting into the topic more and more I came to the conclusion that it would be easier for me to write the application from the beginning, basing on the knowledge I gained from Virtual CDU. After five months, I had working stand-alone CDU, communicating over the network with PMDG 737 NGX, via Peter’s PMDG Data and Events Server. Currently the app supports PMDG Data and Events Server for 737/747/777.
You can see a short video of working CDU application (early version supporting only 737) on Youtube (left CDU – RPi 3B+, right – RPi 2):
Here is the link to the video made by 747 cockpit builder – Stephan Lange, who explains how he built his CDU. Application operation is shown from 20:35.
I wrote this tutorial for people who would like to test this solution.
The application is free to use in home simulators and it is not for sale in any way. This is an amateur project, free of charge and I do not guarantee its support, but if possible, I am happy to help, so please feel free to contact me via PM on the phpjj Forum.
How it works
PMDG serves data variables of current states and values of indicators, switches, displays etc. It can also transmit data displayed on CDU screens. This data can be sent over the network via PMDG Data and Events Server. The application running on Raspberry can read and display these data on the LCD screen, also controls the CDU LEDs. In the opposite direction, the CDU keystrokes are received by Raspberry and sent over the network to PMDG Data and Events Server, which further transfers the appropriate events to PMDG.
- PMDG 737/747/777 with SDK broadcasting enabled – you can read about this here: https://phpjj.wordpress.com/pmdg-data-and-events-server/
- PMDG Data and Events Server – download links are on Peter’s Forum about FSIO: https://www.tapatalk.com/groups/phpjj/
- CDU_Malyna application for Raspberry Pi – can be downloaded from here:
Two dependencies for ARM processor:
Microsoft.NET.CoreRuntime.1.1.appx – minimum version: 1.1.27004.0
Microsoft.VCLibs.ARM.Debug.14.00.appx – minimum version: 14.0.27323.0
- Raspberry Pi 3 Model B or B+.
RPi 2 also works, but a bit too slow. RPi 3 Model B+ works but so far it is not fully supported by Windows IoT, which causes some problems (mentioned below in the Installing Windows IoT section). Rpi 4 is not yet supported by Windows IoT, although you can find boot attempts on the network. I have not tested it. So in my opinion RPi 3B is the best choice for now. I tested the application on RPi 2, RPi 3B and RPi 3B+.
5” ZJ050NA 08C 640×480 LCD Screen with VGA AV LCD Controller Driver Board KYV-N2 V6.
I bought it on eBay as a set. They are in two versions: with HDMI and – cheaper – analog VGA input (both have also composite video input). VGA version will require an additional HDMI-VGA adapter (the quality of picture is very good in this configuration – I use it).
Micro SD card – class 10, 16 GB will be enough.
You will need a card reader to install Windows IoT on the SD card.
It is very important to have good quality SD card, for good system performance. RPi boot problems and slow working speed are reported with poor quality SD cards.
Microsoft Verified Micro SD Cards to work with Windows IoT Core are:
– Samsung EVO 32GB Class 10 Micro SDHC Card,
– SanDisk Ultra Micro SDHC, 16GB Card.
I use SanDisk Ultra like this:
CDU keyboard’s PCB.
Thanks to Stephan Lange we can enjoy great PCB CDU design for this project in Gerber files. You can watch videos of the construction of his Boeing 747 simulator: https://www.youtube.com/channel/UCZwySNx7t3IsAD8-7NvLfCQ)
Gerber files are here:
PDFs (1200 dpi) for make two layers PCB (140×200 mm) by the toner transfer method can be downloaded from this link:
DELL SK-8115 USB Keyboard.
I bought two of them as used for a few dollars.
It is possible that other very similar DELL models will have the same controller and the same matrix keymap.
Some electronic parts: 69 TACT switches 6x6x7.3 mm (or ALPS SKPM SMD for Stephan’s project), LEDs, resistors, wires.
Installing Windows IoT Core on Raspberry Pi
To install Windows IoT Core you will have to download and install Windows 10 IoT Core Dashboard from:
Run Windows 10 IoT Core Dashboard and select “Set up a new device”. Set device type, select drive (SD card), input device name (for ex. Left-CDU) and admin password to the system.
Click “Download and install” and wait for the whole process to be completed.
Note: In case of Raspberry Pi 3 Model B+ you cannot install Windows IoT Core in the above way. RPi 3B+ so far it is not fully supported. For RPi 3B+ you have to download RaspberryPi 3B+ Technical Preview Build 17661. To do this you must join Windows Insider program. Microsoft will probably support RPi 3B+ in one of the future releases of Windows IoT Core, but so far it is not (May 12, 2019).
The only limitations I noticed in the RPi 3B+ operation are lack of Wi-Fi and a longer system start time. RPi 3B+ boots Windows IoT Core around 2:45 min compared to RPi 2, which boots it about 1 min.
Here you can read Release Notes for Raspberry Pi 3B+ and download Technical Preview Build 17661:
Full instructions for installing Technical Preview Build 17661 on RPi 3B+ are available here:
After system installation on the SD card, three new virtual disks will be connected: EFIESP, MainOS and Data. Windows can report messages about unformatted disks – just ignore them.
On the disc labeled EFIESP there will be a file config.txt This is the configuration file for Raspberry.
To force Raspberry to operate at the resolution of 640×480 (CDU application resolution) you have to edit config.txt and change some graphics settings.
In Video section comment with hash # sign lines:
|#hdmi_group=2 # Use VESA Display Mode Timing over CEA #hdmi_cvt 800 480 60 6 0 0 0 # Add custom 800×480 resolution (group 2 mode 87)|
Add new lines in Video section:
You can read more about Raspberry video settings on: https://www.raspberrypi.org/documentation/configuration/config-txt/video.md
Write config.txt, insert the SD card into the Raspberry, connect the monitor, network cable, mouse, usb keyboard and power on the RPi.
First boot of Windows IoT Core takes a few minutes. During the first start you will have to choose system language and enter the administrator password (the same as during installation). After the correct startup, you will see the standard system application screen like below.
Installing CDU application on Raspberry Pi
To complete the next steps you must have your Raspberry working in the local network (RPi has a local IP address assigned).
In Windows 10 IoT Core Dashboard select “My devices”. If your Raspberry works properly in the network you will see it on the list.
Right click on the device will open the pop-up list. Select “Open in Device Portal” and login with your administrator password. You can also do it directly in the browser by entering the IP address of your Raspberry with port 8080 (for ex. 10.0.0.2:8080).
In the Windows Device Portal select “Apps manager” next “Add” and “Install app packages from local storage”. Select applications from your hard disk one by one and install them in such order that CDU_Malyna_1.1.2.B_ARM.appx was the last (you need to install dependencies first).
After installation, all you have to do is mark the dot next to CDU_Malyna application in the “Startup” column. The CDU will start working and will automatically run every time you start Raspberry.
The CDU application is controlled by a keyboard connected to Raspberry via USB port. I designed a CDU keyboard and connected it using the USB controller removed from the PC keyboard – DELL SK-8115.
Below are pictures of DELL SK-8115 controller and pins. The pins are covered with carbon, which has to be scratched to get to the copper tracks that can be soldered.
The controller’s pins connections to the PCB (top side) are as follows:
CDU keyboard is a matrix of 11 x 8 inputs. If you want to make your own PCB for CDU keyboard, you have to design the following matrix:
You can also design a keyboard controller on any microcontroller that can emulate a USB keyboard and allows you to program the matrix described above.
It is possible to connect any PC USB keyboard for do some testing, but its use will be painful. There is mapping picture for testing purposes:
Below are dimensions of the LCD and input points positions on the screen.
Note: These are dimensions of 5 inches LCD used in this project and my application screen data displayed – not dimensions of real 737 CDU.
The CDU LEDs are connected to the Raspberry’s GPIO pins. The PCB provides connections for one or dual LEDs for each indicator. LEDs have common anode and it is powered from RPi 3.3V. You have to choose resistors suitable for your LEDs. Below pictures with LEDs connections to Raspberry and CDU keyboard.
It is also possible to connect an encoder to adjust the display brightness on the 737/747 and the brightness buttons on the 777.
Start menu works like a typical CDU screen. It has input line and options operated by L and R buttons.
L1 – input IP address,
L2 – input port,
L3 – change aircraft type 737/747/777 and color/mono mode of CDU
L4 – change between LEFT/CENTER/RIGHT CDU,
L5 – autoconnect ON/OFF,
L6 – color management (in mono mode),
R1 – info about application,
R4 – connect to PMDG Data and Events Server,
R5 – restart application,
R6 – shutdown the system.
IP & port numbers, aircraft type, CDU position and color set are stored in the config file for use during next startup. The file is saved when you press Connect.
In color menu you can set mono display color according to your preferences, changing Red, Green, Blue and Backlight strength.
The application should detect errors in the connection. In this case, you have to wait some time until the application resumes working and returns to the start menu.
It is recommended to turn off the system with the Shutdown button, however, I have not noticed any problems with the hard power off, except, that if you turn off the power and turn it on too quickly, the data in the config file may be lost (the file will be rebuilt).
If you enable Autoconnect the application will attempt to automatically connect to the server during startup. To make it possible to return to the start menu, an additional Restart button (L6) on the main CDU menu is available. It restarts the application without restarting the system.
That’s all. I will be very pleased if you use this project for your PMDG Data and Events Server based simulator.
Good luck. Irek.
Below a Youtube post from Stephan Lange about his build of the CDU. Enjoy!