Breaking the code ... 4L80 or other late model trans -DIY TCM/TCU

Discussion in 'The "Juice Box"' started by black70buick, Dec 25, 2015.

  1. black70buick

    black70buick Well-Known Member

    Greg, I'm probably mentioned this from the other threads but if you are serious about wanting something with a little more control code is provided below. You tell me the logic you want and the variables & thresholds you want. In fact you can purchase the Arduino Uno R3 and a relay board. With the provided code you can "flash" the program or change it as you need.

    I do have my GN with a ~2600 stall and some weirdness on the TCC engagement as well, but I 've not turned my attention to it. If needed I could support any nuances you encounter mimicking a setup with my GN. Up to you, I'm already on a roll with coding and this is not too divergent. Plus we gotta keep Buick representing on the streets. :TU:

    If you want to work on this here are the recommended materials minus the sensors you want to use, box and wiring. If you do want to go ahead with this I'll start a separate thread to provide the means to create these controls for the 200r & 700r TCCs.

    Arduino Uno r3:

    http://www.amazon.com/s/ref=nb_sb_n...ywords=arduio+uno+r3&rh=i:aps,k:arduio+uno+r3

    Relay Board:

    http://www.amazon.com/s/?ie=UTF8&ke...vptwo=&hvqmt=b&hvdev=c&ref=pd_sl_143qac1k2d_b

    TCC Lockup Code:

    /*
    Chad Kennedy
    Initial version.
    TCC lockup controls for application in the 200R and 700R
    Sensors PN recommended and used are TBD.
    */
    const int rpmPin = A5; //Tach input ***THIS IS AN ANALOG PIN USED HERE****
    const int mphPin = A4; //MPH input ***THIS IS AN ANALOG PIN USED HERE****
    const int MAP_Pin = A3; //MAP sensor ***THIS IS AN ANALOG PIN USED HERE****
    const int TCC_Pinout = 3; // Output to drive relay, relay to drive TCC solenoid
    double duration, durationL, durationM; //variables for duration also referred to period - this is in micro seconds
    double rpm; //Final result for RPM
    double mph; //Final result for MPH
    double mphDur; //Variable for MPH used to calculate period (calling it duration) the variable is used to scale up to seconds
    double reargear = 3.42; //rear end gear ratio
    double min2hr = 60; //use this to convert from min to hours.
    double RevperMi = 736; //this is a conversion of tire circumference to rev per mile.
    double MAP_Val = 0;
    double mphThreshold = 40;
    double vacThreshold = 100;
    double rpmThreshold = 2600;
    //
    void setup() {
    //
    pinMode(rpmPin, INPUT);
    pinMode(mphPin, INPUT);
    pinMode(MAP_Pin, INPUT);
    }


    void loop() {
    duration = pulseIn(rpmPin, HIGH);
    durationM = pulseIn(mphPin, HIGH);
    MAP_Val = analogRead (MAP_Pin);
    // RPM calc
    durationL = duration*2; //PulseIn HIGH or LOW measure time from high signal to low or vice versa so this value must be doubled to account for a full period (cycle or duration) high to high.
    rpm = 1/(durationL/1000000); //this time is in counts equal to micro seconds so divide by 1000000 microseconds to achieve a value in Hz.
    // End RPM calc


    //MPH calculations
    mphDur = 1/((durationM*2)/1000000); // Convert duration to full period, divide by 1000000 for correct microsecond conversion.
    mph = (((mphDur/reargear)*min2hr)/RevperMi); // Since we are dealing with output of trans, need to factor rear gear, convert to hours and divide by tire rev per mile to get to MPH.
    // End MPH calculations
    if (MAP_Val > vacThreshold && rpm < rpmThreshold && mph >mphThreshold) { //if vacuum is greater than vacThreshold and rpm less than rpmThreshold and MPH greater than mphThreshold lockup TCC
    digitalWrite (TCC_Pinout, HIGH);
    }
    else {
    digitalWrite (TCC_Pinout, LOW);
    }
    }
     
  2. black70buick

    black70buick Well-Known Member

    OK it is too cold to be in the garage. Excited though. I added down shift logic in rev 11. Its similar to passing gear logic.

    In English, if WOT is true nothing changed from v10; however, if I go WOT and am less than 40 MPH and RPM is less than 3300 I down shift to first, same thing with 2nd and 3rd but the MPH threshold is 80 and 100 MPH respectively. Will fine tune this once in the car, but it works nicely with bench top testing.
    :3gears:

    Here's a code snippet.


    if (digitalRead(WOT) == HIGH){ //determine if the gas pedal/throttle is wide open if so check RPM and shift.
    analogWrite(PCS, 255); // write the Pressure Solenoid PWM value percentage of 255 where 255 is always on. Get down to business its WOT baby!
    if (rpm > WOTrpmThresh && count < 4) { //WOT shift RPM is 3300, once 3300 reached incrument gear count.
    count = ++count;
    delay (1000);
    }
    else if (rpm < rpmThreshold && mph < _1stThresh) { //Did we stomp on the gas and are doing less than 1stThresh mph then drop to 1st
    count = 1;
    }
    else if (rpm < rpmThreshold && mph < _2ndThresh) { //Did we stomp on the gas and are doing less than 2ndThresh mph then drop to 2nd
    count = 2;
    }
    else if (rpm < rpmThreshold && mph < _3rdThresh) { //Did we stomp on the gas and are doing less than 3rdThresh mph then drop to 3nd
    count = 3;
    }
     
  3. knucklebusted

    knucklebusted Well-Known Member


    Very cool. I'll just have to figure out where to pick up the MPH on my car. I could strap magnets to the drive shaft and use hall cell to sense it.
     
  4. black70buick

    black70buick Well-Known Member

    There are many cool ways of getting a pulse. Hall effect (magnets) is the best for automotive applications in open environments. You could use just about any ABS wheel speed sensor or ... basically any pulse sensor( tach, wheel, crank etc etc.) whatever you can successfully mount.

    Found this on Dakota in case you are interested:

    SEN-01-4160 - 8K pass-through pulse generator with adaptor cable for GM transmissions with cable drive speed output.

    http://www.dakotadigital.com/index.cfm/page/ptype=product/product_id=109/prd109.htm
     
  5. black70buick

    black70buick Well-Known Member


    Version 11 demo.

    <iframe width="640" height="360" src="https://www.youtube.com/embed/UVJpiDPMdEY" frameborder="0" allowfullscreen=""></iframe>
     
  6. black70buick

    black70buick Well-Known Member

    OK. I now have version 12. I believe I have completed all the logic to operate in a fully automatic manner. Now, time to cleanup my code, the actual physical (bench layout) and exercise all the logic. Will post up a video once I can dedicate the time, may take a week or so. :beer
     
  7. black70buick

    black70buick Well-Known Member

    Could have used more time, but nevertheless as promised - video will be view-able in T minus 2 1/2 hours after this post. Videos are taking a long time to upload.


    <iframe width="560" height="315" src="https://www.youtube.com/embed/9V7DeWiAi-A" frameborder="0" allowfullscreen></iframe>
     
    Last edited: Jan 17, 2016
  8. black70buick

    black70buick Well-Known Member

    Beginning the next phase. "Put it in a box." Here's a quick video. I'm going to use MOSFETs (Power FETs) MOS = Medal Oxide Semiconductor, FET = Field Effect Transistor. Smaller than a relay and no contacts to wear out, quick response and properly suited for PWM (Pulse Width Modulation).

    <iframe width="480" height="270" src="https://www.youtube.com/embed/Ce5AR8zqZXc" frameborder="0" allowfullscreen=""></iframe>
     
  9. Redmanf1

    Redmanf1 Gold Level Contributor

    Very good info :TU:
     
  10. black70buick

    black70buick Well-Known Member

    Thanks.

    Also quick update - tested the speed input with a old hub assembly complete with Hall Effect Sensor from my Tahoe. So far so good.

    IMG_20160202_194733_002.jpg
     
  11. Mr. Sunset

    Mr. Sunset Platinum Level Contributor

    :eek2: amazing work my friend. :kodak::TU::TU::TU:
     
  12. black70buick

    black70buick Well-Known Member

  13. BRUCE ROE

    BRUCE ROE Well-Known Member

    Good work. Keep in mind that if those MOSFETs drive solenoids, there will be kickback. So
    a kickback diode needs to be in the circuit. There can be some awful transient voltages
    in auto wiring (esp when cranking), very short but long enough to blow a transistor. In
    general I use devices like a 1.5KE24 TVS diode to protect external inputs. No conduction
    in normal operation, but clamping hard anything over 24V. I usually wire a 13V zener
    directly across a MOSFET source to gate, to protect the delicate gate.

    The solid state I put in my cars in the 60s usually failed after a while. That stopped when
    I figured out how to protect them from the cruel world. good luck, Bruce Roe
     
  14. black70buick

    black70buick Well-Known Member

    :gp:Interesting.
    What I had done for the PICs (the whole circuit) was use a delay power up during initialization. Taking several milliseconds to power on.
    For the relays I have in the car now to trigger the solenoids I used caps to filter any transient effects from the solenoids engaging. With these power MOS FETs, I needed no filtering. With these FETs my signal voltages are lower during the ' instant on' and appears to be in the sweet spot were current still ramps with no negative effects. I will say though with the Darlington Transistors more conditioning was required since it triggers on current not voltage like the power MOS FETs, plus I wanted to keep the circuit simple. So I went the voltage triggered power MOS FET route (IRF510). I'll keep an eye on this based on your write up. Thanks.
     
  15. BRUCE ROE

    BRUCE ROE Well-Known Member

    Caps can work, but must be tuned to the situation; a properly placed diode just works.

    Just thinking, the IRF510 has a 4V threshold, not good if your logic runs on 5V. But there is stuff like
    the IRLI2910 designed for that situation, 2V threshold. This one has an insulated package, so you can bolt them to anything
    handy. I usually buy from DigiKey with a great web site for searching and instant data sheets for most, Mouser too is good.
    Bruce
     
  16. black70buick

    black70buick Well-Known Member

    This was a concern of mine but frankly a 5v logic device such as this has a tolerance and actually runs less than 5Vsignal outputs. In the case of the arduino kits, the Vregulator may be 5v but after those electrons fire off through the logic Vsig out from the circuit to drive the FETs is more like 4.5v. On the edge sure, but I've never had a FET be exactly at the stated values min/max values...so like resistors I treat them with +/- 15%. So empirically and without failure (so far) the IRF510 accepts 4.5Vsig because is can stretch to a max of 4V +15% = 4.6V.
     
  17. black70buick

    black70buick Well-Known Member

    Ok, While I am still distracted with the Deutz. I've stalled a little in progress. It is still seized so I pulled the front cover to inspect further also I just ordered the instruction and part manuals...
    http://www.v8buick.com/showthread.ph...e-Deutz-F2L310

    Received my 2 OLED displays last night and got them working... too many irons in the fire I know. I need to get back to putting the current setup in the box. But these OLEDs are pretty cool...


    [​IMG]
     
  18. black70buick

    black70buick Well-Known Member

    Returning to the scene of the crime. err uh this project...

    I created another unit with the same logic using a OLED screen. I will update the code so that it is "dynamic" and read the same data that is displayed on the large LCD. The advantage to the OLED screen is that I can scale text (font size) among many other things. Additionally, included in the picture, the blue light LCD requires several wires to control observe the row of white wires at the top of the LCD where as the smaller OLED requires just 4 wires making life much easier. I also laid out four FETs to drive solenoids.

    IMG_20160621_202528_990_2.jpg IMG_20160621_203630_630.jpg IMG_20160621_203607_325.jpg
     
  19. black70buick

    black70buick Well-Known Member

    I've think I am finally settling on the configuration I want it in. I bought a PCB and a DIY project from Radio Shack. Soldered up the FETs on the PCB and working on the final interconnect details.

    IMG_20160923_163446_584.jpg IMG_20160923_163510_941.jpg IMG_20160923_163624_342.jpg IMG_20160923_163857_840.jpg
     
    Last edited: Oct 30, 2016
  20. dspeece

    dspeece New Member

    I am following your post and would like to reproduce your work and test it with my 4l60e setup. Have you completed the wiring diagram yet? This is a terrific project. I assume your car is not EFI. I am using a LS3 setup and i am thinking about tapping into the MAP and the TPS. I'm not sure how to isolate the TCM circuits from the Engine computer. You have any thoughts?
     

Share This Page