Arduino-Based Instruments?

Discussion in 'Instruments / Avionics / Electrical System' started by Pilotgil, Sep 21, 2017.

Help Support HomeBuiltAirplanes Forum by donating:

  1. Sep 21, 2017 #1

    Pilotgil

    Pilotgil

    Pilotgil

    Well-Known Member

    Joined:
    Apr 2, 2013
    Messages:
    52
    Likes Received:
    54
    Location:
    Unfortunately California
    Hello All,

    I have been working on various instruments for my Super Drifter for a couple of years. None of them Arduino-based. I have attached pictures before of some of those previous designs. I have stayed away from the Arduino mainly because of memory limitations when coding using a "sketch" (Basically C, a memory hog compared to my normal assembly routines) and the overhead of the bootloader. I decided to see what I could actually get accomplished and designed the attached Arduino-compatible printed circuit board to form fit it into a 2 1/4" inch instrument hole. Because I like graphic LCDs rather than straight text, the hardware had to accommodate the graphic LCD interface and I had to write the code to "talk" to the LCD. A feature rich character (various sizes) and drawing routines take up quite a bit Arduino's memory; however, many functions (like oil pressure and temp, EGT, etc are fairly easy to implement). Note the picture with the "live" graphics is not an Arduino-based design. If there is any interest, I'll post some updates as I build the next instrument based on the Arduino. I will be populating the PCB this weekend. Takes a bit of patience as most of the components are surface mount.

    Gil

    ACI.jpg Engine (2).jpg
     
    rdj and BoKu like this.
  2. Sep 21, 2017 #2

    tspear

    tspear

    tspear

    Well-Known Member

    Joined:
    Feb 13, 2014
    Messages:
    762
    Likes Received:
    165
    Location:
    Oneida
    Ok, that looks cool. And super useful for the small/light planes.
    Are you going to open source the code and put it somewhere like Github? Or is this just a personal project?
    Note: as much as a encourage, I would not have a use. I will go large glass EFIS when I build.

    Tim
     
  3. Sep 21, 2017 #3

    TFF

    TFF

    TFF

    Well-Known Member

    Joined:
    Apr 28, 2010
    Messages:
    11,114
    Likes Received:
    3,011
    Location:
    Memphis, TN
    Can this be set up to run 4-6 CHT and EGTs at once?
     
  4. Sep 21, 2017 #4

    Pilotgil

    Pilotgil

    Pilotgil

    Well-Known Member

    Joined:
    Apr 2, 2013
    Messages:
    52
    Likes Received:
    54
    Location:
    Unfortunately California
    Well, yes it could. It's just code and some hardware. I already have multichannel EGT, it just would need to be expanded (Same hardware, just more channels, same blocks of code). I use Type K thermocouples. But, I'm just posting what I am doing for my plane but will not be designing for other's needs. Maybe this will spur your interest in an Arduino-based monitor project for yourself!
     
  5. Sep 21, 2017 #5

    Pilotgil

    Pilotgil

    Pilotgil

    Well-Known Member

    Joined:
    Apr 2, 2013
    Messages:
    52
    Likes Received:
    54
    Location:
    Unfortunately California
    Just a personal project to see what I can do...
     
  6. Sep 21, 2017 #6

    Dana

    Dana

    Dana

    Moderator

    Joined:
    Apr 4, 2007
    Messages:
    8,454
    Likes Received:
    2,853
    Location:
    CT, USA
    I like Arduino. To date the only thing I've done with it is a speed control for my milling machine, but it was so cool I immediately bought another one to have on hand "just in case". May not be efficient code, but it's so **** easy, and memory and CPU power is so cheap nowadays who cares?

    That said, I still prefer steam gauges for traditional airplanes... but if I ever end up with another ultralight or more modern plane I may feel differently.

    Dana
     
  7. Sep 21, 2017 #7

    TFF

    TFF

    TFF

    Well-Known Member

    Joined:
    Apr 28, 2010
    Messages:
    11,114
    Likes Received:
    3,011
    Location:
    Memphis, TN
    I will have to look into it.
     
  8. Sep 22, 2017 #8

    Pilotgil

    Pilotgil

    Pilotgil

    Well-Known Member

    Joined:
    Apr 2, 2013
    Messages:
    52
    Likes Received:
    54
    Location:
    Unfortunately California
    Well, I was impressed enough to make a PCB to try out some concepts. Code efficiency is important when you are using a small microcontroller with limited memory. You could easily, if you're a programmer, write more efficient code for the Arduino; however, what makes the Arduino "so easy" are the libraries - but they come at a cost - memory. For example, using a few libraries off of Github and the Arduino IDE, I can make some rapid prototypes and test various concepts; however, making a truly usable project requires a lot of considerations. Consider the non-linearity of some sensors that have to be curvefit, calibrated, and checked for error conditions. Depending on the goals, the math can get sticky and memory gets gobbled up quickly with a high-level language like C and libraries. So my goal is simple, see what I can do with an Arduino-compatible of my own design and where the limitations are. A good example is the image of my engine information system. The entire code is about 16KB (This system is not based on Arduino) including all the "hidden" setup pages, user setups, alarm setup, sensor calibration and curve fit, error tests, and normal operations. On an Arduino, for the same code space I could only get the basic altimeter, baro setting, and basic "character only" graphic LCD functions for the same 16K code space. It's going to be a challenge to get the altimeter, VSI, and airspeed and the required setup functions to fit unless I write my own libraries - and then it ceases to be so easy. Hey but if you want to throw up a couple of monitored parameters like oil pressue and temperature, amps and volts, even airspeed or altitude, etc. Arduino is the way to go. Of course, I could try an Arduino-Mega-Compatible...hmmm.
     
  9. Sep 22, 2017 #9

    TFF

    TFF

    TFF

    Well-Known Member

    Joined:
    Apr 28, 2010
    Messages:
    11,114
    Likes Received:
    3,011
    Location:
    Memphis, TN
    What hardware do you have there? Board and display. I have not messed with electronics in a long time and this type is new to me.
     
  10. Sep 22, 2017 #10

    pictsidhe

    pictsidhe

    pictsidhe

    Well-Known Member

    Joined:
    Jul 15, 2014
    Messages:
    5,859
    Likes Received:
    1,484
    Location:
    North Carolina
    About 8 years back, I got to nose around a small van converted to EV. The dash display was a reprogrammed laptop. Most impressive. A tablet or phone should be great for small planes, all the instruments in one panel.
     
  11. Sep 22, 2017 #11

    Pilotgil

    Pilotgil

    Pilotgil

    Well-Known Member

    Joined:
    Apr 2, 2013
    Messages:
    52
    Likes Received:
    54
    Location:
    Unfortunately California
    This is my own design based on Arduino. Form fit to use a 2 1/4" inch instrument standard cutout. The faceplate is also my own design.
     
  12. Sep 23, 2017 #12

    Pilotgil

    Pilotgil

    Pilotgil

    Well-Known Member

    Joined:
    Apr 2, 2013
    Messages:
    52
    Likes Received:
    54
    Location:
    Unfortunately California
    In my opinion, one display panel designs are great until it goes black. My 152 has a full Aspen PFD/MFD IFR panel and while I love it, but there is backup. All depends on what you want. I have always liked the "round" instrument design better. I could easily put all of this on a single display but too many LCDs that are big enough for everything fit and that can be seen in direct sunlight are generally quite expensive and I don't have the panel space in a Drifter. For a one screen, graphic solution, you need high brightness such as 2,000 nits, a wide dimming range with high efficiency LEDS so you don't cook the panel, and the design has to be optically bonded so most of the light gets out. I believe an iPad is about 1/4 that 2000 nit brightness. I fly drones commercially and the iPad makes for an extremely very poor sunlight display.

    Graphics are important but it costs money to get the brightness and pixel count.
     
  13. Sep 23, 2017 #13

    Pilotgil

    Pilotgil

    Pilotgil

    Well-Known Member

    Joined:
    Apr 2, 2013
    Messages:
    52
    Likes Received:
    54
    Location:
    Unfortunately California
    I populated the board with some of the parts and connected the IDE and uploaded the famous "blink" code and it ran first time! Next I will populate and test the display driver (It already works on the breadboard). My first Arduino-based design will be an altimeter and VSI with baro adjustment. The pic with the green LEDS is the board running the "blink" code. The second pic with the blue faced display is the altimeter but using a text-only display so I could verify the sensor and basic routines. This is just a rough prototype, even the faceplate is just 3D printed. Works well though.

    IMG_4336.JPG IMG_3879 (2).JPG
     
  14. Sep 23, 2017 #14

    cluttonfred

    cluttonfred

    cluttonfred

    Well-Known Member

    Joined:
    Feb 13, 2010
    Messages:
    6,351
    Likes Received:
    2,208
    Location:
    World traveler
    Very nice. Have you considered using a monochrome OLED display? It seems like they would be easier to read in bright conditions.
     
    MadRocketScientist likes this.
  15. Sep 23, 2017 #15

    Pilotgil

    Pilotgil

    Pilotgil

    Well-Known Member

    Joined:
    Apr 2, 2013
    Messages:
    52
    Likes Received:
    54
    Location:
    Unfortunately California
    The LCDs I use are transflective so they are very easy to see in direct sunlight; also, the backlight is excellent and when driven by a PWM, has excellent dynamic range. The big challenge is getting a display with a viewable area that is large compared to its overall mechanical dimensions and that will still fit in whatever form factor is chosen. I wanted to stick with either a 2 1/4 or 3 1/2 inch standard instrument "look" which then limits what one can shove "inside". I did look at an OLED but it's display area was smaller than I desired. There just isn't a good selection given the design constraints. I'm sure at some point something will come along that may be suitable. But the displays I am using are excellent in the brightest sunlight since they are transflective. However, for "night" it must be driven by a PWM to get the backlight "dim enough". This isn't a problem, the microcontroller handles this quite well especially if you're using a PWM that is hardware implemented. Plus, my mechanical parts are already machined for the display.
     
  16. Sep 25, 2017 #16

    Pilotgil

    Pilotgil

    Pilotgil

    Well-Known Member

    Joined:
    Apr 2, 2013
    Messages:
    52
    Likes Received:
    54
    Location:
    Unfortunately California
    The small 3-button keyboard was installed and tested. This is connected to one of the Arduino's analog pins and uses a resistor divider so different combinations of button presses can be distinguished. There is also a small RC filter and diode clamp for ESD.

    IMG_4374.JPG
     
    nerobro and cluttonfred like this.
  17. Oct 7, 2017 #17

    Pilotgil

    Pilotgil

    Pilotgil

    Well-Known Member

    Joined:
    Apr 2, 2013
    Messages:
    52
    Likes Received:
    54
    Location:
    Unfortunately California
    The chip for the display interface finally arrived so I was able to test it and it worked well. The pictures show the completed "basic" instrument. All common hardware and core code modules work. The numbers on the LCD display represent test functions (meaning they are for testing purposes and not "pilot" values) and are working correctly (the 0000 shows no buttons are pressed and the 0761 is an expected number from an internal calculation). Next I'll be connecting the baro sensor and coding the graphics for the altimeter/VSI.

    IMG_4530.jpg IMG_4529.jpg IMG_4533.jpg
     
  18. Oct 21, 2017 #18

    Pilotgil

    Pilotgil

    Pilotgil

    Well-Known Member

    Joined:
    Apr 2, 2013
    Messages:
    52
    Likes Received:
    54
    Location:
    Unfortunately California
    Here is an update. The pressure sensor is now being used to calculate the altitude - the right side of the display is the altitude in feet (337) and the right shows the baro setting (29.92). The user can change the baro setting. Still doesn't look "fancy" but now that the core sensor and user interface is working properly, I will get to work on the graphics.

    FullSizeRender(3).jpg
     
  19. Oct 23, 2017 #19

    cowlove

    cowlove

    cowlove

    Member

    Joined:
    Nov 20, 2014
    Messages:
    16
    Likes Received:
    9
    Location:
    Seattle, WA
    I like the bezel and the fit/finish of your piece. Very nice and professional looking, which mine is not. I used this $50 module that has an on-board atmega chip (same as the arduino) to run the display driver. https://www.sparkfun.com/products/8799

    The display driver was open source, so I modified it to accept encoded engine data over a serial line from another Arduino mounted on the engine as an engine monitor. Although the display seems pretty flicker-free in real life, most pictures seem to somehow catch it in mid refresh, as is the case here. IMG_20170820_202954 (1).jpg In the remainder of the screen space, it normally shows volts, amps, engine hours, MAP, OAT, and magnetic heading.

    Did you design the bezel and have it machined? Or did you buy it somewhere? Which display do you end up using. I do like the look.
     
    Pilotgil and cluttonfred like this.
  20. Nov 27, 2017 #20

    Pilotgil

    Pilotgil

    Pilotgil

    Well-Known Member

    Joined:
    Apr 2, 2013
    Messages:
    52
    Likes Received:
    54
    Location:
    Unfortunately California
    Hi,

    Yes, I designed the bezel. Everything is in CAD to make sure it all fits and generally, it's production ready on first try but tweaking is always a possibility. Then I have parts CNC'd (even the sheetmetal including bending) when all is good. So this is all original work. Machining is expensive so I would rather take the time in the computer to get it right before spending real cash on parts. The display I use is New Haven from DigiKey. This is example of the case design for my engine analyzer (RPM, EGT, etc). Normally, I use PICs for all my designs so this is my first stab with Arduino. The Arduino is a "custom" PCB with the core being Arduino-compatible but the power supply, I/O, and other support being integrated onto the PCB.

    Case.jpg

    FullSizeRender(1).jpg



    How many buttons do you use for the interface? Any rotaries?
     
    dino likes this.

Share This Page

arrow_white