rnd-ash / ultimate-nag52-fw

Ultimate NAG52 firmware repository
GNU General Public License v3.0
46 stars 21 forks source link

Completely change shift code to that of how EGS52 works #24

Closed rnd-ash closed 2 years ago

rnd-ash commented 2 years ago

This is a big PR, and will help with #14 and #3.

Brief

Our old shift code selected a PWM value for a SPC and MPC solenoid from a linear table, then ramped down SPC PWM at a desired rate which was calculated at the time of shift.

This new code introduces the following

  1. Mapping tables from EGS52 TCU which map PWM to Pressure in mBar
  2. Hold times for clutch filling, as originally designed into the OEM TCU by Mercedes and Simens

The shift process now works like this:

  1. Gauge shift speed and what the car is doing

  2. Select pressures from various tables in PM class, and also select solenoid ramp times for each of the stages

    • Bleed phase - SPC line is reduced to min pressure
    • Fill phase - The clutch packs are to be filled with ATF at very low pressure to remove any air
    • Lock phase - Clutch pressure is increased a bit more to 'lock' them into place to prevent any slip
    • Torque phase - New clutches start to bite, allowing them to take the torque of the old clutches
    • Overlap phase - Transition between new and old clutches occurs
    • Max pressure phase - New clutches are locked into place, and switches over to line pressure
  3. The special shift reporter data capture system. Each shift is logged with up to 1000 data points, it can be retrieved using the PC config application, but I plan on using the captured data for the TCU to figure out itself if the gearbox flared or shifted too hard, and thus modify the pressure and/or timing of each of the 6 aforementioned pressure phases as an adaptation system!