Alfa Romeo Owners Club of Australia Forum

Technical => 160 Series (90, 75, 164 Sedans) => Topic started by: festy on October 10, 2015, 08:49:31 PM

Title: My short term 75
Post by: festy on October 10, 2015, 08:49:31 PM
I brought this home today, on loan for a couple of weeks.
It was the first time I've driven an Alfa on the road since 1998  :-[
(http://www.festy.org/pics/albums/userpics/10001/TS1.jpg)

And most importantly, it's a twinspark!
(http://www.festy.org/pics/albums/userpics/10001/TS2.jpg)

I did a lot of R&D work on the Motronic ECU system a couple of years ago, adding new features etc but I couldn't go any further without a car to test on, so I was a little bit excited to finally get my hands on one.

First job - find the ECU and diagnostic port. It's a '91 model so has the later 3 pin fiat style port.
(http://www.festy.org/pics/albums/userpics/10001/TSplugs.jpg)

After following the wires, I found the ECU hiding behind a metal cover panel so popped it open and installed my custom firmware chip, then started the engine. I've been waiting a long time for this  8)
(http://www.festy.org/pics/albums/userpics/10001/TSecu.jpg)

It's got all the normal issues  - the VVT solenoid is stuck advanced (I think), it's only running on one coil, there's an ARC disco etc but that's all part of the TS experience  ;D

Title: Re: My short term 75
Post by: Divano Veloce on October 10, 2015, 09:23:13 PM
Thats brilliant news, whatever you do don't give it back!
Title: Re: My short term 75
Post by: Paul Gulliver on October 10, 2015, 10:59:51 PM
Festy , that great news. What you achieved with your ECU thread on Alfa BB was unbelievable considering you didn't have a car . I hope you are now in a position to maybe revived that thread.
Title: Re: My short term 75
Post by: lombardi on October 11, 2015, 07:16:44 AM
Once you drive it, you will realise what all us owner's of 75s, you will not give it back !
Title: Re: My short term 75
Post by: Bulli75 on October 11, 2015, 03:30:52 PM
 ;) ;) CORRECT!!!
Title: Re: My short term 75
Post by: pasey25 on October 12, 2015, 09:26:59 AM
I stupidly sold mine. Now I look for it everywhere.

just looking at that pic of the diag connector gave me a serious pang of saddness/regret
Title: Re: My short term 75
Post by: festy on October 12, 2015, 09:39:46 AM
A few screenshots of the live data progress - I think there might be a bug in the coolant and air temp sensor code because there's intermittent faults in the logs, but no fault codes on the ECU.
The load of 100 at idle makes me think the AFM needs cleaning, so for now I just lowered the ignition advance at 900-1600 rpm / load point 100 so it doesn't bog down when you crack the throttle off idle.
I sat in the driveway blipping the throttle while tweaking the ignition map a little at a time until it responded better :)

The first two pics show advance of about 17* at idle, but the third pic (after the map changes) show about 14* at idle and 16* at 2200 rpm.

Quote from: pasey25 on October 12, 2015, 09:26:59 AM
I stupidly sold mine. Now I look for it everywhere.

just looking at that pic of the diag connector gave me a serious pang of saddness/regret
This one is for sale, $1200 ono ;)
Title: Re: My short term 75
Post by: festy on October 12, 2015, 04:44:29 PM
Fixed the temp sensor bug - it was in the datalogging software, not the ECU code which explains why there was no faults logged.

I spent ages yesterday trying to sort out the ignition issues, both distributor caps and rotors were pretty sad and they were firing in different orders.
I thought I was going mad because it would only run if cylinder 3 was firing when cylinder 1 should have been according to my timing light, until I eventually recalled being told that this engine has an alfetta water pump fitted... and I'm guessing the Alfetta's TDC pointer must be in a different spot to the TS?
   
Title: Re: My short term 75
Post by: Duk on October 12, 2015, 06:07:47 PM
Quote from: festy on October 12, 2015, 04:44:29 PM

I spent ages yesterday trying to sort out the ignition issues, both distributor caps and rotors were pretty sad and they were firing in different orders.
I thought I was going mad because it would only run if cylinder 3 was firing when cylinder 1 should have been according to my timing light, until I eventually recalled being told that this engine has an alfetta water pump fitted... and I'm guessing the Alfetta's TDC pointer must be in a different spot to the TS?


How do you mean they were firing in different orders? The leads were done incorrectly?
Title: Re: My short term 75
Post by: festy on October 12, 2015, 06:32:41 PM
Quote from: Duk on October 12, 2015, 06:07:47 PM
How do you mean they were firing in different orders? The leads were done incorrectly?
Leads mixed up, or distributor rotated a *long* way out of position. The cam distributor was already lined up with it's reference mark, but couldn't find any reference marks on the other one so I'll pop the cam cover off when I get a chance and line it all up properly.
Title: Re: My short term 75
Post by: festy on October 12, 2015, 07:20:19 PM
Cleaned all the plugs and reset the gaps, cleanes the distributor caps again, and got it running on the cam distributor nicely so then set the other to match and now it will run with either coil disconnected (but not both)
Next job, test the cam variator...
Title: Re: My short term 75
Post by: festy on October 12, 2015, 07:50:11 PM
Cam variator is working just fine, the hesitation off idle must just be the overzealous AFM.
So, do I pop the top off it to clean the tracks and tighten the spring one notch, or just fix it in software?  ::)

My logs so far show it idling with a 'load' of 85-100, which translates into about 5 millisecond injector pulse width.
I would have expected maybe 1-2ms?
The factory fuel maps have a load axis covering loads from 25 to 120 (1.25ms to 6.25ms) so it's almost off the end of the map just idling  :o

When I first pulled out the ECU I noticed signs that I wasn't the first to open it up (scratches around the folded tabs, one of the mounting nuts missing etc) and once I looked inside that was confirmed.
It had the original '191 chip which is correct for late model AU twinsparks, but someone had broken a leg off the chip and soldered it into a carrier socket so I'm guessing it had an aftermarket chip installed at some point in it's life and later removed - so I wouldn't be surprised if the AFM flap has been fiddled with. I should probably check to make sure there's no "instant +10hp" resistors connected to the coolant sensor too :)
Title: Re: My short term 75
Post by: festy on October 12, 2015, 09:42:03 PM
I just went for a quick drive, first time out running my firmware ;D
It went a fair bit better than when I drove it home the other day, but I think that has more to do with sorting out the ignition issues than any improvements in the chip.
 
(http://festy.org/pics/albums/userpics/10001/firstdrive.jpg)

Then I pulled over and made a few tweaks to the ignition map with the engine idling, before heading back home.
And I only indicated with the wipers once  :o

I think next job might be to finish writing the wideband ECU code which will help if I need to adjust the AFM spring.
 
Title: Re: My short term 75
Post by: festy on October 12, 2015, 10:22:48 PM
I just noticed that I got a fault code logged when I returned from my drive.
It was DTC# 34, which is an idle switch circuit fault.

I looked up the parameters set for code 34:
(http://festy.org/pics/albums/userpics/10001/DTC34.jpg)

What that means is that DTC 34 will be recorded if the following 4 conditions are met:
1) the coolant temp is at least 83* (i.e. engine is up to normal operating temp)
2) Engine speed is < 1000 RPM
3) Injector pulse width is > 2.5ms (which is a load of 50)
4) the idle throttle witch is closed

So that pretty much confirms that the AFM is lazy, it's delivering twice the maximum acceptable amount of fuel at idle if max is 2.5ms and my logs show 5ms.   

The only reason I noticed the fault was that it turned on my newly-wired-in "check engine" lamp, if these cars had one from the factory it probably would have been on for a very long time...
Title: Re: My short term 75
Post by: festy on October 13, 2015, 11:10:14 AM
Hey, that doesn't look like factory silicone on the AFM cover  :o
(http://festy.org/pics/albums/userpics/10001/AFM1.jpg)

Surprise! this AFM has been interfered with, but at least they were kind enough to mark the original setting (well I assume that's what the white paint is marking...)
(http://festy.org/pics/albums/userpics/10001/AFM2.jpg)

So I set the spring tension back to the mark and started it up - and like magic the throttle crack stumble has completely gone, who would have thought....
Then I went for a quick lap around the neighborhood, it's a completely different beast now :)

The owner wasn't real impressed with the TS, he told me it had nothing down low compared to an Alfetta and was a dog off the line. I'll have to see what he thinks of it now it's working properly 8)
Title: Re: My short term 75
Post by: LukeC on October 13, 2015, 12:39:54 PM
Don't fix it now! He may want to keep it. Buy it, then fix it for yourself....  :)

Even when they were new, they always were a little doughy off the line. The gearing is higher than an Alfetta. That would not be helped by big wheels.

Let me know if you need any bits. I have lots of spares. I have just decided the last TS I bought was too far gone to save as a daily driver.
Title: Re: My short term 75
Post by: festy on October 13, 2015, 01:19:45 PM
Quote from: LukeC on October 13, 2015, 12:39:54 PM
Don't fix it now! He may want to keep it. Buy it, then fix it for yourself....  :)
The only reason I'm giving it back in a few weeks is because my wife thinks 6 cars is too many when I only have a single garage in suburbia. Well actually I have a double garage, but my mill takes up half of it  ???
That, and I can't afford another rego and it's a 91 model so still a long way off club plates.

The owner (my uncle) has plenty of other more interesting Alfas to play with, and will either sell it or part it out when I return it - or just park it next to his other 75s...

Quote
Even when they were new, they always were a little doughy off the line. The gearing is higher than an Alfetta. That would not be helped by big wheels.
You noticed the wheels :-[
They're off a 147 apparently, the tyres on the original black wheels (which we both agreed look much better) were worn so these were fitted for the last rego inspection.
Quote
Let me know if you need any bits. I have lots of spares. I have just decided the last TS I bought was too far gone to save as a daily driver.
Thanks, or you could buy this one as a daily driver :D 

Seriously, if anyone is looking for a cheap 75TS PM me because it needs to find a new home.
I'd love to keep it as a daily, but nothing short of a people mover is practical with 4 young kids  :-[
Title: Re: My short term 75
Post by: festy on October 13, 2015, 02:36:46 PM
I just went out and fine-tuned the CO adjustment (it's a software setting in my code now, instead of using the AFM screw) and made a few small map tweaks down low and went for a spin.

Oh wow, that's better  ;D
The road was slightly damp, and I think the rear tyres traveled twice as far as the fronts.
From the way the rear was stepping out at every opportunity I'm pretty sure the LSD is working properly too ::)

Title: Re: My short term 75
Post by: cc on October 13, 2015, 03:04:22 PM
Festy, any chance of some posts on your history with ecu software and working on cars and chips generally? eg what language is used in the chip whats the file type used in the tables. Also, how is the change in the CO emission measured and which table is being changed for the CO adjustment. Have read some of your posts on alfabb. Fascinating stuff.
Title: Re: My short term 75
Post by: bteoh on October 13, 2015, 03:38:12 PM
Festy,
Are you using TunerPro RT software to diagnose problems on the 75TS? Would the 164 motronic ecu be the same as the 75TS? I am trying to diagnose some issues with my 164 and have plugged it in using multiscanecu. It doesn't give me much info though. However, I noticed when car is idling, the software says it is "off idle" when the car is idling. Checked connectors on the TPS which appear fine. Can also hear the click from TPS when throttle just closes. Not sure why ecu may not be getting right info? Would you know what pins the TPS are on the motronic ecu?
Thanks :)
Title: Re: My short term 75
Post by: festy on October 13, 2015, 04:03:31 PM
Quote from: bteoh on October 13, 2015, 03:38:12 PM
Festy,
Are you using TunerPro RT software to diagnose problems on the 75TS?
Yes, using Tuner Pro RT and a plug-in I wrote (MotronicPlugin) to handle the communications.
Quote
Would the 164 motronic ecu be the same as the 75TS?
They are almost identical (assuming it's a 12V 164, the 24Vs used a slightly more advanced ECU), and yes they speak the same protocol. I've added a few new diagnostic and live data functions to my version of the TS firmware, but the factory chips have enough basic diagnostic functions to show the same information, just not as quickly.
Quote
I am trying to diagnose some issues with my 164 and have plugged it in using multiscanecu. It doesn't give me much info though. However, I noticed when car is idling, the software says it is "off idle" when the car is idling. Checked connectors on the TPS which appear fine. Can also hear the click from TPS when throttle just closes. Not sure why ecu may not be getting right info? Would you know what pins the TPS are on the motronic ecu?
Thanks :)
Sure, it's pin 2 on the 35 pin ECU plug. It should be grounded when the throttle is closed.
Here's a list of pin functions I put together a while ago - I can't promise the wire colours will match yours though.
Title: Re: My short term 75
Post by: bteoh on October 13, 2015, 06:33:09 PM
Thanks Festy, much appreciated :)
Title: Re: My short term 75
Post by: festy on October 13, 2015, 07:27:03 PM
Quote from: cc on October 13, 2015, 03:04:22 PM
Festy, any chance of some posts on your history with ecu software and working on cars and chips generally? eg what language is used in the chip whats the file type used in the tables. Also, how is the change in the CO emission measured and which table is being changed for the CO adjustment. Have read some of your posts on alfabb. Fascinating stuff.
I'm a programmer by trade, and dabbled with electronics a bit as a kid. And I'm inquisitive, that's probably the main reason I got into this stuff ;D

A few years ago I decided I'd had enough of carbs giving me trouble at track days, so thought I'd have a crack at fuel injecting my Alfetta. I was intending on using an old Haltech F9 or something simple and basic like that, but then I found the pcmhacking forum and changed direction a bit - and that re-kindled my interest in electronics too.

Although I've got distracted far too often along the way, my Alfetta has gone from being bog stock to this, having built pretty much everything myself from scratch. It's not the prettiest, but it's been done on essentially a zero budget.
(http://festy.org/pics/albums/userpics/10001/1510.jpg)
(as a mechanical engineer, I make a great IT guy, but it gives me something to do at least  :-[ )

Then one day there was a discussion on the alfabb where I realized the motronic was not well understood at all, and there was no DIY tuning available to the community like there is for most other marques, so thought I'd take a quick look.... :o

These Motronic ECUs are 80's technology. They are based on an 8052 microcontroller (which is an 8051 with a few extra features) with 128 bytes of RAM plus another 128 bytes of external RAM, They also have a couple of memory mapped ADCs, and a few custom Bosch chips that implement specific functions like CAS filtering etc.
The firmware is all 8051 native assembly. With something as time critical as engine control, very tight loop timings are needed. 8051 assembly was not a skill I had before I started this :o
I wrote the Tuner Pro plug-in in C++ which is another language I hadn't had much to do with before either.

As for the tables in the chip (aka "bin"), they're just numbers. RPM is stored in units of 40, i.e. "100" would indicate 4000 rpm. Load is multiplied by 0.05 to get the injection pulse width in milliseconds, which is why in some of the recent posts I was describing load in terms of both raw numbers i.e. 50 or 100, and the actual injection time that represents, i.e. 2.5ms or 5ms.
Some are a little more complex to translate into real world numbers, i.e. ignition advance is (X*0.75)-23.5.
The 0.75 multiplier is because the ECU tracks timing to 0.75 degree increments (60-2 CAS wheel, so 120 CAS teeth per 4 strokes or 3* per CAS tooth, and 4 tooth "events" per tooth (low, rising, high, falling) so each event is 3/4 of a degree) - it takes a fair amount of time to work out something like that from a few hundred lines of code that look like this:
X01ff: mov a,40h ; 01ff   e5 40      e@
jnz X0235 ; 0201   70 32      p2
mov a,r2 ; 0203   ea         j
jz X021e ; 0204   60 18      `.
mov a,r4 ; 0206   ec         l
rrc a ; 0207   13         .
mov a,r5 ; 0208   ed         m
rrc a ; 0209   13         .
subb a,r3 ; 020a   9b         .
mov a,r4 ; 020b   ec         l
clr acc.0 ; 020c   c2 e0      B`
orl a,41h  ; 020e   45 41      EA
rr a ; 0210   03         .
subb a,r2 ; 0211   9a         .
jnc X021e ; 0212   50 0a      P.
inc 4fh         ; 0214   05 4f      .O
inc 4fh      ; 0216   05 4f      .O
mov a,r2 ; 0218   ea         j
mov r4,a ; 0219   fc         |
mov a,r3 ; 021a   eb         k
mov r5,a ; 021b   fd         }
ajmp X0238 ; 021c   41 38      A8
;
X021e: setb p1.2 ; 021e   d2 92      R.
clr a ; 0220   e4         d
mov r0,a ; 0221   f8         x
mov r1,a ; 0222   f9         y
mov 50h ,a ; 0223   f5 50      uP
mov 76h ,a ; 0225   f5 76      uv
clr 26h.1 ; 0227   c2 31      B1
clr 26h.2 ; 0229   c2 32      B2
setb 24h.1 ; 022b   d2 21      R!
setb 24h.2 ; 022d   d2 22      R"
clr 24h.3         ; 022f   c2 20      B
clr p1.2 ; 0231   c2 92      B.
ajmp X027e ; 0233   41 7e      A~

   
The CO trim I was adjusting wasn't a measurement, it was more like an air/fuel ratio adjustment with no feedback - an idle mixture adjustment. With an O2 sensor the ECU does have feedback which is what closed loop operation is.

These AFMs have a little trimpot (the blue rectangle in my earlier photos) that offsets the fuel mixture when the ECU is running in non-cat mode. It's there so when these cars are being "smog tested" the idle fuel mix can be adjusted to minimize emissions. The reason I moved that to a software setting was because there are no spare analog input pins available on the ECU, so to add new functions like MAF learn or wideband I needed to free up an input.

If you're interested in the inner workings of a Motronic map I'm happy to explain it all, but it's a pretty dry topic  ???

Title: Re: My short term 75
Post by: Duk on October 13, 2015, 09:05:47 PM
Quote from: festy on October 13, 2015, 07:27:03 PM

The CO trim I was adjusting wasn't a measurement, it was more like an air/fuel ratio adjustment with no feedback - an idle mixture adjustment. With an O2 sensor the ECU does have feedback which is what closed loop operation is.

These AFMs have a little trimpot (the blue rectangle in my earlier photos) that offsets the fuel mixture when the ECU is running in non-cat mode. It's there so when these cars are being "smog tested" the idle fuel mix can be adjusted to minimize emissions. The reason I moved that to a software setting was because there are no spare analog input pins available on the ECU, so to add new functions like MAF learn or wideband I needed to free up an input.


Just out of pure curiosity, what are the potentials of integrating the now spare analog input as a proper analog TPS signal to effect acceleration enrichment?
It was 1 of the major reasons why I moved away from using the Nissan ECU on my V6, in that the acceleration enrichment is based on AFM/MAF signal change. But the whole thing is, from my understanding, plumbing volume sensitive. If someone wanted to add a turbo or supercharger and use a decent intercooler, then considerable volume (some litres) will be added between the AFM and the TB.

Oh, and awesome work!  8)
Title: Re: My short term 75
Post by: festy on October 14, 2015, 09:54:57 PM
If someone was going to add a decent turbo or supercharger, I would recommend they throw the old Motronic in the bin. These ECUs have limited potential, and I'm already heading into "beating a dead horse" territory  :-[
Yes, I suppose it wouldn't be too hard to use the CO ADC channel for a TPS to improve AE response.
But this is the *only* ADC channel I can really free up, and I'm already using it for WB or MAF (depending on the modes enabled) so it's a pretty rare resource!

Currently AE is calculated by the delta change in AFM as you described, there's a simple lookup table for that.
AFM deltas under 4 don't trigger AE, but my recent logging makes me think that it could be triggered slightly lower without negative impact, which should speed up the triggering - it's easy to try so I'll let you know how that goes ;) 
Title: Re: My short term 75
Post by: cc on October 15, 2015, 01:00:03 AM
thanks for the background post on the 13th october.
I have a few of questions!
There is a guy here in Brisbane who used to service afm meters, when the meter had a fine wire in them (the car was a vl commodore) and he said that  the old type of afm would 'drift' and not calibrate correctly.
Do you think modern afm's and oxygen sensors as on my 2002! 156 V6 also go out of calibration?
Can any drift be re calibrated by editing the programmed  table in the chip?
Sure would be cheaper than replacing the oxygen sensors.
The other question is more of a request! whats an AB, an AE or adc? in the 24th Oct post.
Had a look at the tuner pro web site mentioned in some of your posts. Are tuning definition files on the net for  156?
Is re programming  the chip an interest that can be developed/understood easily? Or something that shouldnt be learnt on the daily driver!
thanks