2-stage Fan Control w/ trans
Chevy 350 trans w/gearvendor OD
Chevy K10 in build up, will get an MS3X and MShift
Re: Chevy 350 trans w/gearvendor OD
Chevy K10 in build up, will get an MS3X and MShift
-
- Posts: 1696
- Joined: Fri Apr 04, 2008 1:28 pm
Re: 2-stage Fan Control w/ trans
If I was doing this, I would grab the code here: http://www.msgpio.com/manuals/mshift/4L60Ecode.html. There is a link to the Codewarrior 'special edition' free compiler on that page, as well as a link to a zipped copy of the full V1.100 code project.
Install Codewarrior, unzip the code, and click on the .MCP file in the code's folder (the code should open in Codewarrior). To compile code, press F7 (or go to 'Project/Make' in the menu). Try it once just to make sure everything works (you will get a few errors, these are described in the source code in main.c).
You can edit the code in main.c (it is in the /Sources/ folder of the project). If I was doing this, I would 're-purpose' the 2 spare outputs to acts as the fan relay drivers.
For the added temperature sensor input, I would basically duplicate the current trans temp sensor.
The current code grabs the trans temp by reading analog-to-digital channel 2. I would probably use channel 4 (currently used for the line pressure sensor). The ADC is grabbed in a function called get_adc();
I would replace the code in get_adc():
Code: Select all
case 4:
// line pressure
// line pressure table value if line_units=0
// ADC count if inpram.line_units = 1
// engine brake input if line_units = 2
switch (inpram.line_units)
{
case 0: // use pressure table
adcval = linefactor_table[ATD0DR4];
break;
case 1: // report ADC count
adcval = ATD0DR4;
break;
case 2: // use as engine brake input
if (ATD0DR4 < 50) // if below 0.244 Volts
jake_brake = 1;
else
jake_brake = 0;
adcval = ATD0DR4; // report ADC count
break;
default:
break;
} // end switch (inpram.line_units)
break;
Code: Select all
case 4:
// 2nd temp sensor
// Uses same curve as trans temp sensor
adcval = cltfactor_table[ATD0DR4]; // use the adc count to look up the temp (x10) in the cltfactor table
break;
Then in the timer section you would change:
Code: Select all
if ((millisec+16) % 24 == 0) outpc.line_pressure = (outpc.line_pressure*9 + get_adc(4))/10; // get line pressure (psi)
Code: Select all
if ((millisec+16) % 24 == 0) outpc.coolant_temp = get_adc(4); // get coolant temp (x10)
At that point, you can use the spare port logic to control the spare outputs, something like:
Code: Select all
if (outpc.coolant_temp > inpram.fan_temp1) spr1(1); else spr1(0);
Lance.