DIY gauges??

Discussion in 'Instruments / Avionics / Electrical System' started by Aerowerx, Oct 6, 2014.

Help Support HomeBuiltAirplanes Forum by donating:

  1. Feb 12, 2016 #161

    phiatt

    phiatt

    phiatt

    Member

    Joined:
    Aug 22, 2009
    Messages:
    10
    Likes Received:
    16
    Location:
    Eastern US
    Hello Guys,

    My name is Philip Hiatt, it's been a while(I think?), since I posted on this forum, if ever. I ran across this thread in the past and once again this morning. I revisited an old project I started about 8-10 years ago when I started building my first home built, VP-2. Like most of us I didn't have a lot of money to throw into gauges and flight instruments, So I started designing my own. Being a long time Electronics Hobbyist and doing it for a living I had many resources to pull from. After several moves and having to relocate, I wasn't able to commit any time to it. But here recently, in between jobs I have nothing but time. All in all, the plan is to make something affordable( less cost than a panel of steam gauges), simple and portable(used on different aircraft), and reliable.

    It uses an Arduino for data gathering, Tachometer, 8 thermocouples, 8 analog inputs, Airspeed via MS4525D, MPL3115A2 Altimeter / Baro (does the calculations for you) and using a 4D Systems 7" LCD module for the display. Here is a pic of the prototype PCB for the Arduino. All signals are connected to the adapter via IDC cable - Screw terminal breakout(pictured below). So far, the cost amounts to ~$90 electronic parts(Mouser, prob less in the future), ~$10 for the PCB, ~$190 for the 4D Systems Display, $6 34 conductor ribbon cable w/IDC, $10 for the breakout and ~$10 Arduino Mega 2560(Ebay). Total approx $310, which is already less than one instrument I have in one of my planes. As the project progresses, I should be able to reduce the overall cost by implementing the bare minimum for a working system. The plan is to use this in an upcoming ultralight project; for testing it will be retrofitted into my current air worthy airplanes when complete.

    board.jpg

    s-l1600.jpg

    For those of you that may be interested, I am trying to document my progress on my blog, Airplanes, Aircraft, and pretty much anything that will fly. I have the PCB off to Fab, all electronics parts are on the way, and the 4D LCD was ordered yesterday. Code for the Arduino isn't going be too hard, I have already started designing the Panel Front. If anyone has questions or comments, please feel free to ask....or comment.

    Thanks
     
    Joe Fisher, bmcj, spaschke and 3 others like this.
  2. Feb 12, 2016 #162

    cluttonfred

    cluttonfred

    cluttonfred

    Well-Known Member

    Joined:
    Feb 13, 2010
    Messages:
    6,351
    Likes Received:
    2,208
    Location:
    World traveler
    That sounds very promising, Philip, I look forward to seeing your progress. And a VP-2 as well, my kind of guy! I'd love to learn more about your modified landing gear in another thread. Cheers, Matthew
     
  3. Feb 12, 2016 #163

    Blue Chips

    Blue Chips

    Blue Chips

    Well-Known Member

    Joined:
    Oct 15, 2014
    Messages:
    370
    Likes Received:
    76
    Location:
    Mount Gilead Ohio, USA
    Yes, that sounds very interesting.
    Hoping your time permits you to elaborate on the build for us electronically challenged individuals, of which I know there is more then me here :gig:
     
  4. Feb 12, 2016 #164

    blane.c

    blane.c

    blane.c

    Well-Known Member HBA Supporter

    Joined:
    Jun 27, 2015
    Messages:
    2,869
    Likes Received:
    492
    Location:
    capital district NY
    Thank you Philip.
     
  5. Feb 12, 2016 #165

    phiatt

    phiatt

    phiatt

    Member

    Joined:
    Aug 22, 2009
    Messages:
    10
    Likes Received:
    16
    Location:
    Eastern US
    Hey Guys,

    Thanks for the comments; For starters,
    • Thermocouples, using a MAX31855 K Thermocouple amplifier and a MAX4617 8:1 mux (this mux had the lowest on-resistance I could find). Using this thermocouple interface is really simple; I plan to use a freely provided Arduino Library, and basically it does the heavy lifting and all the user has to do is display F degree or C.
    • thermos.jpg
    • All analog inputs have a pull up resistor and a zener diode for protetcion, for use with typical automotive sensor, resistance type, they can be disabled by cutting a trace on the PCB if using an active sensor(like a capacitive fuel level sensor). With the sheer number of different types of sensors out there, it may take some time to figure out the scaling in the code.
    analog.jpg

    Everything else is pretty much straight forward, except I had to use 0603 packages on a lot of the on board components to save space. Which can be a pain to work with, they are tiny.

    The Arduino is inexpensive(Ebay), Arduino libraries and IDE are opensource and freely available (Google). 4D System even provides an Arduino library for communication with their LCD modules. My parts from Mouser arrived this afternoon; one more thing, use of the Arduino Ethernet shield for a Web Based instrument panel is still possible, I will continue working on that also. Using AJAX and HTML5; and by no means am I a "expert" coder, I know enough to get myself in trouble .

    For those interested in the web based approach check out this site, it's pretty cool:

    https://startingelectronics.org/tutorials/arduino/ethernet-shield-web-server-tutorial/SD-card-gauge/

    And a big Thanks for the person who shared this work, this tutorial gave me the idea of using a web server for the gauges.
     
    blane.c and bmcj like this.
  6. Feb 13, 2016 #166

    blane.c

    blane.c

    blane.c

    Well-Known Member HBA Supporter

    Joined:
    Jun 27, 2015
    Messages:
    2,869
    Likes Received:
    492
    Location:
    capital district NY
    Thank you again.
     
  7. Feb 13, 2016 #167

    phiatt

    phiatt

    phiatt

    Member

    Joined:
    Aug 22, 2009
    Messages:
    10
    Likes Received:
    16
    Location:
    Eastern US
    Here is the first Draft for the instrument panel, created with 4D Systems Workshop.

    EFIS_1.jpg

    The design file: View attachment EFIS.zip

    If anyone has any suggestion, please let me know; what I like to see may not be what everyone else like. Please consider the Workshop IDE from 4D Systems is kinda limited.

    Thanks everyone
     
    Aviator168, blane.c and bmcj like this.
  8. Feb 13, 2016 #168

    Blue Chips

    Blue Chips

    Blue Chips

    Well-Known Member

    Joined:
    Oct 15, 2014
    Messages:
    370
    Likes Received:
    76
    Location:
    Mount Gilead Ohio, USA
    That does look good Phillip,
    Its likely going to be very personal in design for many where less and/or additional information will be needed, my self included, doubtful any particular lay out can be suitable as a fit all.
    My need will require (as possible) a combination rotor/engine rpm as well.
    I'm not sure what all a single Arduino can handle.

    Ken
     
  9. Feb 13, 2016 #169

    goldrush

    goldrush

    goldrush

    Well-Known Member

    Joined:
    Apr 11, 2010
    Messages:
    165
    Likes Received:
    13
    Location:
    Aberdeenshire UK
    Looks great.. must have a future.
    I suggest general needs would be for an altimeter pressure setting and VSI

    Not sure of the need for both digital and analogue readings (unless I have misunderstood)
     
  10. Feb 14, 2016 #170

    phiatt

    phiatt

    phiatt

    Member

    Joined:
    Aug 22, 2009
    Messages:
    10
    Likes Received:
    16
    Location:
    Eastern US
    Hey Ken,


    Typically in a microcontroller environment, the micro doesn't actually monitor all inputs at the same time. This is where interrupts and a very basic time sharing approach comes in. Basically, the micro for instance monitors rpm for a given amount of time 500 ms or less at a time, then the math is done to calculate engine rpm for that given time, the rest of the data is gathered then display is updated accordingly. Everything happens so fast that it is impossible for us as standard humans to perceive it. Also, the Atmega 2560 (Arduino Mega), along with several other AVR's run at 16 MIPS, that means 16 million instructions per second. Most instructions within the micro are complete within one instruction cycle, every .0000000625 secs.


    For myself, in such a system, I would prioritize airspeed among any other, being that I plan to use this in a fixed wing aircraft. For a gyro or heli, I would prioritize rotor rpm, since that is what keeps you in the air. So, in all the Mega may be more than capable of monitoring several systems and relaying the proper info; as long as proper programming techniques are used, no delays(delays block or prevent other code from running), sparingly use of interrupts and very little floating point math.


    Pseudo Code:


    Initialize Libraries
    Initialize Variables
    Initialize Airspeed sensor
    Initialize Baro Sensor
    Initialize Thermo Sensor
    Initialize Analog Inputs
    Get Local Pressure
    Get Altitude
    Get Thermo values
    Get Analog Values
    Initialize Display
    Update Display
    Attach RPM Interrupt
    LOOP:
    Get Airspeed
    Get Altitude
    Check for RPM Interrupt expire
    --NO (Continue)
    --YES(Disable Interrupt, calculate RPM, continue)
    Get Thermo values
    Get Analog Values
    Update Display
    Attach RPM Interrupt
    Start over.


    As you can see this is just an off the top of my head of how things should run; The only thing to consider in this very basic Pseudo Code is the Display update. In the past I use to believe that updating the display as fast as possible was paramount, in which (uses Serial or ethernet), but this is not the case. If I update the display with a baud of 9600 bps, the micro can do more data gathering in between packets than it could lets say at 115200 bps. So, time management is very important in a microcontroller system; And remember we are just gathering data and displaying it, not running a Fuel injection and Ignition control at the same time, which is immensely time critical.


    I apologize for the lengthy post, I may at times get a bit over zealous with this project; I have had a long time to think about it. I would see no problem monitoring a rotor and engine rpm at the same time, I use the same approach in a robot project I have going on also. I use interrupts to keep track of 2 encoders on the drive motors that have a resolution of 3200 pulses per rev. Along with this, a PID loop for each that is calculated, at max rpm the encoders output at a rate of 10 Khz and the Arduino has no trouble keeping up.
     
    blane.c and clanon like this.
  11. Feb 14, 2016 #171

    cluttonfred

    cluttonfred

    cluttonfred

    Well-Known Member

    Joined:
    Feb 13, 2010
    Messages:
    6,351
    Likes Received:
    2,208
    Location:
    World traveler
    Very simple and uncluttered, I like it. You might want to abbreviate the numbers on the dials (10 for 10000 ft, for example) so the numerals could be bigger. Personally I'd make the tach the same size as the others, evenly spaced and shrink the secondary displays, maybe just use a single CHT/EGT indicator that scrolls through the cylinders to save space if that's easy to do in the IDE, but that's all just personal preference.
     
  12. Feb 14, 2016 #172

    12notes

    12notes

    12notes

    Well-Known Member Lifetime Supporter

    Joined:
    Aug 27, 2014
    Messages:
    692
    Likes Received:
    445
    Location:
    Louisville, KY
    Awesome! A Vs1 of 0mph! What plane is that?

    Just kidding. You may want to leave a little more room around the airspeed for the white arc, as that will overlap the green. Assuming you have flaps, that is.

    Personally, I think the altimeter would be better as the standard 2 needle or similar design, you get a lot more resolution with a quick glance (e.g. not reading the number at the bottom). The difference between 500 and 600 feet will be pretty hard to determine from the gauge, the marks are 200 ft. apart instead of 20 ft. with a steam gauge.
     
  13. Feb 16, 2016 #173

    phiatt

    phiatt

    phiatt

    Member

    Joined:
    Aug 22, 2009
    Messages:
    10
    Likes Received:
    16
    Location:
    Eastern US
    Well Guys,

    Here in NC, we have had a bought of ice and snow, now know it's not as bad as some areas. But around here, the general populous freaks out when we get a dusting. In all, there probably will not be any deliveries before the end of the week...so, my orders will be delayed.

    In the mean time, I have been working on the web based gauge display. I acquired a couple Ethernet Shields for Arduino;I have successfully run this example on both the Arduino Mega and the Arduino Due using the Gauge example from https://startingelectronics.org/tutorials/arduino/ethernet-shield-web-server-tutorial/SD-card-gauge/ and Mykhailo Stadnyk JavaScript example fromhttp://https://github.com/Mikhus/canv-gauge. Using HTML 5 and XML to exchange data.
    The example works very well, the only problem is the more gauges you add, the slower it loads since the script is embedded in the web page. But, once it loads, it is very smooth and look good too. Here is a screen shot of it running on my laptop:
    ArduinoWebGaugeTest.jpg

    Also, attached is the Arduino Sketch and web page: View attachment GaugeTest.zip

    The shield uses an SD card for storage, and when a browser request the page, the Arduino has to cache the entire web page from the sd card to the browser. I plan to keep working on this as an alternate solution for a display. Somehow I need to trim the fat on the script and webpage or speed up the SD card library to help speed up loading. I think? As soon as my PCB's get here I will work on this option also.

    On the web page, Gauge 0 is displaying the value of Analog 0, which is 0 - 1023 mapped 0 - 220. The gauges in the script are totally customizable, anything from size, color, range arcs, values and so on. The rest of the gauges are just displaying values of counters within the Arduino Code. And a big thanks to the guys who develop this, I have leaned a lot in the past couple days playing with the code.

    On a side note, I am using a cross-over cable and the Arduino is connected directly to the Ethernet port on my laptop. I have used this over my home network, but with Netflix, Youtube and who knows what else going on; the loading of the page lagged considerably.

    To do this if anyone plans to play with these examples, set your Ethernet adapter to IPV4 static ip, use for example 192.168.1.10 and a subnet of 255.255.255.0, and the Arduino to for example 192.168.1.25, same subnet. and a cross over cable is needed for two Ethernet adapters to communicate.

    With this possibility, any old laptop or single board computer running a modern browser, ie. Chrome or Mozilla, Not IE, can be used as a display. That's all for now, Thanks everyone.

    Philip
     
    blane.c, Hot Wings and clanon like this.
  14. Feb 16, 2016 #174

    phiatt

    phiatt

    phiatt

    Member

    Joined:
    Aug 22, 2009
    Messages:
    10
    Likes Received:
    16
    Location:
    Eastern US
    UPDATE:

    I was using an old 1GB Sd card that doesn't even have a class printed on it; I changed over to a class 10 and the loading time has significantly improved

    .
     
  15. Feb 16, 2016 #175

    Blue Chips

    Blue Chips

    Blue Chips

    Well-Known Member

    Joined:
    Oct 15, 2014
    Messages:
    370
    Likes Received:
    76
    Location:
    Mount Gilead Ohio, USA
    Phillip,
    I find you post VERY encouraging and easy to understand, makes sense even to the electronically ignorant I.E. me me :gig:

    Ken
     
    bmcj likes this.
  16. Feb 16, 2016 #176

    bmcj

    bmcj

    bmcj

    Well-Known Member HBA Supporter

    Joined:
    Apr 10, 2007
    Messages:
    12,553
    Likes Received:
    4,576
    Location:
    Fresno, California
    I love it, but you're going to blow up your engine if you keep that up! ;)
     
  17. Feb 17, 2016 #177

    blane.c

    blane.c

    blane.c

    Well-Known Member HBA Supporter

    Joined:
    Jun 27, 2015
    Messages:
    2,869
    Likes Received:
    492
    Location:
    capital district NY
    I would arrange the instrument needles all pointed in the same direction when everything is functioning normally. Then you only have to study a particular gauge when it is different from the others.
     
    Pops likes this.
  18. Feb 21, 2016 #178

    dougwanderson

    dougwanderson

    dougwanderson

    Well-Known Member

    Joined:
    Jul 21, 2014
    Messages:
    137
    Likes Received:
    28
    Location:
    Lakeville, MN USA
    An easy simple and available system is ardupilot the with a gps modal (for ground speed and other) and fpv osd (on screen display) and a cheap tft display and you have ahrs add a camera and you can look out at your landing gear and the ground. I have it setup for less than a $100. don't have a plane but do have ahrs? you can add a pressure sensor for true air speed. light cheap customizable plan on using it in an ultralight. ap speed.jpg fpv.jpg
     
    spaschke likes this.
  19. Feb 22, 2016 #179

    choppergirl

    choppergirl

    choppergirl

    Well-Known Member

    Joined:
    Jan 31, 2015
    Messages:
    1,502
    Likes Received:
    510
    Location:
    AIR-WAR.ORG ★★☠★★
    A bunch of steam gauges, even rusty old things bought off of ebay from WW2, would end up costing me more than my entire airplane build and weight a ton. I'm leaning more to a Nexus 7 2013 tablet with a hood from the sun, running some android pilot software, connected via bluetooth to a sensor package (for airspeed mainly). Poor man's 3G/GPS/acelerometer/attitude equipped glass panel, with maps, in an ultralight ;-)

    But... not sold on the idea. While I'm flying I don't want to be fiddling with a touchscreen or complex screen that just auto-rotated on me... or rebooting a tablet.... I'd rather have the analog gauges tho... they are all just so darn expensive... new... or even used.

    [​IMG]

    If I could, I'd have all my gauges read out in 7 segment LEDs. No dials, no bar graphs, no needles.. against an analog circular dial where you are squinting and your brain is trying to calculate what exact number that line between two numbers exactly is... just different large color numbers showing different critical information at a glance in big number LEDs. Different colors for different gauge....

    [​IMG]

    Its just so... straight forward... brain associates color with the gauge, so in a pinch you just look for whatever colored number is air speed, altitude, cht, altimiter, tach, or fuel, or compass... and if any get in a danger range, have them... flash... it makes so much sense to me, I don't know why no one hasn't done it before..

    [​IMG]
     
    Last edited: Feb 22, 2016
  20. Feb 22, 2016 #180

    VAPORTRAIL

    VAPORTRAIL

    VAPORTRAIL

    Well-Known Member

    Joined:
    Aug 10, 2012
    Messages:
    157
    Likes Received:
    82
    Location:
    HUDSON, FL
    Choppergirl,

    Welcome Back!

    Just One concern, How do you plan on getting this thing up to 88MPH?
     

    Attached Files:

    Last edited: Feb 22, 2016
    Joe Fisher and bmcj like this.

Share This Page

arrow_white