Consult type hardware/software plans

Paul R

New Member
Hi,

Not sure if this news has been posted recently but anyho. A while ago I was going to get a Techtom CMX-100-N1 to reverse engineer and build a Consult port plugin system to monitor the ECU and maybe change a couple of parameters (possible on some Nissan ECU's not sure about the R), nothing such as changing a map but maybe timing etc...

Anyway I got a bit stuck with the hardware side, I had a basic circuit diagram but couldn't figure what to do with the CLK line. But recently those nice people on the SR20 Forum (and a couple of other Oz forums) have published the plans for the circuit. As you will be able to tell below it's nothing complicated and the parts should be around £10.

This circuit changes the TTL output from the ECU to Serial RS232 voltagesm so that you can plug it into a laptop/palm/dish washer etc, it also provides a CLK signal to the ECU which is what I was missing.

When connected you can send codes to the ECU and ask it for realtime values and stored fault codes. There has already been some software published on the net as Opensource code and several people have stepped forward to help develop it.

I'm going to help with the programming as I do that anyway in my current job and I believe in the Opensource ideal. Also the other SR20 owners are not R owners and there may be subtle differences between ECU codes.

So I thought I would share this exciting news as it's something which has been a long time coming. I'm not trying to take any credit for this in anyway but it's great news and such a shame that companies hold onto information and charge a large amount for it but that's business and you can't blame them I guess.


There is a cut down version of the Conzult software that can be freely downloaded but I can post all of the links I have found so far, sourcecode, circuit diagrams, transmision codes etc...


This is the parts list, it's been a few years since my last Electronics course (which was only ONC level) and there are bound to be people on this list who know a lot more about it than me so if there are any suggestions then please let me know :)

(Note: This parts list is for bulk buying not all the caps and resistors are needed for a single circuit.)

78L05 5v regulator
2.4576MHz Osc and 74HC163 for the CLK line (153.6Khz)
MAX232 (or varient, cap values may need to change) TTL to RS232 converter
0.1 uF caps x 10
10 uf caps x 10
150 Ohm x 10
1 kOhm x 10
4.7 kOhm x 10
Diode
NPN Tranny (BCR133)
LED
DB9 connector
Box

Anyway I'm off to Maplin to the bits (or equivilents) and build something over the B/H weekend :)

Have fun!!!! :)


P.S. I did do a search on the forum but nothing obvious came back so please don't shoot if you all know this...
 

Paul R

New Member
Oh well Maplin had a "Staff training day", nice. Maybe tomorrow then.

This was the original thread I read which explains a few things and has a few other links http://www.sr20forum.com/showthread.php?t=68441&page=1&pp=20
seems like the CLK bit had a couple of people questioning things. I had put a silly scope on it and wasn't sure what the output was. The original schematic was posted a while ago on the SkylineDownUnder forum.
 

Tony

Member
Sounds awsome m8,

SR20 forum stuff hurt my head!!!!!

I`d like to see this get off the ground!!!!



Tony....
 
W

Willy

Guest
Awesome man. I've been looking into this for a while, but never had the car to put it on (I had an R31 with RB20DET). Now I have a 'R so I have an excuse. I found another site with a circuit diagram. I'll hopefully be building this in the next few weeks. :D



http://www.users.bigpond.com/webspace/plms/index.html

Edit: Sorry, I just realised this link is on the SR20 page.
 

Paul R

New Member
Yeah there is quite a bit of info to get through but it's not that bad really when you consider the simplicity of the hardware and the method of getting values to/from the ECU. The hard bit is figuring out what codes do/get what, some of them have already been worked out if you look at aircon.h and ecu.h.

The unit can return data to the free Conzult software so it is quite easy to tell if it is working or not (that and smoke comming from the ECU :) ).


Tony: I deffo want to see this going as I think it can only help the R and other Nissan owners, the other good bit is the ability to download the ECU ROM (if you know the base address apparently), if you couple this with the freeware ROM Editor from 925style that you can download then we can start to learn more about the R's mapping. There were some SR20DET maps included with the editor software but I don't know if there is anything R specific missing.


Willy: Excellent, I know there were quite a few links mentioned on the other thread but it's really great that the information has been brought together. If for some reason you get round to building the circuit before me let me know how it goes please. There were a couple of different diagrams with only minor changes to some of the componants. The Nissan egroup one seems to be the most detailed. I'm going for the SR20 version though.


If I can get the parts (and I have most of the non-IC stuff lying around the house) I will get something built for the Donny North UK show next weekend and bring my laptop if anyone is going and wants to have a look.
 
W

Willy

Guest
Well I have all the components that I need already. The last one I needed was the EXO-3 oscillator and I just ordered that yesterday and it should be here tuesday. I'll design up a board in Protel over the weekend and get the techys at uni to make it up for me :)
 

Paul R

New Member
Sounds good, I got most of the parts from Maplin last night but they didn't have the right crystal or 74HC163 chip so I will see what happens with the ones I did get hopefully they are equivilents but it might just go pop .

I've got some vero board to prototype it just in case. Where did you get the EXO3 from? We did a search but it didn't come back with anything??? Maybe I should of ordered the parts from RS or something. In the end it came to about £10 but that was with having duplicates of a few componants.


The sample source code is written for UNIX style com ports, I spent some time yesterday writing a virtual dashboard app under Linux which is just text based. If that is fine then I'll port it to a Windoze GUI without much hassle and do a GTK or TCL version as my laptop dual boots as well.

Looking at ecu.h there are some gaps in the command list where their function is not known which should be fun in fiddling with :) There are some defines as well for the NA ZED, I'll be adding the defines for the R when we find out what works and what doesn't.


I was going to suggest to the SR20 Forum members of defining a project under SourceForge or the like and have all our versions under their with multiple maintainers. Any thoughts??? Saves duplicating effort and then we can have multi O/S's looking similar (or at least features).


Just out of curiosity would you be better at the hardware or software side of the "project"?
 
W

Willy

Guest
I'm in Australia. I got the EXO3 from farnell (www.farnell.com). I think they are in the UK too. It cost be $15AUD, which is roughly about 6 quid. So it is fairly pricey.

Sourceforge sounds like a good idea.

I'm probably better at hardware, but I don't think we need much more advancement in that area. I may start work on a daughterboard and EPROM emulator later this year, all depends if I get time.

As far as software goes, I've only really done a few projects relating to my 5 year uni course. I've done C++ in UNIX and with Borland Builder, Java and a little bit of VB that I taught myself to work with the COM port. Oh yeah, I've used Java with the COM port and it was very easy. Think Java may be too slow and unreliable for our project though.

I'm pretty quick at picking any programming up, so I'm happy to help out in this area. I live with a guy who's a programmer (unfortunately mostly web stuff), but he's pretty quick with VB. I don't really like VB much myself.
 

Paul R

New Member
Seems like the IC I got wasn't correct and they (Maplin in Wrexham) don't have any binary counters in stock. I'll order one but in the meantime I had a thought. The CLK is the baud rate * 16 so for a 9600 baud rate you have 153Khz CLK. So far people have said you should be able to use different baud rates so if my crystal is 3.535Mhz that divided by 16 is around the 230000 baud rate that more recent hardware supports, so I guess the question is does the ECU support that speed of CLK??? Can't hurt to find out.

Anyway a bit more progress with the Win32 app. I've started writing a tabbed dialog affair in Visual C/C++. I need to port the serial bit into comms classes. The original code made some assumptions which are detailed in the PLMS PDF for validating the comms traffic. For the UI bit I was thinking of using the tabs to separate out logical functions such as one tab for all sensor information or grouping sensors and tests together

e.g.

TAB1 - General information

ROM ID
Search ROM address space for bytes
Save ROM to disk with variable start and end addresses

TAB2 - Ignition or Engine information tab

RPM
Injector pulse timing
AFR
Current timing from CAS
Timing Adj (+5/-5 degrees seems to be the standard)
Balance tests

TAB3 - Aircon information tab (maybe)


You get the idea. Will also have an option to save either the selected stats or all stats to a file for each comms cycle so you can use it as a data logger that can be replayed.

Any thoughts or features anyone???
 
W

Willy

Guest
That sounds really good. I was thinking that a tabbed affair would be the way to go.

For the CLK, I'm not sure if it will work or not with a higher frequency chip. Someone said that they were guessing that it may allow you to set the baud, but who knows. Hopefully he's right. I'm sure it won't hurt to find out.

I'm still in the process of finishing the board. I've got the schematic done and the footprints set up with bigger pads so they're easier to solder. Should finish the PCB design in the next few days and hopefully get it milled out by the end of the week :D

I was thinking on my way to work this morning that it could be possible to add the fuel and timing maps at a later date. Basically the fuel/timing cell in the map is referenced using the RPM and a value for load (boost they call it in RomEditor) that the ECU has calculated. I have the equation that the ECU uses, so in theory we would be able to show a trace of which cells in the fuel/timing map that the ECU has accessed. This could make tuning easier.

My ultimate aim for this was to use a separate address EPROM tracing piece of hardware to do it for me and integrate this with an EPROM emulator and the daughterboard. Hopefully I can find a 16bit RAM chip so I only need to emulate 1 chip, not too. I started looking at this a few months ago. I think I did find one from memory. I was planning on making an emulator for my old skyline (8 bit ROM), but I wanted to make it good enough so it will work with SR ECUs as well. We'll see. I think it's gonna be a long way off yet (no time).

Sorry bout the long post.
 
W

Willy

Guest
I just built the board last night and mounted it in a box. Hopefully I'll be able to test it over the weekend and see what happens. Fingers crossed that it works :)
 

Paul R

New Member
Excellent, well let me know how it goes. Been busy with a few things so got all the parts just need to build it sometime hopefully this week.
 
W

Willy

Guest
OK well it's built. I made a few stuff-ups with the board. I must have been real tired when I made it. Anyway, I finally got hold of a lap-top last night so I could test it. We were trying the Conzult demo program. I'm not sure what this program is supposed to do in the demo version, but none of the sensor voltages, etc are working (not sure if the demo supports it). The things that are working are you can turn the engine fans on and off and you can put it into idle adjust mode. I'm thinking either the demo doesn't show the sensor voltages or my board is not receiving anything, just transmitting. Most likely the latter case.

I'll have another look at it tonight. The RS232 TX line just sits at -9V. Do you know what the voltage levels of the ECU are to the receive pin on the consult board? I've gotta try and find out (I think it's 12V, but that kinds doesn't make sense going off the schematic).

I'll have a look around today and see what I can find. I also need a terminal program that sends/receives in hex. I found one dodgy dos program, but I'm not sure if it works properly. Any ideas?

For the software side of things. I've been thinking of going Java. I know most people hate it, but it is good because it will run on any platform. I'm also thinking of investing in a PDA and trying to write some software for it. Apparently PDAs use a Java Development Tool that is very easy.
 

Paul R

New Member
Nice one :) I ordered the missing bits from Farnell today, next day delivery but it was after 5pm when the order went through so maybe Friday. Anyway, the Free Consult program might not work properly because it's not written for the R but all that should happen is that it will try and get sensor information that doesn't exist - unless the programmer tried to determine what car, Z TT or Z NA, by looking at the ROM and it's getting confused.

Have a look at ZTalk from www.zcontrol.net they might be able to help as they mention a version for SR ECU's. Other than that do you have/use Cygwin or VMWare?

Cygwin will allow you to run Linux programs in a Windoze window so you should be able to use the *NIX sytle com ports (/dev/TTYS0 etc...). Cygwin is freely downloadable but you have to *cough* pay for VMWare which would allow you to run Linux in the background as a separate OS. I'm only suggesting these as ways of debugging the hardware by using a modifiable software source.

If you don't fancy these then let me know and I'll upload what I have so far which might not be much but should give you some info. I'll add a debug window tonight which dumps the comms traffic. Of course it will be Alpha as I don't even have the hardware built but it wont melt your machine (but it might not work at all), it's written in C using lcc which is a free compiler/ide for Win32.

The Java app should be fine, only dabbled with Java to be honest but I have recently been playing with the J2ME SDK and started writing apps for the Symbian OS phones like Series 60 and Sony P800/900. It would be portable but would take slightly longer. I'll finish some of this app even if it's just used for debugging and see where that gets us.



As for the TX line, it's supposed to be idle low. And considering you can talk to the ECU to put it into test mode (and the ECU goes through a handshaking sequence at the beginning) then I think your hardware is fine or it wouldn't get this far.

Have fun!
 
W

Willy

Guest
Cool thanks for the reply. I'm hoping to get Linux on my PC soon. The problem is that the only laptop I have access to that has a COM port is my friend's and it belongs to his work. So we can't really install must on there. I found the problem with my board, I had connected to T1in on the MAX232, but on the other side connected to T2out. That was easy to fix, just bridged two pins. Now I have to get my mate back again so I can test it on his laptop again. I was thinking of just making a real long serial cable so I can run it indoors for development :) hehe.

I may also look at building a USB board soon. That would be far more useful.

I'd be interested in having a look at what you've got so far.

Thanks for the help.
 

Paul R

New Member
Try somthing like the Slackware Live CD, you can download it for free and fits quite easily onto a CD, then you just boot off the CD and don't have to install anything on the PC itself. You can still access the floppy drive and harddisks though as you should still have vfat and ntfs modules as standard (either that or I can build a kernel just to go on a floppy with the relevant bits on there; won't be pretty though).
 
W

Willy

Guest
Ah, great idea. One of my mates suggested Slackware too. Sounds good :)

I'm seriously thinking of looking into buying an iPaq and developing some software for that. It's very annoying that I can't get my hands on a laptop all the time.

I guess I have to figure out my priorities though. I should probably buy other things for the car first. I've had it a month. It has no stereo what so ever (not even speakers) and a standard clutch which doesn't like much abuse. Oh well, that happens.
 
W

Willy

Guest
My board works!!!

I finally got hold of a laptop with a COM port (an old P120!!) and my board works. I loaded up the free version of Conzult and it worked perfectly!!

The main interest to me was that my injectors reached 85% duty cycle (stock boost), which shows they have a bit left in them yet :)

My next task is to get on with the software. I also found a USB module that comes with drivers so it creates a virtual COM port and any software can still use this 'COM' port as if it was real. Should be pretty good for development. Also comes with extra drivers that allow you to talk send/receive data etc as a proper USB port :)
 
D

domestos75

Guest
hey man,where abouts in Nth Qld are you?townsville??

cheers,
steven
 
W

Willy

Guest
yep :)

Are you?

I just bought my car a month ago from a guy called Leon who lives up here. It's a grey one with FMIC and no bonnet scoop.
 
Top