Matronics Email Lists Forum Index Matronics Email Lists
Web Forum Interface to the Matronics Email Lists
 
 Get Email Distribution Too!Get Email Distribution Too!    FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Engine Sensors to Arduino...

 
Post new topic   Reply to topic    Matronics Email Lists Forum Index -> AeroElectric-List
View previous topic :: View next topic  
Author Message
andymeyer



Joined: 31 Mar 2015
Posts: 54
Location: SW MI

PostPosted: Sat Dec 23, 2017 9:07 am    Post subject: Engine Sensors to Arduino... Reply with quote

I'm in the process of putting together a data collector for my O-235 in my Long EZ... I've got the 8 thermocouples set up and working via a KTA259k shield and a Sparkfun SAMD21 Mini board. I'll end up building a board with 8 MAX31855's in the near future for faster data.
I'm also reading Manifold press, Timing and RPM from a Lightspeed ignition and Oil press and Temp from the installed engine sensors.
Loop is a continuity loop - the other side of the circuit has a 10k resistor to ground... If the loop is open, the circuit will go high. If the loop is shorted, it'll go low, and if all is normal, it'll hover about in the middle.

I'm just looking for a quick review of the circuits to make sure I'm close before I start burning fingertips. For the MP and timing, I'm thinking a 2Hz filter in hardware. The RPM is a 15ms 10V pulse - 2 per rev (with a zener for protection and a little filtering to clean up noise). The oil pressure is a 5 volt sensor (5->3.3v divider with zener protection) and the Oil Temp is a low resistance sensor from a Westach oil pressure gauge. I understand that a 220Ohm resistor is about right with these.
The Arduino is a 3.3v flavor.

Any suggestions for improvements in values or circuit designs before I change my fingerprints (again.) Smile


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List



RearCircuits2.png
 Description:
MP, Timing and RPM.
 Filesize:  36.73 KB
 Viewed:  9716 Time(s)

RearCircuits2.png



RearCircuits1.png
 Description:
EOP, EOT and Loop.
 Filesize:  33.56 KB
 Viewed:  9716 Time(s)

RearCircuits1.png


Back to top
View user's profile Send private message
alec(at)alecmyers.com
Guest





PostPosted: Sat Dec 23, 2017 11:19 am    Post subject: Engine Sensors to Arduino... Reply with quote

Why not do your 2Hz filtering in software?
Unless you need a quite specific frequency response you can do a simple but effective exponential filter, with this in your main loop:

filteredValue = e * sample + (1-e) * filteredValue

choose appropriate value of e to achieve the smoothing you want according to how often the loop cycles.
On Dec 23, 2017, at 12:07, andymeyer <ameyer(at)mil-amax.com> wrote:



I'm in the process of putting together a data collector for my O-235 in my Long EZ... I've got the 8 thermocouples set up and working via a KTA259k shield and a Sparkfun SAMD21 Mini board. I'll end up building a board with 8 MAX31855's in the near future for faster data.
I'm also reading Manifold press, Timing and RPM from a Lightspeed ignition and Oil press and Temp from the installed engine sensors.
Loop is a continuity loop - the other side of the circuit has a 10k resistor to ground... If the loop is open, the circuit will go high. If the loop is shorted, it'll go low, and if all is normal, it'll hover about in the middle.

I'm just looking for a quick review of the circuits to make sure I'm close before I start burning fingertips. For the MP and timing, I'm thinking a 2Hz filter in hardware. The RPM is a 15ms 10V pulse - 2 per rev (with a zener for protection and a little filtering to clean up noise). The oil pressure is a 5 volt sensor (5->3.3v divider with zener protection) and the Oil Temp is a low resistance sensor from a Westach oil pressure gauge. I understand that a 220Ohm resistor is about right with these.
The Arduino is a 3.3v flavor.

Any suggestions for improvements in values or circuit designs before I change my fingerprints (again.) Smile


Read this topic online here:

http://forums.matronics.com/viewtopic.php?p=476704#476704


Attachments:

http://forums.matronics.com//files/rearcircuits2_714.png
http://forums.matronics.com//files/rearcircuits1_139.png


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
andymeyer



Joined: 31 Mar 2015
Posts: 54
Location: SW MI

PostPosted: Sat Dec 23, 2017 12:06 pm    Post subject: Re: Engine Sensors to Arduino... Reply with quote

alec(at)alecmyers.com wrote:
Why not do your 2Hz filtering in software?
Unless you need a quite specific frequency response you can do a simple but effective exponential filter, with this in your main loop:

filteredValue = e * sample + (1-e) * filteredValue

choose appropriate value of e to achieve the smoothing you want according to how often the loop cycles.

My only thought was that the hardware filtering will clean up noise that will get into the software filtering. It also slows down the requirements for data collection for the filter... I can sample the Oil press a couple of times a second and have good data. Or, am I over thinking this?


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
View user's profile Send private message
alec(at)alecmyers.com
Guest





PostPosted: Sat Dec 23, 2017 1:52 pm    Post subject: Engine Sensors to Arduino... Reply with quote

Both digital and analog filtering (and digital sampling) are all *huge* topics with libraries of textbooks devoted to them. So whether you’re overthinking this depends on what kind of results you want, I suppose.

You might want to ask yourself how noisy do you expect your oil pressure sensor to be? Where’s the noise coming from? What kind of spectrum does the noise have? What does the real signal under the noise look like? If you want filtering it does help to know what it is you’re trying to filter out and what you’re trying to keep.
Software filtering is easy to adjust, and your Arduino is likely to be sitting in a loop doing nothing for almost all of its processor cycles, so you’ve plenty of processing resource: it probably doesn’t cost you more to sample at 5Hz, or 10Hz.

On Dec 23, 2017, at 3:06 PM, andymeyer <ameyer(at)mil-amax.com> wrote:


alec(at)alecmyers.com wrote:
Quote:
Why not do your 2Hz filtering in software?
Unless you need a quite specific frequency response you can do a simple but effective exponential filter, with this in your main loop:

filteredValue = e * sample + (1-e) * filteredValue

choose appropriate value of e to achieve the smoothing you want according to how often the loop cycles.


My only thought was that the hardware filtering will clean up noise that will get into the software filtering. It also slows down the requirements for data collection for the filter... I can sample the Oil press a couple of times a second and have good data. Or, am I over thinking this?


Read this topic online here:

http://forums.matronics.com/viewtopic.php?p=476709#476709


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
nuckolls.bob(at)aeroelect
Guest





PostPosted: Sun Dec 24, 2017 4:40 am    Post subject: Engine Sensors to Arduino... Reply with quote

At 02:06 PM 12/23/2017, you wrote:
Quote:
--> AeroElectric-List message posted by: "andymeyer" <ameyer(at)mil-amax.com>


alec(at)alecmyers.com wrote:
> Why not do your 2Hz filtering in software?
> Unless you need a quite specific frequency response you can do a simple but effective exponential filter, with this in your main loop:
>
> filteredValue = e * sample + (1-e) * filteredValue
>
> choose appropriate value of e to achieve the smoothing you want according to how often the loop cycles.
>

My only thought was that the hardware filtering will clean up noise that will get into the software filtering. It also slows down the requirements for data collection for the filter... I can sample the Oil press a couple of times a second and have good data. Or, am I over thinking this?

What is design goal for use of the data? Trend
monitoring? Failure analysis? Is there any
data being collected with greater quality than
your physiological perception latency?

In the targets world, the only high speed data
gathering and interpretation was for flight controls;
generally sampled at 100Hz and rolled off at 10Hz
in signal conditioning. All other data, engine
conditions, airspeed, altitude, temperatures, etc
were gathered and processed at 1Hz or slower.

How are you going to treat the data gathered? Writing
to Flash? How large a flash drive are you planning to
incorporate. In other words, how many hours of
flight data.

Then supposing you have, say 100 hours
of data on an SD card . . . by what process will you
interpret, display and analyze the data?
Dedicated application, EXCEL, etc. etc?

The manner in which the data is to be used
has a lot to say about the quality of the
gathering techniques.




Bob . . .


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
nuckolls.bob(at)aeroelect
Guest





PostPosted: Sun Dec 24, 2017 7:53 am    Post subject: Engine Sensors to Arduino... Reply with quote

Quote:

My only thought was that the hardware filtering will clean up noise that will get into the software filtering. It also slows down the requirements for data collection for the filter... I can sample the Oil press a couple of times a second and have good data. Or, am I over thinking this?

I have uploaded a preliminary data package on
an Arduino based DAS that Paul and I have been
fiddling with for about a year. I'm about to
mail brass boarding hardware to Paul to debug
and marry to his software.

https://goo.gl/pGpX4i

Use any of this as it suits your purposes.
Since this was intended to be an investigative
tool, we didn't get hard-over on filter roll
offs. Those are component ratios that are easily
adapted as needs present.

We attempted to craft a 6 channel analog,
2 channel discrete DAS that could be user
configured for a range of sample rates . . .
as determined by software and configuration
jumpers. We included a gain channel with
cold-junction compensation for thermocouples,
a gain channel with high common mode capabilities
for measuring RTD, strain gages, shunts in bus
feeders, etc. A hall effect current sensor
that can be easily configured for a range
of current measurements from plus/minus 1 amp
to plus-minus hundreds of amps. The analog
inputs can be configured to directly excite
my all time favorite temperature sensor

https://goo.gl/12tB3w

Some analog inputs are easily switched between
5 and 25v full scale.


The goal is to be easily incorporated inti
bench testing, flight testing, under the hood,
etc. situations. It will run from separate
battery supply . . . or ship's bus.

It features remote control of the run/stop command
so that with a single conductor to the cockpit,
the DAS under the cowl can be started and stopped
at will thus chunking the data gathering task
so that you don't have a SD card full of insignificant
data interwoven with data of interest.

Are you deeply committed to the 3.3v Vdd product?
There are MANY more remote sensing products that work
well in the 5v world as opposed to the 3.3 volt
world. Unless you're striving for very low power ops
on self contained batteries, I suggest you re-visit
the 5.0 vs. 3.3 decision.




Bob . . .


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
andymeyer



Joined: 31 Mar 2015
Posts: 54
Location: SW MI

PostPosted: Sun Dec 24, 2017 1:36 pm    Post subject: Re: Engine Sensors to Arduino... Reply with quote

The original intent was basic data collection for looking at performance, cooling, drag reduction, etc... It's evolved a bit to be a full engine monitoring system - with display. I'm seeing how easy a 2.8" (or two) displays are easy and fast to drive.

I've had a pretty relentless (as relentless as a father of 3 can be) pursuit of drag reduction... I'm close to 18 knots improvement on this airplane, and since I started recording low resolution data, I can show about 13 knots of provable gain. I've got a performance model that gets me within 1.2 knots at most normal conditions so any change can be found utilizing some 6 sigma manipulation. Goal is to get some of this computing ability into the engine monitor as well as greatly improve my data collection. Altitude hold AP is going in soon, etc...

First goal is displaying the data as an engine monitor, and second will be collecting for model improvement and tracking drag reduction. A long goal is to be able to develop a system that can effectively back out a pilots performance handbook based on a few flight profiles flown during their first 40 hours on a new experimental.

I'm looking for relatively clean data for presentment on the display initially. This first pass will be a few boards soldered up and mounted - functional for a few months while I work on the cockpit display, etc... Then, PCBA's built (and shared if there is other interest in this system...) I'll be writing more as I progress. My mechanical and aerodynamics prowess is much better than my electronics... But I'm learning.


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
View user's profile Send private message
ceengland7(at)gmail.com
Guest





PostPosted: Sun Dec 24, 2017 5:20 pm    Post subject: Engine Sensors to Arduino... Reply with quote

On 12/24/2017 9:52 AM, Robert L. Nuckolls, III wrote:

Quote:
Quote:

My only thought was that the hardware filtering will clean up noise that will get into the software filtering. It also slows down the requirements for data collection for the filter... I can sample the Oil press a couple of times a second and have good data. Or, am I over thinking this?

  I have uploaded a preliminary data package on
  an Arduino based DAS that Paul and I have been
  fiddling with for about a year. I'm about to
  mail brass boarding hardware to Paul to debug
  and marry to his software.

https://goo.gl/pGpX4i

  Use any of this as it suits your purposes.
  Since this was intended to be an investigative
  tool, we didn't get hard-over on filter roll
  offs.  Those are component ratios that are easily
  adapted as needs present.

  We attempted to craft a 6 channel analog,
  2 channel discrete DAS that could be user
  configured for a range of sample rates . . .
  as determined by software and configuration
  jumpers. We included a gain channel with
  cold-junction compensation for thermocouples,
  a gain channel with high common mode capabilities
  for measuring RTD, strain gages, shunts in bus
  feeders, etc. A hall effect current sensor
  that can be easily configured for a range
  of current measurements from  plus/minus 1 amp
  to plus-minus hundreds of amps. The analog
  inputs can be configured to directly excite
  my all time favorite temperature sensor

https://goo.gl/12tB3w

  Some analog inputs are easily switched between
  5 and 25v full scale.


  The goal is to be easily incorporated inti
  bench testing, flight testing, under the hood,
  etc. situations. It will run from separate
  battery supply . . . or ship's bus.

  It features remote control of the run/stop command
  so that with a single conductor to the cockpit,
  the DAS under the cowl can be started and stopped
  at will thus chunking the data gathering task
  so that you don't have a SD card full of insignificant
  data interwoven with data of interest.

  Are you deeply committed to the 3.3v Vdd product?
  There are MANY more remote sensing products that work
  well in the 5v world as opposed to the 3.3 volt
  world. Unless you're striving for very low power ops
  on self contained batteries, I suggest you re-visit
  the 5.0 vs. 3.3 decision.

 


  Bob . . .
What's the reason for using a degree-K sensor, instead of a degree-F sensor (like the LM34)?
Virus-free. www.avast.com [url=#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2] [/url]


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
nuckolls.bob(at)aeroelect
Guest





PostPosted: Tue Dec 26, 2017 7:20 am    Post subject: Engine Sensors to Arduino... Reply with quote

Quote:
Quote:

Bob . . .
What's the reason for using a degree-K sensor, instead of a degree-F sensor (like the LM34)?

The DegreeK sensor presents ~2740 mV at room temperature
and its output says above zero for even the lowest expected
temperatures. To measure minus temps with a DegreeF device,
you need a source of negative voltage to bias it up.


Bob . . .


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
ceengland7(at)gmail.com
Guest





PostPosted: Tue Dec 26, 2017 11:15 am    Post subject: Engine Sensors to Arduino... Reply with quote

On Tue, Dec 26, 2017 at 9:19 AM, Robert L. Nuckolls, III <nuckolls.bob(at)aeroelectric.com (nuckolls.bob(at)aeroelectric.com)> wrote:
Quote:
Quote:
Quote:

  Bob . . .
What's the reason for using a degree-K sensor, instead of a degree-F sensor (like the LM34)?

  The DegreeK sensor presents ~2740 mV at room temperature
  and its output says above zero for even the lowest expected
  temperatures. To measure minus temps with a DegreeF device,
  you need a source of negative voltage to bias it up.


  Bob . . .

Ah, yes. I suspected that; I didn't notice the negative supply requirement for sub-zero on the LM34 until after I hit 'send'. 
Virus-free. www.avast.com [url=#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2][/url]


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
nuckolls.bob(at)aeroelect
Guest





PostPosted: Tue Dec 26, 2017 6:13 pm    Post subject: Engine Sensors to Arduino... Reply with quote

Quote:
Ah, yes. I suspected that; I didn't notice the negative supply requirement for sub-zero on the LM34 until after I hit 'send'.Â

Not only do you need a negative supply to get
the device to function, you need an a/d converter
that resolves negative voltages.

DegreesK stays in the positi8ve range for all
temperatures of interest and the rudimentary
0-5v input range for DAS isn't insulted either.

I have a half dozen DegreesK sensors left over
from Beech projects . . . a little chunk of 'stuff'
soldered to the end of a single, shielded conductor.
I think the the last time I used these was to monitor
ambient and motor temperatures on the Beechejet's
pitch trim system during an investigation into motor
shaft failures.

REALLY easy to fabricate and integrate into the
DAS system.


Bob . . .


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List
Back to top
andymeyer



Joined: 31 Mar 2015
Posts: 54
Location: SW MI

PostPosted: Mon Jan 08, 2018 4:18 pm    Post subject: Re: Engine Sensors to Arduino... Reply with quote

Great call on the LM235 degree K sensor... I'll be using that on the front module for the air data computer side of this thing. Can't the ground for an LM35 just be biased up a volt or so to get the negative temperatures if the voltage conversion accounts for that 1 volt?

I spent some time looking over the DAS system... Nice setup - thank you for the education seeing how these are really designed... I've got a EE degree from 20 years ago, but never got into circuit design. Always a development guy... Sensors and mechanical integration of the electronics, along with calibration and engine tuning. Now I'm getting into some fun circuit design and trying to relearn.

On 3.3V vs 5V... My module driving my display is a Teensy 3.6 - should be able to grunt the display and ADC computations along plenty fast - 3.3V. For the engine side module, I have used a bunch of the SAMD21 Arduino boards so I've kind of stuck there. Using RS485 so I know I can use 5V in the engine compartment, but... (TTWWADI - I know...)

Failure analysis... It won't be anything more mission critical than oil pressure... I can hear RPM... Everything else is bonus data from where I am today. As far as failure of this system affecting the rest of the airplane - pull the breaker and shut it down.

Probably not exceeding physiological perception latency... I'm gonna have to remember that one. My CGR30P's in the other airplane record at 3Hz. Data gathered will be written to SD card... Probably won't store more than 10 hours of data, Estimating 3-5 MB an hour so pretty easy on GB class SD cards.

Analyzing data... I do this with my CGR30's and dump it either into Excel or process it with a chunk of C code to grab what I need and get what I'm trying to learn that day / week / month / airplane.

I already display the MP and Timing on a 3.5 digit panel meter - want to get rid of that. Filters pretty smooth. Planning on light filtering in HW to clean things up and help the AD's out, then use SW filtering to get where I need to be. Both are really cheap and good in their own ways.

Getting closer on the circuits via my re-education in electronics... Open for any other thoughts or improvements... Anything I'm doing grossly wrong, or could easily improve.

Planning on setting the ARef to 1.1V on the Ardunio. I think I have my voltage dividers and filters about right. I have the 10V, 1.5ms RPM signal coming in - I think the circuit I've put together will work for the digital Arduino input - interrupt SW works, but I haven't tested this circuit against it. Fuel Press and Oil Temp are the Westach 387-100 KV and 387-30 KV 0.5V to 4.5V sensors. EOT is a Westach sensor as well 2190 ohms at 90F (about as low as I need to measure) and 212 ohms at 212F. How can I improve the resolution at high temp without giving up the range at the bottom end?


- The Matronics AeroElectric-List Email Forum -
 

Use the List Feature Navigator to browse the many List utilities available such as the Email Subscriptions page, Archive Search & Download, 7-Day Browse, Chat, FAQ, Photoshare, and much more:

http://www.matronics.com/Navigator?AeroElectric-List



Untitled2.png
 Description:
 Filesize:  130.79 KB
 Viewed:  9436 Time(s)

Untitled2.png



Untitled1.png
 Description:
 Filesize:  121.67 KB
 Viewed:  9436 Time(s)

Untitled1.png


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Matronics Email Lists Forum Index -> AeroElectric-List All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group