Jump to content
Mopar1973Man.Com LLC
  • Welcome To Mopar1973Man.Com LLC

    We are a privately owned support forum for the Dodge Ram Cummins Diesels. All information is free to read for everyone. To interact or ask questions you must have a subscription plan to enable all other features beyond reading. Please go over to the Subscription Page and pick out a plan that fits you best. At any time you wish to cancel the subscription please go back over to the Subscription Page and hit the Cancel button and your subscription will be stopped. All subscriptions are auto-renewing. 

He351ve stand alone Arduino controller code for 2nd Gen Cummins


Recommended Posts

  • 2 weeks later...

Alright version 1.05 is out and downloadable with the orginal link.  

 

biggest changes are better top end responsiveness to keep shaft speeds in check and boost levels up. IE: rather than jumping to large position at above 140k rpm it now walks out slowly.  It also takes into account shaft speed accelleration.  IE if the turbo speed is above 140k but slowing down the turbo won't keep trying to open. If it is above 140k and accel it will open.

 

Also, the lcd has been update to show turbo speeds as 35 k vs 35,000 rpm.  this makes it way easier to read.  I have also changed it so it only updates the shaft speed every 4th time the lcd refreshes.

 

Other updates as in the change log.

Link to comment
Share on other sites

While the current setup is working VERY well, I still think that it could be better if I could read data from the OBDII, event though it is limited it does read, Load, RPM, TPS, and Coolant.  

 

With this device

http://freematics.com/store/index.php?route=product/product&product_id=30 ( could do it myself, but why for 39.99 bucks shipped)

I can read the obd port and import via Serial into the arduino I currently have.  I should be able to tune the turbo better,  Biggest thing is Engine RPM,  seeming as the turbo is driven by exhaust flow, it is hard to tune the turbo to work well at low engine speeds, ( requires the vanes closed more) and have it tuned for high RPMS ( requires vanes be VERY open).  

 

Current issue with watching only the shaft speed, is you need to tune the turbo for the middle, rather than being able to tune for both. 

Link to comment
Share on other sites

So the code will once again split, there will be 3 sets of code.  Boost controlled vane position, Freq controlled vane position, and Freq + OBD controlled position.  

Boost code: vane position is set in normal driving by the boost recorded, IE 5 psi vanes = x 10 psi vanes =10.  Drawback to this mode is it is VERY easy to push the turbo out of it's map in terms of shaft speed.  You also can't really control cruising vane position to allow for a less high strung turbo.  The turbo is always small when at low boost operation IE cruise.  This code is no longer updated, but you can download it and run it if you don't want to use everything needed for the Freq reading ( umax 9924 chip)

Freq Code: Vane position is controlled by turbo shaft speed, TPS and boost are taken into consideration IE: at shaft speed x vane position is x.  Drawback to this is it is hard to tune the turbo.  You can tune it for low engine speed or high, but not really both. The current tune / curve is pretty good for middle of the road, but it's top end tops out about 30psi to keep turbo shaft speeds in check.  This is a result of having to tune the turbo for lower end operation.  This code is no longer updated as of 1.05, it will be downloadable in it's current form and does work very well in DD duty.

Freq + OBD Code: Vane position is controlled by turbo shaft speed, but position is altered by TPS + Boost + Engine RPM.  Biggest advantage to this is that without knowing the engine RPMS you are unable to predict how much exhaust flow is coming from the turbo.  At high engine RPMS the turbo will need to be open more than at low engine rpms even if shaft speeds are identical.  This will make the curve more tune-able for both low end operation and WOT high end operation.  The Torque curve should be VERY flat and you shouldn't have any issues keeping Shaft speeds below 140,000 rpm, while keeping boost near 35-40psi.  This is really the only way in my mind to push the turbo to the limit, while keeping it smoke free at low speeds, without driving the turbo way beyond it's map.  You should be able to push ~400 - 450 hp in a 2nd gen safely. Updates for this code will come as soon as I test out the OBD adapter for the Arduino.  An arduino shield should come in the future to allow for an easier install or DIY.  The OBD adapter you will need is http://freematics.com/store/index.php?route=product/product&product_id=30 and cost $39.90 shipped from aussie land.

Link to comment
Share on other sites

I hope so haha,

 

Yea I got bored again, I made some changes that really helped with the top end and now I want more haha.  

 

currently I am maxing boost at 32ish psi with shaft speeds right at 140,000,  Egt's are right at 1200 at WOT, so there is more to give.   I think if I can read engine rpm ( why I am goign with OBD) I can keep the bottom end I have right now, or improve slightly, while opening up the top some.  

 

Currently you get to 30ish psi and vanes open to keep shaft speeds in check, but it opens too much and you don't have the drive pressure to keep building. however I am struggling to be able to find a good curve that doesn't overreact due once rpms climb.  I can tune it for top end, but then the bottom falls out. 

 

  Right now I am at 1:1 drive to boost at anything over 10psi of boost, so I am really not pushing the turbo hard.    The 6.7 guys push their turbo harder in stock form haha.  

Link to comment
Share on other sites

What does holset rate the turbo to135k ish? I would think you could get the drive up by keeping the vanes small that should really spin the turbo and to keep the drive a but higher should really help out the boost to. Wonder what the 6.7 guys spin the turbo to in modded form? They have to be above the 140 mark. I just got my turbo on my 4bt have g issues with the speed sensor so I can update ya to with what I find by playing around. 

Link to comment
Share on other sites

the super hx40 is the same compressor wheel as the he351 turbos.   

 

I know my turbo has seen 160,000 rpm with the boost code.  Looking at the VERY lame turbo made holset gave us for the turbo I am not worried about 140,000, but I would like to see better control on the top end.  The turbo likes to slingshot from 100,000 to 140,000 in the blink of an eye, so I am thinking with the OBD I can help manage that.

Link to comment
Share on other sites

You already have snow? Yuck! Did it sound like a big rig? Haha its a safety measure can't get on it and cause a spin out.

 I have been making test passes in the rain. :)

 I'm having an issue with the speed sensor reading. At the moment I have tried wiring the chip up as a1 and a2 mode and exactly as you layer it out on pg 14 hopefully correctly per the diagrams on maxim. It will not read any rpm. The circuit to the turbo is good. 

If I hook up just the speed sensor sorry +wire into 8 port it will read a turbo speed. I have #1 as the port with the little dimple on the chip. 20151117_134039.jpg

Link to comment
Share on other sites

Any progress? 

 

 

as for me,

 

Warmup has been added to the OBD code. 

Trigger

if (TPS == 0 && ECT < 60) {Warmup_mode = true;} else {Warmup_mode = false; }

I don't know how I will deal with off throttle Decel when coolant is low.  I might need to bring Truck speed into the code too lol.

Warmup

 /////////////////////WarmUp//////////////////////////////////
 //Manages the vanes during Warmup
void WarmupManage() {
   if (IAT == 12 || IAT == 13 ||IAT == 14){
      if ( EngineRPM > 1000) {
      constrain(vane_position, 918, 960);
      vane_position += .05;
      if (vane_position > 940) {vane_position = 800;}
    }
    else{vane_position = last_vane_position - 10;}
   }
    
    else if (IAT == 22 || IAT == 23 || IAT == 24){
      vane_position = 960;
     }
    else {vane_position = 1000;}
   // }
  }

 

 

Another cool think I can do with the arduino is tell what gear I am in by the speed vs rpm. not sure what I can do with that, but I might come up with something.

 

Position code has been cleaned up some.  I have moved the TPS_range variable to a overall position below, rather than on EVERY calc.  Same goes for the new RPM variable.  turbo limit has been reduced to 140,000 rpm vs 145,000

/*  This code is put in place to control an HE351ve turbo using Turbo RPM and other inputs.
 *   
 *  Sections of this code, including but not limited to the rpm based vane position calculations, Freq Measure, and 
 *  Timer setup are thanks to Curtis R Hacker at lilbb.com and his RPM based HE351vgt arduino shield.
 *  
 *  This work is licensed under the 
 *  Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
 *  To view a copy of this license,
 *  visit http://creativecommons.org/licenses/by-nc-sa/4.0/.
 */

/////////////////////////////POS Manage////////////////////////////////////////
void PosManage() {
      if (turbo_rpm <= curve_rpm[4]) {
        if (ThrottlePosition < 3) {  // Idle Section
          if (turbo_rpm > BarkRpm) {AntiBark = true; vane_position = min_position;} else {AntiBark = false;} // this will slap the vane positon wide open if turbo is above barkrpm and TPS is below 3
            if(turbo_rpm <= idle_rpm) {  //if tps is below 3 and turbo rpm is below idle rpm post is idle position
             vane_position = idle_position;
             idle_walkdown_mode = false;
          } else {
            if (turbo_rpm <= idle_walkdown_rpm) { idle_walkdown_mode = true;} else { idle_walkdown_mode = false; }  //idle walk down walks the turbo position to idle position slowly.
            if (idle_walkdown_mode) { vane_position = idle_position - two_cm;}  
                        
          }
        }else {  AntiBark = false;
          // -----
          // Curve section
          if (curved){  // if in curved , cruise mode, the turbo will not do a map unless starting from a stop.  Otherwise it jut jumps to a position,  65mpg cruise turbo rpm should hang around 35,000 which puts the turbo at 14cm
                 if (turbo_rpm <= curve_rpm[0]) { vane_position = constrain(map(turbo_rpm, idle_rpm , curve_rpm[0], Offidle_position, turbo_curve[0]), Offidle_position, turbo_curve[0]);} // This will snap the vanes from idle position to starting position whne tps sense. 
            else if (turbo_rpm <= curve_rpm[1]) { vane_position = turbo_curve[0];}  //this is the high end mapping of the turbo.
            else if (turbo_rpm <= curve_rpm[2]) { vane_position = turbo_curve[1];}  //this is the high end mapping of the turbo.
            else if (turbo_rpm <= curve_rpm[3]) { vane_position = turbo_curve[2];}  //this is the high end mapping of the turbo.
            else { vane_position = turbo_curve[3];}  
          }
          else{
                 if (turbo_rpm <= curve_rpm[0]){
                    if ( ThrottlePosition < 20) { vane_position = constrain(map(turbo_rpm, idle_rpm , curve_rpm[0], Offidle_position, turbo_curve[0]), Offidle_position, turbo_curve[0]);} // This will snap the vanes from idle position to starting position whne tps sense. 
                    else { vane_position = turbo_curve[0];} // This will snap the vanes from idle position to starting position whne tps sense. 
                  }                 
            else if (turbo_rpm <= curve_rpm[1]) { vane_position = map(turbo_rpm, curve_rpm[0], curve_rpm[1], turbo_curve[0], turbo_curve[1]);}  //this is the high end mapping of the turbo.
            else if (turbo_rpm <= curve_rpm[2]) { vane_position = turbo_curve[1];}  //this is the high end mapping of the turbo.
            else if (turbo_rpm <= curve_rpm[3]) { vane_position = map(turbo_rpm, curve_rpm[2], curve_rpm[3], turbo_curve[1], turbo_curve[2]);}  //this is the high end mapping of the turbo.
            else { vane_position = map(turbo_rpm, curve_rpm[3], curve_rpm[4], turbo_curve[2], turbo_curve[3]);}  //this is the high end mapping of the turbo.
          }
        }
      } else if (turbo_rpm < lit_rpm) { AntiBark = false;
          vane_position = map(turbo_rpm, curve_rpm[4], lit_rpm, turbo_curve[3], turbo_curve[4]);}//- TPS_range was put into place to open the vane more if throttle input was higher while boost is low

/////////////////This is the top end controls.  The turbo really does increase rpms VERY quickly the trick to to find the sweet spot where rpms stay steady at wot.       
////////////////
       else {
        AntiBark = false;
        
        if (curvea){  //end pos of 18cm starts 12 cm
                 if (turbo_rpm <= 120000) { vane_position = 584;}  //************************ the 6.7 logs we have show the turbo jumping to positions when at WOT rather than stepping.
            else if (turbo_rpm <= 126000) { vane_position = 540;}
            else if (turbo_rpm <= 132000) { vane_position = 500;}    //************************ this will jump to a higher position at given rpms on the top end to slow the turbo down.
            else if (turbo_rpm <= 140000) { vane_position = 420;}
        }// according to holset the turbo is balanced to 130,000 rpm.  
        
        if (curveb){  //End pos of 16cm start 11cm
                 if (turbo_rpm <= 120000) { vane_position = 645;} //************************
            else if (turbo_rpm <= 126000) { vane_position = 624;}
            else if (turbo_rpm <= 132000) { vane_position = 600;} //************************
            else if (turbo_rpm <= 140000) { vane_position = 502;}         
        }
        
        if (curvec){  //End pos of 14cm 456 start 10cm
                 if (turbo_rpm <= 120000) { vane_position = 700;} //************************
            else if (turbo_rpm <= 126000) { vane_position = 685;} //************************
            else if (turbo_rpm <= 132000) { vane_position = 640;} //************************  
            else if (turbo_rpm <= 140000) { vane_position = 544;}
            
          }
        
        if (curved){  //End pos of 17cm  start 16cm
                 if (turbo_rpm <= 120000) { vane_position = 458;} //************************
            else if (turbo_rpm <= 128000) { vane_position = 416;} //************************
        }

        if (turbo_rpm > curve_rpm[3]) {vane_position -= TPS_range;}
        if (turbo_rpm > curve_rpm[4]) {vane_position -= RPM;}
        if (turbo_rpm > 110000) {
          if (turbo_accel[2] > 60) { vane_position -= 10; }
          if (turbo_accel[2] > 90) { vane_position -= 10; }
          
        } 
        // Overrun protection
      if (turbo_rpm > 140000 ){  // 140,000 rpms is where I get worried about shaft speed.  
        if (turbo_accel[2] > 0 && BoostPressure > 25) {vane_position = last_vane_position - 2;}         //this will creep the vane position more open each code cycle if turbo rpms are above 150,000 if not in curvea ( perf mode defined by "F_watchpot" tab) 
        else if (turbo_accel[2] > 0 && BoostPressure < 25) {vane_position = last_vane_position - 1;}
        else {vane_position = last_vane_position;}
      } 
      if (turbo_rpm > 155000) {
        vane_position -=10;
      }
      if (turbo_rpm > 160000) {
        vane_position -=40;
      }
      
   }
}

To be able to use Engine RPMs I have mapped the reading ( 0, 3200, 0, 80) So at 0 rpm the turbo adjustment is 0 and at 3200 ppm adjustment is 80 or about 2 cm.

int ReadEngineRPM(){
if (obd.read(PID_RPM, EngineRPM));
  return map(EngineRPM, 0, 3200, 0, 80);                    // read the value from the sensor I am mapping the rpms to give a reasonable vane adjustment without having to divide later.
}

 

 

Not sure if I like that yet, but I can't really see a need to not have it mapped.  Mapping it allows me to not do a bunch of dividing in the code, which I guess is slow lolol.  

Link to comment
Share on other sites

Why only one VGT :devillook: It would be pretty easy to do a 451 or 551 over 351 twin setup.... pointless but cool.

 

Issue with the 351 in a twin setup is you really need an external gate since the turbo doesn't have one.  It relies on the large housing, but the turbine is still smallish, as a wastegate.  I can spool the turbo even with the housing set to 25cm^2 with my fueling mods. I don't know you could flow enough through the housing to really get a large turbo going before you ran into a bottle neck.

 

I think carl makes a 475 kit or something similar.

 

Those are my thoughts.

Edited by Me78569
Link to comment
Share on other sites

×
×
  • Create New...