Pages: [1] 2 3 ... 7
Author Topic: True ME7.5 Speed Density  (Read 74680 times)
noice
Newbie
*

Karma: +16/-3
Offline Offline

Posts: 23


« on: April 13, 2020, 01:33:13 PM »

Hello mah dudes, trying to staying sane during all this shit that is going on right now I decided to revisit a project that I always wanted to see running: True VAG ME7.5 speed density. The simplest way for this, is to read the pressure into the intake manifold and write it to ps_w.

First thing: Yeah, I have a MAP in the intake.

The shitbox I am working on is a 2001 S3 8L with a HKS2835 (GT3071R with a T2 housing) and I am using the 8N0906018AH/360322 software.

I will be using the rear 02 sensor for interfacing with the MAP.

I will post all the development I did so far for you guys to criticize, none of this software had been tested on a running engine, but everything works fine on the bench. Attached to this post are the modified bin and a damos for this software version.

So, we need to read the voltage from the ADC pin, filter this shit, converter it to a pressure value and write it to ps_w.

Luckily, Bosch already did most part of the hard work for us in the code of GGDSAS, so I will just copy and paste some shit that I know that works and modify it a little bit. The function located @8A1C00 converts and filters the signal. The original Bosch function is @8618F8. Call @861A44.

The function @8A1B70 initialize the values when the ECU is started. Call @861874.

For reading the ADC, the function located @8A1A94 is used. Call @822A68.

The function @8A1B00 is needed to zero the accumulator. Call @822920.

For copying the values to ps_w, I modified the bgsrm-bps function in the original code. We also need to calculate dpsfg_w if we want to keep BGRLP enabled. I also modified the call to bgsrm-bps (located @822920) to land at the right place.

I am currently waiting for some parts to make my shitbox run again, as soon as they arrive, I will test this file on the car.

If someone want to port it to the 2.7t bin to speed up the development, I will gladly help. However, I will not spoon-feed you.
Logged
nyet
Administrator
Hero Member
*****

Karma: +607/-168
Offline Offline

Posts: 12268


WWW
« Reply #1 on: April 13, 2020, 02:09:26 PM »

Thanks for this, and thanks for titling the thread "speed density" and not "MAFless".
Logged

ME7.1 tuning guide
ECUx Plot
ME7Sum checksum
Trim heatmap tool

Please do not ask me for tunes. I'm here to help people make their own.

Do not PM me technical questions! Please, ask all questions on the forums! Doing so will ensure the next person with the same issue gets the opportunity to learn from your ex
fknbrkn
Hero Member
*****

Karma: +185/-23
Offline Offline

Posts: 1454


mk4 1.8T AUM


« Reply #2 on: April 13, 2020, 02:28:11 PM »

Thanks for this, and thanks for titling the thread "speed density" and not "MAFless".
Why are you so triggered with the mafless word?  Cheesy
Logged
Gonzo
Sr. Member
****

Karma: +21/-30
Offline Offline

Posts: 483


« Reply #3 on: April 13, 2020, 04:26:47 PM »

Thanks for this, and thanks for titling the thread "speed density" and not "MAFless".
I am going to type MAFless just so when people search for MAFless, this thread comes up. I would never use the word MAFless to annoy anyone, I swear.
Logged
adam-
Hero Member
*****

Karma: +124/-33
Offline Offline

Posts: 2179


« Reply #4 on: April 14, 2020, 01:16:14 AM »

Fuckin' mint!
Logged
prj
Hero Member
*****

Karma: +1072/-480
Offline Offline

Posts: 6035


« Reply #5 on: April 14, 2020, 08:14:26 AM »

Filtering needs to be a 3d map with high delta breakout from it.
Sampling needs to be crank sync due to pulsations...

And some other things. I guess you'll get there when you actually try.
Logged

PM's will not be answered, so don't even try.
Log your car properly - WinOLS database - Tools/patches
noice
Newbie
*

Karma: +16/-3
Offline Offline

Posts: 23


« Reply #6 on: April 14, 2020, 02:20:35 PM »

Filtering needs to be a 3d map with high delta breakout from it.
Sampling needs to be crank sync due to pulsations...

And some other things. I guess you'll get there when you actually try.

I wrote this code a long time ago and never figured out how to make it sample cranck sync. Today I realized that it was simples than ever: ps_w calculation is already running in the sync raster, so if I sample the ADC at this point, its done.

Is it simple as that or am I overlooking something?



Logged
noice
Newbie
*

Karma: +16/-3
Offline Offline

Posts: 23


« Reply #7 on: April 15, 2020, 06:07:14 PM »

Figured how to read the ADC whenever I want (if channel injection mode is enabled):

Code:
seg003:000A1CB2                 bclr    ADCRQ
seg003:000A1CB4                 mov     r5, #7000h
seg003:000A1CB8                 mov     word_F0A0, r5
seg003:000A1CBC                 bset    ADCRQ
seg003:000A1CBE
seg003:000A1CBE loc_8A1CBE:                             ; CODE XREF: seg003:loc_8A1CBEj
seg003:000A1CBE                 jnb     ADEIR, loc_8A1CBE
seg003:000A1CC2                 bclr    ADEIR
seg003:000A1CC4                 mov     r4, word_F0A0
seg003:000A1CC8                 and     r4, #3FFh
seg003:000A1CCC                 mov     word_FA54, r4

#7000h is the ADC channel that i am interested, F0A0 is the ADDAT2 register and FA54 is free RAM.

I already wrote an attempt to read the MAP synchronous, I think I can make my car runs tomorrow for testing this.
Logged
noice
Newbie
*

Karma: +16/-3
Offline Offline

Posts: 23


« Reply #8 on: April 15, 2020, 06:11:13 PM »

Forget to mention: The conversion time is under 5μs, so we shouldn't have problems waiting for the ADC with that jnb instruction, but if necessary, I (think I) have solution for this.

For filtering, I think a simple lowpass filter will be enough. I mean, its good for the MS6, so...
« Last Edit: April 15, 2020, 06:27:04 PM by noice » Logged
prj
Hero Member
*****

Karma: +1072/-480
Offline Offline

Posts: 6035


« Reply #9 on: April 16, 2020, 05:08:14 AM »

It's not good enough, unless you want to spend half your life re-tuning ESUK from scratch.
Also, because it runs crank-sync the rate of you filtering depends on RPM...
Logged

PM's will not be answered, so don't even try.
Log your car properly - WinOLS database - Tools/patches
woj
Hero Member
*****

Karma: +43/-3
Offline Offline

Posts: 500


« Reply #10 on: April 16, 2020, 11:39:47 AM »

Couple of cents from me. First, can't you really find a spare ADC input on your ECU? On my ME7.9.10 I found and tested one spare linear ADC 0-5V channel connected to the "outside", and two with bias resistors for temperature sensors (yes, I know these are pretty much useless for MAP).

Pulsations  - I never actually studied how my factory speed-density ECU samples the MAP sensor, not too difficult to look it up though. And in all other ECUs I worked with I did not pay attention either, just assumed it's done right, but... on my previous car the MAP sensor was mounted external to the manifold and had a physical dumper on the vacuum / boost connection line. I experimented with removing that dumper a couple of times, and there were clearly differences in the signal that the ECU was receiving. So perhaps, just perhaps, there could be a physical solution in your case?
Logged
noice
Newbie
*

Karma: +16/-3
Offline Offline

Posts: 23


« Reply #11 on: April 16, 2020, 04:03:37 PM »

It's not good enough, unless you want to spend half your life re-tuning ESUK from scratch.

Good info.

Do you mind sharing your filter implementation? Not asking for the code or anything like that, only a simple model or even type of filter.

Also, because it runs crank-sync the rate of you filtering depends on RPM...

Yes, its is linear dependent with nmot. We can calculate it very easily on the fly using a cte or even use a 2D lookup for being capable of tunning the "center" of it.

Logged
noice
Newbie
*

Karma: +16/-3
Offline Offline

Posts: 23


« Reply #12 on: April 16, 2020, 04:07:41 PM »

Couple of cents from me. First, can't you really find a spare ADC input on your ECU? On my ME7.9.10 I found and tested one spare linear ADC 0-5V channel connected to the "outside", and two with bias resistors for temperature sensors (yes, I know these are pretty much useless for MAP).

There is probably a spare port on the ECU, but there is no difference in doing this, only extra work.

Pulsations  - I never actually studied how my factory speed-density ECU samples the MAP sensor, not too difficult to look it up though. And in all other ECUs I worked with I did not pay attention either, just assumed it's done right, but... on my previous car the MAP sensor was mounted external to the manifold and had a physical dumper on the vacuum / boost connection line. I experimented with removing that dumper a couple of times, and there were clearly differences in the signal that the ECU was receiving. So perhaps, just perhaps, there could be a physical solution in your case?

Can you post the disassembly of the ADC been read and the filtering process?

Can you post your bin? Do you have a DAMOS/A2L for it?  Grin
Logged
prj
Hero Member
*****

Karma: +1072/-480
Offline Offline

Posts: 6035


« Reply #13 on: April 17, 2020, 08:52:50 AM »

Couple of cents from me. First, can't you really find a spare ADC input on your ECU?
Why would you need a spare ADC when the MAF ADC is perfectly good to use?
Rear o2 sensor is pretty dumb too.
Logged

PM's will not be answered, so don't even try.
Log your car properly - WinOLS database - Tools/patches
noice
Newbie
*

Karma: +16/-3
Offline Offline

Posts: 23


« Reply #14 on: April 17, 2020, 11:22:52 AM »

Why would you need a spare ADC when the MAF ADC is perfectly good to use?
Rear o2 sensor is pretty dumb too.

Why dumb if the original loom reach the sensor and have the same pin as the new connector? Just need to repin a single wire in the ECU connector for supplying 5V and its all good to go.
Logged
Pages: [1] 2 3 ... 7
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Page created in 0.051 seconds with 18 queries. (Pretty URLs adds 0.00099999999999999s, 0q)