5l40e

A forum for discussing applications and implementations of the MegaShift transmission controller code for the GPIO from B&G. This can control up to 8-speeds and 6 shift solenoids (plus a 16x9 table for controlling a PWM line pressure valve). It has manual and fully automatic modes (16x9 load x speed table), with under and over rev-limit protection, and full data logging of all inputs and outputs (among many other abilities). A TransStim to test your completed board is also available.
gurov
Posts: 164
Joined: Mon Jun 01, 2009 1:01 pm

5l40e

Post by gurov »

i've got a 5l40e trans in a 325xi bmw here. the stock ecu is fairly pissed off at me at this point as I've taken all the engine controls away from it (fuel, spark, throttle body) and it is talking to the TCM that runs the 5l40e and I have a feeling the TCM is not very happy that control has been taken away from the main ecu.

so my question is this, megashift supports the 4 speed transmissions, but is the 4 speed a limitation of the number of outputs or is there some further reason behind that. what would it take to add support for 5 speed transmissions ?
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: 5l40e

Post by Bernard Fife »

gurov,

The hardware is capable of doing some forms of 5-speed auto transmissions. There are a number of spare outputs, and these could be used to control additional shift solenoids. For the shift indicator to read and show the 5th gear, etc., the code would have to be modified a bit.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
gurov
Posts: 164
Joined: Mon Jun 01, 2009 1:01 pm

Re: 5l40e

Post by gurov »

Lance wrote:gurov,

The hardware is capable of doing some forms of 5-speed auto transmissions. There are a number of spare outputs, and these could be used to control additional shift solenoids. For the shift indicator to read and show the 5th gear, etc., the code would have to be modified a bit.

Lance.
great, i will see if the erratic behavior continues, purchase a GPIO and set it up on a bench here and take a crack at modifying the code.

would it be safe to assume that the extent of the modifications will be to effectively mimic the handling of the 4th gear (taking a long shot here) to handle 5th (no up shift from 4 in base code, which is what's desired for 5th gear), and modify 4th gear to be handled like the rest of the gears (with up and down shift) ?
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: 5l40e

Post by Bernard Fife »

gurov,

Yes, that's the way to do it.

You would need to add variables for things like the 5th gear ratio, but I think the code has room in the existing variables to describe the shift lever positioning and shift solenoid on/off patterns. These are eight bit variables (one variable for each shift solenoid) with each bit representing whether the solenoid is on or off in each gear. Right now they describe PNR1234 (i.e. seven values), so there should be room for one more on/off (or you could easily change these to 16-bit variables and have loads of room).

The new variables have to be added to the inpram. (input parameters from PC) and outpc. (output datalog values to PC) structures and those changes have to be mirrored in the mshift.INI file. That should just about do it, though. There is lots of documentation in the code itself.

If there is enough interest (more than a couple of people want it), I will add up to 7 speed capability to the code.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
gurov
Posts: 164
Joined: Mon Jun 01, 2009 1:01 pm

Re: 5l40e

Post by gurov »

Lance wrote:gurov,

Yes, that's the way to do it.

You would need to add variables for things like the 5th gear ratio, but I think the code has room in the existing variables to describe the shift lever positioning and shift solenoid on/off patterns. These are eight bit variables (one variable for each shift solenoid) with each bit representing whether the solenoid is on or off in each gear. Right now they describe PNR1234 (i.e. seven values), so there should be room for one more on/off (or you could easily change these to 16-bit variables and have loads of room).

The new variables have to be added to the inpram. (input parameters from PC) and outpc. (output datalog values to PC) structures and those changes have to be mirrored in the mshift.INI file. That should just about do it, though. There is lots of documentation in the code itself.

If there is enough interest (more than a couple of people want it), I will add up to 7 speed capability to the code.

Lance.
great, i may not end up having to do this, but i might still grab a gpio box and play around with this for the heck of it. the trans seems to be shifting just fine for now.
gurov
Posts: 164
Joined: Mon Jun 01, 2009 1:01 pm

Re: 5l40e

Post by gurov »

so looks like i'm going to end up having to take over the trans. i have a GPIO box + trans kit ordered from diy autotune (along with v2.2 board cause i've got a few ms2 chips laying around)

once i get the box assembled and talking, i'll take a gander at the code to see what would have to be done.
gurov
Posts: 164
Joined: Mon Jun 01, 2009 1:01 pm

Re: 5l40e

Post by gurov »

for reference:

http://www.autodiagnosticsandpublishing ... ission.pdf

the pinouts, shift pattern, solenoid/etc.
gurov
Posts: 164
Joined: Mon Jun 01, 2009 1:01 pm

Re: 5l40e

Post by gurov »

Lance: it looks like there's only 3 shift solenoids in the 5l40e:

Image

the shifts are achieved via joining multiple solenoids, it would appear.

Image

the mode switch (this is coming from the trans as to what's actually engaged ?
Image

from this, does it look like there would be a need to add more parts to the GPIO or just change the code ?
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: 5l40e

Post by Bernard Fife »

gurov,

This should be 'doable' with the 4L60E hardware.

The 4L60E has three shift solenoids, and the code allows any pattern of on/off to be user specified. So that's covered in the current code.

The lock-up solenoid and EPC look similar to the 4L60E (though not necessarily the same pattern, but the same mode of operation). So likely no code changes for those.

The 4L60E has 3 inputs to determine the shift lever position, and it looks like this trans uses 5 digital inputs. The current 4WD input could be used as one of the extra inputs, then the other would likely need to be grabbed from either the non-CAN MAP or line pressure inputs. This will require so monitor code alterations (and possibly some minor circuit changes).

One of the two spare outputs could be used for the 5th gear LED. This will also require minor code changes.

Then, finally, of course you will need to add the provision for a 5th gear status flag to the code.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
gurov
Posts: 164
Joined: Mon Jun 01, 2009 1:01 pm

Re: 5l40e

Post by gurov »

okay, makes sense.

i've got a megashift built now, it's on the bench next to the ms3 for the bmw. i can connect to it, and it displays stuff back to me, I'm going to make up a test bench for this thing.

i will probably use the non-can map input as load will be relayed via CAN.

now, what is this 90% dc business about on the 4l60e trans on one of the solenoids, and what should i do about it for my purposes ?
Lance wrote:gurov,

This should be 'doable' with the 4L60E hardware.

The 4L60E has three shift solenoids, and the code allows any pattern of on/off to be user specified. So that's covered in the current code.

The lock-up solenoid and EPC look similar to the 4L60E (though not necessarily the same pattern, but the same mode of operation). So likely no code changes for those.

The 4L60E has 3 inputs to determine the shift lever position, and it looks like this trans uses 5 digital inputs. The current 4WD input could be used as one of the extra inputs, then the other would likely need to be grabbed from either the non-CAN MAP or line pressure inputs. This will require so monitor code alterations (and possibly some minor circuit changes).

One of the two spare outputs could be used for the 5th gear LED. This will also require minor code changes.

Then, finally, of course you will need to add the provision for a 5th gear status flag to the code.

Lance.
Post Reply