What's new
Van's Air Force

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

Arduino compatible controller (new thread)

vlittle

Well Known Member
I thought that I should start a new thread on this topic, separate from the RV-12 thread. For those new to the topic, I have developed an Arduino-compatible controller board that is application-hardened for Avionics applications. I has two H-bridges for driving trim (or other) motors, a relay H-bridge for driving flaps, pumps or lamps, protected analog and digital inputs and provisions for expansion (Bluetooth, WiFi, displays, etc.). The serial input supports TTL, RS-232, and RS-422 levels for short, medium and long haul applications. The design operates up to 50 Volts (max), depending on configuration (14V or 28V nominal). All power and IO has extensive protection from ESD, short circuits, and power surges (load dumps).

This design works well with Dynon, Garmin and other EFIS systems that provide air data, system data and engine data on a serial link.

All of the group-buy circuit boards have arrived and I have partially assembled one to test the major functionality. Everything is working fine. I have even tested it with an FTDI USB to Serial board plugged in for downloading sketches.

The Falcon-AVR board pictured is a 14V version, the 28V upgrade will be tested later this week.

I'll start sending out boards once the 28V design has been proven.

Thanks to all of the folks that supported this design effort and helped me defer some of the cost (my cost over $1000 out of pocket plus 1000+ hours). The documentation is here.

Falcon-AVR-boards.JPG


Cheers,
 
Last edited:
More horsepower!

During the design of my Falcon-AVR controller, I converted a large assembly language program to C (about 1600 lines) and started bumping up against the real-time and memory limitations of the Arduino 'Uno' type processor (aka the Atmel ATMega328P).

Like most engineers, I saw this problem as an opportunity, so I designed a small daughter board that converts the Teensy 3.2, which is based on a high performance ARM core, to the ATMega328P socket. This provides at least 10x the throughput and much more memory for large sketches. The small connector on the board provides a third independent serial port, I2C and SPI capability, with power (5 or 3.3V).

This board plugs directly into the Falcon-AVR board, but also the Arduino Uno! The picture below shows two USB cables which provides me with two serial monitors... one from the Uno board talking on serial port #1, and the other on the Teensy talking on serial port #0.

This really opens up applications for the Uno, since the console can be separated from the serial port. It allows full throughput WiFi, for example when using the commonly available WiFi cards.

So... in solving the problem and designing a board for the Falcon-AVR, I have also greatly enhanced the function of the Arduino Uno. Next step, solve world hunger!

As always, PM me for more info.

Talon-AVR-Uno.jpg

Arduino Uno with Talon-AVR

Talon-AVR-inplace.jpg

Falcon-AVR with Talon-AVR

Talon-AVR-assembly.jpg

Talon-AVR without the Teensy 3.2 mounted
 
Last edited:
WiFighter!

Here's a couple of pics of the Falcon-AVR + Talon-AVR (Teensy) and a WiFi board plugged in to Serial1 (first pic) or Serial2 (second pic)

I'm having way too much fun with this, but the hardware is done. The WiFi was a big challenge, but now my iPhone is talking to the Falcon-AVR!

Falcon-AVR-WiFi1.JPG


Serial2 is on the Talon board. In total, there are three serial ports in play here... the USB, Serial1 and Serial2.

Falcon-AVR-WiFi2.JPG
 
Last edited:
Update on Falcon-AVR

Well, I have just finished another massive coding project on the Falcon-AVR. I added flaps and trim presets to the basic(!) autotrim controller function that I have been flying with.

I also climbed the WiFi mountain. Now I can login to the device with my iPhone and change all of the configuration data easily and perform installation debug. I also added some remote control routines... I can run my flaps and trim without being in the aircraft! This is useful more for ground checkout, but it leads to thinking about what else I can do with it.

And yes, it's password secured and short range.

The picture shows the final configuration. I mounted the WiFi module underneath the main board, connected with wires to the Talon module (Teensy adapter). I plunked down a second WiFi module down next to it for show and tell.

One of the big challenges I had was getting my interrupt driven environment playing nice with Software Serial on an ATMega328P processor. In this application, it just won't work. In the bowels of the internet, it says to run Software Serial at the same or faster baud rate than the hardware serial port or it will block the hardware serial. It also says you can't run SS at 115,200 bits per second. For this application, that's a null set.

The solution was to punt the ATMega and just use the Teensy, which has extra hardware serial ports and much more memory and horsepower, so I can be more wasteful in my coding.

It's fun sitting at my desk in the hangar and running the flaps up and down!

Falcon-AVR-WiFi3.JPG
 
Last edited:
Security

...
I also climbed the WiFi mountain. Now I can login to the device with my iPhone and change all of the configuration data easily and perform installation debug. I also added some remote control routines... I can run my flaps and trim without being in the aircraft! This is useful more for ground checkout, but it leads to thinking about what else I can do with it.

And yes, it's password secured and short range.

...
Looks like a really cool project! As someone involved in security for food and shelter, I'd recommend caution mixing any kind of remote access and your airplane's flight controls. The bad guys out there are much smarter and much more capable than you would imagine.
 
How can I get more info? Your PM inbox is full and I don't see any mention of this on the Vx site or Planemaker.
 
The next generation aviation controller

Here's a teaser....

Falcon-ESP_pcb.jpg


This project uses 4-layer SMT boards and is not as customizable as the Falcon-AVR through-hole design.

In many respects it is simpler, smaller and gives up some interface functionality. The big upside is that the CPU is an Expressif ESP-32 which is vastly more capable than the AVR or MX20 processor used on the original Falcon-AVR.

Oh, it also supports WiFi and Bluetooth natively.

It will be the next generation autoflaps and autotrim controller in both my Rocket and my new build. Another innovation is that it will work in simple trim/flaps control hardware-only mode, without a processor plugged in (or functional)!

It will be totally open source hardware based on EasyEDA (try it!).

No further information will be forthcoming for a while while I am occupied on another major project, but I promise more teasers as I go along.

Cheers!
 
Last edited:
Maybe that's a stupid question, but starting at PWR I already fail to understand your circuit at Q3. What's the purpose of Q3? Assuming PWR is positive, that body diode will always conduct. What am I missing?
 
Maybe that's a stupid question, but starting at PWR I already fail to understand your circuit at Q3. What's the purpose of Q3? Assuming PWR is positive, that body diode will always conduct. What am I missing?

Q3, D5, and R5 are for reverse polarity protection. When power is first applied, Q3 is off so current flows through the Q3 body diode. This allows current to flow through D5 and R5 which applies a voltage to the Q3 gate. Q3 then turns on, allowing current to flow through the FET instead of the body diode. If power is applied with reverse polarity, no current is allowed to flow past Q3.
 
Q3, D5, and R5 are for reverse polarity protection. When power is first applied, Q3 is off so current flows through the Q3 body diode. This allows current to flow through D5 and R5 which applies a voltage to the Q3 gate. Q3 then turns on, allowing current to flow through the FET instead of the body diode. If power is applied with reverse polarity, no current is allowed to flow past Q3.

What Kevin said.
It's an expensive function, but it handles all kinds of electrical issues that cars and airplanes can experience.

When all else fails, there's always the fuse as well.
 
Here's a teaser....

Falcon-ESP_pcb.jpg


This project uses 4-layer SMT boards and is not as customizable as the Falcon-AVR through-hole design.

In many respects it is simpler, smaller and gives up some interface functionality. The big upside is that the CPU is an Expressif ESP-32 which is vastly more capable than the AVR or MX20 processor used on the original Falcon-AVR.

Oh, it also supports WiFi and Bluetooth natively.

It will be the next generation autoflaps and autotrim controller in both my Rocket and my new build. Another innovation is that it will work in simple trim/flaps control hardware-only mode, without a processor plugged in (or functional)!

It will be totally open source hardware based on EasyEDA (try it!).

No further information will be forthcoming for a while while I am occupied on another major project, but I promise more teasers as I go along.

Cheers!

Update: Here's the PCB assembly. The ESP-32 processor module has been removed to show the board details. There are two trim motor drivers and a pair of relays for driving flaps.

This board works without the processor module as an electronic 'relay deck' for trim and flaps. Plugging in the processor brings auto-trim and auto-flaps capability in firmware.

Not flight tested yet, still learning the quirks of the ESP-32 before porting the Arduino code.

IMG_01.jpg
 
Are these board for sale?

Hello, are the boards for sale? If so, what is the price and do you supply the kit or do we need to order from DK or Mouser?

Thank you.
 
Hello, are the boards for sale? If so, what is the price and do you supply the kit or do we need to order from DK or Mouser?

Thank you.

Well I finished my other project and can slowly ramp up again on this.

My intention with the Falcon-ESP32 project is to provide complete open-source design information so that you can order boards and parts directly from my suppliers.

The only gotcha is that it is that you will need to purchase a minimum quantity to get a decent price. Oh, and one more thing... you need the equipment and skills for surface mount assembly.

Perhaps someone else on VAF wants to undertake this part of the project. I have a small SMT prototype facility, but it's not for production quantities. I have designed SMT boards that run in the millions, but that was when I worked for a living.

I *may* have a small quantity of devices available soon for sofware developers, but no commitments yet.

V
 
Here's another teaser. As I slowly ramp up on this project, which will be timed to coincide with my new aircraft build, I thought I would share some more information.

Since the Falcon-ESP uses a processor board with embedded WiFi and Bluetooth, it's pretty straightforward to configure it using a phone or tablet. This example is just a demonstration, but I use it for debug. Below is a screen grab from my iPad.

Eventually it will evolve to be the configuration console for my next-gen trim/flaps controller. I may even port it to the Falcon-AVR documented in the beginning of this thread.

FMI, contact me by email. My intention is to make the hardware and software 100% open source.

Cheers, V

Falcon-ESP_webserver.jpg
 
Last edited:
AOA and Rear Seat Airdata Display

As part of my effort to update, refresh and update a lot of Vx-Aviation technology, I've had another go at AOA indicators.

My intention is to release the code entirely to the public domain, to run on standard hardware. The problem has been finding (or building) the hardware at a price that is attractive to the average homebuilder.

I have managed to source a low-cost of compute/display modules that will run the code (search M5stack).

So after a few days of work, I have ported my original V-Speed ADS code, plus the code that I used for my trim controller to extract airdata information from a G3X or SkyView serial data stream.

The photo below shows two modes: Rear Seat Airdata/AOA/Slip & Front Seat AOA/Slip. The mode is selected by the center button, the other two buttons control the screen brightness. The two red chevrons flash at high AOA.

The device is connected to a free serial port and 5V power (a bit of additional hardware required, to be described later). The EFIS port is configured and voila!

aoa-group.jpg


I would entertain constructive criticism on the screen layout, which is somewhat constrained by the hardware.

As for when the software will be available... Flight testing will be delayed by my travels, but sometime in the new year I hope to have a release. It's all brute-force C-code. Oh yeah (burying the lead) the module cost less than $30 from a number of sources!

No PM's please.
Cheers, Vern
 
Last edited:
Hi Vern,

Excellent idea for a compact rear cockpit display! You might consider inverting the font size for data vs labels to help with “old man” eye syndrome ;)

Our first generation tone generator used an inexpensive Arduino processor and worked well if the EFIS manufacturer’s AOA algorithm accurately captured enough of the aircraft curve AND was properly calibrated by the user. Since our objective is to provide accurate AOA and performance/energy cues in addition to progressive stall warning we’ve been experimenting with our own hardware. We still capture EFIS data with our current design. We are a non-profit, volunteer open source group and share all of our code and designs. We are currently building 25 units for beta test and would be happy to collaborate or share lessons learned if you’re interested—this would an excellent visual display component for non-HUD installations.

v/r,

Vac
FlyONSPEED.org
 
Last edited:
DO-160 power input considerations

The circuitry presented here is sadly not compliant even with category A.
However this is easily fixed.

DO-160G takes dim view on any voltage clamping device and in fact specifies that the power available to blow your clamping device is somewhat larger than the total energy available in the universe.

You can still use a clamping device but it must only start acting well above the maximum test voltage. I am afraid 40V does not cut the mustard.

I would recommend you look at Category Z as this is not a big deal for your circuits to achieve with suitable component selection.

Design it such that it will survive 80V for 200mS (that is a bit more time than needed) and then 50V indefinitely. Make sure your voltage regulation is fast enough to handle 10mS transients on any voltage change from your minimum operating to 80V. Ensure that drops in supply below minimum (brownout) will not cause malfunction (i.e. failed restarts etc).

If your stuff can do the above you are fine. If you have any questions please drop me a PM, I have access to all the documents and am more than willing to help.
 
Thanks, Rainier.
Don't get confused with the old posting schematic... that was a prototype for an industrial controller. It's been substantially modified/hardened/improved for new applications. Nevertheless, I appreciate your guidance moving forward. I will post the upgraded design when I get a round tuit.

As for the recent postings on the AOA display... this is a commercially available platform [i.e. I only added the code] and I need to provide a 'power board' that clips onto the bottom, or it can be used with the available battery pack as a portable device.

Cheers.
 
Hi Vern,

Excellent idea for a compact rear cockpit display! You might consider inverting the font size for data vs labels to help with ?old man? eye syndrome ;)

Our first generation tone generator used an inexpensive Arduino processor and worked well if the EFIS manufacturer?s AOA algorithm accurately captured enough of the aircraft curve AND was properly calibrated by the user. Since our objective is to provide accurate AOA and performance/energy cues in addition to progressive stall warning we?ve been experimenting with our own hardware. We still capture EFIS data with our current design. We are a non-profit, volunteer open source group and share all of our code and designs. We are currently building 25 units for beta test and would be happy to collaborate or share lessons learned if you?re interested?this would an excellent visual display component for non-HUD installations.

v/r,

Vac
FlyONSPEED.org

Vac, I certainly welcome to opportunity for collaboration. You've been on my radar for a while. The main impetus for this was to have a rear-seat display. The AOA was an add-on because I already had the code from an old product.

As for old man syndrome, the only way to make the digits larger would be to shrink or eliminate the AOA display. The text fields need to display the +/- maximums expected, and any larger font would wrap around.

I will consider narrowing the AOA portion when the airdata is viewed. When airdata is selected OFF, I can widen the display.

Thanks for the feedback. I just rewrote the code to use C++ classes, which took longer than the brute force code to get working.

Turns out that the display unit has a very loud speaker output, and I can add On-speed audio without connection to the intercom for portable applications. It also has a pair of multi-colored LED bar graphs on the side, so I could really make the alarm conditions stand out, or replicate the AOA information on the bar graphs.

I can also add speech output, with recordings stored on the SD card. Ditto for custom JPEG, BMP or PNG graphics.

Oh yeah, it also has a built in accelerometer/magnetometer so I could actually provide a back-up Attitude indicator in the event of an EFIS failure.

So little time, so much to do.... did I mention the built-in BTLE and WiFi?
 
Why not use the ESP8266 chip with arduino IDE ? It's much smaller then the uno and already has the wifi chip set.

Great project!
 
Why not use the ESP8266 chip with arduino IDE ? It's much smaller then the uno and already has the wifi chip set.

Great project!

You really need to go check out M5Stack.com. They make the hardware. I've used the ESP devices in several designs. The ESP32 device used in the M5stack is impressive. That's the CPU I use in my proprietary designs.

They are still finding their footing in terms of product quality and support, but I am looking at modifying the mechanicals and electronics. Did you know that it's designed to plug into Lego? The mind boggles.
 
Last edited:
Based on feedback received (thanks!), I've made some modifications to the display. I also widgetized the AOA and Slip indicator so I can easily scale them and place anywhere on the screen. Oh, I also discovered that the M5Stack supports memory Sprites, so I can eliminate screen flicker cause by redraws of information on the screen.

It's easy to reconfigure display modes, some are illustrated below.

If the weather clears today, I will perform a flight test!

aoa-group2.jpg


V
 
Purchase?

Vern. I like this. Can I buy one? Or the parts? I like that you have a number, I assume angle on the AOA. Nice work. It’s slick.
 
Nice work, and those are slick little units... I may have to order one or two. Hadn't seen them before.
 
Vern. I like this. Can I buy one? Or the parts? I like that you have a number, I assume angle on the AOA. Nice work. It’s slick.

I don't sell anything, but I will posting the software once testing is completed. Some additional hardware design is required as well to allow for connection to ship's power and the data link. I will post this design as well. You are correct that I am displaying the AOA number. This will become important later on when I have to input calibration data from my airplane. During my flight testing, I have found that the intersection of the horizontal green bars and the yellow chevron was at 50-52% and that the EFIS display was slightly different than mine.

Caveat: these module come from China and need tender loving care. I have two and both have failed in different ways. One was the battery module (not needed) and the other fails to program (probably due to my abuse). I would recommend not purchasing the 'Fire' version, just the basic grey block.

I am traveling for the next month, so only sporadic postings will be made, so please give me some time. Here's a teaser from flight testing. Everything went well:

image16.jpg

image18.jpg
 
Last edited:
Update:
I brought this project with me on vacation (yeah, I know) but my old Windows 7 laptop cannot provide enough USB power. I left my powered USB hub back home. For anyone considering the M5Stack devices, keep this in mind- you will need more power. I have a custom designed power base that I use in the aircraft. I will publish the schematic when I return so that others can review.

A pilot buddy and fellow VAFer has jumped aboard this project and is developing 3D printed bases to simplify installation in aircraft. He will chime in once he's ready.

I've ordered a collection of modules for further R&D, including the 'Stick' version which could be used for just an AOA display.

I've also pursued a battery powered version of the display that gets it's airdata from a Bluetooth beacon wired to the EFIS. This would make short duration (1 hour) flights with a back seat display possible using an unmodified M5Stack Fire module.

Mike Vaccaro's OnSpeed AOA is also on my list. I will initially use the onboard speaker, Later, the intercom interface will be incorporated into the power base.

V
 
Last edited:
Further updates:
I have successfully demonstrated slaving two devices together.

The master sucks in the serial EFIS info, displays it on it's screen and broadcasts it to other devices over WiFi. The result is a frontseat and (a battery powered self-contained) duplicate backseat display, or multiple displays.

But wait, there's more!

I used an M5Stick-C (Pez dispenser size) device to built a stand-alone WiFi access point so if you don't need a front-seat display, you can still send serial info to the backseat.

And more!

Another VAFFER has designed a 3" instrument hole adapter for mounting the M5Stack devices. A 2" version is more challenging.

What's left:
Code verification and flight testing. Learning github so I can formally release the code. Since I didn't learn 'C' until I was 60, please give me time to catch up to the young whippersnappers who know a lot more about the process than I do.

I hope to get this a done in January so that others can replicate my work and do their own coding. I hope the above-unnamed VAFFER will chime in as well.

After that, I will be in Arizona for the remainder of the Winter.

Cheers.
 
After fighting a pernicious software bug in the ESP32 library, I finally updated the operation of the devices to add multiple operating configurations. Here's some new pictures of the display units, with descriptions:

I mounted a pair of displays on my glareshield to demo WiFi linking. The grey unit on the right is a 'master' unit. It is hardwired into the 12V electrical system (with a regulator) and to a Dynon serial port. I had provided a port for this on my panel in 2012 (now that's future-proofing!).

The red unit (aka M5Stack Fire) is a battery powered 'slave' and is connected to the master unit (aka M5Stack Gray) by WiFi. In normal use, the slave unit would be mounted in the rear cockpit for the GIB. The master display unit is optional (more about that later).

Display-Pair.jpeg


Here, you can see the configuration menus for the master and slave units that allow one software load to support multiple applications:
Display-Master.jpeg


Display-Slave.jpeg


And the mount constructed for the back-seat unit using a 3D printed backplate and PVC conduit. Sorry about the rotated images. I'll try to fix that later. The PVC conduit snaps onto the seat frame and can be rotated into any position for maximum visibility.

Display-Back.jpeg


Display-Mount.jpeg


The front seat master unit is totally optional. I'm showing it here just to illustrate the flexibility of the architecture. I also have a small M5Stick-C programmed as a WiFi UDP broadcaster that will send the required information to the back seat. This small unit can be totally buried in the panel and does not need to be visible. Multiple slave units can connect to one UDP broadcaster. I plan on an engine data display as well for the GIB.

I need to do more flight testing, but the weather is crummy, so it may not happen for a while... I will try to get the code published on github in January or February.
 
Last edited:
Vern, Join our AOA Team & Integrate your M5Stack AOA Display

Vern, our Flyonspeed.org team are very impressed with your AOA display design and would like to integrate your AOA display with our AOA system including adding your SW and hardware design to our GitHub account at https://github.com/flyonspeed/OnSpeed-Gen2 and then work integration together!

Our Gen 2 ONSPEED design is completely self-contained and has on-board differential pressure, static and attitude sensors, integrates with the onboard EFIS (if installed), and provides an advanced aural AOA and aircraft performance tone to the Pilot, your System can provide a very useful visual AOA indication and we think it could be integrated to our system by RS232, WIFI, or maybe Bluetooth (both use same WIFI Chip).

We were the 2018 EAA Founder's Innovation Award Winners with our Gen-1 Aural AOA system, are were now working toward this summers Founder's Innovation Award Grand Prize with our new Gen-2 custom designed Gen-2 system and its advanced AOA tracking Software. More details at Flyonspeed.org.

Please send PM and we can discuss.

Thanks
Cecil "TRON" Jones
 
Last edited:
A teaser for those interested... I've developed a library of graphical widgets for Engine Monitor type displays.

More examples coming soon.

EMS-1.jpg
EMS-2.jpg

EMS-3.jpg
EMS-4.jpg
 
Last edited:
But wait, there's more!
The collaboration with the Flyonspeed.org folks has borne fruit, and we are testing a new display for Angle of Attack (AOA) and supplementary information.

AOA-2.jpg


The main graphical widget in the center of the screen is modeled after an F4 Phantom, updated to provide more comprehensive information.

It displays optimal cruise efficiency (white bar aligned with white dots in the yellow chevrons), On Speed for final approach, best glide and best rate of climb (green doughnut in middle), incipient stalls (red chevrons), a progressive AOA indication (white bar and digits at top). NOTE: the white bar is barely visible at the bottom (0% AOA).

Incipient stall also causes the red chevrons to flash and the slip indicator ball to flash and turn red if not centered.

I'm pleased to have joined the OnSpeed folks in this endeavor. I introduced my first AOA display 14 years ago and it's nice to contribute to this ongoing effort.

V
 
I've updated the previous post to include more photos of typical engine gauges.
I have a Beta release of the engine gauge widget library.

Anyone skilled in the art can contact me via email if they want to dig further.
I will be integrating the various EMS display pages with the 'back seat display' project later on.

The idea is that you have one or more devices that you can clip to a back seat rail that provides whatever airdata or engine data that you want to display. I'll be providing several baseline configurations, but if you are skilled in C++ programing and math (yes, for the graphic positioning) you can build your own custom pages based on my examples.

V
 
Last edited:
Attitude

Hey Vern,
Very slick! Did you notice the attitude display on the m5stack blog page?
https://m5stack.com/pages/blog-page. I am sure that you would need the "grey" version with the 9 -axis sensor to make it work but pretty small mark up for the additional functionality. I've got one on the way to play with via Amazon.

Cheers, Sean
 
Hey Vern,
Very slick! Did you notice the attitude display on the m5stack blog page?
https://m5stack.com/pages/blog-page. I am sure that you would need the "grey" version with the 9 -axis sensor to make it work but pretty small mark up for the additional functionality. I've got one on the way to play with via Amazon.

Cheers, Sean

Yup, we are working on it... but I'm not sure I would use it as a primary reference. Right now, all flight and engine data is taken from a Garmin or Dynon EFIS, hence the idea of a 'back seat display'. The M5 devices are very capable. Can turn one into an MP3 player as well....
 
Back
Top