Friday, March 30, 2012

Another SDR Post

I started putting together the hardware for the thermocouple amplifiers, but quickly realized I didn't have everything I needed. I needed some reasonable sized capacitors (0.47uf 10V or so) and a trimmer resistor. The closest I could find in my collection was a .10uf at 25V or .33uf at 1000V. I thought, crap, for less than a dollar, I should get what I need. That 1000V cap, while close to what I needed, was bigger than the chip. Board real-estate would be a challenge.  I know it is just a proof of concept, but I needed something better. I have some surface mount caps, but even those were all over the map, like 47uf, or 100pf, nothing kinda medium.

I was thinking a quick order at Mouser or Digi-Key and I would have what I need by Wednesday. Well, it would take a $25 minimum order, and I'd obsess over what else to buy for 5 days, and I wouldn't get what I need until next week. I had a coincidence happen on Tuesday. Traffic was awful, and I needed to try a different way home. I ended up in Farmers Branch. Tanners Electronics is right there. I thought I am close, maybe they stay open until 6pm. IT was about 4:50pm, and I was close, so I thought I'd go for it.

They are open until 6 Monday through Saturday. I could pop in there and get what I needed. When I got there, I was surprised. They had about the same collection of small capacitors as I did, .33uf at 1000V and some surface mount ones. I did find a couple medium ones, one disk, and one film and a small one, mylar I think. I bought an assortment, at least 2 of each, and a couple trimmer pots, spending all of $3, and I had them.

I haven't had time to do anything with them though. I hope to this weekend.

I've been thinking what a full system might look like. How about the Arduino as the engine controller and monitor. This is for the full FADEC system. Then a USB connection to a central hub, maybe an ARM controller running Linux. Another Arduino running DIY Drone air data computer, and IRS gyro package connected to the central controller over USB. Each Arduino would have their own blue tooth connection for sending to the display computers. Display computers would be Android tablets. I am not sure what the central system would do other than data collection. I guess it should share information, with the two Arduino's. Like putting in a TOGA button, the FADEC would run the engine up for takeoff power, then the autopilot would fly the missed approach procedure. The central computer would have some GPS and mapping software, unless that was outboard also (Android tablet may have that?).

Lots of planning and dreaming.

I said this was an SDR post. Well, here is the SDR info. Suddenly SDR hardware is down to about $20! You can buy USB tuner cards for PC's that have untuned front ends for $15-25 on EBay. There is software available to use them, and they are quite popular. They can tune anything from about 64-1700MHz and should work in almost any mode (even TV, since that is what they are designed for!). Reddit has a hardware compatibility chart. 

I ordered one, maybe, I'll have time to play with it. It sounds like it has most of the software written. All I need to do is plug it in and run some code.

I also found the LinuxCNC website. That might be my answer to the 3D printer I've been wanting to work on. Again, when I get some time, I'll take another look at it.

Sunday, March 25, 2012

Reeling in Some Scope.

I was getting all excited about ordering all the parts I need to get to the finished design. Well, I realize there is more to it than just firing up Eagle, and laying out the board, ordering it, having a B.O.M. ready and assembling a couple proto boards.

I am needing a good solid proof of concept. Can I really measure C.H.T's and E.G.T's with the simple design, and a multiplexer? Well, lets try it and find out. Otherwise I need to build something different. Will the various analog inputs work with a Tack and other inputs? Well, lets get them other inputs working, and then try a tachometer.

For now, I am going to use at least one of the LTC1050s that I have for the CHT's.  I'll just set it up like the example on page 9, the 500degree battery powered temperature sensor. If that is working, with reasonable accuracy, then I'll add a multiplexor in front of that. I'll probably need a different amplifier for the EGTs since they will get to something on the order of 1500degrees.

For the oil and fuel pressure senders, I have something like the The Mitchell 80# sender. This will ground some of the supplied voltage, and we need to measure the current going through the sender. We can do that with a transistor, and some resistors.

I've also got a hall effect current sensor that I want to use. I think it is an Allegro. I got it as a sample a couple years ago. I'll finally get to try that out. That is supposed to handle up to 100Amps with no shunt, all power is available.

The one worry I have is about board layout. I may have to look into getting another board, and modifying it (electronically). That is be beauty of open source, people share, and allow fixing things. People share, and make things available for the rest of us.

Anyway, you can see I am getting more active. A little success will do that for a guy.

Thursday, March 22, 2012

Simple Round Gauge

So for grins, I started a simple round gauge for the thing. It has variable radius, and location. I can instantiate multiple of them, and I can override it to make it a different shape or something. The beauty of and object oriented language. Actually I should design this better, make an interface, and multiple implementations. Graphs can be fun, and round gauges come in all sorts of shapes and sizes.

Some round gauges are 135 degrees and start at the bottom (speedometer or tachometer are examples), others the left and still others the right. Some round gauges are only 90 degrees and start left or right (fuel gauges are like that). Implementing multiple of these could be quick and simple, and useful.

Hey how about that, I was able to upload a picture. The have to be not much bigger than this to work. Sorry.

On the right is my Arduino stack, the main board is on the bottom, then a prototyping shield with my home made pass through connectors, and then the top board is the bluetooth board.

Looking on the screen (maybe it is too small), in the upper left, you can see a round gauge. Yes, that is displaying the temperature right now in the room I am in! That transistor thing sticking up on the prototype shield is the LM34 sensor. The USB connector on the Arduino is only there to power the board. I am not doing anything tricky.

Now we are cooking, more sensors, more graphs, and we are on our way. I'll try to keep things documented. So far I haven't veered too far from the original sensor graph code, but it is what it is. You could probably get where I am using these notes and and getting the original sensor graph code.

Good Luck.

Wednesday, March 21, 2012

Thinking and Planning

After last night, I almost didn't go to bed. I was pretty excited. Almost a year of frustrations and now it is showing progress. Cool, well sorta. I still have a bit to do. The sensor graph just barely shows what is possible.

The pictures never showed up, I'll take another crack at it here:

(I don't get it.. I've uploaded them before?)

I was thinking of being really creative with OpenGL gauges, I could make 'em look just like the analog gauges in the plane, with 3d moving needles and all. Of course what would be the point, I already have that, and they work. No, I want something better. I was thinking the non-linear guages (the ones that show a lot of detail around the normal range and less detail out of normal. And again I can get all fancy, with moving needles and such. I think for now though, I'll try something simple, get that working, and comeback and make it pretty.

I need to maintain the MVC (model view controller) pattern. The phone or tablet screen is the view/controller and the Arduino is the model. All the data comes from the Arduino, the screen will allow some control from the screen, if I move toward a FADEC system. For now, this will be monitor only. (it has all that potential! I should use it ;-).

I need to dig into the whole GUI part, and understand what Android can and can't do graphically. I need to get more hardware hooked up.

More when I get there.

Tuesday, March 20, 2012

Now we're cooking!

Like I said, I thought I'd try installing the Android Development kit on the desktop. It took several hours, downloading JDK, Eclipse and the the SDK. Then there were all the other devices (I forget what they are called, anyway the modules for the various versions of stuff). I finally was able to see sensor graph working in the emulator about 8PM Sunday evening, but I was encouraged. Before I disappointed myself, I shut everything down. My family had just gotten home, and I didn't want to nerd out on them.

So tonight I thought I'd try it, and see how successful I was. A couple quick lessons in uploading apps to the Android (I needed the Sensor Graph app to be running). I needed to set the Bluetooth address in the application, so I needed to plug in the Arduino and run the Amarino app to see what the address is. Ok, it is 00:11:04:15:10:87, and I put that in the file in eclipse, ran compile, uploaded the .apk file to the phone, then ran the app installer on the phone. It connected.

I forgot a crucial step. The Arduino is still probably running my quad stepper app. I need the Sensor Graph app running on the phone too. I open the Arduino app and it wants install a software upgrade. I figure yea sure why not. Well, once it was installed, I remember why, the lib and sketches aren't there. Fortunately it didn't overwrite my original stuff, so I went back to the 0-22 version, and everything was there. Load library Hello Android and get my sensor graph running. Still nothing.

I open the serial monitor, and all I see is gibberish. Dang, baud rate is wrong. I change the baudrate to 9600, and I see "179 172 178 176 174" scrolling across the Arduino serial monitor screen. Cool! I had connected an LM34 temperature sensor to pin 15. It is doing something, but I should try something faster. There is some complicated instructions on the iTread studio stackable bluetooth shield web page about sending the AT commands to change the baud rate. I can't get it to work, but will be happy if 9600 baud works. I change the sketch to use 9600 baud, and upload that, I switch the switch from FT232 to board and  viola! something is happening.

Well I get things looking good on the screen, I see the same numbers and the graph is a little jiggly, but mostly straight across the screen. I put my finger on the sensor, and it goes up. Thinking about how this works, and what the data sheet says, 10mv per degree F. What is the full range of a sensor (12bit or 8bit?). I got some research to do.

For those who might not believe, here are some crummy pictures (very hard to read, and big too).

Saturday, March 17, 2012

I remember my frustrations now...

I have this HP laptop, that I want to do my development on. It is a tx-1000 series, a tx1220us specifically. This seemed to be the best choice at the time I bought it. It was a convertible to notepad (screen rotates to cover the keyboard), and it has a touch screen. I thought it would be a great navigation tool in the airplane. I already had a bluetooth GPS. I just need some moving map software, and I'd be all set.

As it turned out, this laptop didn't live up to my expectations. The screen was very glossy, looked great in the store, but when I got it outside, it was unreadable. If you look around the web, you'll find this laptop is problem ridden. The WiFi and Bluetooth cards just quit! The screen sometimes just quits. The repair from HP is not permanent, so when they quit, you only get usability for an even shorter period of time. So far my laptop has lost the WiFi and Bluetooth. The screen has held up, but I am not using it as a notepad hardly ever. If you look back a few posts you'll see the hard drive gave up, and had to be replaced. I've been using various USB WiFi connections, but none has been 100% reliable either.

It runs Microsoft Vista. I don't know how much of the weird stuff is that OS and how much is the flakey hardware. Dumb things like Firefox locks up when playing videos, and keyboard just flakes out. If I am using firefox, and want to play a movie, I have to open IE (eeew!) or Chrome.Software updates scare me, since sometimes they make me revert to a prior update, and a 1 hour productive session takes two hours to make the computer at least functional, without any productivity.

Before the HD crash, I was running Linux on it (dual boot). It was setup well, always reliable, and only had background updates that worked. Once the WiFi problems started, I was kinda stuck, since most of the USB WiFi connections didn't work without a kernel recompile, so again, productivity was going backwards. I do have an ASUS WiFi connector that works out of the box on Linux, drivers were included, but the distro just worked without 'em. But by now, I don't have the Linux side working 100% now, it seems I gained something and lost something with each kernel change.

Before the HD crash, I had the Android development kit installed, and working. It is COTS software, why would I back that up, I can just get new, and start over. Besides, a newer version would be better anyway. Talk about confusion, the SDK doesn't work with some version of eclipse, and others need this or that version of Java. Last summer, I struggled with getting the Android SDK installed. I set it aside for a while and worked on my 3D printer idea. I got real familiar with the Arduino.

So the last couple days, I have been struggling to get the SDK installed. Things are unreliable, and I can't run the simulator. It runs, it never gets past the boot up screen. The console was showing a bunch of errors, this version not compatible with that library. More updates, and more install issues. Now it comes up, the console stays clean, but it still never gets past the startup screen. Is it the laptop, the OS, the installation, or something else?

Now I want to put it aside again. Maybe if I get some time this evening, I'll try installing on this ancient desktop. I don't know if this thing is up to the task, but it might be another viewpoint.

Wish me luck.

Wednesday, March 14, 2012

I may finish this yet...

I've quit and come back before, but not so long. Actually, I got some feedback a month or so ago. Someone was offering a suggestion on the thermocouple hardware. Bill offered:

  Analog Devices chips that make thermocouple interface a whole lot easier. What 
 are your thoughts on this. 
  PS I like the Dangerpants ADI(air data system)

I think the analog devices are about the only ones I didn't consider.  They are about $5.00 each, and only available in SMT packages. They sure look like they are easy to use, but at that price, it might be a challenge without multiplexing the the inputs.

There is the Arduino Thermocouple Multiplexer Shield that will take 8 K type thermocouples in (4 cylinder EGT/CHT monitoring eh?). Well, $49 puts it in the 8 individual interface chip price range. It is already assembled, so it might be a solid option. The page shows the chips that are used to do the conversion are the MAX6674/6675 chips which are about $12each, and they talk SPI (not supported directly by the Arduino). But the multiplexer the board uses is the ADG608, which is about $5 in homebuilder PDIP packaging.

Over the summer and into the fall I was thinking I'd like to build my own 3D printer. I get the Sparkfun 4 channel stepper controller. It works, but not in bus mode. My thinking was, bus mode would save a lot of wiring, but alas, I had to use a lot of wire to get even 3 steppers going. It isn't a shield, it was all point to point wiring.

I am trying to get the Android SDK components installed on my laptop while I type this in the other window. That is taking a while, so I can go back to working on this blog. The download speed is screaming along at about 125K ick! Anyway, that will get installed, and then I can start working on the GUI for this.

I still want to do the 8 thermocouples, for the CHT/EGT monitoring. If I had a 6 cylinder, I'd still do 8 channels for thermocouples, 6 for the CHTs, and 2 for the EGT. The actual EGT doesn't really matter in a carburetor equipped engine. You want to see peak temperature, and adjust the mixture around that. Knowing if there are differences isn't really important, other than maybe to know if there might be something up with the sensors. (I know, in a fuel injected engine, the EGTs will tell the state of the individual injectors).

I want to also monitor RPM. This can be done multiple ways including:
  1. Spark Plug Firing
  2. Mag/EI outputs
  3. Pulse measuring with sensors on the engine
  4. Optical measuring the propeller.
What I thing the design will allow is some external circuit to present pulses in. This will allow multiple choices of one of these options to be chosen by the builder. I have an EI (PMAG) that has a tach output, that I will probably use.

Pressure sensors are already available on the engine to measure fuel and oil pressures. These will output between 0 and 12volts. The sensors will need to be calibrated, and probably can run in parallel with the analog gauges to do so. Same with the oil temperature sensor, it exists, and can probably run in parallel to allow calibration with the new system.

Again any thoughts or ideas, let me know.