A little background info, I've made a few things from Arduinos, but all of them have been from existing sketches that I've only tweaked, so I'm not well versed in ground up coding.
I'm wanting to use a Arduino to work as a stand alone controller for a 4L80e transmission.
There's several incarnations I'd like to work through on this. The first step would be just a "manual" controller. The second step would be a "automatic" mode. The third step would be the same "automatic" mode, only with some slight changes to the sequencing. The fourth step would be adding in some control over line pressure via PWM. (If the vehicle needs it, it's a heavy vehicle that isn't that powerful, full line pressure might not be an issue)
Some things I want to design into it would be:
4 mosfets to control the solenoids
LCD screen to display mode, RPM, gear indicator, as well as monitor trans temp.
2 buttons for upshift/downshift (paddle shift)
1 button to toggle through modes (Manual, Automatic, Tow)
Some things it will have to monitor:
Engine RPM, I can get a signal from the engine that provides 4 pulses per RPM.
Throttle Position, I can add a TPS sensor. (Pot)
MPH, I can add a VSS to the speedo cable output for road speed.
Transmission temp, the 4L80e has a internal sensor that varies voltage based on temp.
I know the sequence of shifting would go in this order.
Gear SolenoidA SolenoidB TCC
1 ON OFF OFF
2 OFF OFF OFF
3 OFF ON OFF
4 ON ON ON (but really needs about a second delay before on)
- another side note is Park and Reverse, they both need the same values for gear 1.
The manual mode basically just needs to be able to allow the two buttons to cycle through that pattern up and down.
Some other considerations I need to make are related to safety. I need to not allow downshifting into 1 or 2 if speed or engine RPM are above a certain point. Or at least allow for the button to be pressed, but refrain from completing the shift until the speed or RPM are acceptable.
I've started with just trying to get the sequencing up code for "manual" use to working, but I haven't figured out the TCC delay. Nor how to get it to downshift with the other button. I've just reworked some code I found from someone else that was sequencing LEDs. I also know I need to add a lot more to get a display, have multiple modes, and actually sample those other inputs too. Then there's the whole automation/logic. But I'd be most appreciative to any help with this project. Seems there's a few people out there that have made things like this, but they won't turn loose of any of their code because they're wanting to make a product.
#define buttonUP 2 //Push Button for UP shift
#define buttonDOWN 4 //Push Button for Down shift
#define solA 3 //Solenoid A output
#define solB 5 //Solenoid B output
#define TCC 6 //TCC output
#define modeswitch 7 //Switch for tow/haul mode
int state = 0; //integer to hold current state
int old = 0; //interger to hold last state
int buttonPoll = 0; //interger to hold button state
void setup() {
pinMode (buttonUP, INPUT); //buttonUP set as input
pinMode (buttonDOWN, INPUT); //buttonDOWN set as input
pinMode (modeswitch, INPUT); //modeswitch set as input
pinMode (solA, OUTPUT); //Solenoid A set as output
pinMode (solB, OUTPUT); //Solenoid B set as output
pinMode (TCC, OUTPUT); //TCC set as output
digitalWrite (solA, LOW); //set intital state as off
digitalWrite (solB, LOW);
digitalWrite (TCC, LOW);
}
void loop() {
//debouncing routine to read button
buttonPoll = digitalRead(buttonUP); //poll the state of buttonUP
if(buttonPoll == 1){ //check if buttonUPhas been pressed
delay(50); //wait 50ms
buttonPoll = digitalRead(buttonUP); //poll state of buttonUP again
if(buttonPoll == 0){ //if it is 0 condsidered one press
state = old + 1; //increase state by 1
}}
else{ //if button has not been pressed
delay(200); //wait 200ms
}
switch (state) { //react to button press & state
case 1: //if state is 1
digitalWrite(solA,HIGH); //Solenoid A is ON
digitalWrite (solB,LOW); //Solenoid B is OFF
digitalWrite (TCC,LOW); //TCC is OFF
old = state; //set old state as current state
break;
case 2:
digitalWrite(solA,LOW); //Solenoid A is OFF
digitalWrite (solB,LOW); //Solenoid B is OFF
digitalWrite (TCC,LOW); //TCC is OFF
old = state; //set old state as current state
break;
case 3:
digitalWrite(solA,LOW); //Solenoid A is OFF
digitalWrite (solB,HIGH); //Solenoid B is ON
digitalWrite (TCC,LOW); //TCC is OFF
old = state; //set old state as current state
break;
case 4:
digitalWrite(solA,HIGH); //Solenoid A is ON
digitalWrite (solB,HIGH); //Solenoid B is ON
digitalWrite (TCC,LOW); //TCC is OFF
old = state; //set old state as current state
break;
}
}