Jaguar XJ12 Build Thread - COMMENTS

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

Re: Jaguar XJ12 Build Thread

Post by Compassion »

The previous post was generally intended as a shore-up for what I've been up to, and not my final full-detailed offering about what has been worked on. I had a decent burst of time to get to devote to FreeEMS and getting my TA card setup. For me, it wasn't as detailed as I would have liked, but it's just what I could get out the door at that time.

As for the pin-assignments, all I know is that, from your commentary, is that there is something wrong with my TA card pinouts. I asked Andy as he was awake and available at the time, as I was a little miffed, and still planned to follow up with Dan (Ravager). At first I didn't know the IRC callsign to the forum name, so I was at a bit of a dead end. After that, it's come into an issue of my availability and timezones, and the issue that follows.

I've also been working on getting a github repo setup. I figured that once I had gotten that uploaded, it would be *drastically* easier for comment and review for everyone. The problem with that is that I just don't know git, and I worked with cvs for my commits back in my Gentoo dev days, which have since long passed.

So, for everyone else, including me, I haven't had a chance to see if what Andy told me was correct, with the pin changes. He was just engaged at that time because I was trying to make heads or tails about what you'd said. I also commented that Issue 190 just isn't readable in its current form. Would a wiki page with the various pinouts for the TA card, and the S12X packages that are in use for this project help clear up confusion about them for the longer-term?

I just made a best effort from deciphering from the Ravage and Jaguar builds about how that was arranged, and then, made a simple transposition about which card was going to end up being primary, because I was tackling Fuel before Ignition first. At least, that is my guess about what was wrong. If there's other stuff wrong, we can talk about it after it is on Git.

As for the megatunix, FTDI, buildchain issues, and firmware issues, I am planning on a series of more expansive posts, as I mentioned above, I wanted to reproduce what I had issues with first. I just wanted to get in a position that I could verify if I had a good firmware build, but that was impossible to know without being able to a good log or good comms data. I didn't have a script that I could just point at my serial port that could poll it repeatedly to generally say, 'is this data good! yep it's good!/nah it's garbage' to help edge that along.

I don't like to be too reactionary in my posts and verify that the issues I had were true issues and understand. I don't like filing bugs prematurely. The FTDI issue is just a hypothesis. I essentially want to quantify if it's a) a problem with my specific dongle, b) it's something related to the scenario I described last night in #freeems with the SP232A and the FT232R c) it's just a platform issue with FTDI drivers on windows d) megatunix-only (unlikely as it presented itself as an issue also with OLV viewing my logs), or E) it's bad firmware, bad luck, try again, F) it's the ta card, you done fucked up and managed to ruin it in 2-3 weeks flat, way to go idiot, thank goodness you've got a spare/don't do that again F) something that does not fit the above hypothesis or scenarios.


An addendum will follow, since I have more to elaborate on for the above, because I've got more. Documentation takes time.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Jaguar XJ12 Build Thread

Post by Fred »

Compassion wrote:As for the pin-assignments, all I know is that, from your commentary, is that there is something wrong with my TA card pinouts. I asked Andy as he was awake and available at the time, as I was a little miffed, and still planned to follow up with Dan (Ravager). At first I didn't know the IRC callsign to the forum name, so I was at a bit of a dead end. After that, it's come into an issue of my availability and timezones, and the issue that follows.
That is what the forum is for, Evie. It couldn't give a flying fandango what your time zone is. It's always up and waiting for your questions such that the next person who wakes, clicks, reads and knows can respond. Furthermore, I call bullshit on your "callsign/forum name" thing, as I linked you directly to the thread in which I quoted him and suggested you needed his services.
So, for everyone else, including me, I haven't had a chance to see if what Andy told me was correct, with the pin changes. He was just engaged at that time because I was trying to make heads or tails about what you'd said.
You might have succeeded, AND helped others, if you'd been doing that in public...
I didn't have a script that I could just point at my serial port that could poll it repeatedly to generally say, 'is this data good! yep it's good!/nah it's garbage' to help edge that along.
On mac and Linux you do, and even on windows, as I found out today. Just open the port with an appropriate application, dump a file to disk, run the parser over it, or OLV over it, done.

Stop making excuses and pick up your game.

Re the documentation and technical details that you plan to post, that's nice, but not overly important right now. You'd have a solution if you were working more publicly with the rest of us.
I also commented that Issue 190 just isn't readable in its current form.
As what? It's an issue on a tracker, for developers. Lots of well written documentation will be available eventually. In the mean time, people who intend to design their own hardware MUST communicate with those who know. NONE of the documents are or even can be good enough, for the time being, and this is not a problem, at all. This project, must be more intimate than that, as nothing is finalised, and documentation written now would quickly lag reality in almost every area. Such documentation is a liability, not an asset.

a) a problem with my specific dongle
b) it's something related to the scenario I described last night in #freeems with the SP232A and the FT232R
c) it's just a platform issue with FTDI drivers on windows
d) megatunix-only (unlikely as it presented itself as an issue also with OLV viewing my logs), or
E) it's bad firmware, bad luck, try again
F) it's the ta card, you done fucked up and managed to ruin it in 2-3 weeks flat, way to go idiot, thank goodness you've got a spare/don't do that again
F) something that does not fit the above hypothesis or scenarios.

a possibly, but unlikely
b not possible
c quite possible, you're yet to paste a simple version into IRC or the forum, though
d possible because you're on windows, unlikely regardless
e possible as your build was full of errors, though unlikely all the same
f1 so unlikely you could say it wasn't possible
f2 always possible, no matter what
Documentation takes time.
Again, not really necessary in this instance, as a user, all you need to do is communicate openly with those who know the system like the back of their hands.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Jaguar XJ12 Build Thread - COMMENTS

Post by Fred »

EDIT: Deleted the cross post in this thread, checked to be identical to the other thread post, except the first line. Cross posting is rarely OK, especially for large posts.

Code: Select all

freeair:tuner fred$ diff evie.*
1c1
< 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. 
---
> Crossposted from my Build Thread:
This was HUGE, so I cut it down to size:

Compassion wrote:Crossposted from my Build Thread:

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.
[/size]

:-)
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
preludelinux
QFP80 - Contributor
Posts: 51
Joined: Sat Feb 05, 2011 7:35 pm
Location: Moline IL 61265
Contact:

Re: Jaguar XJ12 Build Thread - COMMENTS

Post by preludelinux »

Nice well made post. You most be very good at documentation by the looks of the post. Looks like there was some information conflicting in different places. Is there anyway all this information could be updated to better help the community? I can see with the forum information gets outdated daily reading an older thread can end you up in trouble or reading in the wrong place in a thread. I also understand ordering all this information is a huge task.

i understand this takes time and resources maybe a person could do this task and help free up valuable developer time?
Compassion
QFP80 - Contributor
Posts: 32
Joined: Sun Jan 15, 2012 1:40 am
Location: Sunny Colorado

Re: Jaguar XJ12 Build Thread - COMMENTS

Post by Compassion »

Dan wrote:I hear you have some hardware related questions? fire away and I will answer them as best I can mate.
Yep,

Got my schematics exported to PDF, since I heard you didn't have KiCad. Just as well, as KiCad's sourceforge page has been down all day! You can find them here.

Still trying to make heads or tails of the proper naming conventions for the various analog pins, derived from Jaguar/Ravage.Some of the acronyms can be a bit thick to cut through, so I sort of expanded them for my personal readability. needs.

Ignore the PS experiment stuff for now. I don't have any proper values assigned to the LC Choke filter or the potential additional LDO stage. I'm planning on torturing the LDO with various noise frequencies in the near future and checking out the ripple, and posting the results. I'm more just morbidly curious. I was taught to start with a solid power supply design and move from there.
User avatar
Dan
LQFP144 - On Top Of The Game
Posts: 1204
Joined: Tue Mar 02, 2010 2:33 pm
Location: Australia

Re: Jaguar XJ12 Build Thread - COMMENTS

Post by Dan »

OK. Please just refresh my memory why you are using two TA cards? I think it was fuel only and ignition only experimentation, but I think one will do both and then you can combine the functions if you like. I am not sure whether you want the io shared between both cards if thats the case.

Sheet 1 (unsure of what to call it at present)

Be careful with the digital wakeup pins and selecting them, you have done the right thing linking both PORTE pins for the moment, it is still undecided which one is going to be used (i think).

Power Supply Sheet First (sheet 2)

I know you said ignore it, but I want to comment anywho.

I dont see why the choke circuit is necessary? please clarify? are you doing this as part of your noise injection test? I dont think you will need it in real life with the regulators you have selected (same as RavAGE / Jaguar)

Why have two seperate regulators for analog and digital supplies? be careful with reference voltages here if you do this.

The diodes are also not necessary with that breed of regulator. I also dont think the MOV is necessary either, but thats just me.

TA Card pinouts (sheet 3)

From what I gather this is correct, but the TA site is down and I cant get a copy of the schematics, I can only refer to the DFH pinout of them. I think the actual TA card pinouts are correct. I havent checked which pin you are using for what function (ie. IAT or MAP, etc) but if you are following CURRENT RavAGE schematics, then you are correct.

Can we see the rest of the circuit? or have you not designed it yet?

Hope that helped.

Cheers,

Dan
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Jaguar XJ12 Build Thread - COMMENTS

Post by Fred »

Dan wrote:OK. Please just refresh my memory why you are using two TA cards?
v12, 1 for ign, 1 for inj. 6 port T pins each, no xg.
Be careful with the digital wakeup pins and selecting them, you have done the right thing linking both PORTE pins for the moment, it is still undecided which one is going to be used (i think).
Better: Forget wakeup, implementing that isn't super high priority, so it'll just be un-needed extra complexity and unreliability in the mean time. Ravage has this for development. Chicken egg.
I also dont think the MOV is necessary either, but thats just me.
It's good for robustness when jump starting, etc.
From what I gather this is correct, but the TA site is down and I cant get a copy of the schematics
http://www.diyefi.org/downloads.htm < this link has worked for 4+ years ;-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
DeuceEFI
LQFP144 - On Top Of The Game
Posts: 578
Joined: Thu Feb 25, 2010 3:57 am
Location: Gosport, IN USA
Contact:

Re: Jaguar XJ12 Build Thread - COMMENTS

Post by DeuceEFI »

As for the diodes in front of the regulators I agree with Dan, you don't need the 1N5818-TP diodes as the regulators already have reverse current protection... I've already removed them from the Jaguar board power supply schematic... Sorry about taking so long to update the files in my repo...

I'm curious about the use of the 12v LDO... What is it going to supply power to?

Keep the MOV, it is cheap insurance if you ever jump start the car or if the voltage regulator ever dies in the alternator.
Post Reply