The idea is to measure car's fuel sender unit's resistance without disrupting the original gauge circuit. I understand that the Arduino needs to use analogRead function for that, but I can't seem to figure out how to design the circuit for analog pin.
My ultimate goal is to have a working original cauge AND Arduino connected to LCD showing "litres to go".
Do I have to use voltage divider (won't alternating 12-14.4 dc voltage kill the idea?)? Or do I have to use transistor based circuit?
Below I've attached an illustration showing the original circuit.
You have not given the Fuel Sender unit output voltage yet, only the supply voltage. When you post the Fuel Sender unit Output voltage we can talk about how to condition that for arduino analog input. Not knowing what that voltage is I could only give you a vague and general answer , such as , use a voltage devider and an op amp. There, that was helpful , wasn't it ?
raschemmel:
You have not given the Fuel Sender unit output voltage yet, only the supply voltage. When you post the Fuel Sender unit Output voltage we can talk about how to condition that for arduino analog input. Not knowing what that voltage is I could only give you a vague and general answer , such as , use a voltage devider and an op amp. There, that was helpful , wasn't it ?
I understand.
The fuel sensor operates on the same voltage as does the rest of the car system. So the fuel sender/sensor's output voltage varies with the resistance it's creating. It is typical float-type sensor. When the fuel is empty, resistance is 3 ohms and when full it's 110 ohms. Hope it made it more clear.
Also, needless to say that English is not my native language
You have not given the Fuel Sender unit output voltage yet,
and you gave me this:
When the fuel is empty, resistance is 3 ohms and when full it's 110 ohms. Hope it made it more clear.
Are you saying you have no clue what the VOLTAGE OUTPUT FROM the fuel sender is and you want me to use OHM'S LAW to calculate it based on what ? Now I have to ask for the FUEL GUAGE OUTPUT VOLTAGE ? How can I apply Ohm's law with ONLY the resistance ? If you told me the VOLTAGE then I suppose I could calculate the resistance. Do you have any way to SEPARATE the FUEL GUAGE from the FUEL SENDER unit and MEASURE the fuel SENDER resistance ? Can you MEASURE the FUEL GUAGE OUTPUT VOLTAGE where it connects to the SENDER unit ?
You have not given the Fuel Sender unit output voltage yet,
and you gave me this:
When the fuel is empty, resistance is 3 ohms and when full it's 110 ohms. Hope it made it more clear.
Are you saying you have no clue what the VOLTAGE OUTPUT FROM the fuel sender is and you want me to use OHM'S LAW to calculate it based on what ? Now I have to ask for the FUEL GUAGE OUTPUT VOLTAGE ? How can I apply Ohm's law with ONLY the resistance ? If you told me the VOLTAGE then I suppose I could calculate the resistance. Do you have any way to SEPARATE the FUEL GUAGE from the FUEL SENDER unit and MEASURE the fuel SENDER resistance ? Can you MEASURE the FUEL GUAGE OUTPUT VOLTAGE where it connects to the SENDER unit ?
I don't know the voltage of the fuel sensor, I only know the resistance gap it's operating, which is 3-110 ohms. I can measure the voltage output or flowing current amount tomorrow, if that's necessary...
Sorry for causing inconveniances, I'm really not an expert in electronics, but I'm trying to learn.
I disconnected the fuel level sender from the gauge and measured voltage between the gauge wire and ground. Voltage was 6,86 volts.
I then measured resistance between same wires (turned off the power). It was 66,6 ohms.
Then I measured resistance between two contacts of the fuel sender unit. It was 58,7 ohms (i guess it means, that the tank is half full)
Then I connected fuel gauge back to the fuel sender unit and measured voltage from the same wires (ground and gauge/level sensor wire; power on) and it measured 3,39 volts.
I then decided, it would be nice to check the current flowing through the sensor too. It was 0,0556 amps.
Added some paint-made illustrations, hope it will help.
When the fuel is empty, resistance is 3 ohms and when full it's 110 ohms.
Is this information from some car manual, or did you measure this??
My experience is that the resistances quoted in manuals are approximate at best.
Since you want to know the Voltage as the amount of fuel changes, I suggest you actually measure it. Maybe carefully hook up a 2-wire cable to:
(ground and gauge/level sensor wire; power on)
and connect your multimeter to it. Get a separate can of fuel, maybe 2 or 3 gallons, and drive the car carefully until it actually runs out of fuel, and get that reading. THAT is the one you care about the most. Many fuel gauges are known to be inaccurate near empty tank. AND the value varies quite a bit depending on if the car is pointing uphill or downhill!
Then use your spare fuel to add to the tank, restart the car and drive to a fuel station and slowly fill the tank, recording the voltage at 1/4, 1/2, 3/4 etc. THEN you can decide how to use Arduino to measure the range of voltages, and how you want to display "Liters Left before the car stops".
Do not do this on the AutoBahn.
I love Engineering, but sometimes the Empirical approach gets you what you need.
raschemmel:
How much fuel in the tank when you measured 3.39V ?
Seemed to be about quarter to half tank. Don't know the exact amount unfortunetly.
terryking228:
When the fuel is empty, resistance is 3 ohms and when full it's 110 ohms.
Is this information from some car manual, or did you measure this??
My experience is that the resistances quoted in manuals is approximate at best.
Since you want to know the Voltage as the amount of fuel changes, I suggest you actually measure it. Maybe carefully hook up a 2-wire cable to:
(ground and gauge/level sensor wire; power on)
and connect your multimeter to it. Get a separate can of fuel, maybe 2 or 3 gallons, and drive the car carefully until it actually runs out of fuel, and get that reading. THAT is the one you care about the most. And many fuel gauges are known to be inaccurate near empty tank. Then use your spare fuel to add to the tank, restart the car and drive to a fuel station and slowly fill the tank, recording the voltage at 1/4, 1/2, 3/4 etc. THEN you can decide how to use Arduino to measure the range of voltages, and how you want to display "Liters Left before the car stops".
Do not do this on the AutoBahn.
I love Engineering, but sometimes the Empirical approach gets you what you need.
Thanks for your input!
I took the sensor out and measured its resistance in various states. Lowest was 4 ohms (which was when the tank would be full) and the highest was 111 ohms (which was when the tank would be empty). So it comes pretty close to the range claimed in cars manual.
The programming part is not the issue. Issue is with the circuit part, as I don't know how to design such a circuit which reads the voltage but does not interfere with the orginal gauge circuit...
When this gets sorted out, there's still a problem with variable voltage. When car is not running, the voltage of the battery is about 12 volts. When the car is running, the voltage is about 14.4 volts. So the voltage measurement gets a little difficult. I must also program the Arduino to sense if the circuit is running at 14.4 volts or 12 volts.
The circuit is simple: Two voltage dividers and two analog inputs. You can Google "voltage divider". Your "actual" batt voltage should
be referenced to 13.8V.(Nominal voltage). You can use an op amp voltage follower if you want to guarantee isolation but it probably is not necessary.
Duplicate the above voltage divider for the Fuel Gauge out put voltage. ====> (TO ARDUINO ANALOG INPUT A1)
You now have the battery voltage and the fuel guage voltage at levels that can be read by arduino
by dividing 13.8V by Vbatt
if the battery voltage is above 13.8 the fraction is < 1
if the battery voltage is >13.8V the fraction is > 1
Multiply the fuel guage readout by this fraction and it should compensate for a low or high battery.
You cannot have such low resistances across your power bus.
Read my last post.
Look at the values of the voltage divider.
You must use 10k and 4.7k
ALL of your voltage dividers must use these values.
List ALL of the components that YOU added to YOUR schematic by component designator .
(I am trying to find out if ANY of the resistors in your schematic are part of original circuit.
why do you have R2 & R3 at the Guage with the output of that voltage divider going to the sender ?
Did you add that ?
Why ?
You cannot have such low resistances across your power bus.
Read my last post.
Look at the values of the voltage divider.
You must use 10k and 4.7k
ALL of your voltage dividers must use these values.
List ALL of the components that YOU added to YOUR schematic by component designator .
(I am trying to find out if ANY of the resistors in your schematic are part of original circuit.
why do you have R2 & R3 at the Guage with the output of that voltage divider going to the sender ?
Did you add that ?
Why ?
R2 and R3 are actually inside of the gauge. As user JohnLincoln said, the gauge is an ammeter. All the other resistor values (r4-r7) are example, I know they're not correct. It was just to demonstrate if the principle is right. I will change R4-R7 values as you said in your last post. I have quite a few 100k+ resistors laying around, so I can think of some combination. Thank you for your input, guys! I will let you know how the project progresses!
As long as you multiply both resistors by the same value , you can scale the resistance up to say 100k & 47k.
You could consider using a 50k trim pot for the 47k (if R1=100K) and that would allow you to calibrate the system .
Hii there. I am working on the same projects. I have the same approximate 0,42V on Full Fuel and 3,28V on Empty Fuel. I use arduino Uno R3 with Voltmeter code, my only problem is that is very hard (for me :)) to transfor volts in litres especially because volt up is fuel down, and volt down is fuel up so i can`t use as volt/litres. A code or any formulas would be very useful. All the best and thank you in advance.