Xantia trip computer v1.0

This is the Forum for all your Citroen Technical Questions, Problems or Advice.

Moderator: RichardW

Post Reply
User avatar
longgo
Posts: 42
Joined: 06 Jun 2013, 10:06
Location: Finland
My Cars: was Xantia I LPG
now - Xantia II
wish DS23
x 3
Contact:

Xantia trip computer v1.0

Post by longgo »

Hi folks,

In that topic i `ill try to explain what was/is my idea for "home made" trip computer. So, as you probably know there is way to put same ready device taken from Peugeot. In my case i decide to try something on my way with arduino :-D
With little idea about arduino board i found quite interesting that people has used Nokia 5110 B&W LCD monitor as screen for some home made devices. And also there are plenty cheap and ready ones as module in ebay. And.. i decide to try.
My car is Xantia MkII 1.8 16V . For it i found few diagrams with wire info, and i bought lex. clone to be able to see what approximately injector time i have. For that engine it was about 1.8ms to 8.3 depending the load.
The next step was to get what flow that injectors have. Here i drop on the exell file with some production numbers and info . It seems that for XU7JP4 engine the fuel flow was 181ml/min. With that info i start little calculation:
181ml/min -> 181/60 -> 3.01666666 -> 3.012ml/sec -> /1000 -> 0.003012ml/ms . If the car have average low rpm pulse about 2.1ms in example then should be -> 0.003012*2.1 -> 0.0063252ml/pulse
Because of the nature of that engine, injectors work 2x2 in groups -> or single injector inject every engine rotation.
Another example: 900rpm are 900 turns per minute -> /60 -> 15 rotation per second or 15 injections per second per injector -> 15 * 2.1ms -> 31.5ms fuel time -> *0.003012ml/ms -> 0.094878 ml * 4 cilinder -> 0.379512 *3600s -> 1366.24ml/h -> /1000 -> 1.366l/h or that related to vehicle speed will return what we know as L/100km Or i get the start point - liters/hour. Sorry guys but i`m connected to that metric units :roll: and will use them to the end of that post.
All that will "change" value in that equation will be RPM and Injector pulse. Example - In my case: 14.6hz(850rpm) - 105hz(6300rpm) and injector pulses 1.2ms - 8.5ms(about, depend load , ecu and so on)
or (0.003012ml/ms * 4 injecotrs work in 1Hour * 3600sec in 1H ) / 1000(1000ml =1L) => 0.0433728 as constant -> 0.0434(constant) * Hz * inject pulse => return car consumption as L/H .
Now i need to check on the injector time - i "steal" signal from 1320A cable responsible for injectors 1&4. Well, just put wire from there to the dash. The used function was count pulse length with arduino command. Low part of the pulse is my injector time, High is the time between pulses , Low+High for 1 sec give me Hz`s or RPM.. Of course if you wish can be used other ways.. i choose that one as enough accurate.

Next signal was for fuel level - that was little problem. Why? Let me to start with the info that resistor attached to floated probe in the tank give 300oHms when tank is almost empty and 50 when full. That force me to add little more extra calculation. The next problem that i crash into was the fuel measure itself. For the dash arrow unit has been used some kind of logic to move based on start measure fuel level when the car is just started.Later on based on i guess only - vss, rpm, engine temp the arrow move down.So i decide to make something similar. The start fuel value is taken when you start the car from the same signal as for the dash meter. After it take every 10sec the current fuel consumption and to find average. That average consumption what is taken out of that start value. The result is shown on the screen as rest fuel level.

VSS signal - that is needed for the km/h to be shown or to be calculated L/100 consumption. I have already cable 162B which is VSS signal that goes in the dash.
First the sensor - thanks to the mate i get the info that it has 8 pulses for 1 rotation. From citroen service website i found that sensor gear have 18 teeth , and the shaft gear 22. Or that make 22:18 -> 1.222:1 ratio.
My car is fit with OEM size tires 185/65/15 -> (185*0.65)*2 + 15*25.4 -> 621.5mm -> 0.6215m * 3.1416 -> that give me 1.9525m for 1 rotation. If VSS make 8 pulses for 1 rotation so > 1.9525m / 1.222:1 > 1.5975m for 1 sensor rotation or 1.5975m / 8 pulses > 0.19969m for 1 pulse or if we round - 0.2m/per pulse. Well, that is good but other mate help with the idea that n the car dash the value of the tire length in my case is not 1.95m but 1.9 Why? Because when is with load the measured radius from the axis center to the ground will not be 0.6215m / 2 -> 0.31075m but less so the if i take 1.9m as tyre lenght -> 1.9 / 1.222 -> 1.5545 -> 1.5545 / 8 -> 0.19432 m/per pulse -> * 3.6 to go to m/s -> 0.69955 -> 0.6996 < that is my variable or if i have 100hz signal as pulses * 0.6996 -> give us 69.96 km/h If you wish to try, take the VSS signal to some suitable frequency measure device and make 70km/h on taho and check if you have ~100Hz signal.. With that 0.6996 as constant for calculation and straight hardware frequency counter if i make 50, 60,or 70km/h on dash that is what i see on my test menu in that car trip project.

The next was small things as thermistor added for showing inside cabin temp, replacing the small blue backlight of that LCD with green ...

ImageImage
Image


and idea for small RPM counter backlight change. That was made with other Attiny chip which control 2 RGB SMD LEDs. There the problem is that dashboard have green folio on top and is not possible to play with the colors. So i decide only combination of red+green => yellow -> dash green - > just normal backlight look. I found that the top led need to be for sure with red light on to have the arrow fully bright. Well that was not problem. The next combination was red+blue -> magneta -> + dash green -> that blue color. The last red led(right backlight) kick in to make the RPM counter red zone brighter.

In case of interest here are the diagrams:
Image
Image

Full arduino environment + that project codes + all libraries + software for design own pictures(BMP 8bit to code), and Java program for custom fonts: http://longgo.eu/arduino-1.5.zip" onclick="window.open(this.href);return false; (Java is not included you need to install it by yourself) and the files of that project : http://longgo.eu/projects.zip" onclick="window.open(this.href);return false;


And the result is:


Hope.. it will give you some tips and you can try your version or even you can build something better. Cheers!
Last edited by longgo on 13 Dec 2015, 14:49, edited 3 times in total.
User avatar
xantos
Posts: 409
Joined: 02 Apr 2013, 10:05
Location: Slovenia
My Cars: Xantia 1.9TD Break non-hydractive (1999)
Xantia 3.0 V6 Activa (1998)
C4 2.0 HDi Exclusive Mk2 (2010)
x 10

Re: Xantia trip cvomputer v1.0

Post by xantos »

Now that is really cool! =D> I want one!
Xantia Break 1.9TD (jammed b****!)
Xantia Activa 2.0 TCT + LPG (1998) (peeing b****!) RIP
Xantia Activa 2.0 TCT (1998) (burnt b****!)
Xantia Activa 3.0 V6 (1998) (not a b****! yet :-D )
C4 Exclusive 2.0 HDi (gear shifting b****!)
KP
Posts: 3980
Joined: 10 Jul 2006, 12:11
Location: Warrington
My Cars:
x 27

Re: Xantia trip cvomputer v1.0

Post by KP »

Could you not use the one from a 406 like Paul has done? Does all the stuff you need the. But think it will only work in a hdi?
User avatar
Timmo
(Donor 2022)
Posts: 1346
Joined: 11 Jul 2011, 15:41
Location: Bottom Left!
My Cars: 58 partner teepee outdoor hdi.
58 C2 Code in black! Fun!
x 168
Contact:

Re: Xantia trip cvomputer v1.0

Post by Timmo »

Thats Bloomin Ace!!!
After All, I am the Cornish one!

'58 C2 Code
'58 partner teepee outdoor
User avatar
xantos
Posts: 409
Joined: 02 Apr 2013, 10:05
Location: Slovenia
My Cars: Xantia 1.9TD Break non-hydractive (1999)
Xantia 3.0 V6 Activa (1998)
C4 2.0 HDi Exclusive Mk2 (2010)
x 10

Re: Xantia trip cvomputer v1.0

Post by xantos »

I found something similar on Ebay...

http://www.ebay.co.uk/itm/Universal-Tri ... 461adfd30d" onclick="window.open(this.href);return false;
Xantia Break 1.9TD (jammed b****!)
Xantia Activa 2.0 TCT + LPG (1998) (peeing b****!) RIP
Xantia Activa 2.0 TCT (1998) (burnt b****!)
Xantia Activa 3.0 V6 (1998) (not a b****! yet :-D )
C4 Exclusive 2.0 HDi (gear shifting b****!)
User avatar
longgo
Posts: 42
Joined: 06 Jun 2013, 10:06
Location: Finland
My Cars: was Xantia I LPG
now - Xantia II
wish DS23
x 3
Contact:

Re: Xantia trip cvomputer v1.0

Post by longgo »

From petrol peugeot mk1 the trip com fit with no problem. I did not find in a while. Then come that idea what i share here and decide to give it try. And that ebay item is really nice made!
Post Reply