Flying trips & stories
Details on our RV-6
Homemade EFIS display
Paul & Victoria Rosales' RV-6A Travel Stories
Flight planning pages:
Flying Related Weather:
Bryan & Tanya Duke's Homepage
Email Bryan / Sign Our Guestbook / View Our Guestbook
I'm building a new EFIS display for our RV-6. We already have a Blue Mountain Avionics EFIS/Lite and love it. Instead of buying another commercially available EFIS (thousands of dollars), we decided to buy and manufacture the parts to build our own. The plan is to also write our own software for our new display.
Most existing EFIS displays have some sort of option to output most of their aircraft state and navigation data. The EFIS/Lite has "external HUD" and NMEA outputs. Using these outputs, we'll be able to display everything you'd want on an ADI/HUD display page or a moving map page...at least so we hope.
Here's what hardware we're basing the design on...
- Computer: Advantech PCM-5824 233Mhz Pentium II class processor
- LCD: Sharp LQ050Q5DR01 5" LCD (Hi-bright modified to approx 800 nits)
Please check out my new flying website, www.fly2lunch.com.
Update blog (newest first):
25 Nov 07: The faceplate that Accurate Machine Co made for me is exaclty what I asked for. Gorgeous. Unfortunately, I didn't ask for the right thing. I was certain that when I made the instrument panel, I copied the hole for the engine monitor to make the cutout for my homebrew EFIS, but it's actually a little smaller. The actual hole in the panel for my EFIS is just small enough that the old faceplate can't be re-machined to work. Figures.
Since I need a completely new faceplate, I've decided to add a few things to the design. Buttons. Four of them. I'm going to put them on the right side of the screen. The buttons I'm thinking about are Omron tactile momentary pushbutton switches with 12x12mm black caps. Below is a concept drawing of the new faceplate. The four squares on the right side of the display are where the buttons will go.
There are lots of things you can control with buttons. My plan is to make the bottom right button a menu button. From that menu, I should be able to make about any input to the EFIS I want. For starters, I want to control the LCD screen brightness with those buttons.
To control the screen brightness, I'm going to use the parallel port as a digital output. I'll hook the parallel port to a digital-to-analog converter that sends a voltage based on the digital input. That output voltage will get sent to the LCD screen inverter which already turns an input voltage (from 0 to 5V) to screen brightness.
I wired up an LED bar graph to the parallel port's output pins and added code to my EFIS to output to the parallel port. Using the keyboard, I was able to quickly get the parallel port to vary the output from 0 to 255. Together, the 8 LEDs show the binary value of the parallel port output. The picture below shows an example of that, with the right most LED indicating 1. 10011011, as shown below, corresponds to a value of 155.
There are lots of ways to get inputs to a computer. A keyboard is probably the most typical way people push a button to send a computer data. Joysticks & mice are other ways. I looked at using a GP-Wiz Max 32 USB joystick controller from groovygamegear.com for a button controller, but this project is DOS & I couldn't get a DOS USB joystick driver working easily. So, I started down another path. I'm already planning on using the parallel port to control the screen brightness, so the plan now is to also use the parallel port to read button presses.
I looked around at lots of online resources about how to wire up switches to a parallel port & none of them were working. Every page I found said to send 5V to the status register (pins 10-13 & 15), but no matter what I sent to those pins, my program couldn't see any change. I later found another web page that said to simply ground those pins when you wanted their states to change. That worked for my setup. Below is a picture of the rat's nest I made to test the inputs & outputs. Three switches (all I had) are above the keyboard. The computer is in the top middle & the LCD with it's controller/inverter are on the left. The white breadboard just above & left of the keyboard is where the LEDs are that show the parallel port output. It all works, but none of that wire mess will actually go in the final EFIS.
To watch what the button inputs are being read as & what value I'm sending from the computer I modified the EFIS code to display values on the screen. That made for easier debugging of the code & wiring. That'll also not be in the final product.
The Omron buttons & caps came in from Mouser yesterday. They look like they'll work, but I'm going to mount them on a circuit board to test everything out before I get the new faceplate cut.
31 Aug 07: As you've gathered by now, this is not a fast-pace development effort. There have been times with lots of work & times with no work. I've recently started work on the EFIS repeater again after a break working on my new tailcam. I originally designed the faceplate for the new EFIS in emachineshop.com's little CAD program. After hearing some negative reviews from a few engineer friends, I started hunting for another place to make the faceplate. As luck would have it, Bill Souza, a local RV-7 building owns an amazing machine shop here in Lancaster, CA. I took a tour of Bill's shop, Accurate Machine Co, met his wife, sons & quite a few of the other employees there and went over the not-so-good DXF drawing conversions I made with emachineshop's program. Bill & his son Chris redesigned my EFIS faceplate in AutoCAD & SolidWorks and cut a prototype faceplate on one of their amazing assorment of CNC mills.
Here are a few renders of the faceplate from emachineshop's program:
Here's are a couple pictures that Bill emailed me of the prototype faceplate:
I going to pick up the faceplate tomorrow. The final version will be anodized black. This version is just for a fit check. The pictures look gorgeous though!
26 Feb 07: After some changes to the EFIS repeater code to make it more fault tolerant & a little nicer to the DZCOMM serial port library, it now passes every test I've thrown at it. So far, I've only tested it using my PC simulating the output from the Blue Mountain EFIS/Lite G4. The next step will be to take the repeater hardware to the airplane & test it with the G4.
It's also time to get a case machined for the repeater. I've already talked to a local RV-7 builder and machine shop owner about it. Once I CAD the parts, I'll go down there & get it ordered.
Here's some video of the latest test:
Click for video
2 Sep 06: I still haven't been able to make anything display correctly on the LCD while running the 5824 computer in Linux. The issues still look like display timing or graphics driver problems. So, I tried a little experiment. I wrote some test programs in DOS and ran them on the 5824 & LCD. Everything displays perfectly.
So, I started porting the EFIS repeater code back to DOS & now have everything displaying correctly on the LCD. DOS. Go figure. I still have some serial port work to do, but here's what it looks like on the actual 5" LCD...
The program currently runs between 8 & 10 frames per second (which is slow), but there are probably things I can do to make it faster. I'll worry about getting everything working first - speed later.
23 Feb 07: Yup, it's been a while. I was gone with work for much of late September through the end of November, so my time at home was spent mostly not on this project. I started work again on it in January. Here's the latest.
The graphics, as seen above, work very well in DOS using the Allegro graphics library. After almost a month of trying to make the serial port stuff work with my C++ compiler (DJGPP), it turns out that the "standard" functions I was using to get the serial port working weren't enabled with that compiler. No matter what I did, the code would not read anything over the serial port. Now I know.
So, I switched back to the original DOS serial port library I tried a year ago when this project started: DZCOMM. I have the serial port now listening to the Blue Mountain data stream, but it turns out that the DZCOMM library does all kinds of weird stuff with disabling interrupts that wrecks havoc on the incoming data stream when used in a program that taxes the processor (like mine). So, things work well for 5-10 seconds, then it starts to jump around & miss chunks of data. Not good.
I'm researching other serial libraries, so stay tuned.
I have done a little bit of code optimization & some tweaking in the compiler. The code is now runing at about 14 frames per second, which is plenty fast for what I need. Now if I could just get the serial port to work right...
12 Aug 06: So...I HAD a velocity vector. Not any more. Shortly after the last update, a WindowsXP update on my development laptop obliterated my Linux partitions. I lost everything since my last backup. Luckily, it was only a few days since my last backup (23 May 06), but all the new velocity vector stuff is now gone.
Since then, alot of the work has been spent getting the actual hardware working together. Driving the LCD with graphics modes in Linux is still yielding some weird results. I think it's "just" a graphics card setup problem, so hopefully it won't take too long to figure out. Here's a photo of the program running on the LCD:
I added a bank angle indicator. I tried it with an arc from 60 degress left bank to 60 degrees right bank & ticks at 10, 20, 30, 45 & 60 degrees. I think I like it better without the arc - just the ticks. The bank angle mark (triangle) is now black, but I think it's a little hard to see. I'll play with other colors to see what I like best.
25 May 06: I added a velocity vector (aka flight parth marker) today. It's the green airplane symbol (circle with wings & a tail) in the screen shots below. Velocity vectors are one of the best features of a heads up or heads down display. They show you exactly where the plane is going.
Say for example, I wanted to fly an ILS instrument approach so that my plane flew exactly a 3 degree descent. Instead of trying to do mental math while flying the approach to figure out what my descent rate should be given my airspeed, all I have to do is change the pitch of the airplane until the velocity vector was at 3 degrees below the horizon. Perfect 3 degree approaches every time.
This also makes flying level turns extremely easy - just drag the velocity vector across the displayed horizon & the plane stays level. Also, the difference between the waterline (the black W) and the velocity vector works out to be your angle of attack. Everyone needs a velocity vector; now I have mine.
23 May 06: About 2 months ago, I decided to get Blue Mountain Avionics' new EFIS/Lite G4. I sold my EFIS/Lite G3 the first day I listed it, so I've been waiting to work on the repeater code until my G4 in. Yesterday I started working on the code again - mostly on things I've "wanted" but not "needed." I added a configuration file that gets read when the program starts up. The configuration file lets you set the type of each sub-display you want and its location.
I changed the way the pitch ladder gets clipped (how much of it gets drawn to the screen):
I added a new heading display that only shows the digital readout of heading:
I also added MIL-STD-1787 style airspeed, altitude & vertical speed dials:
And, like I said above, everything is movable now:
Since you can select the type of display & each location from a configuration text file, there's no need to recompile the code when I want to change things anymore. I'm sure once I get it flying, I'll decide on one configuration that I like & just leave it there, but it's nice to be able to change things easily.
16 Mar 06: Big step today...the repeater code now listens to the EFIS! Here's a photo of the repeater code running on my laptop. It's close, but not everything works quite right yet. The -4096's displayed in the repeater are essentially just the values the EFIS spits out when it doesn't have a known value (like heading & TAS shown here). Now that I know that -4096 is an error code, it'll be easy to deal with.
11 Mar 06: I wrote some code to display a huge off flag when the serial input isn't detected. Also, I changed the code to exit if the ESC key is pressed. It's nothing fancy, just enough to get you know not to use it if there's an error.
10 Mar 06: Some bad news: the PCM-5824 computer BIOS flash chip died. In an amazing feat of technical support, Blue Mountain Avionics said they'd take a look at it. I shipped it off today. Since the code is pretty much ready for in-hardware testing, I'm anxious to get some working parts.
We're also having trouble getting the screen to work. I can't find any reference to running the PCM-5824 computer in 320x240 pixel mode using an LCD, so I though maybe I needed a trick to make it work. Blue Mountain Avionics said they've run this board with their 3.8" & 5" screens (both 320x240 pixels) with no problem. D has a PCM-5825 computer and it didn't work right either, so there's maybe a problem with the cable running to the LCD. Hopefully it's a simple fix.
1 Mar 06: In his work on the serial port reading, D took my existing code & split it into two separate programs. One program generates a test data stream, displays the screen & outputs the data to the serial port. This program (bmaSim) simulates the Blue Mountain EFIS, so we can test the other program. The other program (repeater) is the actual display code for my new computer. Repeater does all the displaying the previously dated versions did, but also listens to the serial port for its data.
Below is a photo of two computers talking to each other. The bottom computer is running bmaSim (serial output) and the top computer is running repeater (serial input).
I originally picked DZComm as my serial port programming library, but it's now gone. I also oringally had planned for portability between DOS & Linux for the repeater code, but after ditching the DZCOMM library, D & I decided using Linux's own serial routines were the best way to go.
The plan now is the program will now run on a stripped down Linux kernel (no windows, just the kernel). This will actually make several other important things easier: ftp or terminal connections to the computer when it's in the airplane. FTP will allow easy in-airplane updating of the software.
27 Feb 06: I added a vertical speed bar and readout on the left side of the altitude tape. The current g loading is also shown below, but I added that a few days ago. A good friend of mine, D Wysong, is working on the serial interface for the repeater. My airplane's electrical system is back alive after replacing the alternator and battery contactor. I hope to have serial output captures from the EFIS/Lite soon to feed the test software.
22 Feb 06: I added text display of heading every 30 degrees on the heading tape.
19 Feb 06: I added a startup screen for the display.
I also did some work on the pitch ladder rendering & display code. The "earth" is displayed just like it was before, but the actual pitch ladder is clipped so it doesn't interfere with the other things displayed on the screen. I started adding the code to interface with the Blue Mountain Avionics EFIS.
15 Feb 06: The sky is now more blue. I did some background code changes - mostly cleaning things up to get ready for the serial input data from the EFIS/Lite.
13 Feb 06: Lots of background updates to the pitch ladder stuff to make it faster & more adjustable if I decide to change the scaling, etc. I put clean looking rectangles around the airspeed & altitude readouts. Most of the required functionality is in there...except for the listening to the EFIS/Lite data stream. I still need to make more changes to the pitch ladder, including clipping it near the screen edges and airspeed/altitude/heading tapes.
8 Feb 06: Below is a screen capture of the software I've coded so far. The altitude & airspeed tapes move & all the values vary as I tell it to. The pitch axis moves, but the roll doesn't yet. I still have to program it to listen to my EFIS/Lite.
9 Feb 06: Fixes to the airspeed & altitude tapes (they're still not quite right).
12 Feb 06: Airspeed & altitude tapes fixed. The pitch ladder is now working.