Author Topic: DIY Measurement fuel quantity and EGT  (Read 3422 times)

Offline Stuart

  • Full Member
  • ****
  • Posts: 1779
  • Tilchestune UK
Re: DIY Measurement fuel quantity and EGT
« Reply #30 on: November 15, 2018, 02:22:38 PM »
Bet that that pot on the sensor has 1 leg internally grounded


So ground leg  centre let’s call it sensor and the other is the voltage ref

My aim is for a accurate part with a good finish

Offline MJM460

  • Full Member
  • ****
  • Posts: 895
  • Melbourne, Australia
Re: DIY Measurement fuel quantity and EGT
« Reply #31 on: November 16, 2018, 11:05:40 AM »
Hi Alex, if you have an Arduino script to read current as opposed to voltage, that sounds like a reasonable approach.  The picaxe system I am more familiar with actually requires a voltage input and requires a slightly different but very different circuit.  So long as the Arduino has an ADC input function that reads voltage and converts it to digital either will work.  I assume you have the circuit that you will need to use if you go with current measurement method.

I will give you some circuits and a bit more information about those three terminal voltage regulators tomorrow or the next few days, (this has been a rough week for me so no opportunity today). I suspect you will need one to run your Arduino from the car electricals anyway.  I think you may need a 9 V supply to the board, but perhaps you can confirm that.

MJM460
The more I learn, the more I find that I still have to learn!

Offline MJM460

  • Full Member
  • ****
  • Posts: 895
  • Melbourne, Australia
Re: DIY Measurement fuel quantity and EGT
« Reply #32 on: November 17, 2018, 10:03:38 AM »
Hi Alex,I will try and give you the quick rundown on the ADC input to microprocessors like the Arduino and those voltage regulators.

You will need some sort of circuit to supply your Arduino board from your car electrical supply.  There is a series of low cost three pin devices in a case like a transistor, which give an accurate regulated voltage suitable for this.  They have numbers like 78xx, where xx is the output voltage.  They include 7805 which gives 5 volts, 7809 which gives 9 V and 7812 which gives 12 V but would need over 14 V supply to be reliable, so probably not useful.  I believe Arduino boards are normally powered by a 9 V supply so the 7809 would be the one to choose.  The circuit in the attachment is what the Picaxe system recommends, and would probably be ok for Arduino with the appropriate regulator for 9 V.  The capacitors are not always necessary but are probably good for reliability to avoid problems from other systems on the car.  Look to see if your Arduino system advises something similar.

The Analogue to Digital Converter or ADC requires a voltage input, and draws practically zero current but requires a reference voltage.  Sometimes the chip supply voltage is suitable (which is not necessarily the board supply voltage), and sometimes the microprocessor provides alternatives such as 2.046 which can give you better resolution is a particular application, and might be better for you if it is available.  With a three pin potentiometer you probably connected it like the second circuit I have drawn.  The total resistance determines the current through the total resistance, and the position of the slider picks up intermediate voltages as the input to the ADC function.  It is often recommended that you include a resistor, something in the range of 330 to 1000 ohms in the path to the input pin.  It helps in some fault conditions, and as the current input to the ADC is near enough to zero, it does not affect the values you read.

I am a bit confused about the range of resistance your tank potentiometer provides.  Ideally it would be enough to reduce the current to a few milliamperes with say a 9V supply at V+, but you have to work out the values for your system using ohms law.  The second diagram is a suggestion if the potentiometer has only two connections.  The extra resistor which I have labelled R1 is calculated to provide the maximum input value to the ADC with the the potentiometer slider at that end, and it will be close enough to zero at the other end.  If your potentiometer has only two connections, R1 will have to be connected to the slider.

I know this is all a bit general, but the principals are the similar for all the microprocessors, so this should give you some clues as to what to look for.  The circuits are very simple with few components.  I find it useful to download the manufacturers data sheet for each of the chips.  Amongst all the technical details, there is often a few clues to using them that are helpful even in hobby applications.

I hope this helps.

MJM460
The more I learn, the more I find that I still have to learn!

Offline AlexS

  • Full Member
  • ****
  • Posts: 114
Re: DIY Measurement fuel quantity and EGT
« Reply #33 on: November 18, 2018, 12:38:05 AM »
Thanks guys!

Like the idea. The potentiometer, like you suggest as second option, has two connections. But maybe I am confused, money R1 as the potentiometer with two connections (the tank sensor)?

Normally the arduino can be feed both with 5V or 12 volt. So far I know, digital and analog signals can be only read between 0-5 volt.

And I understand that you were confused with the different resistances of the tank sensor. I also did not understand why this was increased. But now it gives a more real value of between 0-95 ohm. approximately 65 ohms at 25 liters and 77 ohms at full tank (46 liters).

Thanks again for the input. I am looking forward to it tomorrow!

Offline AlexS

  • Full Member
  • ****
  • Posts: 114
Re: DIY Measurement fuel quantity and EGT
« Reply #34 on: November 18, 2018, 01:07:46 AM »
I think you push me in the right direction to get a ohm measurement script for arduino.
I have found a script that can measure the resistance on the basis of a known resistance. Basically this looks like the schedule that you have shared. However, I am planning to adjust the script anyway by entering averages, measuring points and conversion to liters. Sometimes it seems more complicated than it actually is.
« Last Edit: November 20, 2018, 10:37:41 PM by AlexS »

Offline MJM460

  • Full Member
  • ****
  • Posts: 895
  • Melbourne, Australia
Re: DIY Measurement fuel quantity and EGT
« Reply #35 on: November 18, 2018, 09:17:47 AM »
Hi Alex, I hope I am not pushing too hard, the intent is just to contribute to the thought process.  I always feel the key is to understand what is going on.  Then you can easily design a suitable reliable arrangement for what you want to do. 

The key to that Arduino script is the circuit that produces the measured value.  I am not very familiar with Arduino, but it looks like it is actually measuring a voltage at an ADC input and using ohms law and the value of the fixed resistor and measured input voltage to calculate the unknown resistance.  Is this your understanding?

I was clearly a bit tired last night, and left out the circuit arrangement with your tank sender unit which gives you only two terminals.  I have attached that one this time.  The fixed resistor labelled R1 is necessary to limit the current drawn when the sender unit is at the zero ohm end.  Then the total of R1 plus 100 determines the current at the 100 ohm end.  In addition this current at the 100 ohm end of the sender times 100 ohms determines the voltage the Arduino sees when the tank is full.   The more of the 5 V input range you can use, the better your resolution will be.  But if you are happy with the resolution with say 2 volt maximum, you can use larger resistors, so less current.  And make sure you use an adequately rated resistor for the current so it can dissipate the power and not get hot in continuous operation in the car.

The remaining bit of the puzzle is how to provide suitable input voltages to the Arduino board and the resistor/ sender circuit.  That is where the voltage regulators come in.  Also, I would suggest a resistor in the line to the ADC input as a protection for some potential fault conditions.  It makes no difference to the measurement as the current to the input terminal is practically zero.

Once you have suitable input voltage to measure, you can add your averaging and filters in the script.

I will be most interested to see what you come up with.

MJM460

The more I learn, the more I find that I still have to learn!

Offline AlexS

  • Full Member
  • ****
  • Posts: 114
Re: DIY Measurement fuel quantity and EGT
« Reply #36 on: November 18, 2018, 12:21:07 PM »
thanks for your comment! No problem, it is much clearer to me now. Last night I was already pretty tired.

The key to that Arduino script is the circuit that produces the measured value.  I am not very familiar with Arduino, but it looks like it is actually measuring a voltage at an ADC input and using ohms law and the value of the fixed resistor and measured input voltage to calculate the unknown resistance.  Is this your understanding?

Yes it does not work as you describe it. Below I have an overview of what I am going to experiment. Added an extra resistor to lower the current(and so also dissipate the power).

For powering the arduino in the car I will use of a 5v, 2 amp step-down converter. Input voltage: 6-24V DC. However, I will check what the actual voltage across the resistor is in comparison to what the arduino measures at the analogue input.

I'll let you know what's going on at the end of the day!

Alex

Offline AlexS

  • Full Member
  • ****
  • Posts: 114
Re: DIY Measurement fuel quantity and EGT
« Reply #37 on: November 20, 2018, 10:04:37 PM »
Hey guys.

I have taken over the scheme and the corresponding script. It tested on a breadboard. It works well. The use of an extra resistance provides more fluctuation of the measurement of the resistance of the test potentiometer. The extra resistance was 1 k ohm, but when reading 220 ohms it caused it to fluctuate between 205 and 235 ohms.

I also measured the amperage of with and without extra resistance. At a set resistance of around 20 ohms (potentiometer) and both the comparison resistance and extra resistance of 1 k ohm, the amperage was halved. However, the amperage was, however, around 5 mA without extra resistance.
Not really exciting to say.

So I decided not to mount extra resistance for the sensor in the LPG tank.

The whole tested in the car. This could quite accurately measure the resistance of the sensor, compared with the measured value of the multimeter (around the 0.5 ohm difference). However, the ohm fluctuates by 1 ohm, but that is fine.
Again, I measured the amperage at a sensor value of around 40 ohms. However, the amperage amounted to an order of 8 mA ampere. In short, this would provide heat for minimal dispensation.

Offline AlexS

  • Full Member
  • ****
  • Posts: 114
Re: DIY Measurement fuel quantity and EGT
« Reply #38 on: November 20, 2018, 10:18:34 PM »
Only thing I forgot to mention was that the biggest cause was that the arduino could not measure resistance. And the multimeter was the original wiring from the tank sensor to the original LPG display / buttons unit.
One of the sensors connected through a 1.5 mm2 cable and the second through the ground of the car.
I replaced this with a multi-core cable with a much smaller diameter (direction awg 20).
This connected to the arduino, and immediately fixed the problem.  :DrinkPint: I should have done this immediately!  :hammerbash:
Strange is that the resistance has not changed what I could measure with the multimeter.

So I finally soldered the whole. I did this with pinheader, so you can plug in and out of the arduino.
It was important that the pinhead is sufficiently long after soldering. These have seen the incidence of collapsing that the plastic envelope becomes partly soft during soldering.

Now it is useful to give a bracket for the LCD screen and the arduino a place under the dashboard of the car.

The whole once again tested in the car. It appears to work well. The temperature sensor of the exhaust gases also works well.

I would soon make a picture of the whole.

Offline AlexS

  • Full Member
  • ****
  • Posts: 114
Re: DIY Measurement fuel quantity and EGT
« Reply #39 on: November 20, 2018, 10:34:50 PM »
Recently an attempt was made to calibrate the whole.

With every 5 liters I noted the resistance that the arduino displayed on the LCD screen.

The first graph shows all measuring points that have been observed.

The second one is two out of sight given that the same or almost the same value as the previous measuring point.
I also do not expect a linear relationship. But it seems to me that after 5 liters the resistance is the same. Unless the sensor can not go higher or lower (full or empty tank).

The third graph shows the measuring points of graph 2 + measuring points that I measured during a previous tank turn.


May I ask, what do you think of this measured data?

Offline AlexS

  • Full Member
  • ****
  • Posts: 114
Re: DIY Measurement fuel quantity and EGT
« Reply #40 on: November 20, 2018, 10:47:30 PM »
The arduino script for calibrating the tank + EGT.

Offline Admiral_dk

  • Full Member
  • ****
  • Posts: 1400
  • Søften - Denmark
Re: DIY Measurement fuel quantity and EGT
« Reply #41 on: November 21, 2018, 12:06:16 PM »
I'm only interested in the last graph - but … is this made up of two different times you measured the pot resistance or ?

If the pot is ok, you should measure close to the same resistance every time you have the same angle on the shaft …!

The two very different values for 25L do not look good, and to be honest - I can't tell you if they are a result of bad connections, bad measurement or bad pot  :thinking:

Why are some points missing if you measured for every 5L ?

Offline Allen Smithee

  • Full Member
  • ****
  • Posts: 924
  • Mordor, Middle Earth
Re: DIY Measurement fuel quantity and EGT
« Reply #42 on: November 21, 2018, 03:15:51 PM »
Sorry for coming late to this thread - I didn't see it.

I used to have a ford focus LPG - one of the ~300 that Ford made in 2003/4 to test the market and then abandoned. The car had the standard petrol tank for petrol, and a flat circular LPG tank installed in the spare-wheel space under the boot floor (the boot floor itself having a ~100mm layer of styrofoam insulation to stop the chilled LPG freezing the contents of the boot. The car had the ability to switch from petrol to LPG and back at any time (static or under way) - it was always started on petrol but if LPG was selected an automatic sequencer would switch it to LPG as soon as the feed heater (the feed pipe inside the LPG tank included a heater/vaporiser unit) had built sufficient gas pressure. In the summer this switch-over was almost instantaneous, but in the winter if the car was cold-soaked overnight it could be 10 minutes of fast driving before the LPG feed was warm enough!

The car had one fuel gauge which would indicate the contents of the currently-selected fuel tank. The petrol tank used a conventional resistive float sender, but as I remember the LPG tank had a capacitative fuel level sensor (as used on aircraft) - no moving parts and no floaty bits! Having said that, it wasn't all that effective. It was accurate from full to about half a tank, but from there on it would read anything from empty to 1/4 tank seemingly at random, so I had to use the trip-meter as a refuelling guide.

Final thought - like most cars the focus had a low-fuel warning light which came on when you had about 25 miles left in the tank. But while the fuel *gauge* switched between petrol and LPG tanks as you selected them the Low Fuel light ALWAYS refered to the petrol tank. This was a safety feature, because if it came on you know you HAD to put some petrol in or run the risk that there was no fuel left for the initial start (it had to use petrol for starting). The petrol station which I passed on my way home every day sold LPG, so I ran on it pretty well all the time, and in the summer it could take me 3 months to burn through a gallon of petrol. So without that warning light I may never be aware that the petrol tank was dry and the car would be unable to start!

€0.00007 supplied,

AS
Quidquid latine dictum sit altum sonatur

Offline AlexS

  • Full Member
  • ****
  • Posts: 114
Re: DIY Measurement fuel quantity and EGT
« Reply #43 on: November 21, 2018, 04:43:08 PM »
Thanks guys for responding. Welcome Allen.

Per,

Indeed, the measurement differs at 25 liters.

The first measurement session was after I had mounted the tank sensor.

This was the first test session without arduino and measured over the existing wiring of the sensor (a connection over ground and an over a 1.5mm2 wire).

In a previous post in this topic I had the result shown in a graph.
With hearing values:

Did a quick test at a local gas station. Later on I will tank several times to get some data for a calibration of the senor.

I want to read the sensor analogue. Resistance has some changed. But they are higher and that would be better for the arduino, lower amperage.

Empty tank 3930 ohm.
9.1 L 4080 ohm.
24.8 L 4170 ohm.

The strange thing was that this measured at the dashboard was so much higher than in a previous test (without refueling).
Given this reason no further refuel than 25 liters.
Measured again the next day, the resistance now turned out to include 66 ohms instead of 4170.
Probably bad connection.
Here I have completely refueled the tank and measured 77 ohms over the existing wiring with a multimeter.


Test session 2, the results that I showed yesterday (seven measuring points), were done over a new two core cable.
The resistance values ​​are derived from the reading of the arduino.

Good that you come here. Personally, I think that, partly because of the other cable and measuring method (arduino instead of multimeter), the resistance differs.

I think it is best to perform this test again. Also for more measuring points. I hope I have explained it a bit clearly now.



I deliberately omitted the measuring points in Graph 2. However, the values are displayed in the table. The red bars are values that are considered 'strange' to me.
You would expect resistance to rise per 5 liters. The increase would differ. In the area of a half empty tank (28 liters) there would be a somewhat flatter increase of resistance (tank shape and twist sensor mechanism). And with an empty and full tank, the increase would be more stylish. Until the senor is out of the range of the sensor arm.
It turned out, however, that there was still 10 liters in the tank before measuring. With an empty tank, the sensor gives a resistance of around 10 ohms. Given this reason, I expect to measure an increase in standing position after the second measuring point instead of twice ~17 ohms.

This is a bit I try to explain on the basis of the measured values.

Offline AlexS

  • Full Member
  • ****
  • Posts: 114
Re: DIY Measurement fuel quantity and EGT
« Reply #44 on: November 21, 2018, 08:52:20 PM »
Allen,

I assume that the LPG was liquid injected at the ford focus, as LPi or G3 installation?
It is extra important here to refuel LPG in time. Given that a fuel pump is installed in the tank and may otherwise run dry.
My parents used to have a ford galaxy mpv first gene with also lpg. At the time it was a huge cost considering the LPG price of 0.30 euros per liter. Currently that has doubled. I have heard that in the United States it does not make much difference in terms of price compared to petrol?

Compared to cars with a G3 installation, it is not always necessary to start on petrol in older type cars. The LPG is developed as a gas in an evaporator. This evaporator works on the basis of the heat of the cooling water of the engine.
However, I notice that even in the winter the engine starts quickly on LPG. The slant six comes to temperature fairly quickly without overheating in the summer.
On petrol, however, the engine needs more time to get well warm. The switch to hot intake air and EGR system has already been removed. And if necessary I manually use the choke instead of the bimetal unit. This is often done because the engine will run on LPG.

However, I find that the exhaust temperature with driving on LPG fairly low. In comparison with newer engines, obviously better cylinder heads and heavier loads and turbo. But a short test will be the egt between 250 and 350 degrees Celsius. And by pulling strongly towards the 500 degrees.
One time compare with driving on petrol.
It is nice that you can measure this. But have a plan to electronically adjust the ignition for both fuels. Considering the engine in base is adjusted to low octane which was available in the United States at the time and euro 95 and LPG is much more resistant.