There is more to life with TurboRenault.co.uk

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

21 Turbo Renault 21 Turbo and Alpine A610 Fuel Computer issue/solution!

r5gordini

Well-Known Member
A bit of background. I have had three fuel computers fail on me in about a year! The problem seems to be the LCD. I suppose it's just unrealistic to expect a 20 year old LCD, let alone one engineered by Renault, to work perfectly!

I got my thinking cap on and came up with the idea of using an Arduino single board computer to replace the Renault computer. After a weekend's work, I have come up with the following. So far I have just got the fuel gauge working. Next bit (mpg, trip, etc.) is a bit harder.

There are several advantages to this method of solving the problem:

1. Modern electronics: easily upgraded and replaced
2: Modern display technology: my solution uses lovely OLED. No backlight required!
3. Flexible: we can program and calibrate it to our needs. Different injectors? No problem. Different wheel diameters? No problem!

For me, a working fuel gauge is a must, which I have got working today. It still needs a bit of calibration. After that, I intend to add (in complexity order):

1. Temperature in degrees celcius!
2. Speed in mph. Average speed
3. Trip distance
4. Mpg
5. Miles left in tank

So how did I do it? Took an old 21 computer, desoldered the connection block:

images.tapatalk_cdn.com_16_01_10_81d08ea375f93a6167834e257dc534cd.webp

Soldered it onto some veroboard:

images.tapatalk_cdn.com_16_01_10_18700c66897aa03bb302e894e7dabe9f.webp

Did some wiring on the verobard to connect up to the Arduino:

images.tapatalk_cdn.com_16_01_10_bc523c0da7404464a357c1353509d3c2.webp

Wrote a bit of software to interpret the fuel sender's output. Graphed its resistance, working out an interpolated fuel reading. Used the software I use every day at work. Needs to be calibrated a but better but this is a rough start:

images.tapatalk_cdn.com_16_01_10_b95b9906a2f41ff34c532b0b970a347d.webp

Um... Wired up the power pins and plugged it in!

images.tapatalk_cdn.com_16_01_10_abf153fe996e436a916d7f6191ab8f3d.webp

I am very happy about the result and am excited about the project. It's going to take me a while to get where I want, but I will keep going!



Sent from my HTC One_M8 using Tapatalk
 
Yes - probably the a good way to do it is to use the Arduino to send serial data to the PC and then display that on the PC.
In other news, I tested the fuel gauge again yesterday. I put code in that only allows the reading to decrease. It wasn't really any good as the first time I went up a hill, I "lost" two litres over the course of 30 seconds or so. Then reset when on the flat and magically "gained" them again - it leads to inconsistent readings.

I was thinking instead of decreasing the sampling rate and allow the reading to fluctuate, but only ever move by one litre at a time, either way.
 
How can it be so hard when the flipping level sensor is just a linear resistance potentiometer operated by a float?! Maybe we should shout about on Facebook or somewhere with a wide audience to find out how fuel gauges are coded (digital ones).
 
It just fluctuates so much - that's the challenge. I'm kind of figuring it out as I go along, too - by all means, let's go and ask about! I just did a quick google and didn't find much of value!
Another way to do it is to go low resolution and show a bar graph, but I really would like to get an accurate reading in terms of litres (or gallons if @andybond insists!). It's a challenge and an enjoyable one at that, but I don't have any prior experience in this particular field - working it out as I go along.
I might move on to the other stuff for a bit and come back to this issue. We can always fix it in the wild with software updates anyway!
 
Oh and another way to calculate an average could be to accumulate readings and then divide by the number of readings, rather than storing x readings and dividing by the number of readings. That would save some memory! Then I could average 100+ readings. Yes. In fact, that is what I will do. And I will only allow update every minute. That sounds more logical and much simpler.
 
Oh and another way to calculate an average could be to accumulate readings and then divide by the number of readings, rather than storing x readings and dividing by the number of readings. That would save some memory! Then I could average 100+ readings. Yes. In fact, that is what I will do. And I will only allow update every minute. That sounds more logical and much simpler.
Indeed it does.
 
Yes we will get it working on Adaptronic as Andy wants one and half the 21's here run on it lol
It would need a code change for the six cylinders mind.
Yes - in fact I need it for my A610 anyway. I need it more for the 610 than I do the 21, but it's easier to access on the 21, so I'm using it as my development mule.
 
Right! 100 readings averaged over as many seconds. It's too flipping cold out there now to take the car for a drive to see how it works in practice - the windscreen is already covered in ice!
I'll take it for a drive tomorrow and report back.
Hopefully over the weekend I will be able to wire up the other sensors and the low fuel warning light. Then work on storing a trip ;-)
 
Andrew,
Just today I was alerted to your endeavours and am going to recommend you for a medal from the Queen for this work.
Its greater than anything Lady Di or Bob Geldof have ever done.

Reading it has been educational, I am now justified in calling Dave, Sheldon.

As Tony says it's largely way over my head but not the missus.....she understood it all save for the car bits.

I am sat here money waiting, I dont like the amber gamble game.
 
OK - so an update. Averaging the fuel readings over 100 or so samplings seems to work a bit better. It does still fluctuate a bit, but I think I will leave it like that for now.
Before work today I started work on the trip thingy. So I can now track a trip, although it gets reset every time the computer starts. Got miles travelled and average speed working. Now need to persist it every minute or so in order that the trip doesn't reset every time you turn the engine off.
This weekend will be wiring up the injection pulse and the temperature sensor and trying to read those. I'll also build the first installable version and get it put in my car. The current circuit is a bit bulky so I can't get the back on the computer, but I think I can miniaturise the parts of it that matter!

Just today I was alerted to your endeavours and am going to recommend you for a medal from the Queen for this work.
Its greater than anything Lady Di or Bob Geldof have ever done.

Thanks! I'll update this thread regularly
 
The outside temps - that's the only one that comes in to the original fuel computer. If you have wiring for the other two, then let's give it a shot further down the line! We have a few spare analogue inputs on the Arduino. Can put circuitry and wiring in for them which you plug in afterwards, but I want to get the basic thingy working first!
 
The outside temps - that's the only one that comes in to the original fuel computer. If you have wiring for the other two, then let's give it a shot further down the line! We have a few spare analogue inputs on the Arduino. Can put circuitry and wiring in for them which you plug in afterwards, but I want to get the basic thingy working first!
My ECU is in the back so my wiring is already accessible, for an OE car it would need wiring routing from the engine bay (wonder if we could get it from the XR25 Port?)
 
Back
Top