What's new
Van's Air Force

Don't miss anything! Register now for full access to the definitive RV support community.

Arduino microcontroller

joedallas

Well Known Member
Experimenting with the Arduino microcontroller to perform some small tasks in the Aircraft.

P1070648_C_R_A.jpg


http://joesrv12.com/Builder Log/bl_42_11.htm


Has anyone used this in a their aircraft.

Joe dallas
 
I have a handful of them with various stages of code done for a variety of tasks in the airplane. One of the setups is for evaluation of temperature, pressure and flow at various points in the cowling. Another is to show status of a few systems and to control the smoke system (programmed pulses, etc.).

I also built and wrote a whole new (and much more reliable) pilot-controlled runway lighting system based on the Arduino Uno. It's been operating at the airport here for a few months now, works great.

These are some nifty devices and capabilities are pretty much what you can dream up, and learn to code. It does take time away from actually building the plane though hah, so I have set that stuff aside for now.
 
under cowl monitoring

Greg, would be great to find out more about your project. I'd also like to put in more temp probes under the cowl, and having pressure would be really interesting (I think!).

Do you have more details about what you are doing? I have not yet experimented with an arduino, and would be happy to get any hints. I'm considering just buying a bunch of stuff, but also fear it will take time from my build project, since I do love to code. :)
 
Have built several Arduino based projects that I have used in my airplane.

Some examples:

Remote AOA indicator that decodes the serial stream from an EFIS and drives and LED display.

PMag ignition monitor that decodes the serial stream from the PMag and drives a LCD display.

High speed serial logger that logs the serial streams from an EFIS to an SD card.

Built my own Arduino AOA computer. Got it working but never perfected it since Garmin added the G3X at which point I did not need it anymore.

The Arduino line seems to be a great platform for these kinds of task. The brand name hardware is solid as a rock and just works. If the code is solid, they will run with amazing reliability.
 
Last edited:
Arduino Magic

Thank All
I hopped that I was not going down a road never traveled.

I am having a lot of fun writing code and surprised to see it work so well.

I have never used C or C++.

I have used RBace , DBace , Foxpro and SQL and C in not that much different.

My website www.Rvbuilderlist.com is SQL which I have neglected since I started building a Plane.

Thanks Again
Joe
 
Some interesting stuff there (shame we would have to get a mod approved for most of this in the uk).

Have you looked at the ESP8266? It's ideal for when you don't want to run wires. It is a tiny low power (3.3v/~800ma) programmable, stand alone, wifi module. Using two of them, or one and a tablet/phone, you could easily have a wireless link setup.

I've been playing with one for decoding and displaying the PilotAware data (a beefed up version of the Stratux system you have in the US). It might end up being useful for microlights where space and weigh is a big issue. A bit of Velcro would easily hold it up where you want it with no wires.

I did a video showing the ESP8266 to show the size of it, I hadn't received my circuit boards for the voltage regulator at this point so it is running off 2xAA batteries.

In the video there are 4 parts. a 3D printed case, the screen, the ESP8266 (the small board) and the batteries. The final one will have a lipo with charger and regulator but you get the idea from this as to how small they are.


This one has a description of the screen layout and what is going on, this was early on so it is still all on a breadboard.


Not having tested this in a real aircraft I don't know if it will be any good (it might not be readable or cause interference) but for now it is fun playing round with it when I'm not building

The thing I like about these modules is they are tiny and need very little power. For most projects you can replace the Arduino with one of these and have a smaller/lighter/cheaper system.
A quick search on youtube will show the kind of things people are doing with them.

Just thought I would point them out for anyone who hasn't come across them yet. I haven't used my arduino since getting these :D
 
Hey Joe, since you are installing the Arduino into your RV, consider using an Arduino Nano. Much smaller and with the same functionality as an Uno.

Save the Uno for prototyping your ideas.
 
I have just finished a flap, trim system for my 7A. I purchased the arduino mini pro a month ago and taught myself programming, many thanks to the source of all knowledge, " YouTube "

I use an Infinity grip and backup switches on the panel

Built in safety's:

Flaps auto raise over 100 knots
Flaps will not lower over 100 knots
Trim/ flap motors will stop after 10 seconds continuous, takes 7 seconds for full flap travel
Trim speed slows down over 100 knots
Reverse switch movement will stop trim/flap motors immediately


Normal functions:

Each momentary activation of flap switch will move flaps and trim to next programmed position.
If flap switch gets a double activation within 1/2 second, will move to full up/down
If flap switch is held for 1 second will go into manual mode, the flap & trim will stop on release.( this was designed so a cessna driver can operate the system )
Two trim schedules to cover trim with and without passenger.

Next project is to incorporate a lidar sensor so I can get an altitude readout as I approach the runway... 50, 20, 10, 5, 4, 3, 2, 1 retard, thought that might be hilarious, especially if I can transmit it over the radio. Trouble is the lidar cost $US200 ( about $CN10,000 , or thereabouts at current rates). Of course there is one practical safety advantage to this, our runway is very narrow and poorly lighted, knowing how close to the runway will help in making sure the nose wheel is up on touchdown.

Airspeed info is coming from the GRT HXr, had Greg ad this feature, in programming discrete outputs select "airspeed" then at the bottom enter the airspeed you require. Although the discrete outputs are not in their literature they do still exist, by memory I am using discrete output three which is connector "B" pin 10.
 
Last edited:
I have just finished a flap, trim system for my 7A. I purchased the arduino mini pro a month ago and taught myself programming, many thanks to the source of all knowledge, " YouTube "

Built in safety's:

Flaps auto raise over 100 knots
Flaps will not lower over 100 knots
Trim/ flap motors will stop after 10 seconds
Trim speed slows down over 100 knots

Normal functions:

Each momentary activation of flap switch will move flaps and trim to next programmed position.
If flap switch gets a double activation within 1/2 second will move to full up/down
If flap switch is held for 1 second will go into manual mode, the flap & trim will stop on release.( this was designed so a cessna driver can operate the system )
Two trim schedules to cover trim with and without passenger.

Next project is to incorporate a lidar sensor so I can get an altitude readout as I approach the runway... 50, 20, 10, 5, 4, 3, 2, 1 retard, thought that might be hilarious, especially if I can transmit it over the radio. Trouble is the lidar cost $US200 ( about $CN10,000 , or thereabouts at current rates). Of course there is one practical safety advantage to this, our runway is very narrow and poorly lighted, knowing how close to the runway will help in making sure the nose wheel is up.

Oh...I like the possibility of approach altitude verbal read out (the lidar-lite unit)... coupled with the aoa. The ultimate tinker toys for air plane guys!
 
Have built several Arduino based projects that I have used in my airplane.

Some examples:

Remote AOA indicator that decodes the serial stream from an EFIS and drives and LED display.

PMag ignition monitor that decodes the serial stream from the PMag and drives a LCD display.

High speed serial logger that logs the serial streams from an EFIS to an SD card.

Built my own Arduino AOA computer. Got it working but never perfected it since Garmin added the G3X at which point I did not need it anymore.

The Arduino line seems to be a great platform for these kinds of task. The brand name hardware is solid as a rock and just works. If the code is solid, they will run with amazing reliability.

Hi Brian, what does the PMag display actually display, advance settings?
 
Oh...I like the possibility of approach altitude verbal read out (the lidar-lite unit)... coupled with the aoa. The ultimate tinker toys for air plane guys!

Yes Ric, the accessories are so cheap, for $15 you can buy an add on board that has gyros/men's, and all sorts of other sensors. So my thought was to get a reading of the actual pitch angle thus ensuring the nose wheel is clear of the ground on touchdown.

Was watching the CIA mini space shuttle do a perfect 10 auto landing on YouTube. Now my GRT HXr will fly me down to the runway, if there was some way I could use the arduino to flare........hmmm.
 
Aviation-grade Arduino Controller

I've been heads down developing an aviation-hardened Arduino compatible controller.

This project started when I was discussing the procedure for a go-around in my Harmon Rocket with my wingman (Power up, stick forward, flaps up, trim down, call tower). He mentioned that I should just build a gizmo that would do the flaps and trim for me.

Since I was already flying behind an auto-trim controller that I developed several years ago, I took this challenge on and reprogrammed the controller (in PIC assembly language) to implement this function. Everything worked out and now I have a single button push to dial in my flaps and trim. It even measures acceleration and runs the flaps all the way up if it predicts that I may exceed VFE in the go-around.

I realized that many others may want a similar gizmo in their aircraft, but I wanted to move to the Arduino platform for ease of developement. The Arduino stuff is great, but it doesn't do a lot without adding on or designing custom shields, power supplies and packaging. The aircraft electrical and RF environment is pretty harsh. In fact, most of the avionics devices I have designed have most of the cost and circuit board area devoted to protecting the device from the environment (60 volt load dumps, reverse polarity, overvoltages on inputs, strong RF...).

So I developed an aviation-hardened Arduino compatible board called the Falcon-AVR. The prototype has just finished Beta trials (one was replicating the auto-trim controller (1600 lines of C code), the other a marine instrument application). I have just implemented a board revision so that I can easily add-on WiFi or BLE or I2C modules, and support 28 Volt operation.

My intention is to go 100% open source on this design.

See this link for complete documentation.

My intention is to provide blank circuit boards (plus a Digi-Key parts list) to interested folks. There are are assembly options, so some hardware smarts are required. Send me a p.m. if you are interested. Photo of initial proto below.

Cheers, Vern

Falcon-AVR.JPG
 
Greg, would be great to find out more about your project. I'd also like to put in more temp probes under the cowl, and having pressure would be really interesting (I think!).

Do you have more details about what you are doing? I have not yet experimented with an arduino, and would be happy to get any hints. I'm considering just buying a bunch of stuff, but also fear it will take time from my build project, since I do love to code. :)

Not actually very complicated. Basically a set of pressure/temp sensors with long leads, also a flow sensor of sorts, that can be placed in various locations under the cowl where you want to measure. The idea is to determine effects of making changes in inlet and outlet sizes, baffles, plenums, etc. real time data logging to a SD card or similar. Simple code compared to most projects. Since my plane's not flying yet, I haven't finished it yet. Decided I probably should finish the airplane before I mess with all these extras hah, they can take up a lot of time before I know it. I have a list of projects that I'm just pre-planning from a wiring perspective as best I can.
 
Vern, maybe you can help me. I need to protect the arduino H Bridge from back emf when I use the backup flap switch. Usually a diode is installed across the DC motor, however, our flap motors are bidirectional. Any thoughts ?
 
Vern, maybe you can help me. I need to protect the arduino H Bridge from back emf when I use the backup flap switch. Usually a diode is installed across the DC motor, however, our flap motors are bidirectional. Any thoughts ?

You need to add external catch diodes on the motor driver's outputs. You would need a total of 4 diodes. They connect from power and ground to each of the motor driver outputs. They are normally reverse biased and only conduct with back emf. They are labeled D1...D4 below. Use 1N5400 diodes.

On the Falcon-AVR, I chose to use relays to drive the flaps (or lamps or pumps) because they can be 'hostile' loads. Instead of catch diodes, I used a bidirectional Transzorbs, but the principal is similar.

V

image7.png
 
Last edited:
You need to add external catch diodes on the motor driver's outputs. You would need a total of 4 diodes. They connect from power and ground to each of the motor driver outputs. They are normally reverse biased and only conduct with back emf. They are labeled D1...D4 below. Use 1N5400 diodes.

On the Falcon-AVR, I chose to use relays to drive the flaps (or lamps or pumps) because they can be 'hostile' loads. Instead of catch diodes, I used a bidirectional Transzorbs, but the principal is similar.

V

image7.png

Thanks Vern

In my setup the arduino activates an Elecrow H bridge that then feeds through a relay to the motors. On the NO side of the relay is a manual flap/trim switch so I can still operate the flap/trim if the arduino fails.

With the arduino off, when I operate the flaps with the backup switch, on release of the switch the LCD display attached to the arduino momentarily flashes. It seems the back emf is going through the relay NC side and through the bridge and into the Arduino.

So I need to stop the back emf on both leads to cover up and down flap operation

Could I connect a MOV across the flap motor ?
 
Last edited:
Hi Brian, what does the PMag display actually display, advance settings?

It does not display advance settings but it does display the firing angle. Exactly the same reading you would get if you used EmagAir's EICAD software on a laptop while flying.

I don't write anything to the PMag other than the command to put it in serial streaming mode so it can be monitored.

Here is the old thread that was created back when I was building it....

http://www.vansairforce.com/community/showthread.php?t=68582&highlight=p-mag
 
Thanks Vern

In my setup the arduino activates an Elecrow H bridge that then feeds through a relay to the motors. On the NO side of the relay is a manual flap/trim switch so I can still operate the flap/trim if the arduino fails.

With the arduino off, when I operate the flaps with the backup switch, on release of the switch the LCD display attached to the arduino momentarily flashes. It seems the back emf is going through the relay NC side and through the bridge and into the Arduino.

So I need to stop the back emf on both leads to cover up and down flap operation

Could I connect a MOV across the flap motor ?

I misunderstood your question. Your drivers already have the catch diodes, and they are causing the back power feed into the Arduino. This is one of the reasons I used relays for the flaps on the Falcon-AVR... no back power feed is possible.

To prevent this, you have to have isolated power, which is a challenge with semiconductor motor drivers.

A MOV or a Transzorb won't prevent back feed because you can't fine tune the clamp voltage accurately. I would try the 4 diodes but to a completely separate 12V and ground. You may also try schottky diodes so that the catch diodes in the MOSFETs don't engage. This should do the trick.

Edit: further reflection says that your Arduino must be powered at all times. The lack of circuit isolation is a challenge to overcome. It's what I meant by 'aviation hardened'. There are a lot of little gremlins when using the Arduino stuff in an aircraft environment.

V
 
Last edited:
I am by no means a software guy, and it's been a few years since I last messed very much with hardware. Seems these microcontrollers have really leapt forward in both their capacities and their reliability.

I'm running an AF2500 engine monitor and would really like to be able to capture its data on an SD card. Since I'm hoping for first engine run sometime soon (soon, in aviation terms, means this year, maybe... LoL), I'd like to be able to capture data from first engine start, but don't want the labor of messing with product development to get in the way of the labor needed to get ready for that first engine start.

Verns "packaged" product looks like a good idea. Now if only I could figure out how to use pre-developed code (like Brantel's serial data logger code) to load on the board.

Or maybe there is already a pre-packaged data logger available that would suit this purpose?
 
It is great to see experimental aviation going beyond rivets!

Here is the stuff I've been working on if anyone interested

Arduino based EFIS: http://experimentalavionics.com/efis-19264-ver-1-2/

Some video here: https://youtu.be/emqc_vi7-Rg
... and here: https://youtu.be/oVMNnUio5Sg


EMS: http://experimentalavionics.com/engine-management-system/

Cheers,
Oleg

Oleg,

Love it, is there anyway to wifi to the display screen. Thinking of the new iLevel BOM system where all the sensors etc are in a wing mounted unit and info is wifi'd to the in cabin display

Peter
 
Falcon-AVR group buy

I'm organizing an order for the Falcon-AVR final version pcbs. These are 4-layer boards and I'd like to get 20 boards ordered and in the hands of Arduino fans within a month. http://vx-aviation.com/documents/Falcon-AVR/


I already have three people signed up for blank boards. If anyone else is interested, please send me a PM.

Thanks, Vern
 
Last edited:
In fact, most of the avionics devices I have designed have most of the cost and circuit board area devoted to protecting the device from the environment.

So true. Some time ago, I designed a logic circuit for a custom motorcycle instrument panel. It was flakey to the point of uselessness. Finally called my dad for help because he was skilled in the art. Turned out all my logic was correct but I did not have all the "protections" in place to make it a robust device. It was a learning experience. Success happened after his help. :cool:

Nice work BTW.
 
Last edited:
So true. Some time ago, I designed a logic circuit for a custom motorcycle instrument panel. It was flakey to the point of uselessness. Finally called my dad for help because he was skilled in the art. Turned out all my logic was correct but I did not have all the "protections" in place to make it a robust device. It was a learning experience. Success happened after his help. :cool:

Nice work BTW.

Very early in my career, I worked for a telecom company and we had to deal with residual lightning strikes, 600 V power line crossings and ESD.

Here is a design I did in 1982. All of the stuff in the foreground are environmental protection. I did the all of the card design, thick film hybrid design, some of the chip design and we used new fangled devices call PALs (ref 'Soul of a New Machine'). We were the largest consumer of surface mount devices in North America.
mitel-ls-gs-trunk-card-mc340ba-4.jpg


Yup, 1982... sigh. BTW it's an 8-channel LS/GS trunk interface card... you can still buy them today.

V
 
Last edited:
I'm organizing an order for the Falcon-AVR final version pcbs. These are 4-layer boards and I'd like to get 20 boards ordered and in the hands of Arduino fans within a month. http://vx-aviation.com/documents/Falcon-AVR/


I already have three people signed up for blank boards. If anyone else is interested, please send me a PM.

Thanks, Vern

A few folks have asked me about component costs for the Falcon-AVR.
Here's a breakdown of the options:

28 Volt, field configuration (includes case, primary input protection, etc.) $68
14 Volt, field configuration (includes case, primary input protection, etc.) $57
28 Volt, lab configuration (no case, only secondary input protection) $52
14 Volt, lab configuration (no case, only secondary input protection) $40

I would recommend starting with the lab configurations, then adding components as required by the application to get to a customized field configuration.

The costs were derived from Digikey's low volume pricing. Careful shoppers and those who buy in quantities can probably reduce the cost by 50%.

I'm still trying to get a group together to share the cost of a pcb order. PM me if interested.
 
Falcon-AVR demo program

Here's an example of a simple C program (Arduino sketch) that shows how easy it is to process Dynon or Garmin serial information using the Falcon-AVR here.

This program displays:
HDG
IAS
ALT
AOA

on a 20 x 4 LCD screen as a 'backseat' display. The ALT is corrected altitude using the barometric pressure setting.

It took about an hour to write, which is pretty good because 'C' is relatively new to me (... I remember FORTRAN...)! I cut it down from a 1600 line program (auto-trim controller) just to demonstrate the function.

I have a graphics display module that would be very cool to use for virtual instruments, but that's a different project!

V
 
'Soul of a New Machine' - excellent book that all engineers/managers should read.

Great book, and I should read it again... "no mode bit" has been a catch phrase for my career!

We were also involved in the early days of the PC development because IBM was our partner. I still have the original user manual for the PC printed in fan-fold format. I wonder if it's worth money?

My group also designed the world's first video DRAM, which was built by Motorola for us. We were so uninspired by the IBM PCs graphics capability that we developed the VRAM. In the end, we didn't use it, but it was a good idea. Right about then, the Apple Lisa was coming out so we decided that developing our own computer was not the best use of resources.

...sigh...
 
In the end, we didn't use it, but it was a good idea. Right about then, the Apple Lisa was coming out so we decided that developing our own computer was not the best use of resources.
Good call; the Lisa was a stunning success for Apple. :rolleyes:

(I've owned a couple dozen of them; at one time I was probably the most prolific exporter of Lisas to Japan. Long story, but those machines fed my family for a few months when I was between jobs. And yes, I know the Mac was the next step and was at least marginally more successful.)
 
Here's an example of a simple C program (Arduino sketch) that shows how easy it is to process Dynon or Garmin serial information using the Falcon-AVR here.

This program displays:
HDG
IAS
ALT
AOA

on a 20 x 4 LCD screen as a 'backseat' display. The ALT is corrected altitude using the barometric pressure setting.

It took about an hour to write, which is pretty good because 'C' is relatively new to me (... I remember FORTRAN...)! I cut it down from a 1600 line program (auto-trim controller) just to demonstrate the function.

I have a graphics display module that would be very cool to use for virtual instruments, but that's a different project!

V

Here's the text display. Ignore the pushbuttons and IR receivers. The graphical display is working fine, just needs more time behind the keyboard to finish up.

Falcon-AVR-display.JPG
 
Here's the text display. Ignore the pushbuttons and IR receivers. The graphical display is working fine, just needs more time behind the keyboard to finish up.

Falcon-AVR-display.JPG

Update: Here's a photo of my 'back seat display' progress. This is driven by the Falcon-AVR which is also running my auto trim control and flaps positioning in my Harmon Rocket.

The graphics are still a work in process. Unfortunately, the very cool display (Gameduino 2) is no longer available. It has a GPU which makes it easy to display moving images and jpegs and sprites. Looks like a 4D Systems display may be a choice for future effort.

I'm still looking for some more prepaid group-buy orders for the Falcon-AVR circuit boards. I need a total of 20 prepaid orders to cover the costs on the next board run (which is north of $600 for the 4-layer blank pcbs). PM me for more information. Here's the link to the Falcon-AVR documents..

If i can't get a group buy together, I will refund the prepayments and just run a couple of more protos for my own needs. I'll be finalizing on July 1.

Falcon-AVR-display-2.JPG
 
Update on Falcon-AVR order group buy

Some good news and some not so good news.

I am less than a week away from making a decision on the group buy of Falcon-AVR printed circuit boards. I'm a little short of the minimum quantity of boards I need to order, so now is the time to get ahold of me (via PM), or (ahem) pay your PalPal invoice!

I am not making any money on this, and will probably have to subsidize the purchase by $100 or so!

Now the good news: I have completed the design of an option board that allows a Teensy 3.2 to directly plug into the Falcon-AVR instead of the ATMega 328.

This will increase computing speed by about 10x and allow much larger programs to run on the board. More information on the option board (aka Talon-AVR) will come in July, but it also includes a second hardware serial port for more throughput when using add-on boards (for example BlueTooth and WiFi).

Thanks to everyone who has supported this project so far, I hope more can join in.

Vern
 
Falcon-AVR group buy minimum quantity achieved!

Thanks folks! I have released the pcb order to manufacturing based on my MOQ of 10 boards. I was hoping for 20, but c'est la vie.

It will take about 10 days for me to receive the boards. Give me two weeks to completely assemble and debug one board to verify the design before I begin shipping the blank pcbs out to my backers. The good weather may get in the way.

I will be verifying both 14V and 28V [actually 60V] versions.

Oh... I will also be verifying the Teensy 3.2 version....!
 
Thanks folks! I have released the pcb order to manufacturing based on my MOQ of 10 boards. I was hoping for 20, but c'est la vie.

Great news!

I'm happy to send more money to help ensure your share of the cost isn't too outrageous. How much more do you need per board to make the numbers work out?
 
Great news!

I'm happy to send more money to help ensure your share of the cost isn't too outrageous. How much more do you need per board to make the numbers work out?

Now that's a posting I don't get very often! Thanks, Kevin, check your PM.
Vern
 
Tape-out

In the vernacular of the semiconductor industry from the last century, when a database file is released to manufacturing, we called it 'tape-out'.

In my case, it was just pushing buttons on my Cad software, but the result is the same... manufacturing will take about 7 days, shipping to me (in Canada) a few more days, then I'll perform verification.

I'm also checking out a 'desktop' configuration that strips your the Falcon-AVR down to a glorified Uno-like device which can then be upgraded to the 'lab' or 'field' configurations later on. The whole point is flexibility, which is why it's all through-hole.

As I mentioned previously, there will also be an applique board that will allow a Teensy 3.2 to plug in for those who like more horsepower. This will be available in August. In addition to the horsepower, it will also support a second hardware serial port for higher performance WiFi or Bluetooth support. I have already tested Bluetooth connections that allow a 9600 bps connection between a Dynon EFIS and the Falcon AVR. I need to run this interface at 115,200 bps, but that takes a bit more effort.

If the moderator is watching, perhaps we can move this discussion into its own thread...

V
 
Back
Top