Tag Archive for Lexus 8 speed

Transmission ECU – Brake Sense Circuit

GPI4 (Brake sense)

This circuit is located behind the center of the Ampseal connector. This circuit is built as a digital input, but we must bring the nominal 12V brake light voltage down to the 5V that the processor pin can handle (~6.5 Volts absolute maximum). R33 forms one leg of the voltage divider, and also limits the current through the Zener diode if the voltage is greater than 5.6 Volts.

  1. Install and solder a 15K Ohm, 1/8 Watt resistor {brown-green-orange, 15KEBK-ND} in R33.
  2. Install and solder a 10K Ohm, 1/8 Watt resistor {brown-black-orange, 10KEBK-ND} in R34.
  3. Install and solder a 5.6 Volt Zener diode {1N4734ADICT-ND} in place of C20, with the banded end towards heat sink. You will have to space it up off the board by about ½” (12mm) to get the leads to fit.

Thats you done!

Megashift brake sense circuit

12v brake sense circuit




If the input voltage is 14.5 Volts, the voltage divider will reduce this to 14.5 * 10K/(10K+15K) = 5.8 Volts, and the Zener diode further bleeds this off to 5.6 Volts (nominal) with a current of 14.5/15×103 = 0.97 milliamps (the Zener is rated for 1 Watt, which is much higher than we need which is ~1 milliamp * 0.2 Volts = 0.0002 Watts).

If the input voltage is 11.5 Volts, the voltage divider reduce this to 115 * 10/(10+15) = 4.6 Volts, and the Zener diode does nothing. 4.6 Volts is till plenty to trigger the input pin (the acceptable voltage range for ‘high’ on a HCS12 input pin is 3.25 Volts or higher), which means the supply voltage from the brake signal could drop as low as 8.1 Volts and still trigger the input successfully.


Transmission ECU – More circuits (General purpose, PWM, heavy outputs)

The next step is our base circuits for the board. We have 4 General Purpose outputs, GPO1 – GP04 located to centre of the board. The Circuits GPO1 – GPO4 are made up from 1.0K Ohm, 1/8 Watt) in R13, R15, R17, R19 and 4 NPN in Q9, Q10, Q11, Q12



next we have our VB1, VB2, VB3, VB4 out put circuits. We begin by adding links to R5, R6, R7, R8. We are using 1.0K Ohm, 1/8 Watt resistors instad of wire links as we may want to scope these outputs at a later date.

Next we install and solder 30V Zener diodes {1N4751ADICT-ND} in D11, D12, D13, D14

To Complete the VB Circuits we install the Heatsink. we then Install and solder four large TO-220 size NPN transistors {RFP30N06LE-ND} in Q5, Q6, Q7, Q8 and insulators (under Q5, Q6, Q7, Q8){4724K-ND}) on the heat sink in positions. A liberal amount of heat sink grease is used :)


Next we have our PWM1, PWM2, PWM3, PWM4 Circuits. First we solder in our main jumpers in R1, R2, R3, and R4. In R9, R10, and R12 we use 1K ohm resistors and a wire jumper in r11


Install and solder 30V Zener Diodes {1N4751ADICT-ND}, D8, D9, D10. We then Install heatsink and solder 3 large TO-220 size NPN transistors {RFP30N06LE-ND} in Q1, Q2, Q4

We finish off the PWM circuits by installing and heatsinking a RFP30N06LE-ND into Q3




Transmission ECU – Hello world Time

So, the first part of our Transmission ECU build is to install the basic circuitry and hardware for our PC coms so we can Flash the ECU with the megashift Firmware.


A. Base circuits:


  1. Remove excess PCB material: The board is shipped with surplus PCB material on each edge that is about ¼ inch (6mm) wide. You can leave this material on if you are using a custom enclosure, it might make for easier mounting is some situations. However, in most cases, this material must be removed. You do this by using a pair of pliers to flex the excess material along each edge until is snaps off.
  2. PCB/case: Check the fit of the GPIO printed circuit board in the case. It goes into the next to last slots (nearest the case bottom). Do not put the GPIO PCB into the bottom grove, the bottom of this groove is wide enough that it may short out some circuits.Be sure to start it as close to ‘square’ as possible, otherwise it will bind. The PCB should slide into the case fairly easily, but be held snugly. If the PCB doesn’t fit, or is too tight, you have to narrow the board slightly. you do this with a coarse file. Run it along the heat sink edge of the board 10-20 times, then recheck the fit. Repeat as necessary until the board fits properly in the PCB. Then blow the PCB clean with compressed air.Note that if you wish to mount the GPIO PCB in a non-standard case, three mounting holes are provided:



  3. Heat sink: Prepare the heat sink. You will make this out of 1/8″ (3mm) aluminum flat strapping, 5/8” wide (15.8 mm) by 3.94 inches (100mm) long. You will drill 8 holes in it to match the PCB heat sink area. 

    Because aluminum isn’t typically sold in 5/8″ widths, you may have to cut down wider aluminum (¾” or 1″) to get a heat sink that will to fit.

    The easiest way to get the hole spacing right is to transfer the holes from the PCB to the aluminum strip by placing them together and using a felt pen to mark the hole locations on the aluminum strip through the PCB.

    Be sure to allow enough room for the aluminum strip to fit in the case, and allow enough room so that it won’t contact the component leads. Make sure the heat sink rests up against the case when installed to get the thermal contact between the case and the heat sink. Sand both sides of the heat sink to ensure there are no burrs.


  4. Case End-Plates: Here is a rough drawing for the connector end plate for the EAS-400 enclosure with both the V2.10 GPIO board and MegaSquirt® V3 main board in the same case (because cases and boards may vary, you should check all of these measurements carefully with your own hardware). 

    The end plate material should be 0.080″ to 0.125″ thick. The Ampseal connector is sealed internally in this configuration, but the enclosure itself is not sealed (because of the DB37 as well as the tolerances of the end plate to the outside flange of the Ampseal connector (rather than screwed to the face of the flange).

    The GPIO board fits in the bottom slot of the its half of the case, while the V3 main board sits in the second from the bottom slot of its part of the case. Note that the DB37 and Ampseal connector are very close – there isn’t much material left (~0.070″), and you will have to be careful to avoid damaging this area while machining. Thicker material will make this easier, of course.


  5. Install and solder the voltage regulator U1 {LM2937ET-5.0-ND}. This is a TO-220 size component (three pins sticking out of a black case, with a tab and mounting hole on the opposite edge) located in the corner of the board furthest from where the 35 position Ampseal connector will be installed, nearest the heat sink. 

    It has its own location among the SMD components in that corner of the board. You have to bend the leads to a 90° angle so the regulator can site flat against the board, then solder it and screw it the board with a #4-40 nylon bolt and nut (with heat transfer compound (aka. ‘heat sink grease’) between the regulator and board). You do not need a separate heat sink for the voltage regulator (shown in the diagram below), the voltage regulator can be mounted directly to the PCB (with heat sink compound), as long as you are not using the 5Vref supply for powering off-board accessory circuits.


  6. CAN termination resistor: You will install this 120 Ohm, 1/4 Watt resistor (R82) if you have two CAN devices in your network (i.e. the GPIO board and MS-II). If you have more than two devices in the network, you only install the resistor in the devices at the ends of the CAN network. If required, install and solder the 120 Ohm, ¼ Watt resistor {brown-red-brown, 120QBK-ND} in R82. This is located in the corner of the PCB furthest from the Ampseal connector and heat sink. Space the CAN termination resistor up off the board by approximately 1/4″ to 1/2″ (6mm to 12mm), and make sure the lead closest the edge will not contact the case when the PCB is installed in the enclosure. If your board is not at the end of the CAN chain, DO NOT jumper this resistor location, leave it empty


  7. Ampseal
    1. Connector: The connector should be soldered to the PCB. Be sure it snaps into place in the PCB, then solder each of the 35 pins from the underside of the board. Take your time and be methodical, as missing or poorly soldering one or more pins can cause problems that are very hard to troubleshoot later.
    2. Pigtail: The best instructions for assembling the harness pigtail are Tyco’s own instructions, get the PDF file here: Ammpseal 35 pigtail assembly instructions

  8. Serial Communications:You have a choice here. You can bring the serial communications out a serial jack (with a 2.5mm mini stereo jack, which is convenient) or you can bring the serial communications out the Ampseal connector (which offers the possibility of weather sealing).


    1. Ampseal Serial:
      • Rx: Jumper from the via marked “Rx” near the bootloader jumper to the via marked “Rx” near the Ampseal connectors rear edge with 20-24 gauge insulated wire. This will bring Rx out on Ampseal pin 21.
      • Tx: Jumper from the via marked “Tx” near the bootloader jumper to the via marked “Tx” near the Ampseal connectors rear edge with 20-24 gauge insulated wire. This will bring Tx out on Ampseal pin 22.
      • Gnd: Use Ampseal pin 17 as a ground.
      • You can devise your own serial cable, the illustrations below might help.

    2. Bootloader header {A26520-40-ND – cut to suit}: The Boot Header {JP5) on the board near the serial jack is used to reprogram the CPU in your GPIO processor (not the tuning parameters, but the actually code that uses the tuning parameters). Install the 2-position header, but leave it open (do not bridge the pins with a jumper), though you can leave a jumper (S9000-ND) hanging on just one pin as a handy storage location.Depending on what you want from your GPIO controller, though, you may end up using the boot header to eventually to load code. To load new code, you put jumper on the two pins on JP5 with no power applied to the board, and once the jumper is in place apply power to the board and use the downloader program.
    3. Some people have put a momentary switch (normally open – NO) across the boot header, and place the switch so they can go into bootloader mode simply by pressing this switch while powering up, without opening the case. (If you do this, be sure it can’t be pressed accidentally.)


    4. BDM (Background Debug Module) header: This 3×2 header is used to load the serial monitor program to the processor (to act as a bootloader for adding new code version), as well as for looking at the state of code running on the processor when developing new code (in conjunction with a BDM cable, etc.). This is located in the corner of the PCB furthest from the Ampseal connector and heat sink, near the CAN termination resistor (R82) you installed earlier. If you wish to install this header, solder it into position. 


    5. 25×2 Header {WM8135-ND, S9000-ND}: Before installing the header, you must use insulatedwire (~20-22 gauge) to jumper:
      • AD1 to GPI2 at 25×2 header, and
      • PT7 to VB1 at 25×2 header.

      Do these jumpers first, then cut the 25×2 header with small side cutters to fit remaining holes as necessary. Solder each of the header pins from the bottom side of the board (you can use tape to hold the header in place while it is upside down). For now, do not install jumpers on all the applicable circuits (see the table near the top of this document). You can do that after checking the circuits at the end of the build process.
      You can use snipped off leads as jumpers instead and save several dollars on the WM8135 header and jumpers – if you are doing this, wait until the end of the build to install the remaining jumpers – and save the snipped off leads from other components as you go.
      (You could install the complete 25×2 header then jumper the relevant pins by soldering wires directly to the header pins, if you prefer. Be sure not to bridge adjacent pins, of course.

    1. Double check that you have jumpered the correct locations.

      Note that on the V2.00 GPIO boards ONLY, NOT the V2.10 boards, there are errors on the silkscreen labeling at the 25×2 header, this was corrected on V2.10 boards. The actual circuit connections are the same on both boards, they are just labeled correctly on V2.10+ boards. See this link for more information.

      Loading Code on Your GPIO Controller Now that you have assembled the base circuits on your GPIO, you need to load the GPIO code. Completing this step will verify that CPU and serial communications circuits are functioning. To use Eric Falgren’s Windows downloader.exe:

    1. Power down the GPIO Controller,
    2. Put the boot jumper on both pins of the header marked JP5 (for “bootloader”) near the serial plug on the GPIO board,
    3. Power up the GPIO Controller by connecting the power supply ground on one of the Ampseal pins 18, 19, 20 (through the appropriate lead). Then apply 12 volts (nominal, 9V to 15V is okay) to Ampseal pin 1.
      Note: When in bootloader mode, the GPIO may allows a full 12V to flow in some circuits. If your set-up depends on PWM to limit the current in these solenoids, you MUST pull the fuse to these devices before entering bootloader mode to load new code.
    4. Start the Windows downloader program (get it here), and select the appropriate COM port number for your serial connection (if you don’t know your serial COM port, run the portCheck program).
      See this link for downloading using other platforms than Windows..
    5. Select the appropriate .S19 file, and the downloader will read, write and verify the code to the processor in about 10 seconds or so.
    6. The process ends with a message like “Verification succeeded, XXX records total (4 skipped).” (where XXX is a large number that varies from one code version to the next),
    7. Shut down the downloader program,
    8. Remove power from the GPIO Controller,
    9. Remove the boot jumper (or put it on just one pin of the boot header for storage),
    10. Start the tuning software (TunerStudioMS) and set the COM port and speed if necessary.
    11. You will need to download and activate the latest INI file. Under the ‘File/Project/Project Properties’ of TunerStudio, click on the ‘Other’ check box.
    12. Click the ‘Browse’ button.
    13. Navigate to the INI file you downloaded for your code (for example, for MShift™ code you would use the INI from the link www.msgpio.com/manuals/mshift/V2code.html).
    14. Click on the appropriate INI file you downloaded from the code page (www.msgpio.com/manuals/mshift/V2code.html) to activate it.

CAN DASH DISPLAY – For custom AA80E controller

In Order to display Vital information from the AA80E controller we will be designing a Custom TFT Cluster either replacing Stock Speedo or part of the Stock Speedo. We will probably use an Arm developement Board and access the controller data directly Via CAN.

or small OLed display system :-


To poll the needed data From the MSGPIO will we use a read command to read data from the OUTPC table. The outpc offset values (and the descriptions used by TS) are all listed in the section below starting with: [OutputChannels]

The variables are described in lines like this:

seconds = scalar, U16, 0, “sec”, 1.000, 0.0

The first label is the parameter name the tuning software uses (it can be almost anything), the second value tells the tuning software if it should handle the value as individual bits, or as a number.

The next value tells us the format of the number, U16 denotes an unsigned 16 bit number (and ‘int’) , S08 denotes a signed 8 bit number (a ‘char’), and so on.

The value after the number type is the offset, in bytes, of the parameter from the start of the structure. the first value (“seconds”) has an offset of zero (i.e. it is right at the start of outpc.). The next value (“speedo”) will have an offset of 2, since seconds is two bytes long, and has an offset of zero. The third value (“odometer”) will have an offset of 4, because speedo is two bytes long, and starts at byte 2. The rest are similar.

The next label, “sec”, is the label used in the tuning software for this value.

The next two values are the multiplier and translator for the raw value returned. The first value is multiplied by the multiplier. The second value is added to the raw value. For example:

speedo = scalar, U16, 2, “mph”, 0.100, 0.0

means take the speedo value returned from the GPIO and multiply it by 0.100 (i.e. divide by 10) but don’t add anything (0.0). This is done because the microprocessor cannot handle fraction numbers, so all the internal calculations returns a value time ten, and the conversion is left up to the tuning software.


Notes :-

1. the GPIO does not broadcast CAN traffic, so we can not use a device to intercept CAN information.

2. We must send a message via CAN to the GPIO to Request information. The information we are interested in is held in the OUTPC page of memory, This is the GPIO’s realtime data

x72 x01 x07 x00 x38 x00 x08

The above request is

'r',  can_id=1, table=7 (outpc), offset 38h (56 decimal), send 8 bytes 

= sp2PWM


3. The realime data is stored in the following Formatt :-

   deadValue        = { 0 } ; Convenient unchanging value.

   ochBlockSize     = 58

;full version that works anywhere
   ochGetCommand    = “r\x01\x07%2o%2c”
   ochGetCommand    = “a\x00\x06″

  seconds           = scalar, U16,    0,     “sec”,      1.000, 0.0
  speedo            = scalar, U16,    2,     “mph”,      0.100, 0.0
  odometer          = scalar, U32,    4,   “miles”,      0.001, 0.0
  speedo            = scalar, U16,    2,     “kph”,      0.100, 0.0
  odometer          = scalar, U32,    4,      “km”,      0.001, 0.0
  auto_mode         = scalar, U08,    8,       ” “,      1.000, 0.0
  downbutton        = bits,   U08,    9 [0:0]
  upbutton          = bits,   U08,    9 [1:1]
  downshift_request = bits,   U08,    9 [2:2]
  upshift_request   = bits,   U08,    9 [3:3]
  error             = scalar, U08,   10,       ” “,      1.000, 0.0
;  serialComm         = bits, U08,     10, [0:0]
;  CAN error          = bits, U08,     10, [1:1]
;  revshiftblock      = bits, U08,     10, [2:2]
;  CVSSreset          = bits, U08,     10, [3:3]
;  VSSerr             = bits, U08,     10, [4:4]
;  gearRangeErr       = bits, U08,     10, [5:5]
;  lowVolts           = bits, U08,     10, [6:6]
;  noBrake            = bits, U08,     10, [7:7]        
  manual_gear       = scalar, S08,   11,       ” “,      1.000, 0.0
  current_gear      = scalar, S08,   12,       ” “,      1.000, 0.0
  target_gear       = scalar, S08,   13,       ” “,      1.000, 0.0
  engine_rpm        = scalar, U16,   14,     “rpm”,      1.000, 0.0
  LOAD              = scalar, S16,   16,     “kpa”,      0.100, 0.0
  LOAD              = scalar, S16,   16,       “%”,      0.100, 0.0
  clt               = scalar, S16,   18,    “degF”,      0.100, 0.0
  clt               = scalar, S16,   18,    “degC”,      0.100, 0.0
  linepressure      = scalar, U16,   20,     “psi”,      1.000, 0.0
  lock_TCC          = scalar, U08,   22,       ” “,      1.000, 0.0
  brake             = bits,   U08,   23  [0:0]
  burnstatus        = bits,   U08,   23  [1:1]
  FWD               = bits,   U08,   23  [2:2]
  forceUP            = bits,   U08,   23  [3:3]
  forceDWN            = bits,   U08,   23  [4:4]
  LOAD_short        = scalar, U16,   24,     “kpa”,      0.100, 0.0
  LOAD_short        = scalar, U16,   24,       “%”,      0.100, 0.0
  aux_volts         = scalar, U16,   26,       “V”,      0.001, 0.0
  PC_duty           = scalar, U08,   28,     “pct”,      1.000, 0.0
  converter_slip    = scalar, U08,   29,     “pct”,      1.000, 0.0
  dbug              = scalar, U16,   30,       ” “,      1.000, 0.0
  In1adc            = scalar, U16,   32,   “volts”,      0.00488, 0.0
  In2adc            = scalar, U16,   34,   “volts”,      0.00488, 0.0
  In3adc            = scalar, U16,   36,   “volts”,      0.00488, 0.0  
  solst             = scalar, U08,   38,       ” “,      1.000, 0.0
  Output1           = bits,   U08,   38  [0:0]
  Output2           = bits,   U08,   38  [1:1]
  Output3           = bits,   U08,   38  [2:2]
  Output4           = bits,   U08,   38  [3:3]    
  Output5           = bits,   U08,   38  [4:4]
  Output6           = bits,   U08,   38  [5:5]
  Output7           = bits,   U08,   38  [6:6]   
  chcksum           = scalar, U08,   39,       ” “,      1.000, 0.0
  mileage           = scalar, U16,   40,     “mpg”,      0.010, 0.0       
  FuelAdj           = scalar, S16,   42,       “%”,      0.100, 0.0
  SpkAdj            = scalar, S16,   44,       “°”,      0.100, 0.0
  IdleAdj           = scalar, S16,   46,       ” “,      1.000, 0.0
  SprAdj            = scalar, S16,   48,       ” “,      1.000, 0.0
  In1               = bits,   U08,   50, [0:0]
  In2               = bits,   U08,   50, [1:1]
  In3               = bits,   U08,   50, [2:2]
  In4               = bits,   U08,   50, [3:3]
  sp1PWM            = scalar, U08,   51,      “%”,       1.000, 0.0
  is_rpm            = scalar, U16,   52,    “rpm”,       1.000, 0.0  
  butADC            = scalar, U16,   54,  “volts”,     0.00488, 0.0  
  sp2PWM            = scalar, U08,   56,      “%”,       1.000, 0.0
  TCC_count         = scalar, U08,   57,    “sec”,       0.100, 0.0
  ;     pageSize =  57 + 1 = 58
; total page size must not be a (multiple of 8) plus 1; i.e. 17, 25, … 57, 65, etc.

; Derived Values
   secl             = {(timeNow % 256) – (timeNow % 1)                 }, “sec” ; to keep TS happy despite CAN delays
   second2          = { seconds % 256                                  }, “sec” ; for clock gauge to see resets
   time             = { timeNow                                        }, “sec” ; system time from PC
   kmileage         = { 235.2/mileage                                  }, “l/100km”
   os_rpm = { ((speedo*1.467)/((tire_diam/12)*3.1416)) * 60 * axle_ratio }, “”;
   os_rpm = { ((speedo*0.893)/(((tire_diam/2.54)/12)*3.1416)) * 60 * axle_ratio }, “”;
   VSS_Hz = { (os_rpm * num_teeth)/60  }, “Hz”;
   ic1_period = { 1/VSS_Hz }, “”;
   ic2_period = { 60/(is_rpm * iss_divider ) }, “”;
;   speed2 = { dbug/10 }, “”; Alternate speed for debugging



Data C Type for the above is :-


;   C Type                 Bits              Range                     MegaTune INI Designation
;   ------                 ----              -----                     ------------------------

; - char (=signed char)     8            -128 to 127                S08 (one byte offset each)
; - unsigned char           8               0 to 255                  U08

; ...............................................................................................

; - int  (=signed int)     16          -32768 to 32767             S16 (two byte offset each)
;   (= short)

; - unsigned int           16               0 to 65535                  U16
;   (=unsigned short int)

; ................................................................................................

; - long  (=signed long)   32            -2³¹ to 2³¹ - 1            S32 (four byte offset each)
;   (=long int)     

; - unsigned long          32               0 to 2³² - 1                U32
;   (=unsigned long int)

C types Described here :


More info from the ms3 CAN implimentation here :-



thats all for now! – MARTY

More to follow but here are some vids from testing






2URGSE + AA80E + ISF DIFF now fitted to the Supra

Well, the supra now has all the major main mehanical work almost complete. The rear end runs with the ISF torsen differential with ISF shafts and Modified outter joints. Custom Prop setup links to the AA80E. Lots of room around the trans tunnel, and with Carefull planning by Colin ment we retained stock trans mounting points, just a few tweaks to be done now to the motor mounts. We have plenty of room to play with for the exhaust manifolds too.

IS-F Torsen LSD Fittment and JZA80 Differences

Today we got the rear end ready for installation. Keypoints :-


1. Differental casings are both physically the same, IS-F LSD bolts straight up to the Stock supra rear subframe. Supra inner joints do not fit the IS-F rear differential.

2. lexus Half shafts are correct length and also straight fit for the jza80 rear hubs.

3. IS-F Half shafts will need to be modified on outter joints to have ZA80 ABS rings fitted (1mm from outter flange circumference to be removed) as on the IS-F the abs pickups are built into rear hub bearing. Supra outter joints do not fit the IS-F half shafts due to a different spline pattern.

4. Stock Supra Rear Prop and centre bearing will be used, with the IS-F front prop (2 ins longer than Auto Prop, though AA80E is 2.1ins Shorter than A340E)


AA80E 8 speed auto wiring and operational tech info

Again all in PDF format