Reverse engineering ECU help

Blundar

Golden Member
Oct 19, 2000
1,144
0
0
Where would a good place be to start reverse engineering a honda ECU? It looks like the one I have uses an OKI 80C51 microcontroller.
I know it CAN be done because others have done it. I did a bit of reverse engineering work back in the day working on OKi 900 phones... I believe they used the same microcontroller.

Anyone have any creative ideas for simulating the operation of the car's sensors in order to figure out wtf the ECU is doing?

peace
-D
 

Superdoopercooper

Golden Member
Jan 15, 2001
1,252
0
0
I work for a company that produces 8051 microcontrollers...

I think if you had some knowlege of the device, getting the COMPILED functions (i.e. machine code) from the device would be doable... but yo have no easy way of knowing the exact "program" that was downloaded to the device. And that assumes that the manufacturer didnt' burn some lock or secrecy bit so you cannot have access to internal flash/RAM/etc.

EDIT: i'm an EE, but new to the uC game... so the above may be 100% false. Definitely do NOT take my word as your final answer, please!!
 

Blundar

Golden Member
Oct 19, 2000
1,144
0
0
I sure know about blowing security bits...

I think I'll probably start cannibalizing this one soon and see where I get.
You have a 8051 simulator software handy?
 

blahblah99

Platinum Member
Oct 10, 2000
2,689
0
0
i'd get my hands on a reader/programmer for that microcontroller first and see if you can rip off the rom code from the chip.

if its code protected, then why not just do some research and write your own code on a pic chip or something similar? I would think that's a lot easier than reverse engineering the honda chip.

My co-worker wrote one for his car and said he gained quite a few hp's off his self-written program :)
 

Superdoopercooper

Golden Member
Jan 15, 2001
1,252
0
0


<< I sure know about blowing security bits...

I think I'll probably start cannibalizing this one soon and see where I get.
You have a 8051 simulator software handy?
>>



Well... the company I work for sells development kits that come with a compiler that let you program and run code on our microcontroller via your PC serial port. Don't know if that would interest you. If so... PM me and I'll send you the website... so you can at least look over what I'm talking about.
 

TheDudeFromBelgium

Junior Member
Apr 12, 2001
2
0
0


<< If you dont mind me asking, what is an ECU?

>>



Well, last time I checked (today) it meant Electronic Control Unit.
I think it has something to do with controlling the horse power of the engine in question.
Though I could be horribly wrong of course.

Dude
 

Menelaos

Senior member
Oct 10, 1999
251
0
0
From Where in Belgium is the Dude? I'm from Brugge. Nen goeiemorgen!

About that control unit:
What does it control? The ignition timings, valve timing, turbo, ... or all of the above?

Thanks,

Menel.
 

Blundar

Golden Member
Oct 19, 2000
1,144
0
0
the two main things that the engine unit controls are:
-How long the injectors stay open
-When sparks are triggered

It generally senses:
-oil temperature
-coolant temperature
-air temperature
-manifold atmospheric pressure
-throttle position
-clutch position
-speed

Having control over the ECU means:
-spark timing timing can be better adjusted for performance/engine safety
-fuel/air mixture can be adjusted for better performance/engine safety
-larger injectors can be used to deliver more fuel w/o high fuel pressures
-conditions such as high boost not envisioned by the original program can be dealt with
-vtec switch point, rev limit and target idle can be changed
-nitrous solenoids can be driven via relay to precisely control nitrous activation at set RPMs

The reason I have a strong interest in being able to reprogram my ECU is that I will soon be running a turbocharger on my CRX, which is not something that the stock ECU was ever designed to handle. The pressure readings from sensors in the throttle body normally used (?) to adjust the fuel/air mixture for altitude changes go wacko from the high pressure of a forced induction system. I don't really feel like dropping the cash for a pre-made tunable ECU, especially considering their software will not run in 2000, which is what my laptop runs.

Being able to read boost, retard timing and dump more fuel is absolutely necessary for a properly tuned turbocharged vehicle. Rising rate regulators and high pressure fuel pumps are inelegant and ghetto IMHO. Failure to solve the boost issue with hondas leads to ECUs going wacky, lean fuel mixtures (and detonation, which destroys engines) and poor performance.
 

Menelaos

Senior member
Oct 10, 1999
251
0
0
Seems to me a lot of calculations need to be done, or are the timings necesary widly available on the net?

Thanks BTW for the info,

Menel.
 

cleanerPA

Member
Nov 27, 2001
65
0
0
Dave,
While I applaud your efforts, IMHO, it is unlikely that you will be able to get your stock ECU to do what
you need it to do.

Your NA engine does not have the sensors or corresponding outputs to feed the ECU for a turbo
application. You'll need an ECU that has these capabilities, hence the need for an aftermarket ECU.
Boost map, fuel curves, timing, etc. is all ECU controlled in a properly done turbo conversion.
That's why a lot of these things end up w/ Haltech/Electromotive/etc. ECUs.

Now, if your ECU has tons of spare inputs and you are able to fully reverse-engineer the computer,
it is possible that you can add functionality to it, but that sounds like an exercise far beyond what it
is worth in time and effort when off-the-shelf solutions already exist.
 

Blundar

Golden Member
Oct 19, 2000
1,144
0
0
cleaner, I believe the ECU *does* have all the inputs necessary.
The stock ECUs throw a code and fail to work properly when the intake manifold atmosphetic pressure (MAP) sensor goes into the boost range. Aftermarket honda-ish ECUs from zdyne (www.zdyne.com) and hondata (www.hondata.com) reprogram the stock ECU to allow fuel maps to be adjusted for boost. Knock sensors would be helpful, and I am not sure which ECUs have these stock, but I know many do, particularly the PR3 and PW0 used in B16A1 powered JDM Civics + Integras, as well as most of the newer engines.
I press onward :)
 

RazeOrc

Senior member
Nov 16, 2001
269
0
0
I saw this at work and thought what you were thinking of attempting was cool, then kinda silly, then foolish, and now I believe it's downright stupid and dangerous. The reason I'm being a bit stern is because I work on the software for EECs or Electronic Engine Controls for high-bypass turbofan engines (airplane engines) which is essentially the same basic concept behind an ECU or Engine Control Unit but for an internal combustion engine (car engine). While we have to worry a lot more about fine tuning our engines to comply with FAA regs and Customer Efficency ratings, we also have to worry about one more thing, SAFETY.

In order to even attempt to reengineer a stock chip you'll need some expensive equipment, a logic analyzer as well as some hook up to Flash the chip or write to the chip as others have already mentioned. Why is this a bad idea? Because put simply even though there is info on how to write ur own code to improve performance on those chips, what that code is missing is all of the safety features and redundant algorithms to prevent the engine from damaging itself and in the end YOU.

Let me elaborate a little, FIRST of all there is certain info that is required as you have already mentioned in order to be run or else the engine will use failsafe settings to allow functionallity but at greatly reduced performance. The failsafes are unchangeable as they provided the last defense against major computer failure of your onboard systems. The next thing is how you write ur updates to the ECU, you see, in aircraft engines there are seperate parts of the software downloaded at different stages, if you don't dl them in the right order or integrate them properly it renders the control useless. I don't know for sure if car engines do this, but all of the principles are the same. More importantly though, if you do not know the update rate of the computer that uses the ECU's controlled values, you may write code that would not update fast enough or too fast which could lead to impropper timings and damage ur chip, computer, and ur engine. Further, If when you rewrite the code, it is not properly integrated into the rest of the code (or if you just flash the damn thing not knowing what you're doing with new hand code) your comp may not be able to even use the crap u put in the ECU and will again default to failsafe values.

SECOND, if for example you sucessfully rewrote ur chip and the new effects seem to boost performance, you would have no real idea what kind of damage ur doing to ur engine. We test constantly how minor changes to NON-VARIABLE values in the scheduling of how our engine's control affects performance, why?, because we CAN make our engine run 10% more efficently or run 30% faster, BUT the PHYSICAL DESIGN LIMITS OF THE ENGINE ARE ALMOST ALWAYS COMPROMISED. We see this in the form of burst disks, rotar rub, case cracking, you name it we do it, why?, so that using the product won't cause mechanical failures or in extreme cases human injury when it rolls off the assembly line.

THIRD, Every time you change the specs for your engine in the form of software upgrades in order to improve the mechanical shortcomings of the device you introduce a very high level of uncertanty and therefore instabillity. If you were to change certain timings and pressure ratios without knowing EXACTLY how the 2 or 3 or 4 or 20 different controlled values DEPEND on one another, i.e. knowing the logic AND the Physical Design limits of your engine in order to maxamize performance but keep the engine from ending up scattered all over the ground and you, then what you are doing is like trying to do is outguess an engineer who knows the control and engine like the back of his/her hand how to improve the performance. And remember you need to know HOW performance is affected in real life after you modify the "theoretical" benefits of the software :)

While what you are thinking of attempting sounds cool, it could also be hazardous and in the long run costly and inefficent. I would reccomend just doing some research on upgrade performance ECU chips and buy the one that suits your car (that has been tested and certified so if your engine blows, they're responsible and you're not dead).
 

oLLie

Diamond Member
Jan 15, 2001
5,203
1
0
It sounds really interesting what you're attempting Blundar, but like the dude above me said keep it safe.
 

RazeOrc

Senior member
Nov 16, 2001
269
0
0
Just for clarification, the only time any of what I said holds water is if you were to successfully write to ur ECU and your car took to the changes, chances are you'd prolly kill ur chip first and therefore see nothing but a performance decrease. If you did succeed just realize you've voided all warranties and prolly ur life insurance policy for taking unnecessary risks :)
 

Blundar

Golden Member
Oct 19, 2000
1,144
0
0
1. I don't give a sh1t about blown engines. I wouldn't think about putting a TURBO on a HONDA if I did.
2. The first place I'd try a new ECU or new program would be on a dynojet
3. Thanks for the safety concerns everyone. I'm still in the middle of the engine swap.