MAP conversion
Ludis Langens
ludis at cruzers.com
Sat Sep 26 12:33:40 GMT 1998
"Mike Pitts" <mpitts at mail.emi.net> wrote:
> Does anyone have an idea as to what the following 1-bar MAP
> conversion is actually calculating. The application is a CPI
> V6 truck. The result is used in most of the table lookups which
> use MAP.
>
> Value = ((((MAPCounts - 26.0) * 0.59) + 0.25) * 2.0)
>
> MAPCounts represents the raw A/D counts read from the
> 1-bar MAP sensor. The formula limits the useable range of
> the MAP from 26 to 242 counts (20 kPa to 97 kPa). Anything
> outside of that range causes the value to set to 255.
Um, you may find that, except in the ECM init code, that anything
below 26 sets the result to 0. (The init code in a lot of ECMs
forgets to check for the underflow.)
Here are some constants which I've found used in several different ECMs:
oneBarScale EQU 151 ;One bar MAP magnification
oneBarOffset EQU 26 ;26..242..243 => 0..255..256
twoBarScale EQU 160 ;Two bar MAP magnification
twoBarOffset EQU 28 ;28..232..233 => 0..255..256
And here are two conversion tables I've generated:
(Use a fixed width font and at least 77 columns. The first of these
tables matches a conversion performed by Diacom.)
;One bar MAP sensor to KPa conversion
;
;KPa = (n - 26) * 151/128 * 5/16 + 20
;
; : 0 1 2 3 4 5 6 7 8 9
; ....:.....................................................................
; 0 : 10.4KPa10.8 11.2 11.5 11.9 12.3 12.6 13.0 13.4 13.7
; 10 : 14.1 14.5 14.8 15.2 15.6 15.9 16.3 16.7 17.1 17.4
; 20 : 17.8 18.2 18.5 18.9 19.3 19.6 20.0 20.4 20.7 21.1
; 30 : 21.5 21.8 22.2 22.6 22.9 23.3 23.7 24.1 24.4 24.8
; 40 : 25.2 25.5 25.9 26.3 26.6 27.0 27.4 27.7 28.1 28.5
; 50 : 28.8 29.2 29.6 30.0 30.3 30.7 31.1 31.4 31.8 32.2
; 60 : 32.5 32.9 33.3 33.6 34.0 34.4 34.7 35.1 35.5 35.9
; 70 : 36.2 36.6 37.0 37.3 37.7 38.1 38.4 38.8 39.2 39.5
; 80 : 39.9 40.3 40.6 41.0 41.4 41.8 42.1 42.5 42.9 43.2
; 90 : 43.6 44.0 44.3 44.7 45.1 45.4 45.8 46.2 46.5 46.9
; 100 : 47.3 47.6 48.0 48.4 48.8 49.1 49.5 49.9 50.2 50.6
; 110 : 51.0 51.3 51.7 52.1 52.4 52.8 53.2 53.5 53.9 54.3
; 120 : 54.7 55.0 55.4 55.8 56.1 56.5 56.9 57.2 57.6 58.0
; 130 : 58.3 58.7 59.1 59.4 59.8 60.2 60.6 60.9 61.3 61.7
; 140 : 62.0 62.4 62.8 63.1 63.5 63.9 64.2 64.6 65.0 65.3
; 150 : 65.7 66.1 66.5 66.8 67.2 67.6 67.9 68.3 68.7 69.0
; 160 : 69.4 69.8 70.1 70.5 70.9 71.2 71.6 72.0 72.3 72.7
; 170 : 73.1 73.5 73.8 74.2 74.6 74.9 75.3 75.7 76.0 76.4
; 180 : 76.8 77.1 77.5 77.9 78.2 78.6 79.0 79.4 79.7 80.1
; 190 : 80.5 80.8 81.2 81.6 81.9 82.3 82.7 83.0 83.4 83.8
; 200 : 84.1 84.5 84.9 85.3 85.6 86.0 86.4 86.7 87.1 87.5
; 210 : 87.8 88.2 88.6 88.9 89.3 89.7 90.0 90.4 90.8 91.1
; 220 : 91.5 91.9 92.3 92.6 93.0 93.4 93.7 94.1 94.5 94.8
; 230 : 95.2 95.6 95.9 96.3 96.7 97.0 97.4 97.8 98.2 98.5
; 240 : 98.9 99.3 99.6 100.0 100.4 100.7 101.1 101.5 101.8 102.2
; 250 : 102.6 102.9 103.3 103.7 104.1 104.4 104.8
;One bar pressure subrange to KPa conversion
;
;KPa = n * 5/16 + 20
;
; : 0 1 2 3 4 5 6 7 8 9
; ....:.....................................................................
; 0 : 20.0KPa20.3 20.6 20.9 21.3 21.6 21.9 22.2 22.5 22.8
; 10 : 23.1 23.4 23.8 24.1 24.4 24.7 25.0 25.3 25.6 25.9
; 20 : 26.3 26.6 26.9 27.2 27.5 27.8 28.1 28.4 28.8 29.1
; 30 : 29.4 29.7 30.0 30.3 30.6 30.9 31.3 31.6 31.9 32.2
; 40 : 32.5 32.8 33.1 33.4 33.8 34.1 34.4 34.7 35.0 35.3
; 50 : 35.6 35.9 36.3 36.6 36.9 37.2 37.5 37.8 38.1 38.4
; 60 : 38.8 39.1 39.4 39.7 40.0 40.3 40.6 40.9 41.3 41.6
; 70 : 41.9 42.2 42.5 42.8 43.1 43.4 43.8 44.1 44.4 44.7
; 80 : 45.0 45.3 45.6 45.9 46.3 46.6 46.9 47.2 47.5 47.8
; 90 : 48.1 48.4 48.8 49.1 49.4 49.7 50.0 50.3 50.6 50.9
; 100 : 51.3 51.6 51.9 52.2 52.5 52.8 53.1 53.4 53.8 54.1
; 110 : 54.4 54.7 55.0 55.3 55.6 55.9 56.3 56.6 56.9 57.2
; 120 : 57.5 57.8 58.1 58.4 58.8 59.1 59.4 59.7 60.0 60.3
; 130 : 60.6 60.9 61.3 61.6 61.9 62.2 62.5 62.8 63.1 63.4
; 140 : 63.8 64.1 64.4 64.7 65.0 65.3 65.6 65.9 66.3 66.6
; 150 : 66.9 67.2 67.5 67.8 68.1 68.4 68.8 69.1 69.4 69.7
; 160 : 70.0 70.3 70.6 70.9 71.3 71.6 71.9 72.2 72.5 72.8
; 170 : 73.1 73.4 73.8 74.1 74.4 74.7 75.0 75.3 75.6 75.9
; 180 : 76.3 76.6 76.9 77.2 77.5 77.8 78.1 78.4 78.8 79.1
; 190 : 79.4 79.7 80.0 80.3 80.6 80.9 81.3 81.6 81.9 82.2
; 200 : 82.5 82.8 83.1 83.4 83.8 84.1 84.4 84.7 85.0 85.3
; 210 : 85.6 85.9 86.3 86.6 86.9 87.2 87.5 87.8 88.1 88.4
; 220 : 88.8 89.1 89.4 89.7 90.0 90.3 90.6 90.9 91.3 91.6
; 230 : 91.9 92.2 92.5 92.8 93.1 93.4 93.8 94.1 94.4 94.7
; 240 : 95.0 95.3 95.6 95.9 96.3 96.6 96.9 97.2 97.5 97.8
; 250 : 98.1 98.4 98.8 99.1 99.4 99.7 100.0
> Is the formula simply scaling the MAP counts into a more
> usable range?
Yup, they are throwing away the hard vacuum portion and the boost
portion of the MAP sensor range. For the second table, notice what the
KPa values are for 0, 16, 32, 48 and etc. Now think about how the table
lookup subroutine works. Now go and label the columns/rows of your
tables. Don't wear out your zero key...
[Heh, heh - I'm now waiting for you to find the MAP to vacuum conversion
code. It will really throw you for a loop.]
--
Ludis Langens ludis (at) cruzers (dot) com
Mac, Fiero, & engine controller goodies: http://www.cruzers.com/~ludis/
More information about the Diy_efi
mailing list