laptop "piggybacking"?

ONLY for ADVANCED technical discussion about the 240sx!
scuba_sean
Posts: 272
Joined: Sun Dec 08, 2002 8:41 am
Car: snowboarding, sailing

Post

ok, i just bought my laptop, and i hooked it up to my deck and i got it playin over the stereo and she sounds crispy. now: i want to hook it up to my ECU to do a piggyback, like a piggyback ECU reprogram. even if it's just to monitor engine stats, and i can't change anything, i want something. im goin to university now, so maybe i can find someone in the computer science dept. to write me the program, but i'll still need what kind of signals the ECU puts out, so i can tell them. sorry if what i've said is all retarded, because i don't know the computer side of my engine as well as i should. peace


Nismo_Freak
Posts: 10314
Joined: Wed Jul 24, 2002 10:42 pm
Car: 89 Nissan 240SX

Post

Umm... why don't you first try to get the ECU to hook up to your laptop. You'll need to create your own diagnostic harness that will plug into the laptop as well as the diagnostic port.

User avatar
solaris22
Posts: 396
Joined: Fri Jun 06, 2003 11:30 pm

Post

or buy an e-manage

scuba_sean
Posts: 272
Joined: Sun Dec 08, 2002 8:41 am
Car: snowboarding, sailing

Post

first, it's a 1990, so it doesn't have OBD II, so is there a diagnostic port? and i know about the cable, ive been thinking about that. and second, what's an e-manage?

GroundZero
Posts: 224
Joined: Thu Aug 14, 2003 6:27 pm

Post

This was copied from optauto.com:

GREDDY E-MANAGE SYSTEM: MAIN UNITOur Price $303.00Compare At $379.00You Save $76.00 Email this item to a friend Item#: TP-15500500E-Manage is an inexpensive programmable fuel management system that allows you to properly tune your factory fuel system without changing the entire factory ECU system to a "stand-alone" unit. The E-Manage system is a "poggy-back" type unit that will save you from wiring headaches by working in conjunction with factory ECU. This system will allow the tuner to easily control the pulse duration of factory injectors or upgraded injectors with a built in adjustable dial, It also has a built-in VTEC controller which can adjust the VTEC shift point as well as the fuel curve. An optional communication software package (PC Windows) and harness kit is available to fine tune the entire engine, from 16 additional fuel RPM points, ignition timing, larger injectors, airflow meters, injector duty cycle, and control up to 2 sub injectors, with the use of optional communication software and a PC Window based lap-top, the E-manage system will assist the tuner in data logging and real time monitoring capability.

scuba_sean
Posts: 272
Joined: Sun Dec 08, 2002 8:41 am
Car: snowboarding, sailing

Post

that's exactly what i need, but theres one problem: im a university student who has no money. so, heres what i think. we should all try and come up with a program to do exactly what the e-manage does. talk to anyone and everyone you know, try to find out how we could do it. im sure nismo or aries or someone could get on the horn to nismo if we asked nicely and find out exactly what kind of signals the ECU wires carry and how they change with the change in the thing they are monitoring. i'll talk to everyone i meet in the computer science dept. and try to get someone who thinks they could do it. if i can get this done, i'll send it or ship it to anyone who wants it. anyone. just please help me out here guys

chrissa
Posts: 15
Joined: Wed Aug 20, 2003 7:19 pm

Post

scuba_sean wrote:that's exactly what i need, but theres one problem: im a university student who has no money. so, heres what i think. we should all try and come up with a program to do exactly what the e-manage does. talk to anyone and everyone you know, try to find out how we could do it. im sure nismo or aries or someone could get on the horn to nismo if we asked nicely and find out exactly what kind of signals the ECU wires carry and how they change with the change in the thing they are monitoring. i'll talk to everyone i meet in the computer science dept. and try to get someone who thinks they could do it. if i can get this done, i'll send it or ship it to anyone who wants it. anyone. just please help me out here guys


Hi scuba_sean,

To build your own system using a laptop, it would probably cost more that the $300 for that piggy back system. In addition to your laptop, you'll need a data acquisition card with a number of digital inputs and analog to digital converters. There aren't any ports on a laptop that can do this readily. The average price of the card alone is around $300 to $1000 USD depending on the precision and sampling rate. You'll also need a digital out card. Depending on whether you plan to drive the injectors and ignition system yourself, you may even have to make your own amplification board to step up the current for the digital outs.

As for the signals to the ECU, get a factory service manual and read the section on Emissions System. That describes every sensor that's fed to the ECU, including the analog voltages and resistances and the digital input signals. Using digital signal generators, some voltage supplies and a bunch of variable resistors, you could easily simulate every signal at a bench lab station at your university and hook up some digital oscilloscopes and see what the output signals are like.

Lastly, you'd have to develop all the software for your laptop. Most I/O cards come with device drivers and C/C++ libraries for Windows. So, brush up on your C++.

This would be a very interesting project for a good third year or forth year electrical engineering student, but I doubt you could do it cheaper than what most companies sell a mature, developed product for. Prototyping stuff is not cheap.

scuba_sean
Posts: 272
Joined: Sun Dec 08, 2002 8:41 am
Car: snowboarding, sailing

Post

you know your ****!!! what do you do? are you a computer science student? i know about the software, i was going to get someone i know to write it for me, because im lost in C++. so basiclly what you're saying to me is that the signals that the ECU and the sensors put out are not signals that could be processed by a laptop? they have to go through something that turns their signals into a signal a computer can read? i think that's what im getting. hit me back, or email me at [email protected]

ps: you live in calgary, thats the closest ive ever seen anyone on here to me. do you ever come to lethbridge?

scuba_sean
Posts: 272
Joined: Sun Dec 08, 2002 8:41 am
Car: snowboarding, sailing

Post

ok, i just spent a while looking at the e-manage thing on emab and at GReddy, and i want to know if anyone has done it to their 240? i don't see it on the engine list, so if anyone can help out by telling me that they've done it, that would be great. thanks alot.

chrissa
Posts: 15
Joined: Wed Aug 20, 2003 7:19 pm

Post

I graduated from U Calgary with a degree in electrical and computer engineering. I make a living doing data acquisition and data processing for the oil and gas pipeline industry. The concepts are pretty much the same as the auto industry, though the auto industry is much more realtime (the pipeline guys like to think they're realtime - whatever...).

Engine management is something that a few of us in Calgary are starting to seriously get into. Just the last few months I've been doing quite a bit of reading and research into what it would take to build a full replacement ECU. I'm looking more into the electrical hardware and software side. My buddy is looking more into the algorithms to properly tune the engine based on the data collected. I'd say we're still a long way off from doing anything but it's been interesting so far.

But yeah, you have the right idea. You need some kind of hardware to take the raw signal from whatever sensor you have in the engine and convert it to bytes which can be sent to the laptop. The most basic, low level port on your laptop is the RS-232 serial port. You would still need a basic A-D converter and a chip to serialize the digital signal and sent it to the RS-232 port on the laptop (the chip could be a really small and low powered micro controler). That is the simplest system. You could probably build that for cheap. From there, the systems just get faster, more complicated, and more expensive.

scuba_sean
Posts: 272
Joined: Sun Dec 08, 2002 8:41 am
Car: snowboarding, sailing

Post

that's all i really wanted, something dead simple, that would plug into my serial port, so is that do-able for cheap?

pball
Posts: 65
Joined: Wed Aug 13, 2003 4:05 am

Post

Probably not - chrissa's right, you're going to need some sort of converter to work right with a serial port. You could probably build one for a couple hundred dollars or less, but you'd need to be pretty good with a soldering iron. You're probably better off just saving up (a lot...) and getting a MoTeC M4 or some other tunable ECU; if you really want to tweak the engine to its full potential you need all the elaborate little bells and whistles.

chrissa
Posts: 15
Joined: Wed Aug 20, 2003 7:19 pm

Post

scuba_sean wrote:that's all i really wanted, something dead simple, that would plug into my serial port, so is that do-able for cheap?


Maybe. Use Google and search for an A/D converter using a serial port. It's a pretty simple idea, so I'm sure somebody must sell a cheap little black box you could plug into your serial port. The sampling rate would be low, though low here could be around 2,000 to 10,000 Hz. For an engine, that's plenty if all you want to do is watch the signals. It may be a little dicey for the crank angle sensor at high RPM, though you'd want to use a digital in for that. Digital inputs should sample a lot faster (no A to D conversion needed).

Ohh yeah, this would only be for one channel through the serial port. To add more channels, you would probably need some kind of multiplexer or a more complicated chip doing the sampling. And the sampling rate would go down. RS-232 ports aren't exactly fast. Maybe look for something that plugs into the parallel port? Or the USB port? Or even a PCI or PCMCIA card? But now you've pushed the price to $500+.

I just did a quick search myself. Lots of guys have schematics available for the serial chips they sell, but no pre-packaged boxes. Hey, maybe there's a business opportunity right there...

scuba_sean
Posts: 272
Joined: Sun Dec 08, 2002 8:41 am
Car: snowboarding, sailing

Post

i'll leave that one to you, you seem to know what you're talking about. thanks for all your help. give me a shout if ya ever come down to lethbridge

GroundZero
Posts: 224
Joined: Thu Aug 14, 2003 6:27 pm

Post

wouldn't it be easier and extremely cheaper to just buy an emanage for $300? you can plug your laptop into it, monitor all the parameters of the engine and adjust settings if need be.

User avatar
shane bigler
Posts: 90
Joined: Mon Sep 01, 2003 2:04 pm

Post

This is very intriguing. Why is possible to burn chips for so many other makes of vehicles but not for the SR20det? I have friends that get maps and burn their own chips and tune their own ecu's at home but from the research Im doing on tuning my ecu this cannot be done. I mean whats Jim wolf doing that we cant do at home? I really dont want to mail off my ecu but getting E-manage or S-AFC doenst have the same versatility as my friends are getting with burning their own chips. I dont have any experience with this so whats the dilly yo?

User avatar
[s3]
Posts: 722
Joined: Tue Sep 09, 2003 5:24 am

Post

For later model 240s with the Consult Port, 300 degrees offers this

http://www.300degree.com/electronics/nprobe/

I have one, works great so far on my Z as well as my Maxima and many other nissans with the Consult port.

As far as burning EPROMS go, the first step to doing anything is to decode the factory EPROM with a HEX editor. I'm pretty sure JWT has decoded the SR20DET timing maps as well as all the other functions the EPROM holds. You'll need an EPROM reader to suck the code off and probably a burner to reprogram new chips.

http://ashleypowers.com/Zemulator/Index.htm This particular applicaition is for the Z, however the SR20DET ECU might be very similar.

Its not hard to decode the ECU, since all the data is static data that does not change, it just takes a lot of time to find out all the values. I'm sure a group of CS kids would hack it up in no time.

180fan
Posts: 7799
Joined: Sat Dec 14, 2002 12:16 pm
Car: 89 fastback

Post

c/c++ executes too slowly. might want to consider using assembly. next, you can use whatever sensors you want, just have to know the specs for the range of voltages that it will run through for the different sensors and build your program accordingly to be able to accept the range of voltages per sensor and how they behave (linear, exp, etc) and there are some other details to how to modify the signal so that it'll be something that the ecu will accept and understand or you'd have to use an eeprom writer to rewrite some of those specs into the ecu and pray to god that the sensor you've selected will fall within acceptable range for the ecu. You're in for quite a bit of work if you're going to do a stand alone system hence why most of those true stand alones cost so much, because there's so much work involved in making them. I'm pretty sure I've missed some of the other points for such a system, but in general, you're looking for a long project that would require quite a commitment of both time, energy, and money. Save for the e-manage and save yourself alot of headache.

User avatar
s14db
Posts: 94
Joined: Sat Nov 01, 2003 8:59 pm
Car: 1998 240sx

Post

I use Nology's PDA-Dyno for all my data loging. It only works with OBD-II cars. It's Palm based so you need one of those. I like it cause I had a palm already and it's small.The only thing I don't like is that it can only pull OBD-II info. I hooked it upto a '99 ford truck and could only see the o2 sensors. Luckly my 240 puts out alot more Generic OBD-II info.There are some laptop based products for shops that start at over $1k. I have not seen anything for OBD-I. Most likely cause every manufacture has a different spec. the only one outside of nissan that I have seen to program OBD-I is Jim Wolf. He spent some time and money cracking the code and I don't thing he'll give up the info too quick.I don't think writing your own program will be that easy. Nissans ECUs are very cryptic. They are not wide open like hondas(those bastards and thier Hondata!). Your best bet is with the emanage for OBD-I.

chrissa
Posts: 15
Joined: Wed Aug 20, 2003 7:19 pm

Post

shane bigler wrote:This is very intriguing. Why is possible to burn chips for so many other makes of vehicles but not for the SR20det? I have friends that get maps and burn their own chips and tune their own ecu's at home but from the research Im doing on tuning my ecu this cannot be done. I mean whats Jim wolf doing that we cant do at home? I really dont want to mail off my ecu but getting E-manage or S-AFC doenst have the same versatility as my friends are getting with burning their own chips. I dont have any experience with this so whats the dilly yo?


Some of the earlier ECUs for the SR20DET are really easy to reprogram the EPROM. The difference between the older ECUs and new ECUs is that the older models have an external, generic EPROM (external from the MPU). You can easily pull it off the board and get an image of whats programmed on it. A replacement chip with a new program loaded on it cost a few dollars. The MPUs used are generic, off the shelf chips, with the programming manuals readily available (Nissan uses Hitachi).

As time progressed, Hitachi started farming the work out to a subsidiary called JECS. They started introducing propriatary chips, combining the MPU and EPROM together, and basically making it near impossible to reverse engineer what was done. The newer ECUs don't have external EPROMS, but do have an exteral data and address bus that you can hook up an EPROM to mounted on a separate board. The programming from the factory for the ECU now lives in the MPU which is a little (or alot) more difficult to get out. Jim Wolf managed to get it out, and the rest was easy.

If you cruise some of the Japanese and Australian web sites about the SR20DET, you can find lots of info on the older ECUs. As soon as the ECU code moved onboard to the MPU, there's not a lot of info available.

Oh, and the comment that C/C++ is too slow, that's just not true. There are many excellent compilers for embedded systems out there that can generate some amazingly efficient compiled code. Anyone who programs in assembly by choice today is not doing themselves any favors. I think assembly is still important to know (it teaches you a hell of a lot about how memory works), but developing in it is just not practical anymore considering development time, maintainability, debugging, and interfacing to the millions of provided software device libraries that usually accompany the hardware you buy.

Chris.

180fan
Posts: 7799
Joined: Sat Dec 14, 2002 12:16 pm
Car: 89 fastback

Post

dunno man, I'm taking a digital design class, we're doing all assembly, higher level languages take too long for execution. I guess it depends on what you're doing and preference, but I do have to agree with you, it's a pain to program, but boy is it fast. also if the cars are running off RISC cpu's it'll execute natively which is a big plus. I haven't personally had time to look extensively at the ecu for the SR or KA but I assume it'll take some time to figure it out even with the labs I've got access to at school unless one of my profs decides to lay down the ownage on my as$ and show me how it's really done. Ha ha ha. Dunno maybe after finals I'll show my professor and ask him what would he do to backwards figure it out, but that's if some of you are actually serious about putting the time into this kind of project


Return to “240SX Technical Forum”