EMS sensor programming

jlbpropilot

New Member
Joined
Jan 3, 2010
Messages
29
I need to setup my skyview to give me an air-pressure reading for my air start system. I have read the document on here and just can't quite figure it out. Where do I write the programming? How do I save it and import it to my skyview? What information do I need about the sensor I am using? According to the documents with the sensor the output is 0.5 – 4.5 V (ratiometric). It is a PSI sensor with a max of 2500. Anything else I need to find out? Thanks
 

dynonsupport

Dynon Technical Support
Staff member
Joined
Mar 23, 2005
Messages
13,226
It is a bit technical, and for those of you reading along, this is literally the easiest type of sensor to support. You'd need to modify the latest sensor file available at http://dynonavionics.com/docs/support_software_SkyView.html. The actual sensor definition requires that you create a 4th order polynomial that characterizes the sensor. For a truly ratiometric (linear) sensor, this ends up being a simple slope/offset equation right out of algebra, (Y=X1x+X0), where X1 and X0 are the values you'd need for the coefficients. Since you have a direct voltage output, you want no pullup resistor configured, and that requires that you only allow "enhanced general purpose inputs" in your configuration. If your sensor is truly 0 psi at .5 V, and 2500 at 4.5V, the thing you'd add to you sensor file would be the following*. Note that the sensor file needs to be imported as a whole, so you can't just import this snippet and have it add on to what's on the system. This means that you want to start with the sensor file on on the web site, add something like the below to it, and then import the whole thing.

sensor={
id=STARTER AIR PRESSURE
function=PRESSURE
pins=C37_P8 C37_P22 C37_P31
name=STARTER
min_val=0
max_val=2500
resolution=10
round=10
is_piecewise=0
low_coeff={
c_x4=0
c_x3=0
c_x2=0
c_x1=625
c_x0=-312.5
}
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
}

* No guarantees. The the above was created with care but wasn't tested.
 

dabear

New Member
Joined
Oct 2, 2007
Messages
525
Location
Warrenton, Virginia
Would this sensor support 0 to 800-1,000psi? If so once you have tested it and the sensor file, can you share the information on the file and the sensor type? I'd love to remove the analog guages for my Yak/CJ and use the SV.

Bear
3 Screen, 2 AHRS CJ6A
 

jlbpropilot

New Member
Joined
Jan 3, 2010
Messages
29
ok, I am following what you are saying a little more. I am unable to get very far due to the fact when I try to download the latest sensor file from the link you gave me it opens as a webpage rather than a file and I am unable to save it as a file to my computer. Any ideas?
 

dynonsupport

Dynon Technical Support
Staff member
Joined
Mar 23, 2005
Messages
13,226
You want to save the .sfg file. Depending on the browser, you might need to right click and select "save target as" or similar.
 

mmarien

Murray M.
Joined
Dec 26, 2009
Messages
1,206
Location
Saskatoon SK CAN
Try right click on the download link and select "Save Target As..."

You browser thinks the file is a text file and opens it instead of saving it. Well it is a text file. You could also try "SaveAs" from your browser after it opens the file. It's under the "Page" menu in IE8.
 

jlbpropilot

New Member
Joined
Jan 3, 2010
Messages
29
you guys are great, thanks for the quick response. I am able to save it using your suggestions but my computer doesnt know what program to use to open it so I can make my modifications. Maybe I have to modify it then do the save as thing. Any suggestions?
 

jlbpropilot

New Member
Joined
Jan 3, 2010
Messages
29
May have answered my own question but I opened the .sgf file with word and added on the settings you recommended. I will attempt to load them tomorrow and give a report if it worked. Thanks
 

dynonsupport

Dynon Technical Support
Staff member
Joined
Mar 23, 2005
Messages
13,226
May have answered my own question but I opened the .sgf file with word and added on the settings you recommended. I will attempt to load them tomorrow and give a report if it worked. Thanks

If you opened it in Word, make sure that you save it as text-only; otherwise Word will embed all kinds of formatting characters that will cause problems trying to load that file into SkyView.

Better to edit the .sgf file in a "pure" text editor, like Notepad.
 

jlbpropilot

New Member
Joined
Jan 3, 2010
Messages
29
Ok, I was able to transfer the file to my skyview. The sensor is coming up on my screen but I have a couple of problems. One of which is that there are 10 places to the right of the decimal which is an easy fix. The other one is that I cant get it to come off 0 psi. I am only able to put about 120psi in my starter bottle right now but even when I do that the pressure reads 0. Could you explain how you came up with the numbers under the low coefficient title? Is that what needs to be changed? While messing around in the different screens I was able to see Raw = 310, Volts = .3825, and the third column which I cant remember what it was = 0. Thanks for any help in advance.
 

dynonsupport

Dynon Technical Support
Staff member
Joined
Mar 23, 2005
Messages
13,226
The cooefficients are taken from the equation that describes the curve (or linear slope, in this case) that you generate for the sensor using the tool of your choice. In this case, excel is a really good tool. If you graph

|.5 | 4.5 |
|0 | 2500

(those are four cells)

then have it pull out the equation, the equation that describes this sensor is Y = 625X - 312.5, where X is voltage and Y is pressure.

So X0 is -312.5 and X1 is 625.

Now, remember your original statement: .5V is 0 PSI. The sensor page is indicating that it is seeing .3825V, which is below that. So your sensor has yet to come off the bottom peg. This might just be an accuracy at the low end thing (we struggle with this with very low pressure fuel pressure readings, because the sensors don't track very well at the low end, as some of you may know), or it could be that the .5-4.5V spread that you indicated isn't a very good characterization of the sensor.

FYI, when we characterize a sensor, we nominally run it up and down the temp/pressure range, usually on multiple sensors to confirm that the sensor type even has a repeatable voltage curve that can be trusted. This usually creates a nice curvy line, which can then be approximated with a full 4th order polynomial.
 

swatson999

Well-Known Member
Joined
Oct 6, 2010
Messages
1,528
Even easier than Excel...paper and pencil. You have two unknowns, and two conditions.

Solve y = mx + b (here, y = pressure, x = voltage) using (.5, 0) and (4.5, 2500) for x and y.
 

cleesgt

New Member
Joined
May 16, 2011
Messages
11
Location
Huntsville, AL
Attached is a graph of what the pressure sensor looks like.

 

Attachments

  • Pressure_Sensor_X-Y_graph_of_Press_VS_Volts.PNG
    Pressure_Sensor_X-Y_graph_of_Press_VS_Volts.PNG
    52.2 KB · Views: 125

ljbuller

New Member
Joined
Jul 13, 2011
Messages
24
Location
ND
The above discussion looks somewhat like the Freescale ZMPXV7007. the sensor I am looking at is an amplified .5 to 4.5V sensor. It has a 1psi range. If I read this right, I would use
:inches of water
Min_val=3.459988
max_val=27.679904
resolution=.01
round=.01
low_coeff={
c_x1=.25
c_x0-.125
Is that anywhere in the ball park?
Do you have any confirmation that the sensor config in the previous posts worked with the 10k pull up?
 

vlittle

Active Member
Joined
May 7, 2006
Messages
532
You want to save the .sfg file. Depending on the browser, you might need to right click and select "save target as" or similar.

It turns out that you cannot use an arbitrary file name for the definition file. It's safe to use the default filename when you "save as", then edit the contents. Arbitrary file names are not recognized by Skyview, such as "mysensor.sfg". Took me a while to figure this out.

V
 
Top