Making your own EMS sensor definitons

rgcrothers

I love flying!
Joined
Dec 24, 2011
Messages
22
From my reasearch on the web, it appears that pulling the needed data from Excel is done with "LINEST". If the information on how to pull the needed data from Excel could be posted here, perhaps others would be able to use it in the future.

Here is a link that seems to get pretty close to what is needed. http://people.stfx.ca/bliengme/ExcelTips/Polynomial.htm

Randall
 

dynonsupport

Dynon Technical Support
Staff member
Joined
Mar 23, 2005
Messages
13,227
So using your table above, we were able to compute the following numbers that you can use to edit the sensor file. Note that because of the nature of the sensor, this characterization may not be very accurate below about 70F. It should be within a few degrees above that, though:

c_x4=0.213903638386384
c_x3=-8.53528046571783
c_x2=61.6555092348803
c_x1=-206.50599646988
c_x0=467.308229032624

low_resistance=PULL_UP_200
 

rgcrothers

I love flying!
Joined
Dec 24, 2011
Messages
22
Ahhh, thank you thank you thank you.

I had not anticipated the need for the pull up, but will add it.

I will probably test the set up with one sensor, starting with ice water using a good thermometer for reference, and take it on up to boiling and above (with oil) to verify I am getting good information.

I do appreciate the response and realize I am probably a one off case here, but perhaps others will be able to read the posts above and get a better picture of what is involved in generating one of these definitions.

Randall
 

dynonsupport

Dynon Technical Support
Staff member
Joined
Mar 23, 2005
Messages
13,227
No no... the EMS has a pullup. That's one of the lines that you'll see in the config file which tells SkyView which internal pullup to use.
 

rgcrothers

I love flying!
Joined
Dec 24, 2011
Messages
22
Right, before editing, the carb temp definition calls out "high_resistance=PULL_UP_10K"  I was planing to change that line to "high_resistant=PULL_UP_200K".

With the old Blue Mountian stuff I had to add resistors in line, glad those days are over.

I figure I have pulled well over $20K worth of BMA stuff out of the plane. I guess I got one small victory today as I used the bottom of the old gold box case as a tray to hold the EMS and the back up battery, so I did salvage a little something :cool:

Randall
 

dynonsupport

Dynon Technical Support
Staff member
Joined
Mar 23, 2005
Messages
13,227
It absolutely needs to be low_resistance, not high, and it needs to be 200, not 200K. The high_resistance is for a more complex sensor configuration and won't affect this sensor.
 

rgcrothers

I love flying!
Joined
Dec 24, 2011
Messages
22
Oops, sorry, that was a typo on my part.

Still learning how to get those numbers for myself, I learned that I needed to start out in Excell with a scatter chart, then fit a polynomial trend line, selecting 4th order. Then there is an option to show the equation. That get me alot closer but the numbers don't match up yet...
 

rgcrothers

I love flying!
Joined
Dec 24, 2011
Messages
22
I have been successful in getting my Westach Temperature sensor definition added to the sensor file and initially anyway, it looks like they are going to work fine. Thanks to support for crunching the numbers for me to make this part work. I am able to assign the sensors to pins and display the various gauge types etc.

I am still having some difficulty with the AFR gauge that I would like to display. I have an electrically dependant engine so it is very important for me to monitor both my main and backup busses, so I have pins 1 and 2, the only pins labled as voltage inputs on the DB37, used to monitor those voltages.

I was hoping to use pin 22 for the AFR and call the function voltage, but it will not allow that use. Is there any way to use one of the other functions to allow the AFR display? Input is linear voltage signal from 0 to 5 volts. I hate to have to cut a hole in the panel for an AFR Steam Gauge but it seams like I may be up against the limits of the system as it stands today? Any hope for a generic sensor as mentioned above by mmarien? Other possible solutions?

FWIW, I also have had my system crash and reboot when trying to configure the AFR on pin 22. I have the sensor definition in the file, specifying pin 22 as one of the pins suitable for use, and for some reason pin 22 keeps showing up as an available sensor in the sensor display widget page, even though I have selected "unused" in the pin mapping. If I select it the system crashes and reboots.

Randall
 

dynonsupport

Dynon Technical Support
Staff member
Joined
Mar 23, 2005
Messages
13,227
So if it's a 0-5V output, you should be able to use it on one of the "C" type inputs, which can be used without a resistor per the sensor file. Though you can have the numericals be any value, you'll need to choose a type like "TEMPERATURE" or "PRESSURE" to be able to use it. If you have a table of a bunch of values for that sensor, we can run it through for you like the last one.
 

avizer

I love flying!
Joined
Oct 14, 2012
Messages
13
Is there a way to change the max value of an Info item.

My max fuel is 350g, the max fuel that the Skyview will accept is 260g...
 

dynonsupport

Dynon Technical Support
Staff member
Joined
Mar 23, 2005
Messages
13,227
Not that one, unfortunately. It think you may have run into a hard-coded limit. We've filed a but for our engineering team to take a look at this.
 

shenweas

I love flying!
Joined
Jan 2, 2012
Messages
87
I am having trouble getting a reading from one of the inputs on my skyview.

I have an input that is

.01 volt = 10
.02 volt = 20
.03 volt = 30

I have the sensor setup as follows

sensor={
id=VOLTAGE MEASURE
;VERIFIED POLY, FILTER?
function=VOLTS
pins=C37_P31
name=T_MAP
name=IGN
name=TIMING
name=MAIN
name=BACKUP
min_val=0.0
max_val=40.0
resolution=1
round=.1
is_piecewise=0
low_coeff={
c_x4=0
c_x3=0
c_x2=0
c_x1=100
c_x0=0
}
low_resistance=NONE
low2high_cross=0
high_coeff={
c_x4=0
c_x3=0
c_x2=0
c_x1=0
c_x0=0
}
high_resistance=NONE
high2low_cross=0
window=.2
shift=3
age=16
}


What am I doing wrong?


I have tried c_x1=1 and c_x1=10 and it makes no change

I am reading .1 units on the display when I should read 10.0
 

dynonsupport

Dynon Technical Support
Staff member
Joined
Mar 23, 2005
Messages
13,227
I bet you have another sensor in your file named VOLTAGE MEASURE. You can only have one of the same ID, or it will use the first one and ignore the second one (or other way around, I forget).

Also, don't expect great accuracy from this. You're asking it to read millivolts. While we do have a digitizer resolution that is right around a millvolt, in practice that means you should be pretty happy to get .05V resolution. So we can probably tell the difference between 10 degrees and 20 degrees of timing, but likely not 20 and 24.

It's also going to be a very noisy measurment unless you put a lot of filtering on it.
 

cmgolden

I love flying!
Joined
Apr 28, 2014
Messages
68
Location
Wichita, KS
We'll consider the addition of a more generic type that won't add Volts or PSI to the end of the label, but it's not a request we get very often so I can't promise a timeframe for that.
If this isn't available already, +1!

(Air-Fuel-Ratio sensor on order soon...)
 

airguy

Active Member
Joined
Nov 10, 2008
Messages
722
Location
Gods Country - west Texas
I'm having a bit of trouble adding a sensor (the AFR example listed above, in this case) to my file. I'm opening the SFG file in Excel, and Excel shows the indented sections of the code to be in the next column, and I'm following that for the added sensor and saving it back in the native format, but it's not showing up in my display. Do I need to use a different program to edit the file?
 

dynonsupport

Dynon Technical Support
Staff member
Joined
Mar 23, 2005
Messages
13,227
Normally you would use an "ASCII Text Editor" to edit the Sensor Definition File, such as Windows Notepad - it's just text.

I'm having a bit of trouble adding a sensor (the AFR example listed above, in this case) to my file. I'm opening the SFG file in Excel, and Excel shows the indented sections of the code to be in the next column, and I'm following that for the added sensor and saving it back in the native format, but it's not showing up in my display. Do I need to use a different program to edit the file?
 

dougnlina

I love flying!
Joined
Mar 28, 2014
Messages
61
So I am trying to wrap my head around adding and defining a special sensor/widgit to my EMS. It is to show ignition advance on an electronic ignition. Basically the Lightspeed Ignition unit provides an output in millivolts that directly corresponds to the advance, ie. 0-40 mv equals 0-40 degrees of advance. Is it possible to use one of the EMS enhanced general purpose inputs and manage to read voltages this low? The millivolts are on the same order of magnitude as the ammeter shunt, but (from reading the forum), the shunt input has special hardware in the EMS box to handle reading its values, and apparently one cannot simply add a second shunt to the system. Is there some other reason other than the low voltage that a second shunt cannot be added? Or is there some other special issue I am misunderstanding with shunts? If the low (milli-)voltage output of the EI system I want to connect cannot be picked up by the enhanced purpose inputs on the EMS, can I adapt the ammeter pins 24&25 for use reading the advance? And then install one of the GRT Hall effect modules for my AMPS reading? Any help is appreciated.
DP :-?
 

Grizzly

New Member
Joined
Oct 2, 2017
Messages
13
Location
France LFOP airport
Bonjour,

In the first post, following the link of the Wiki, I read:
" * shift= A shift of x means 2^x/16Hz = T(sec) where after T seconds the filtered value is 90% of the change in value. So make this 5 if you want a filter that takes 1 second to hit 90% of the step change in value."
But 2^5/16hz=2 seconds not 1 second
What is incorrect: the formula, the calculation or my eyes ?  ;)
 

dynonsupport

Dynon Technical Support
Staff member
Joined
Mar 23, 2005
Messages
13,227
Looks like there are a few errors in that statement. Thanks for the catch.

It should actually say:
A shift of x means 2^x/16Hz = T(sec) where after T seconds the filtered value is 66% of the change in value. So make this 5 if you want a filter that takes 2 seconds to hit 66% of the step change in value.

The sensor file itself has a definition of this, and it was correct in saying:
Shift of x means 2^x/16Hz = T(sec) where after T seconds the filtered value is 66% of the input value. This is used to reduce noise in the signal (e.g., sloshing in a fuel tank) but also reduces the response rate to actual changes at the input.
 
Top