Results 1 to 15 of 15

Thread: Help with mat related question

  1. #1
    Fuel Injected!
    Join Date
    Aug 2012
    Posts
    386

    Help with mat related question

    I am using mat and am trying to understand why or why not on the following. This is using 6395 pcm, BJKZ bin, $OE mask, advanced $OE TP5 v250 xdf and BJKZ.src. On line $4AF2 it does a calculation where it takes the the mat sensor value and adds 40 to come up with a temp value that is then used in the mat input to the blended temp that is then blended with coolant temp and that result is used as the temp in the sea level density calculations. At least I think that is what happens. I want to be able to manipulate that "+40" number. There is many other scalar/constants/bias that can be manipulated and so think this should be also. So, if it can be changed how would one make the xdf allow that?
    6395, BHDF, 7.4 BBC lightly modded now 6395 BMHM back to BHDF

  2. #2
    Administrator
    Join Date
    May 2011
    Location
    Lakes Region, NH
    Age
    54
    Posts
    3,862
    Something is getting lost in translation. That number is never added to 40 anywhere in the code. It is not "temp plus 40." Instead, it is "temp in degrees C from -40 to 215 divided into 256 increments." Here's why:

    In an eight bit computer number there are eight bits available to represent a number.

    If we assume all of the numbers are positive then we can cover "0" (00000000) to "255." (11111111) That's 256 possible values.

    If we need negative numbers there are two common strategies available. Ones complement and twos complement.

    In ones complement the first bit represents the sign of the number, positive or negative. This limits the range of numbers we can show. Every binary number that starts with 1 is negative and a negative number is obtained by "flipping" the bits of a positive number. So numbers look like this:

    01111111 = 127
    01111110 = 126 ....
    00000010 = 2
    00000001 = 1
    00000000 = 0
    11111111 = -0
    11111110 = -1
    11111101 = -2 .....
    10000001 = -126
    10000000 = -127

    If we use twos complement we also use the first bit to indicate sign. But we can eliminate the clumsy number "negative zero" and simplify math operations as well by changing what's represented:

    01111111 = 127
    01111110 = 126
    01111100 = 125 .....
    00000010 = 2
    00000001 = 1
    00000000 = 0
    11111111 = -1
    11111110 = -2 .....
    10000010 = -126
    10000001 = -127
    10000000 = -128


    Given the range of values typically available to an engine, -40 to 220, it doesn't make much sense to use either ones complement or twos complement numbering to represent temperature. Neither system goes high enough and both systems cover numbers far below the engine's operating range. Unsigned numbers go high enough to cover standard engine operation and more, all the way to an engine melting 491 deg F, far higher than necessary. But they don't cover any negative values. So the numbers can't represent temp "as-is."

    Engineers decided to use unsigned numbers but to "shift" the values by 40 deg C. When the temp sensor voltage is at the bottom end of the range, -40 deg C, the circuitry in the ecm is designed so it will convert that voltage into the value "00000000". From that starting point all temperatures follow.

    00000000 = -40
    00000001 = -39
    00000010 = -38 ...
    00101000 = 0
    00101001 = 1
    00101010 = 2 ....
    11111110 = 214
    11111111 = 215

    When the binary numbers in the left column are converted to decimal numbers, they look like this:

    0 = -40
    1 = -39
    2 = -38 ...
    40 = 0
    41 = 1
    42 = 2 ....
    254 = 214
    255 = 215

    If this seems confusing then it might be easier to use a "container" analogy. Imagine 256 containers, each numbered, from 0 to 255. In the case of MAT the containers are used to hold a temperature value. The lowest temp value is -40 deg. If the lowest temp value is placed in the lowest numbered container, then container number 0 = temp value -40.

    Using this container analogy it should be apparent that actual MAT is 40 degrees lower than the decimal number (the container) the engineers chose to represent it. This is where the "+40" comes into play. All MAT values are 40 degrees lower than the numbers that represent them.

    The 4AF2 table is organized into 17 containers covering "0" through "255" which I believe represent temperatures from -40 to 215. C. I realize the max shown in TP is 192 C but I suspect that's not correct. But the real question now is, what are you trying to do do? If you want to increase the the number of containers available to provide a greater level of adjustment it may be a bit of a task. The easiest way to do it might be to find an unused location in code and make a new table with the desired number of cells then modify the definition file to point to the new table. If that's what you're looking for then it might not be a huge challenge.

  3. #3
    Fuel Injected!
    Join Date
    Aug 2012
    Posts
    386
    Thanks for the in depth reply. I guess where I got off track was every time I recorded mat/CLT/blend/air density and manipulated them the results were as expected even though it was coincidence it looked correct so I thought maybe I was understanding it. As it turns out without a little more control there isn't really much advantage on my mild motor to even bother with mat so will turn it off and move on.
    6395, BHDF, 7.4 BBC lightly modded now 6395 BMHM back to BHDF

  4. #4
    Administrator
    Join Date
    May 2011
    Location
    Lakes Region, NH
    Age
    54
    Posts
    3,862
    I made some corrections to my post for clarity. I do suspect the temp values assigned to each step of the 4AF2 table are not correct which might make adjustments at warm temp tricky. Luckily coolant temp and MAT are often close with a warm engine.

    I believe I have found some areas where a larger table with more steps for finer resolution could be inserted.

  5. #5
    Fuel Injected!
    Join Date
    Aug 2012
    Posts
    386
    In my case my sensor is not in the manifold but in the air cleaner. On what I consider to be my standard day my mat temp shows about 37C, I want the input to the blend to be 85C so that would require an addition of 48C. That was where I was heading but as I said being as I can't get there from here I will just shut mat off.
    6395, BHDF, 7.4 BBC lightly modded now 6395 BMHM back to BHDF

  6. #6
    Fuel Injected! brian617's Avatar
    Join Date
    Apr 2013
    Location
    Arkansas
    Age
    45
    Posts
    711
    Move MAT to the number eight runner in the intake? You'll get cooler readings.
    89 K1500 Scottsdale 5.7L 5spd 3:42 RamJet cam Dart iron TBI heads 427 PCM swap
    95 C2500 Cheyenne 6.5L turbo diesel 4L80e 4:10 DB2-4911 Manual pump conversion 0411 PCM trans control 2Bar COS
    05 Outback XT 2.5L turbo gas auto

  7. #7
    Administrator
    Join Date
    May 2011
    Location
    Lakes Region, NH
    Age
    54
    Posts
    3,862
    Hmmm... the stock TBI air cleaner used a Thermac style heat stove to ensure intake air was at least 90 deg F. Changing the canister or removing the heat tube allowed colder air into the breather. But GM really wanted the intake air to be warm.

    I realize you've already decided to forgo MAT correction, but you can add a resistor to the MAT sensor value to change the temperature reported to the ecm.

  8. #8
    Fuel Injected!
    Join Date
    Aug 2012
    Posts
    386
    I got my mat all working correctly. The change from the mat + 40 is do able. Unfortunately I typed a long detailed entry of the process and the forum dumped it out.
    6395, BHDF, 7.4 BBC lightly modded now 6395 BMHM back to BHDF

  9. #9
    Administrator
    Join Date
    May 2011
    Location
    Lakes Region, NH
    Age
    54
    Posts
    3,862
    Congratulations!

    Did the forum log you out or was it another issue? If you lose a post you can sometimes "restore saved content" to get everything back. That happened to me last night while I was searching for information for an Isuzu application. I have also used notepad to type everything out then copy/paste to put it into the forum.

  10. #10
    Fuel Injected!
    Join Date
    Aug 2012
    Posts
    386
    I think maybe it was just I took too long to type the message. I saw some odd results today. Although I can force the temp I want there appears to be somewhere in the code that doesn't like it when you do that. Will post if I find a cause or solution.
    6395, BHDF, 7.4 BBC lightly modded now 6395 BMHM back to BHDF

  11. #11
    Administrator
    Join Date
    May 2011
    Location
    Lakes Region, NH
    Age
    54
    Posts
    3,862
    In my case my sensor is not in the manifold but in the air cleaner. On what I consider to be my standard day my mat temp shows about 37C, I want the input to the blend to be 85C so that would require an addition of 48C.
    I think I've finally got what you're trying to do. Even though the sensor reads cool air at the breather, you want the ecm to use a warmer temp blend value as it's a better fit based on O2 feedback. Is this right? You can do this by changing the values in the $4AF2 table. So you can turn this:

    Code:
    0
    12
    24
    36
    48
    60
    72
    84
    96
    108
    120
    132
    144
    156
    168
    180
    192
    Into this:
    Code:
    48
    60
    72
    84
    96
    108
    120
    132
    144
    156
    168
    180
    192
    204
    216
    228
    240
    The ecm looks up values based on IAT. At 35 deg C it will use a combination of the 7th and 8th values in the table. At 85 deg C it will use a combination of 11th and 12th values. If the values from 11th and 12th entry are in the 7th and 8th spots, the result of the lookup will be the same as if the IAT was 85 deg C.

  12. #12
    Fuel Injected!
    Join Date
    Aug 2012
    Posts
    386
    Yes that is what I am doing. On that lookup the gm coder has already added the 40 degrees so I only needed to add 8 to what gm had. My water temp runs at 85C. So my goal was at my standard day while driving down the road my water temp used for density calculation would be 85C, my mat temp used for density calculation would be 85C and my inverse density at 85C would be 1.00, therefore at that point there would be no mod to my ve table. Any change up or down from MY standard would bias the ve accordingly.
    6395, BHDF, 7.4 BBC lightly modded now 6395 BMHM back to BHDF

  13. #13
    Administrator
    Join Date
    May 2011
    Location
    Lakes Region, NH
    Age
    54
    Posts
    3,862
    That makes sense. If I remember right you're using an unheated intake? Are you seeing a greater difference than expected when not at steady load and rpm?

  14. #14
    Fuel Injected!
    Join Date
    Aug 2012
    Posts
    386
    I just did a detailed update and the forum shut me out again. Will do a notepad or PM later.
    6395, BHDF, 7.4 BBC lightly modded now 6395 BMHM back to BHDF

  15. #15
    Fuel Injected!
    Join Date
    Aug 2012
    Posts
    386
    Gearhead notes


    While setting mat up using modified 4AF2 I found if you changed all entries of 4AF2 and then saved and reloaded the code would have changed the entries in the inverse density by quite a bit. If you corrected the density table and saved again it would have done changes to 4AF2 but not back to original. At that point I thought maybe I was done. I tried modding 4AF2 and then correcting the density table but leaving the first and last entry to what the code had changed to. That all worked and they saved ok and the two end entries are at extreme temps that I will never see. I have done one drive with the new setup and it seems to follow the outside temp changes. Right now I am blending 50/50 but will experiment with that. I have an unheated intake and have operated down to 24F with no problems.
    6395, BHDF, 7.4 BBC lightly modded now 6395 BMHM back to BHDF

Similar Threads

  1. Having some ignition related issues
    By JeepsAndGuns in forum GM EFI Systems
    Replies: 27
    Last Post: 01-18-2016, 03:40 AM
  2. 454 TBI related items: 54mm TBI, MSD Billet Distro, Edelbrock intake..
    By dubwise in forum Buy - Sell - Trade - Wanted
    Replies: 6
    Last Post: 05-11-2015, 08:41 PM
  3. Other EFI systems and related topics forum
    By Six_Shooter in forum Other EFI systems and related topics
    Replies: 0
    Last Post: 10-25-2011, 07:12 AM
  4. Topic of the Week! Knock Sensor related!
    By EagleMark in forum GM EFI Systems
    Replies: 8
    Last Post: 07-04-2011, 12:13 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •