PDA

View Full Version : Calc PID's for AD Input



BlkMax
December 23rd, 2009, 09:57 AM
How do I write these? I have seen others figure this out, and EFILive made one for me, but how do I do this myself?

I have some Aeroforce transmitters that read from 0-150 psi, and 0.5-4.5 VDC output.

How do I make a Calc-PID statement for these to read correctly when I input them into the analog inputs on a V2?

FWIW, the Aeroforce folks say to configure their gauge with an intercept of 37.5, and a slope of -18.7.

I am not looking for the metric units on this, just the imperial.

mr.prick
December 23rd, 2009, 10:43 AM
(Volts*Slope)+Intercept

joecar
December 23rd, 2009, 10:49 AM
What mr.prick said...

1: 0.5V = 0 psi = 0 kPa
2: 4.5V = 150 psi = 1034.2 kPa

Imperial:
slope = (p2 - p1)/(v2 - v1) = (150 - 0)/(4.5 - 0.5) = 37.5
intercept = p1- v1*slope = 0 - 0.5*37.5 = -18.75
so p = slope*v + intercept = 37.5*v - 18.75

Metric:
slope = (p2 - p1)/(v2- v1) = (1034.2 - 0)/(4.5 - 0.5) = 258.6
intercept = p1 - v1*slope = 0 - 0.5*258.6 = -129.3
so p = slope*v + intercept = 258.6*v - 129.3

See attached calc_pids.txt, copy it to My Documents\EFILive\V7.5\User Configuration.

When you select this pid on the pids tab, do rightclick->Imperial for psi.

mr.prick
December 23rd, 2009, 12:19 PM
Great service as always Joe. :thumb_yello:
Coincidentally, I made a spreadsheet for WBO2 expressions a few days ago.

joecar
December 23rd, 2009, 02:26 PM
Handy spreadsheet...:cheers:

BlkMax
December 23rd, 2009, 06:39 PM
Thanx Guys....

Merry Christmas

mr.prick
February 16th, 2010, 06:25 AM
I updated the spreadsheet to compare AFR/Lambda PID expression to {B3601}. :)

joecar
February 16th, 2010, 07:56 AM
Thanks for the update...:cheers:

My only comment is: now you divide instead of multiplying to arrive at the AFR (just like HPT do)...?

:)

mr.prick
February 16th, 2010, 08:16 AM
There are 2 pages.
I saved it with the HPT side open so when it opens that is what you see and
it was the first version too. :doh:
It's fixed now.

joecar
February 16th, 2010, 09:16 AM
Ah, I see... (or rather I missed the tabs/pages :doh2:).