Trip computer fuel usage signal VR ECU

Holden/Delco Tuning. ALDL, OBD 1.5. Circa 1989 to 2004.
Post Reply
vn_luke
Posts: 5
Joined: Mon Nov 16, 2009 4:15 pm

Trip computer fuel usage signal VR ECU

Post by vn_luke »

I need to emulate the fuel flow signal that was sent from an original VR v6 PCM to the trip computer (pin A10 auto, A2 manual).

From what I've found in the service manual, this is a 0-5v signal (presumably pwm square wave. earthed on ECU end?) that varies according to fuel consumption of motor.

Does anyone know any more about this signal? frequency? duty cycle vs consumption on standard trip computer calibration?

Thanks,
Luke
User avatar
VL400
Posts: 4991
Joined: Sun Mar 01, 2009 2:54 pm
cars: VL Calais and Toyota Landcruiser. Plus some toys :)
Location: Perth, WA
Contact:

Re: Trip computer fuel usage signal VR ECU

Post by VL400 »

Welcome :thumbup: What PCM have you replaced the delco with?

The signal is an 8 bit PWM @ 128Hz. The PCM accumulates the inj PW and outputs them in a PWM signal according to the calibration figure that specifies the amount of fuel per bit. In a VR V6 its 1.53mS per bit.


Here is the code...

Code: Select all

	;**********************************************
	;
	; 	     Calculate Fuel Usage
	;
	; Generates The Duty Cycle That Is output on A PWM
	; Line To Represent The Injector Pulse Width
	; 
	;        Called Every 6.25mS - 160Hz
	; 
	;**********************************************
LB02A:	sei				; Set interrupt flag (disable interrupts)
	ldaa	L0183			; Fuel Usage Time Counter
	inca				; Increment Counter
	cmpa	#0x14			; 20d
	bcs	LB097			; If Counter < 20d Then Dont Calculate Fuel Usage
					; Else...
	; ---------------------------------
	; -- Calc Fuel Usage Every 125mS --
	; ---------------------------------
	ldy	#0xF000			; 0% DC And 128Hz 
	ldd	L0184			; Accumulated Corrected (For # CYLs) Asynchronous PW
	cpd	L8957			; Am'nt Of Fuel For 1/256 Duration
					; 	- Default 0x00CA
	bcs	LB062			; Branch And Use 0% DC If Async PW < Fuel For 1/256 Duration
					; Else...
	ldx	L8957			; Am'nt Of Fuel For 1/256 Duration
					; 	- Default 0x00CA
	idiv				; (Corrected (For # CYLs) Asynchronous PW / Fuel For 1/256 Duration)
					; 		- D/X = X:D
	cpx	#0x00FF			; Check If Result > Max
	bcs	LB04D			; Branch If <
					; Else...
	ldab	#0xFF			; Use Max
	bra	LB050			; Branch And Save DC

	; -- Get DC into AccB --
LB04D:	pshx				; \
	pula				; | Transfer X Into AccD (Actually Just Want Quotient Into AccB)
	pulb				; /
	
	; -- Save DC Value --
LB050:	aby				; Add Desired DutyCycle To Base Freq Value
	
	; ----------------------------
	; -- 
	; -------------------
	ldaa	L8957+1			; KTCFUEL: TRIP COMPUTER - Amount Of Fuel For 1/256 Duration
	mul				; 
					; Multiply A and B, result in AccD
	pshb				; 
	psha				; 
	tsx				; load last stacked address into x
	ldd	L0184			; Accumulated Corrected (For # CYLs) Asynchronous PW
	subd	0x00,x			; 
	pulx				; 
	std	L0184			; Accumulated Corrected (For # CYLs) Asynchronous PW

LB062:	sty	L3FD4			; Fuel Use PWM output
	pshy				; 
	pula				; 
	pulb				; 
vn_luke
Posts: 5
Joined: Mon Nov 16, 2009 4:15 pm

Re: Trip computer fuel usage signal VR ECU

Post by vn_luke »

Thanks heaps for that - has saved me a lot of work! - much appreciated.

I've replaced the PCM with an Adaptronic E1280S - http://adaptronic.com.au/products/e1280s.html

I can't vouch for it's "real world" performance as I haven't run it in the vehicle yet - but it gives those of us with minimal embedded systems knowledge (and no delco source :p) a user-friendly method of programming and customizing various bits functionality. (amongst lots of other cool stuff!)

... now just need to work out what happens if you consume more fuel than the trip computer cal value :p
User avatar
delcowizzid
Posts: 5630
Joined: Sat Feb 28, 2009 8:38 pm
Location: Wellington NZ
Contact:

Re: Trip computer fuel usage signal VR ECU

Post by delcowizzid »

when we turboed the vr and fitted the 42lb injectors i never changed the calibration value for consumption just changed injector rate and ve table we cruise at 2L/100 LOL must fix that one day get it a bit closer to real consumption
If Its Got Gas Or Ass Count Me In.if it cant be fixed with a hammer you have an electrical problem
mag
Posts: 321
Joined: Fri Apr 03, 2009 9:21 am
cars: VN Commodore
Location: Blue Mountains NSW

Re: Trip computer fuel usage signal VR ECU

Post by mag »

On the same subject, with my vn running $12P code with APNX cal, do I need to change the "amount of fuel for 1/256 duration" and/or the "fuel rate used" if they are based on vp data, the origin of the APNX cal. My vn xdf gives a different formula for "amount of fuel for 1/256 duration" that suggestions I cannot use the data in the APNX cal & vn code had no "fuel rate used" parameter.
User avatar
VL400
Posts: 4991
Joined: Sun Mar 01, 2009 2:54 pm
cars: VL Calais and Toyota Landcruiser. Plus some toys :)
Location: Perth, WA
Contact:

Re: Trip computer fuel usage signal VR ECU

Post by VL400 »

Is the trip computer reporting wrong info?
mag
Posts: 321
Joined: Fri Apr 03, 2009 9:21 am
cars: VN Commodore
Location: Blue Mountains NSW

Re: Trip computer fuel usage signal VR ECU

Post by mag »

Only average fuel consumption seems to be higher than used to be. Also get rich exhaust flagged but have not cleared ecu yet to see if it reappears. A little disconcerting given I have a new O2 sensor & 10x more zero crossing that ever before.
User avatar
VL400
Posts: 4991
Joined: Sun Mar 01, 2009 2:54 pm
cars: VL Calais and Toyota Landcruiser. Plus some toys :)
Location: Perth, WA
Contact:

Re: Trip computer fuel usage signal VR ECU

Post by VL400 »

Is the trip computer not reading what the fuel bowser suggests your fuel economy should be?

It does sound like there is still some tuning to do, closed loop does not fix everything. Reset the malf codes to see if it returns if you replaced the O2 sensor.
mag
Posts: 321
Joined: Fri Apr 03, 2009 9:21 am
cars: VN Commodore
Location: Blue Mountains NSW

Re: Trip computer fuel usage signal VR ECU

Post by mag »

Rich exhaust flag appeared sometime after new O2 sensor was fitted, odd. Have not done specific bowser check but have noted that trip computer consumption has gone from 9/10 l/100k to 13/14l/100k in last six months. May have co-incided with change to APNX cal after using BLCD modified with original vn AFTY data. Believe APNX considered better bet than BLCD. Have not modified APNX with AFTY data. Would have thought APNX to be a suitable tune for stock vn, rough comparision with AFTY shows only small ve & timing differences, hence question about trip computer parameter compatibility.
Post Reply