Login Register

Vida CEM swapping

A mid-size luxury crossover SUV, the Volvo XC90 made its debut in 2002 at the Detroit Motor Show. Recognized for its safety, practicality, and comfort, the XC90 is a popular vehicle around the world. The XC90 proved to be very popular, and very good for Volvo's sales numbers, since its introduction in model year 2003 (North America). P2 platform.
Post Reply
WhizzMan
Posts: 33
Joined: 21 February 2021
Year and Model: 2001 XC70
Location: Göteborg
Has thanked: 8 times
Been thanked: 2 times

Re: Vida CEM swapping

Post by WhizzMan »

dikidera wrote: 27 Dec 2023, 07:21 My ECM is Denso, I can't say for certain as I have no prior tuning experience and I just dived in deep, but the car is using I believe the load model, most tables are based on Load. And load changes based on the throttle plate and various other things. The calculations are complex and really beyond me as there are two or three different methods used, there is load based on both map and maf, or just the map. I haven't studied their relationship.
I may be wrong here, but I believe the Denso ECU uses a torque request based algorithm. The position of your throttle pedal is your input, some parameters like engine RPM, vehicle speed, selected gear, engine temperature and such can be of influence of the actual torque the engine is requested to produce.

Having said that, a certain load at a certain RPM will produce a known torque output. This will obviously mean that the internal calculations in the ECU will use load in a lot of it's calculations.

The table you posted does not look like an ignition timing table to me. If it was that, it would have low numbers for higher RPMs and full load and higher numbers for low load and/or low rpm. Explanation: The more filling with A/F mixture there is in the cylinder, the faster the mixture will burn and the less ignition advance it will need to produce peak pressure at the right crank angle. The relationship to RPM is that if you ignite too early, you will get pinging (detonation) at high fill rates. Because of that, you will be limited to having the ignition occur later than one that produces peak pressure at the optimal angle. In engine design and tuning this is a trade off between compression factor, octane rating, RPM and such. In practice all modern atmospheric street engines have a timing setup that works this way. I have no idea what this table is for but it may be a correction table or something that relates load and RPM to injector open time if I were to guess.

vtl
Posts: 4724
Joined: 16 August 2012
Year and Model: 2005 XC70
Location: Boston
Has thanked: 114 times
Been thanked: 605 times

Post by vtl »

WhizzMan wrote: 15 Jan 2024, 01:38 I may be wrong here, but I believe the Denso ECU uses a torque request based algorithm.
I think they all are. Those with drive-by-wire throttles.

dikidera
Posts: 1304
Joined: 15 August 2022
Year and Model: S60 2005
Location: Galaxy far far away
Has thanked: 67 times
Been thanked: 175 times

Post by dikidera »

WhizzMan wrote: 15 Jan 2024, 01:38
dikidera wrote: 27 Dec 2023, 07:21 My ECM is Denso, I can't say for certain as I have no prior tuning experience and I just dived in deep, but the car is using I believe the load model, most tables are based on Load. And load changes based on the throttle plate and various other things. The calculations are complex and really beyond me as there are two or three different methods used, there is load based on both map and maf, or just the map. I haven't studied their relationship.
I may be wrong here, but I believe the Denso ECU uses a torque request based algorithm. The position of your throttle pedal is your input, some parameters like engine RPM, vehicle speed, selected gear, engine temperature and such can be of influence of the actual torque the engine is requested to produce.

Having said that, a certain load at a certain RPM will produce a known torque output. This will obviously mean that the internal calculations in the ECU will use load in a lot of it's calculations.

The table you posted does not look like an ignition timing table to me. If it was that, it would have low numbers for higher RPMs and full load and higher numbers for low load and/or low rpm. Explanation: The more filling with A/F mixture there is in the cylinder, the faster the mixture will burn and the less ignition advance it will need to produce peak pressure at the right crank angle. The relationship to RPM is that if you ignite too early, you will get pinging (detonation) at high fill rates. Because of that, you will be limited to having the ignition occur later than one that produces peak pressure at the optimal angle. In engine design and tuning this is a trade off between compression factor, octane rating, RPM and such. In practice all modern atmospheric street engines have a timing setup that works this way. I have no idea what this table is for but it may be a correction table or something that relates load and RPM to injector open time if I were to guess.
That ignition map is wrong, it took me a while but I fixed it properly now. it needed to be corrected by subtracting 30 instead of just 10 I had.
Image. I have verified my correction using OBD2 in fact it's where I dug when I discovered my issue.

This is just one of many that depend on many conditions such as VVT advancement, startup time, gear level pos i.e idling and whether I am using bi-fuel mode or not. This one specifically I am not sure.

Now the throttle maps took me very long to find this out but I followed on a lot of code until I found that the values from the throttle maps are multiplied by 0.07999 and represents air mass or more specifically throttle open area.

Image

There is code in the ecu to convert air mass in g/s to torque, but yeah this map which is what is most changed in 170->140hp detune is in g/s. The formula in DHA for Throttle Open Area is 5240/65535.
However one interesting tidbit is that the resultant value is added to by some ETM/ETS compensation, but the foruma in there is there is shown as 640/65535, so it is weird that two air masses have different factors.

Well we know that 170hp has more or less peak airflow of 136g/s(logged by people from other forums) fairly close to the 138,9 in the map. We know that 170hp * 0,8 VE = 136g/s
Of course before the final value is passed to the actual air mass -> throttle percentage there are some changes. When the TCM is shifting it sends a torque limit request to the ECU in nm yes, but this is converted to air mass and from what I saw it was a fairly large and complex function and I had no use reverse engineering the algorithm.
However this air mass also seems to affect fueling.

One very interesting thing is that BSR change these maps very absurd values like 342g/s, firstly the engine can never flow this much air, That is like 300+ hp or something like that. Secondly the throttle cannot possibly open more than 100%.

I tried tracing how the value which is very high affects other parts of the calculations and the only possible thing was indirect control of fueling.

And here is the BSR map

Image
Last edited by dikidera on 15 Jan 2024, 07:47, edited 2 times in total.

vtl
Posts: 4724
Joined: 16 August 2012
Year and Model: 2005 XC70
Location: Boston
Has thanked: 114 times
Been thanked: 605 times

Post by vtl »

emericaz wrote: 14 Jan 2024, 09:46 I tried like this
How do you check if you got the pin right?

emericaz
Posts: 10
Joined: 5 January 2024
Year and Model: 2003 S60
Location: Hungary

Post by emericaz »

vtl wrote: 15 Jan 2024, 07:40
emericaz wrote: 14 Jan 2024, 09:46 I tried like this
How do you check if you got the pin right?
I’m using T5Luke’s tool for uploading.
I have to save the dump after i swapped the bytes and upload, or i only need the swapped bytes pasted in the tool?

vtl
Posts: 4724
Joined: 16 August 2012
Year and Model: 2005 XC70
Location: Boston
Has thanked: 114 times
Been thanked: 605 times

Post by vtl »

emericaz wrote: 15 Jan 2024, 07:47 I’m using T5Luke’s tool for uploading.
I have to save the dump after i swapped the bytes and upload, or i only need the swapped bytes pasted in the tool?
There's 4 known shuffles: https://github.com/vtl/volvo-cem-cracke ... er.ino#L62 CPU can have 2 endianness (i.e. need to swap bytes for viewing them on x86 CPU or not). 8 possible pin byte orders in total. The right one can be found in under 5 minutes.

emericaz
Posts: 10
Joined: 5 January 2024
Year and Model: 2003 S60
Location: Hungary

Post by emericaz »

vtl wrote: 15 Jan 2024, 07:52
emericaz wrote: 15 Jan 2024, 07:47 I’m using T5Luke’s tool for uploading.
I have to save the dump after i swapped the bytes and upload, or i only need the swapped bytes pasted in the tool?
There's 4 known shuffles: https://github.com/vtl/volvo-cem-cracke ... er.ino#L62 CPU can have 2 endianness (i.e. need to swap bytes for viewing them on x86 CPU or not). 8 possible pin byte orders in total. The right one can be found in under 5 minutes.
Tried it but im dumb for this. I have to swap the bytes before shuffle,right?
Attachments
Képernyőkép 2024-01-15 172132.png
Képernyőkép 2024-01-15 172132.png (8.74 KiB) Viewed 673 times

vtl
Posts: 4724
Joined: 16 August 2012
Year and Model: 2005 XC70
Location: Boston
Has thanked: 114 times
Been thanked: 605 times

Post by vtl »

Code: Select all

straight:
0  1  2  3  4  5
55 29 58 70 51 68


{ 0, 1, 2, 3, 4, 5 }
55 29 58 70 51 68

{ 3, 1, 5, 0, 2, 4 }
70 29 68 55 58 51

{5, 2, 1, 4, 0, 3}
68 58 29 51 55 70

{ 2, 4, 5, 0, 3, 1}
58 51 68 55 70 29



swap16:
 0  1  2  3  4  5
29 55 70 58 68 51

{ 0, 1, 2, 3, 4, 5 }
29 55 70 58 68 51

{ 3, 1, 5, 0, 2, 4 }
58 55 51 29 70 68

{5, 2, 1, 4, 0, 3}
51 70 55 68 29 58

{ 2, 4, 5, 0, 3, 1}
70 68 51 29 58 55

emericaz
Posts: 10
Joined: 5 January 2024
Year and Model: 2003 S60
Location: Hungary

Post by emericaz »

vtl wrote: 15 Jan 2024, 10:56

Code: Select all

straight:
0  1  2  3  4  5
55 29 58 70 51 68


{ 0, 1, 2, 3, 4, 5 }
55 29 58 70 51 68

{ 3, 1, 5, 0, 2, 4 }
70 29 68 55 58 51

{5, 2, 1, 4, 0, 3}
68 58 29 51 55 70

{ 2, 4, 5, 0, 3, 1}
58 51 68 55 70 29



swap16:
 0  1  2  3  4  5
29 55 70 58 68 51

{ 0, 1, 2, 3, 4, 5 }
29 55 70 58 68 51

{ 3, 1, 5, 0, 2, 4 }
58 55 51 29 70 68

{5, 2, 1, 4, 0, 3}
51 70 55 68 29 58

{ 2, 4, 5, 0, 3, 1}
70 68 51 29 58 55
I tried it all, im using cemtool with clone dice. I tried with key in pos0/pos2. Do i need to disconnect dice between tries?

vtl
Posts: 4724
Joined: 16 August 2012
Year and Model: 2005 XC70
Location: Boston
Has thanked: 114 times
Been thanked: 605 times

Post by vtl »

I've never seen "cemtool". Is it what you can use with P2?

Post Reply
  • Similar Topics
    Replies
    Views
    Last post