VAF Forums

VAF Forums (https://vansairforce.net/community/index.php)
-   RV-12/RV-12iS (https://vansairforce.net/community/forumdisplay.php?f=73)
-   -   Arduino microcontroller (https://vansairforce.net/community/showthread.php?t=149911)

madhun 05-29-2017 06:01 AM

Quote:

Originally Posted by Brantel (Post 1176162)
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?

petersb 05-29-2017 07:02 AM

Quote:

Originally Posted by Phantom30 (Post 1176253)
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.

vlittle 05-29-2017 10:16 AM

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


greghughespdx 05-29-2017 10:34 AM

Quote:

Originally Posted by rv8ch (Post 1176159)
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.

petersb 05-29-2017 02:12 PM

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 ?

vlittle 05-29-2017 05:39 PM

Quote:

Originally Posted by petersb (Post 1176420)
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


petersb 05-29-2017 06:39 PM

Quote:

Originally Posted by vlittle (Post 1176469)
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


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 ?

Brantel 05-29-2017 06:49 PM

Quote:

Originally Posted by madhun (Post 1176289)
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/communit...ighlight=p-mag

vlittle 05-29-2017 08:08 PM

Quote:

Originally Posted by petersb (Post 1176480)
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

madhun 05-30-2017 06:14 AM

Quote:

Originally Posted by Brantel (Post 1176483)
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/communit...ighlight=p-mag

Thank you kindly.


All times are GMT -6. The time now is 08:04 AM.