The MegaShift™ code uses the Bowling and Grippo GPIO hardware that communicates with a MegaSquirt-II™ CAN enabled engine controller to get the engine rpm and load (MAP kPa).
Here are the MegaShift™ Port Assignments:
Transmission Function | Processor Port | GPIO Circuit | GPIO AMP Connector Pin |
Output1 (Sol A) | PE4 | VB3 | 23 |
Output2 (Sol B) | PM2 | VB4 | 35 |
Output3 (Sol32) | PT1 | PWM4 | 34 |
PC | PT2 | PWM3 | 33 |
TCC | PT3 | PWM2 | 32 |
LED1 | PM4 | GPO1 | 10 |
LED2 | PM3 | GPO2 | 7 |
LED3 | PM5 | GPO3 | 8 |
LED4 | PB4 | GPO4 | 9 |
Input 1 (switchA) | AD0 | EGT4 (build as GPI)1 | 26 |
Input 2 (switchB) | AD1 | GPI2 (jumper at 25x2 header) | 6 |
Input 3 (switchC) | AD3 | EGT3 | 25 |
Mode switch | PT5 | VR3 | 14 |
Paddle UP | PT6 | VR2 | 15 |
Paddle DOWN | AD6 | GPI5 | 4 |
VSS | PT0 | VR1 | 2 |
Temp Sensor | AD2 | GPI3 | 30 |
Brake Sense | AD7 | GPI4 | 3 |
Speedo Output | PT4 | PWM1 | 31 |
Spare Output1 (SP1) | PT7 | VB1 (jumper at 25x2 header) | 11 |
Spare Output2 (SP1)/Output4 | PA0 | VB2 | 12 |
non-CAN MAP/TPS/MAF | AD5 | EGT1 | 24 |
Line Pressure Sensor | AD4 | EGT2 | 27 |
2WD/4WD Sense/Input4 | PE1 | GPI1 | 5 |
1 Build EGT4 as voltage input circuit: install R70 (1KΩ), JP9, substitute 5.6 volt Zener diode in C44 (banded end towards copyright notice); C43 for noise control if necessary.
The GPIO main board must be built to the above specifications (more details will be added here shortly).
Example Application: 4L60E Shift Logic
The following table illustrates the hardware logic required to shift gears in the 4L60E. Note that the transmission can be electronically shifted between the 4 forward gears, neutral, park, and reverse must be selected with the shift lever (though the shift lever position can be detected via the switch manifold feedback). Once in Drive, the transmission's forward gears can be controlled.
A nice design feature of the 4L60E is that shifting the transmission electronically does not require any precisely coordinated events, so timing is not crucial. Shifting from one gear to the next is always accomplished by turning on or off a single solenoid. In fact, the most precision used is to determine the output shaft rpm, which is not at all critical in this application.
The following table gives the state of transmission's inputs and outputs for each gear, as well as what needs to change during upshifts and downshifts.
Gear | SOL A | SOL B | 3/2 SOL | PC | LED1 | LED2 | LED3 | LED4 |
Reverse | on | on | off | PWM% based on load | flash | flash | flash | flash |
Neutral/Park | on | on | off | off | off | off | off | |
1 | on | on | off | PWM% based on load | on | off | off | off |
1/2 upshift | switch off | on | sw 90%PWM | PWM% based on load | switches on | sw on | off | off |
2/1 downshift | switch on | on | sw off | PWM% based on load | on | sw off | off | off |
2 | off | on | 90% PWM | PWM% based on load | on | on | off | off |
2/3 upshift | off | switch off | 90% PWM | PWM% based on load | on | on | sw on | off |
3/2 downshift | off | switch on | PWM reduced | PWM% based on load | on | on | sw off | off |
3 | off | off | 90% PWM | PWM% based on load | on | on | on | off |
3/4 upshift | switch on | off | 90% PWM | PWM% based on load | on | on | on | sw on |
4/3 downshift | switch off | off | 90% PWM | PWM% based on load | on | on | on | sw off |
4 | on | off | 90% PWM | PWM% based on load | on | on | on | on |
Note that SWA, SWB, and SWC indicate the position of the manual valve (the shift lever, in essence). This tells MegaShift when the transmission is in park/neutral, reverse, D1, D2, D3, or D4. The values for the switch manifold shown above indicate manual valve position, NOT the currently selected gear. The switch manifold information is used to limit upshifts, where desired. Note that engine braking (via the overrun clutch in the transmission) is only available when the manual valve is in position D3, D2, D1.
Steady State Monitoring Configuration
Reverse
Neutral/Park
First
Second
Third
Fourth
Shift 'Mechanism'
The basic shift control strategy (how to shift, as opposed to the determination of when to shift) looks like this:
* Upshifts *
First-Second
Second-Third
Third-Fourth
* Downshifts *
Fourth-Third
Third-Second
Second-First