Announcement

Collapse
No announcement yet.

speed density code & function

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • speed density code & function

    i recently managed to port the speed density code from PRJmod over into a 3B ECU with success to some extent. the car does start run and idle with MAF unplugged along with no MAF related fault codes. i changed up some things in the 3B code so the ECU only references 1 timing table and 1 lambda table because the ECU is equipped with multiple of each table by default. i than replaced one of the lambda tables by turning it into a VE table and added the IAT compensation table as well. it is just like PRJ's code. MAP sensor is input on AN5 just like the later ECU as well. the only real difference at the moment is that im running a motorola MPXH6300 MAP sensor and i know that the original code was setup for MPXH6400 sensors so the scaling is slightly different. i realized that the table at 0xB500 plays a major role in either the linearization of the MAP sensor or it has something to do with the transient state of fueling. over all the issue im having is that my motorola 300KPA sensor seems to trace around 200KPA when the car is at idle so i assume i have an error somewhere in the code function or something is interfering with the input on AN5. the circuit for AN5 in 3B is practically identical to the the AAN ECU so removing R660 is a must. slightly puzzled with the high reading of the MAP sensor and im hoping someone else has an understanding of the SD code and can help correct the issue.
    "The really good drivers got the bugs on the side windows." Walter Röhrl

  • #2
    no one? still looking at 0xB500 as it it read by DPTR directly after the ADC input is read. FVCO is the actual MAF value in RAM. would really like to know if this is MAP sensor linearization mapping or not because it is definitely being read when traced with ostrich emulator and if you mess with the values in that table the car gets very unhappy.
    Code:
    code:00000130 E5 D9                    mov     A, ADDAT        ; Move MAP sensor signal to A
    code:00000132 F8                       mov     R0, A           ; Move MAP sensor signal from A to register 0
    code:00000133 90 B5 00                 mov     DPTR, #code_B500 ; Read from table
    code:00000136 93                       movc    A, @A+DPTR      ; table value+MAP Signal moved into A
    code:00000137 F5 DA                    mov     DAPR, A         ; D/A Converter Program Register
    code:00000139 88 4B                    mov     FVCO, R0        ; Move MAP signal into FVCO
    "The really good drivers got the bugs on the side windows." Walter Röhrl

    Comment


    • #3
      Use MPX6400 or use "Find" in M232 Wiki for "If you use other MAP sensor" how many mods must do. For max $20 this is "madness"!!!

      Originally posted by vwnut8392 View Post
      FVCO is the actual MAF value in RAM.
      - There is no MAF or MAF values in Prjmod!!!!!! Read very carefully in CPU data sheet what is DAPR (not DPTR) (what doing every bit or combination of bits) and what is doing with data from ADDAT. Then and only then you will find what is this map (0xB500 to B5FF) and how precisely Dmitry organized working of his SD mod. Not just one VE map

      Small advice, don't touch this map.

      Best Regards!

      Comment


      • #4
        well i was working on porting the speed density to the 3B ECU and i thought this was the problem because i have an MPXH6300 in my ECU. turned out after i took a break and looked at it again i didnt remove the code for MAF linearization and move the parts to reference the VE table and IAT fueling comp table. once i did that everything fell right into place and it works.
        "The really good drivers got the bugs on the side windows." Walter Röhrl

        Comment


        • #5
          The DAPR B500 story must be a running gag meanwhile ^^

          Comment


          • #6
            only problem i have now is on sharp throttle movements the fueling goes lean for a split second and if the car sits and idles for for like 3 minutes it just decides to go lean and shut off. of course it starts right back up after it shuts off. strange problem.
            "The really good drivers got the bugs on the side windows." Walter Röhrl

            Comment


            • #7
              ORLY

              Well that's why I rewrote the entire acceleration enrichment code to use TPS.

              Except there's no TPS in Fuel/IGN chip on 3B. You're ****ed.

              On 3B just use 10 bit adc for a HFM5 style MAF and be happy or **** with resistors to get the signal in the correct range for the VFC and use stock code.
              Last edited by prj; 30 June 2019, 15:28.
              http://tuner.ee - http://www.facebook.com/tuner.ee

              Comment


              • #8
                Originally posted by d_anev View Post
                Use MPX6400 or use "Find" in M232 Wiki for "If you use other MAP sensor" how many mods must do. For max $20 this is "madness"!!!

                - There is no MAF or MAF values in Prjmod!!!!!! Read very carefully in CPU data sheet what is DAPR (not DPTR) (what doing every bit or combination of bits) and what is doing with data from ADDAT. Then and only then you will find what is this map (0xB500 to B5FF) and how precisely Dmitry organized working of his SD mod. Not just one VE map

                Small advice, don't touch this map.

                Best Regards!
                HEHEHEHE

                Yeah, getting 10 bit resolution on MAP sensor is some work.
                I am not sure it was really that important to do it (maybe it would work OK with just 8 bit precision), but I did it because I could. Also they used more precision on the MAF (VFC with 16 bit counter) and also in newer motronics starting with M2.7 they use also more precision for the MAF via ADC.

                First conversion is done with 8bit precision. Then that table is basically precomputed config to lower the range from 0-5V to a lower range. Because this stuff happens in IEX0 it's too expensive (and pointless) to calculate this. After that the lookup is done with 1.25V range, but near the range where first value was read to get 10 bit value.

                There's a lot of smart **** in there that takes a lot of knowledge to fully appreciate ^_^
                Reading the 8051 user manual will help.
                http://tuner.ee - http://www.facebook.com/tuner.ee

                Comment


                • #9
                  Originally posted by prj View Post
                  ORLY

                  Well that's why I rewrote the entire acceleration enrichment code to use TPS.

                  Except there's no TPS in Fuel/IGN chip on 3B. You're ****ed.

                  On 3B just use 10 bit adc for a HFM5 style MAF and be happy or **** with resistors to get the signal in the correct range for the VFC and use stock code.
                  well i did do the HFM5 and it does work, i played with the resistors as you said. i do appreciate the work as well, i wouldnt be messing with it if i didnt find it interesting. i think i seen an early file with 8bit MAP precision as well because it was missing code at hex address 0x0151 so im going to guess that the one you released in your repo is the 10bit precision and the other one i seen is the 8bit precision. i'll look at the TPS functions in your file more and maybe there is a chance to patch in the function from the the later ECU into the older one and make it work. in a round about way you said yourself that all the M2.X are all the same, one version is just more evolved than the other or purposely made for whatever manufacturers engine it was going to run. M2.7 is a very interesting ECU as well, i managed to get a full harness, ECU and all of the sensors from a fiat punto GT. thats hard to come by in the USA lol.

                  "The really good drivers got the bugs on the side windows." Walter Röhrl

                  Comment


                  • #10
                    Originally posted by prj View Post
                    On 3B just use 10 bit adc for a HFM5 style MAF and be happy ....
                    Uhaaa one little sentence give new possible solution there is still something to get out of your sleeve like a magician

                    Comment


                    • #11
                      Originally posted by d_anev View Post

                      Uhaaa one little sentence give new possible solution there is still something to get out of your sleeve like a magician
                      not really trying to do anything special. my 200 20v turbo has a bad MAF and i'd rather just get rid of it completely.
                      "The really good drivers got the bugs on the side windows." Walter Röhrl

                      Comment


                      • #12
                        There was never any 8 bit MAP file, it was 10 bit from the get-go.
                        http://tuner.ee - http://www.facebook.com/tuner.ee

                        Comment


                        • #13
                          Can you say me what resistor du you Change and what hfm5. I think you use the rs4 maf.

                          thanks

                          Comment


                          • #14
                            Is there any news about the HFM5 conversion?
                            408kw @ wheel

                            Comment


                            • #15
                              I take a 80mm HFM5 Sensor for 95€, an a Arduino Nano with ADC additional Bord (with Conectors for the Car Installation, no Cut wire ect. p&p round 50€)
                              an i Convert with the Arduino the Signal to a OEM Sensor. First Test ist run well.

                              Comment

                              Working...
                              X