Jaguar XJ12 Build Thread

Post your project vehicles here! One thread per vehicle please.
Post Reply
Compassion
QFP80 - Contributor
Posts: 32
Joined: Sun Jan 15, 2012 1:40 am
Location: Sunny Colorado

Jaguar XJ12 Build Thread

Post by Compassion »

Hello FreeEMSers!

Edit: The comment thread can be found here.

The project I am planning is a Jaguar V12 engine transplant from a 1989 XJ-S HE with GM TH400 into a 1972 XJ6. Originally I had planned it for a later car in my possession, my 1979 XJ6L, but some other factors came up, locally. I’m fairly versed in wrenching and a lot of details on these cars. I know plenty of people that look under the hood and just don't know where to begin. :)

Technology has just jumped a good margin between then and now and I haven’t done a lot in regards to modern custom-EFI tuning, but I'm enthusiastic. I've still got a decent amount of knowledge and practice in DIY electronics. I’m not an electrical engineer by trade, but sometimes I do think about going back to University for it.

I’m short the original ECU & the harness that runs through the car for this project. I’ve got access to my fathers 1982 Daimler Double-Six (UK-spec) and 1985 Jaguar Sovereign HE (Euro/German-spec) for reference, in addition to a 1977 Jaguar XJ12L that has the D-Jetronic EFI setup with the original flat-head design. I'm curious to see how tight modern-EFI and tighter ignition timing (and potentially higher compression) can bring up the MPG numbers on that motor, because it sure was a guzzler.

Above all, the cars share a common chassis, so fitting the motor and transmission will be a bolt-on affair, although I will need to change the springs if I don't want a saggy ride height. I’m versed with a ton of the change between the years of production, but I’m going to need to scavenge at my local junkyards to solve some of the other parts needs that are going to come up. I’ve also got some mechanical schematics to come up with for some of the other adapters I’d like to come up with, since I’d like to make it a fairly open door for other Jaguar owners to go down this path if they desire to, with some of the big issues worked out. I’ve got a few iterations/milestones that I’d like to go through for academic purposes to show the outcome from it.

Basic Transplant Logistic issues to solve:
-Optional: Springs from XJ12 to fix ride height
-Fuel Tank & Pump Transplant from later Series XJ with fuel injection
-Running replacement fuel lines (IE: return line to prevent/minimize vapour lock issues)
-Drive shaft modifications
-Rear diff swap (ratio differences)
-Cooling control
-Tachometer, Speedometer and other gauge issues
-Diagnostic read-out in car)


The Car
Image

Mine actually isn't as nice as the stock photo, presently. It sat for 10+ years in Louisiana with the intake manifold off, and baking the interior, and then has been sitting in my Dad's garage since we came across it in 2000. This must change. The original motor is completely seized and I don't have much hope for it, so my project has a mix of restoration issues to along with the rest of the installation.

Image


----
Tools to obtain (short-list):
-Fuel pressure gauge
-New vacuum gauges
-Multi-channel Logic Analyzer
-Oscilloscope (been jonesing for one for years and need it for my other Jaguar care work)
-Two Wideband O2 sensors for tuning purposes
----

Milestone Overview:

Phase 1:
-One TA Card
-Batch-Fired Injection in 4 groups of Three Injectors (Duplicating the stock ECU grouping)
-Injectors will be wired independently for future stages
-May use resistors for short-term (increasing dead-time) until low-z driver board created/sorted
-Dual VR sensors (60 degrees apart) w/crank wheel
-Optional?: Dual-EDIS VR Conditioner Board
-Conditioner board can drive 6-cyl coil negative inductively driven tach/rev counter
-12 Cylinder Tach appeared for only 1973 and might be shared with the Series 3 E-Type and made of unobtainium
-Some concern on maximum advance available with EDIS
-Use stock throttle position sensor. Replace with stock part if dead-spot is discovered to have known issue with a dead spot
-Dual MAP sensors (one per bank)
-TBD on Control: Fan Relay controlled by FreeEMS
-Use stock aux air valve with balance pipe to regulate cold idle (would like to implement dual IAC later)
-Use stock pair of O2 sensors

Stage 2:
Items to be developed:
-Crank-driven (essentially) Distributor-mounted CAS adapter (mostly for a drop-in solution for other owners)
-IAC adapters for per-bank idle control (bank A and B draw is not balanced in regards to vacuum load)
-Need to source coil-near-plug ignitors for project

Two TA-card build
TA card 1 - Fuel control (semi-sequential)
TA card 1 - Ignition
Breakdown of components TBD
-May spec Hi-Z injectors at this phase, due to single-cycle fire of low-z stock injectors. (Previous generation was specified to fire twice per cycle and low-z, last generation on 1996 XJ12 were high-z Nippon Denso, but made of unobtainium)

Stage 3: One custom board build:
I’ll cross that bridge when I get there, but sequential fuel injection and sequential spark would be nice.
I'm also looking into going from the GM TH400 and doing a 5 or 6 speed manual conversion for the car around this stage. Maybe in stage 4.
Compassion
QFP80 - Contributor
Posts: 32
Joined: Sun Jan 15, 2012 1:40 am
Location: Sunny Colorado

Re: Jaguar XJ12 Build Thread

Post by Compassion »

I've been working on getting ready my TA card build. I've got two TA cards coming in and I've been focusing on getting a suitable power supply setup. Right now the plan is to go with a single 36-1 crank wheel sensor.

The plan is to setup the first TA card to handle fueling of the cylinders in pairs with semi-sequential with the original distributor setup in use and then expand to the second board handling spark in a wasted spark manner.

For the interim, my 1979 XJ6L is going to be the berth for the motor during the development work. I've got some rubber to replace on that motor before I stuff it in the engine bay, but that work continues.

Below a snapshot of my KiCad process.
Image
Image

I'm working on the PSU, submitting that to my father for review, then moving onto using the various input circuits from the existing FreeEMS projects, and then working on a LM1949 P&H Low-Z injector setup.
Compassion
QFP80 - Contributor
Posts: 32
Joined: Sun Jan 15, 2012 1:40 am
Location: Sunny Colorado

Re: Jaguar XJ12 Build Thread

Post by Compassion »

My TA cards arrived not too much longer after I posted the above.

I talked with Andy/DeuceEFI about the the pin assignments for the above. It looks like the first card really should be spark, and the second fuel injection, with moving fuel injection to PortB when that all settles out.

Went through and also built the USBDM board that Andy had sent. I've gotten the firmware flashed on it using the new tool that pgm (I'll explain later) made because of Freescale's GUI loader being broken for Windows 7 x64. I'm still having trouble actually using it as a BDM, but that will get sorted.

Also built FreeEMS firmware using the Windows Toolchain, although I got a bunch of git errors, but as far as I know it built successfully. That got a bit muddled because of another problem.

I could not get the FreeEMS Loader to work on the Windows Toolchain, so I moved onto Megatunix for its mtxloader. I found out that its broken on Windows till the serial stuff gets cleared up. I've already mentioned the issue to Dave and he's working on that.

Moved to my OS X install, with megatunix. I was able to flash my build files onto the TA card. Success. Sort of. I kept getting garbage out, when I'd hook up with it. I mean beside the binary data. ;) Been setting my machine up with MTX's autodetect loop and using my FTDI (0403:6001) in Windows, since on OS X I wasn't getting any valuable data for debug at the time, and it's an arbitrary time, it seems. Still researching. It looks like the FT232R and SP232A just don't play nice!

Is the 4-pin RS232 header header generally direct to the S12X? If it is, I can take a stab are just wiring up an FT232R(L) directly to it and just side-step the DB9.

Since the issue is transient, I probably can work around it, just seems to be trickier to repo. When I can't get any good data out, it's out for quite a bit, and when it's back... it's back. I'm back to it being back.
Compassion
QFP80 - Contributor
Posts: 32
Joined: Sun Jan 15, 2012 1:40 am
Location: Sunny Colorado

Re: Jaguar XJ12 Build Thread

Post by Compassion »

As I say below, I am not sure the User Rides section should be the current home for my build/build comment thread, as I currently have been documenting the entire process in one place for convenience.

Goal: Build FreeEMS firmware and successfully upload a good firmware to TA card

Getting started:

I figured I would take the approach of not digging through every single forum post, for better or worse, since, in my personal opinion and professional experience, forums don't tend to be great document repositories. They are great for a collage of personal experiences and group communication, but not as great in regards to final documentation. I personally have a similar disdain for email as a documentation repository, but have a personal preference for Wikis as they are collaborative in nature, allow for proper version control, and discussion.

As mentioned previously, I purchased two TA cards, in mid-April. I haven't finalized any aspects of the design, although, as a rehash, technology-wise, I've settled that I will be likely using a 36-1 trigger wheel, mounted to the crank pulley of my V12 engine, a VR/Hall Effect sensor provided with the pulley, (my father would like to try an industrial optical trigger), LS1 (preferably truck) coils for a coil-near plug ignition arrangement, and for now, Low-Z injectors.

This is intended as a short overview, but not a complete retelling of what I worked thought. After a day of assembling a USBDM, I was in a position to fire up my TA card for the first time, but first the USBDM. The docs I am referred to are at DeuceEFI's USBDM Repo., as I was assembling a DeuceEFI BDM.

Essentially, assemble the USBDM, the USB, check that Windows detects it as a JS16 device.
What I needed to obtain were the USBDM tools and firmware, and the new firmware loader compatible with Windows 7 64-bit. The versions I used (4.9.1) are available here:


The firmware is contained in USBDM_4_9_4b_Win.msi and the bootloader to I used to replace the steps with the Freescale GUI Loader was contained in JS16_Bootloader_1_0_1_Win.msi

The firmware I chose in the JS16 Bootloader was HCS08/HCS12/CFV1, and I think it requested the firmware for the USBDM (can't quite remember) and grabbed a renamed C:\Program Files (x86)\pgo\USBDM 4.9.4\FlashImages\JS16\USBDM_JS16CWJ_V4.s19 (originally with the extension .sx).

Afterwards, the JS16 device dropped from the bus. I then had an Unknown device in my Device Manager, which I then replaced the drivers with, in a forced fashion, with the ones provided @ C:\Program Files (x86)\pgo\USBDM 4.9.4\USBDM_Drivers\Drivers. Windows complained that they were not signed, as to be expected, but I think that was the hold up for some other users on Windows 7 64-bit.

After that, my USBDM would show up in the HCS12 programmer. Regrettably, I think there is a mistake in my assembly, or at least a poor materials choice. I used 28AWG stranded hook-up wire. I'm already having issues that at least one of the stranded leads broke in the process of getting the JS16 flashed. So, definitely solid core wires when I go through, do the additional trimming and clean-up of the board.

When it came time to hook up to the TA card, my TA card lit up, but the HCS12 programmer would not detect the TA card in any fashion, even after getting a custom firmware loaded (I have no idea if the Freescale demo program is secured), but it would not detect the S12X XDP chip or flash an image from the later step.

But before the conclusion of the above, things got a bit trickier. I needed to build firmware.

Which lead me to look up how to get a usable working toolchain. My main machines run Windows 7 64-bit and Mac OS X 10.7 64-bit.

I decided to start with Windows.

So, I hit up the main webpage, http://freeems.org/, reviewed the docs webpage, the getting started thread, and the somewhere in-between there, made a leap to hit up the toolchain under DevTools.

I grabbed the Windows toolchain from http://tools.diyefi.org/ . After that, I grabbed a pull of the current main trunk FreeEMS repo @ https://github.com/FreeEMS/freeems-vanilla using the GUI from git-scm. I followed the recommendation to use that repo from here.

I pulled up the Readme.md. It has, I assume, unix carriage returns, so Notepad on Windows generally ends up making the file generally... not as friendly to read on Windows. Decided that the most expedient thing to do was to just read the file on GitHub. Glanced through the building Firmware section, looked like I was good to go, although it mentioned that the current repo to build from is https://github.com/fredcooke/freeems-vanilla, which conflicts with the above guidance. I think there was another reference to the main trunk being @ FreeEMS/freeems-vanilla, and Fred’s dev repo being his personal repo, but in retrospect, days and many browser tabs later, I’m missing that reference. If I find it, I’ll edit this section and add it.

So, I dropped into my src directory and the first error I got was:

Code: Select all

C:\git\FreeEMS-freeems-vanilla\src>make clean
process_begin: CreateProcess(NULL, git describe --dirty=-DEV, ...) failed.
I control-c’d out.

Okay, so I need git. It wasn’t in the toolchain.

I turned down adding it to my PATH variables for Windows during the install, so it seemed like now was a good opportunity for that. My git path was “C:\Program Files (x86)\Git\bin”. Downside, it looks like git-scm comes with a score of potentially conflicting files that will probably conflict with my build tools, but I took at shot at it.

If you’ve never added a path variable before, this guide is useful for Windows 7 users. It’s a little different for XP and earlier.


So, I dropped back into the source folder:

Code: Select all

C:\git\FreeEMS-freeems-vanilla\src>make
make: Interrupt/Exception caught (code = 0xc00000fd, addr = 0x4227d3)
Okay, so git-scm, on Windows only results in pain and I removed git-scm, ran make again and got a wall of text :) I saw, at the end, since I hadn’t scrolled up and read everything, that I probably want to run make s19 or make clean.

I wasn’t sure how much of a mess the make bomb with Windows git-scm did earlier, so I ran make clean (get past the git error) , followed by make s19 (clearing its git errors, presumably for each stage.)

But I was generally victorious with the various s19 files in my src/firmware/ directory. I wanted the benchtest version, but down the road, I’ll probably be using the FreeEMS- -MissingTeeth-Crank-36minus1.s19.

If you reviewed the above section about the USBDM, you’ll know that I failed with the USBDM, at this point.

I referred back to the main readme in Main Trunk GitHub repo, which suggested FreeEMS Loader and Megatunix.

I decided that first would take a shot at getting the FreeEMS Loader and compile it on Windows. I Google’d “FreeEMS-Loader” as I figured that’d be the most expedient route to get to it. SeanK’s repository was right at the top. I pulled a clone of his repo, read the readme, and installed the two pre-reqs. It got a little hazy here. It didn’t say what I exactly needed to do next. So, I went into the root of the repo, tried a make. No make targets. Went into src/. Still no make targets. There wasn’t exactly clear guidance about what to run, so I referred to the Linux section.

I would have tried qmake, but I didn’t appear to have one, I had the appropriate bin folders added in my path, as far as I could tell, according to the steps. Reviewing it now, it seems Qt did not apply the correct bin folder to the PATH variable in Windows. So, after that fix (adding C:\Qt\4.7.1\bin ) it has built. I have not tried it as an app, yet. I guess a minor doc bug update is in order.

Code: Select all

C:\git\seank-freeems-loader\src>qmake
Project MESSAGE: Straight compile on windows (seank only)
Project MESSAGE: Straight compile on windows (seank only)
Project MESSAGE: Straight compile on windows (seank only)
I didn’t see any executables, though, after the build completed, so, it seems I will need to follow up separately.

I looked back over the docs for the Mac OS X side and came to the conclusion that I’d likely end up in the same boat, for an outcome, granted, in retrospect, the qmake situation would have ended differently.

So, I was left with Megatunix. I was not able to use the Windows-based Megatunix, so I changed over to OS X, and was able to load the firmware successfully, but then was not able to connect to my TA card.

Part two will follow detailing those efforts, potentially, a bit more work with FreeEMS-Loader and maybe a little bit more.
Compassion
QFP80 - Contributor
Posts: 32
Joined: Sun Jan 15, 2012 1:40 am
Location: Sunny Colorado

Re: Jaguar XJ12 Build Thread

Post by Compassion »

I've committed my initial dual-TA card schematics to Github @ https://github.com/eCompassion/Mark1.

-Evie out.
Post Reply