Saturday, April 30, 2011

Frustration Part 1.

I'll call this part 1, since I'll have plenty of frustration. Something won't go as expected, and I'll have to do some extra work, or wait on something. I ordered the bluetooth shield from someone in the US thinking I'd get it quicker with lots of ready to go documentation. Turns out, they source it from China, and it takes the same couple weeks as if I ordered it from ebay. They do have docs on line, so that is pretty good.

Time is another factor. With work and family stuff, I just am not getting to work on this too much. I know I need to order the amplifier chips, some of the other discretes and maybe a proto board. I mostly want to have the full design done, so I don't waste time with some small orders, and filler parts that I don't need. I am sure it'll happen eventually, but I don't want to start off that way.

I'll have to pick up some thermocouples and maybe oil pressure/temp sensors and play with them. I was thinking putting 'em on my car would be a good test. At least it would give me a benchmark, and let me know if I am in the ball park with the software/GUI and all.

I am just kind of excited about getting some data from the arduino to the phone, then I can feel like I am moving forward.

Wednesday, April 27, 2011

First shot at the thermocouples

I sort of came up with the schematic. Eagle got a little creative with the symbol names, but I am not sending this out to have the board fabricated, so it probably isn't critical.

The upper clump is the CHT thermocouples, the lower clump is the EGT thermocouples. Each group with their own temperature compensating circuit. I didn't put any values on this. It is mostly an expanded version of the schematic in the Linear LT1014 data sheet. That datasheet has some interesting resistor values (IE 199K) I'll play with things a little bit, to see how accurate I get it with standard components. I suspect, it'll be good enough.

The datasheet is shooting for 10mV / degree C, I can use math to change to 9.82mV / degree C or even 10.28mV.

I've ordered the bluetooth shield, and expect it before the weekend. I am kicking myself, since I ordered from seed studio, and they  have prototype shields (cheap too!) that I didn't order one of those at the same time.

Again, any feedback is more than welcome.

Friday, April 22, 2011

What have I gotten myself into

Today was an interesting day. I started looking at the accessories I need to make this work. It looks like I will have to spend some money. The bluetooth shield will be about $60-70. I looked at the BlueSmirf and the bluetooth mate, both are more than the main board. That is what it costs to do stuff I guess.

It seems weird, because almost all phones have bluetooth capabilities, even the cheap ones, and they usually don't cost like that. I know Arduino shields are low production items, but wow! I was thinking maybe $20-30, I guess I can't guess well.

I've been looking at amplifiers for the project. I originally was considering the LTC1050, since that is what I was using before. Then thinking of multiplexing it, with some 4066's or something. Today I found the LT1014's, 4 in a package, and the datasheet shows cold compensating, so you can get 3 per package, and the are about $5 each, in a DIP package from Mouser. To do 8 inputs, it will take 3 packages, not bad.

There is also an Arduino proto shield, I found. That ought to be useful, allowing me to build the adapter on a good looking board, instead of by hand on a perf board.

I looked at the MAX6675 A/D converter. It would work, but they are really expensive, 8 would be about $100! I keep looking, and think the LT1014's are the right choice.

For schematics and such, I've used eaglecad in the past, and will probably use it for this. The free version limits your board size and number of components, but I think this will fit in the limits enough.

Another shield I found a few months ago is the autopilot. That will probably be my follow on project.  If this doesn't turn into a FADEC at least. I want to head into the FADEC direction, but will be very careful, and have overrides until I am sure it works (and even then if I design for override, I'll probably keep the design).

Wednesday, April 20, 2011

Testing the Aurdino

I actually got the board 2 days ago. Some home projects and family items have kept from it. I followed the instructions on the Getting Started Page. It worked right out of the box (envelope, whatever)! The first time I plugged the board in, I got the dreaded Blue Screen of Death windows is famous for. (long story, yes I am a Linux guy, but life throws curves at you all the time, dang WiFi port quit on my laptop, then the windows driver for the replacement USB WiFi port, was only 32 bit, but I have a 64bit processor, and the linux system didn't work. Anyway, now the hard drive is going bad, do I fix everything, or find a new laptop before something else breaks?). The Arduino folk are building this to work with whatever, so I can use windows, and be successful! After a reboot, and loading the drivers like instructed, I was successful at running the blink app. I also found the serial monitor, and was able to see the output from several other example programs.

The Arduino folks are really smart, and have some really good tools. Everything is automatic or almost. You change the code, and correct syntax is highlighted, incorrect is not. The uploader can be run using Control U, a pulldown menu, or from the shortcut button. I had to set my port and board:

  • Port: COM4
  • Board: ArduinoMega 1280

I need to at least come up with the block diagram of what hooks to what. Again, for analog inputs, I will have 4 J thermocouples, and 4  K thermocouples for the EGT and CHT's, oil pressure and temperature, fuel pressure and outside air temperature. For digital inputs, the RPM will need to be measured, probably on an interrupt. There is room for additional digital inputs, including landing gear position, flaps or spoiler position. Analog inputs for throttle, mixture and carb heat position. Outputs may include a speaker or input to the intercom, assorted LEDs, and finally using bluetooth, to the Android.

A consideration I have, the amplifiers needed for the thermocouples are somewhat expensive, like about $5 per chip. One chip per channel, meaning over $40 for amplifiers alone (or $60 if I used a 6 cylinder). That is more than I paid for the Arduino board. That is fine, but there is another way, using multiplexers. Something like a 4066 or another analog switch. I need to do that research.

I think the next thing I will do is start building the tester. It'll have a couple amplifiers for the thermocouples, then I'll have the connector for the other analog inputs, with some op-amp (lm324?) to allow scaling the inputs. Another digital input will be for the tachometer input (opto coupler?).

Sunday, April 17, 2011

Link Page

While I was building my airplane, I had a link page, a place where I  would always go and check stuff. If I was looking for something for the plane, I'd try ebay, needing info about a radio, one of the radio retail sites, or the manufacturer. It was tough sometimes, since links change all the time, but here goes. I may build another one later, or just keep editing this one.

Airplane Parts
  • - Wow,  need I say more, cheap ads, super deals.
  • - The old standby, not printed on yellow paper anymore, but same feeling.
  • ebay motors - Ebay, but the better place to start looking for airplane bits.

Arduino Links
  • The main page - software, schematics, and everything else.
  • Amarino - Android meets arduino, lots of hints and tricks.

Android Links

Book Stores (cause I don't do that one big book seller)
  • - since ebay bought 'em it isn't as fun, but still cheap.
  • A1 books - similar deals as, but alas, bankruptcy caught 'em.
  • Bookmooch - free books? You betcha! well, exchange 'em.
  • Bookins - more free books? how can borders stay in business (oh, never mind).

I've pretty much decided I don't have all the links I need. Should I do electronics retailers? Aircraft parts catalogs? you  tell me. Plenty of room in the comments part. Hey, if you think your link belongs here, I'd love to hear about it also.

Wednesday, April 13, 2011

People are Pendantic

Recently I participated in a debate around pitot heaters. Reading the FAR's (CFR 14, what used to be called FARs when I started flying (not that long ago)), there is nothing about having a heated pitot in little airplanes. Even though most manufactured airplanes have heated pitot tubes. Some people believe everyone must have one, no certifications (experimental or otherwise) can be granted without one.

(this gets a little technical, flying talk, there are hints at the end)

Now I am not advocating not having them, but I will say that if you stay out of moisture when it is cold, you should never have pitot icing trouble. There isn't any air flowing into a pitot tube, it wouldn't work if there was air flowing through it. It measures pressure, so the air gets packed into the tube, and the airspeed indicator reflects the pressure, and that is how it works.

The air can't make things colder than the air temprature, that is physics. Flying at high speed, the wind chill only counts as a feel, not as reality. If you  have a windchill factor of 40degrees below zero C, and the air is 5degrees C, the air can only cool metal to 5degrees C. Now if you are flying and the air temperature is above 0C, then there shouldn't be much freezing going on. Of course, the temperature may vary along the route, and a 3 degree lapse rate may allow you to go below zero, if there are any altitude deviations.

Having a heated pitot tube will allow you to know how fast you are going, even if the airplane picks up ice. Is knowing how fast you are going with a load of ice good news or bad? It may not matter, if you get too much ice. The FAA just issued a SAIB for icing, that seemed to show some common sense in a document. They caught some flak for it, since it was common sense, something  everyone should know. Probably they get tired of getting called out to muddy farm fields, to look at broken airplanes, and are wishing that problem would just go away.

So what does any of this have to do with building an engine monitor?

The engine monitor may want to know the temperature of the air going into the engine. Or at least around the engine to know the change in temperature (deltaT) that is happening. Are the CHTs higher today than yesterday, is it because it is warmer out today? It will be a baseline to know how well the instrument is performing.

I expect people will be different or smarter than me. I hope I can stir some thinking.

Watch those temps

Monday, April 11, 2011

What am I trying to do?

It occurred to me that I didn't really cover what I am trying to do. I am trying to monitor the engine on my airplane. I am trying to build a device that will allow me to monitor the engine parameters in real-time while flying. The device will have alarms and other such passive devices such that if I am busy flying, it will try to get my attention, before something really bad happens.

Airplane Engine???

What is unique about an airplane engine? Normally, for smaller aircraft, and airplane engine is an air cooled piston engine. There are two primary manufacturers, Lycoming and Continental. They have similar designations for their engines, a typical indicator will be something similar to:

The fist letter "O" stands for opposed. Some people call this a boxer engine, Subaru, and Porsche are typical manufactures of this layout of an engine. The manufacturers also use an "R" for radial. Radial engines are roundish, and you'll see them on WWII aircraft.

The next number is the displacement of the engine. 360 is for the number of cubic inches of displacement. Common other values are 320, 540 and 720. A Ford 302 is similar, with 302 cubic inches of displacement (or 5 liters).

The values after the the cubic inches define some accessories and other details about the internal parts of the engine.

My Engine

The engine on my airplane is an O-360A1D engine. It is a 4 cylinder air cooled carbureted engine. It produces about 180HP at 2700RPM. The propeller is attached to the crankshaft through an extension. The slow turning is ideal, and prevents the propeller tip speeds from going supersonic. (I could get into the math, but you can do it if you want. My propeller is 76" diameter, 3ft radius, and arcing at 45 RPSecond you can see pi * d is about 19ft, and 45 times that is 848 ft per second times 3600 and you end up about 578 miles per hour, at the tip).


I want to monitor the cylinder cooling. The baffling on the engine is designed to cool the cylinders, and the air must be efficiently be directed around them. Measuring the individual cylinder head temps (CHT) will help determine the quality of the baffling, and indicate the even flow around them.

The exhaust gas temperature (EGT) can help determine the correct mixture, and even burning of the fuel. As the airplane goes higher, the air is thinner, meaning the mixture must be adjusted to help maintain the proper air fuel mixture. If the temps go down, the extra fuel is coming out the exhaust, and the mixture should be leaned. Cars have mass airflow sensors to maintain good mixture, airplanes have a mixture lever.

The engine RPM will be monitored to be sure the proper speed is maintained, and the engine is running as expected.

Oil is the lifeblood of the engine.  Proper temperatures, and pressure will insure the oil is doing it's job. It has two purposes in this engine; provide lubrication and provide some cooling. There is an oil cooler on the engine, and I want to be sure it is operating properly, without too much or too little cooling.

Fuel pressure is something else to watch. There are two fuel pumps on the engine, mechanical and electric. I need to be sure the fuel can get from the tank to the engine as expected. The pumps will help that happen. The fuel pressure will indicate that is working, and if there are any issues.

Those are the main things that I will monitor. Other things will come up. This design is flexible enough that someone with a 6 cylinder engine could use the design.

Sunday, April 10, 2011

Getting Started

I decided to build an airplane about 15 years ago. A lot has changed since then. The idea of a glass panel, back then was almost unthinkable for any reasonable amount of money. Today, a glass panel is pretty common. There was one company building a complete graphical engine monitor, and a couple doing bits and pieces. Today there are dozens.

Why should I do this...

I have a different idea. I think the ones out there are too darn expensive. Sure the bill of materials they have chosen probably necessitates the price. Sunlight readable LCD displays are expensive, along with all the software and reliability that is needed in the box. Switches, cases and connectors are special for use in an aircraft.

Airplanes are different than cars. High speed and constant vibration are going to cause issues, it is hard to install them. Installation, and building are two different things. Installation issues are the same, almost, no matter what unit is purchased.

My idea is different. I like the idea of component equipment. Have a display box, a data access box, and maybe eventually have an air data computer. Using components, I can upgrade one component at a time, and not have to bother the whole system. If you have a integrated nave system (car or airplane) how many times have you said, I wish this worked like my phone (or had some other new feature).

Components are more expensive...

For stereos, you can buy a boombox or other integrated stereo for far less than component stereo equipment. That is reality. Components are pretty standard in home audio world. In the computer world, things are rapidly becoming standard, but you can't quite plug and play this and that. Communication standards are available, and there are plenty of standards to choose from.

My design is hopefully, going to allow me to upgrade parts that I feel need upgrading without destroying what I have working.

I've been working on this for a while...

About 5 years ago, I started prototyping something. I started with an OEM AT mega board and a prototype board. I had connectors for thermocouples, for CHT and EGT probes, and some other A/D converter connections for the oil pressure and temperature. I had a serial output, that I could connect to a laptop, or a Zaurus mobile internet device, and a GPS board that I started playing with. I got distracted with the GPS board, and never quite started messing more with the engine monitor.

During the last couple years, I knew enough about GPS by now to get a job working on RNP satellite monitoring. That was a good benefit, but now I want to go further and do real live avionics type work.

My idea...

The idea is to stick with the AT mega, but use a COTs board, an Arduino board. An Arduino Mega board has 16 A/D converters, and many digital IO pins. The analog inputs will be:
  1. 4 CHT probes
  2. 4 EGT probes
  3. Oil Temp
  4. Oil Pressure
  5. Fuel Pressure
  6. Fuel Level
  7. OAT
  8. Manifold Pressure
Digital inputs may include fuel flow, engine RPM, and various status switches (trip start, etc).

For a display, I was thinking of using one of my phones or mobile internet devices. They are inexpensive (I've already paid for 'em). They have touch screens, and pretty good graphics. If this whole thing works, I would like to get a tablet computer for this.

For communications from the Arduino to the display, I had considered using USB, since almost everything uses that, but then I found a project that allows the Arduino to talk bluetooth to an Android phone. The perfect place to start.

Where am I today???

I've ordered the Arduino Mega board, I've gone through my old notes about my project, and I've downloaded the Arduino software. I've read the hello world example (blinky), and tutorials 1-85 or so (not really, maybe 1-8). We will just have to see where things go, and how far I get.

How is all this going to work?

I am not really sure. I've never blogged before. I thought it a good way to get my thoughts out there, and allow someone to repeat my work, if it is mildly successful. If it a wretched failure, well, there may still be stuff to learn.

I have lots to do in my real life, this will only be a hobby. If I don't write anything for weeks, give me a nudge, I might be doing something useful, and unable to write. If I don't write for months, maybe the project will be dead.