12 Volt fuel gauge

Hello everybody!

I am a complete newbie in the arduino scene i do have a question about a 12Volt (35-40 y/o) vdo fuel gauge which i have as a spare.
I want to connect that to my arduino, but it is 12Volt so a direct connection will probably be useless :slight_smile:

I can't tell you more about the gauge itself as it doesn't contain any further information and only has 3 ports a plus and minus and one for a light!

Does anybody have some sort of schematic on how to connect the arduino with a 12Volt gauge? Without harming the arduino or the gauge itself?

regards Bastiaan

See if there's anything in the attached link that helps with this:

http://www.diylife.com/2008/02/02/show-pc-stats-on-analog-gauges/

Thanks i do need to play a bit with it, a direct connection to the arduino without any resistors didn't do much, the pointer moved just slightly above the E(mpty), this means i need to play as in the tutorial mentioned with pull-up resistors untill i have a perfect match. Thats gonne be fun.

Another idea i am playing with is using a TIP122 put the gauge on a 12V adapter and use the TIP122 together with the arduino to control the current given to the gauge! But i need to look into the datasheet of the TIP122 if this one is suitable for the job, don't wanna fry my arduino with 12Volts

Adding an optoisolator between the PWM out and the transistor base might provide some reassurance as you play around with it.

Broos,

There is some conflicting info in this thread.

In your first post you mention that the meter is 12V, but then you talk about the amount of current you put through the meter.

The link N201LJ posted looks to be working with current (rather than voltage) meters.

Have you tested the meter with a battery? Connect a AA battery across the + and - pins. If it is a 12V meter, you should get a reading of about 10% of full scale. Then you could use a 9V PP3 battery. You should get 75% of full scale shown. (Initially you should just connect the meter to the battery momentarily - if the needle flies across the scale it is probably a current meter).

Any general purpose npn transistor will do for this. Connect emitter to ground, base to the arduino pin via a 4k7 resistor and collector to 12V via a 10k resistor. Connect the meter to ground and the collector.

Even if the transistor fails and goes short circuit to the 12V line (a rare failure mode - in my experience they fail open circuit and usually with a "pop"), the Arduino will be protected by the 4k7 resistor.

You can test the circuit without the Arduino by connecting the arduino end of the 4k7 resistor to 5V and then ground. You should see close to zero and close to full scale respectively.

Opto-isolators are overkill in this situation, but can be used. One thing to watch out for with opto-isolators is that the turn-on and turn-off times are often different, so if you are using it in a PWM type situation (which you probably will be), the PWM can be skewed (though it probably doesn't matter for a fuel guage).

Regards,

Mike

Thanks for the info! I will be hooking up some batteries tonight when i am back behind my own machine!!!!

i'll make a post afterwards and let you know on what i have discovered!

Thanks for the tips...very usefull!!!!

Bastiaan

Must be a current meter!!!!

I attached it to a 9 volt battery and the output wasn't even close to 25%

if i may ask do you have a schematic on how to get this working?

Hmmm. A current meter has a very low internal resistance, so connecting one direct across a battery should cause a lot of current to flow through the meter. If it is a current meter I would have expected a very rapid full scale deflection of the needle.

Do you have access to a multimeter? Putting a multimeter (in current mode) in series with the battery and the guage should allow you to confirm the current flowing throught the meter.

You say there is a connection for a lamp. Are these wired up inside? I wonder if the lamp is in series with the meter.

Something is not adding up here.

As for the circuit - the link N201LJ posted has a circuit for a currrent meter. The description in my last post should be enough for you to sketch a circuit if it turns out to be a voltmeter.

What vehicle is it from? Maybe a wiring diagram for that vehicle will shed some light on what you're working with.

Mike

Silly question, but is the 9V battery good?

Its a VDO gauge from a NSU Prinz, it is between 35 and 43 years old.
Its one i have spare as i am restoring an old NSU Prinz 4L from 1973 (one of the few remaining)
Talk about a variaty of hobbies hehehehhehe

Anyway it could be that the light plays a roll its actually one that you can pull out from the side and has a single connector (with single i mean + only, no ground). The light is much the same as a bicycle lightbulb!

I do have a wiring diagram for the NSU but that is just to make sure where all cables go and doesn't tell anything about what kind of gauges we are talking about.

I can tell you that the dyna of the car doesn't give AC as cars of today do, but is producing DC power, funny thing about that is that you can start a car without having a battery inside!

i also did a quick test with the original fuel meter which will be replaced in my car, just to check the other one isn't broken and i get the same outputs as with my spare.

Hope this info helps a bit!

Just dont get it, i took a nicad battery (makita drill which is new and fully loaded) 13.4V 1.3 Ah connected the + and the lightbulb to the + of the battery and ground to well....ground ofcourse and guess what i get the same reading as with 9 volts!

Hi Bastiaan,
do you have a meter to measure the resistance between the Plus and Ground-contacts.
If the reading is very small (below 100 Ohms)the gauge is driven by the amount of current flowing through it, if its high (more than 10000 Ohms) it will measure the voltage.

There is a solution for both situations, but since there are conceptual differences the result of the measurement is essential...

(And maybe some here http://www.nsu4.info/ knows a bit more about this ?)
Eberhard

Ok this is what i found out after contacting the webmaster in the website mentioned above, who i know personally from club meetings!

He doesn’t have the official specs on this specific gauge, but he gave an example of another gauge which is used in the NSU TT’s as he wrote me 10 ohm is equal to empty and +/-180 ohm is equal to a full tank of gasoline. This doesn’t necessarely mean its the same for the NSU P4 gauge but the technique used to read the fuel level is the same only possibillity is that the values of resistance are different.

So the secret is in the resistence and not in the voltage i guess, so a 5 volt usb power with the right resistence should do the trick? am i right or am i lost in the woods of electronics?

Broos,

it sounds to me like your guy was describing the fuel level sensor, not the gauge.

I was thinking about this on the way to work this morning. It may be that the meter is something like a 10A meter. The batteries you tried will have an internal resistance which, couple with the resistance of the meter, will limit the current when connected to the meter. If the current limited at, 2A, which I believe to be reasonable, you will only get a 20% deflection. Roughly what you are seeing.

The low values of resistance for the sensor, given by your contact, would seem to back this up, too.

If that is the situation, you should look to the circuits on the page N201LJ linked to, but you’ll need a transistor capable of handling 10Amps (or whatever the meter turns out to be). I’d look into a 2N3055.

You do really need to get hold of a multimeter to test this out. Do any of your car club buddies have one you could borrow?

Do the test Eberhard suggests and also, put the multimeter, reading current in line with the 9V battery and the gauge. You will then know the current going through at 20% of full scale, and you will then be able to calculate the current for full scale deflection.

Regards,

Mike

Hi Bastiaan,

Broos,
it sounds to me like your guy was describing the fuel level sensor, not the gauge.

I think so, too!

I was thinking about this on the way to work this morning. It may be that the meter is something like a 10A meter.

No very likely, because you don't want to drain 10 Amps from the car-battery just to move a little pointing device. But I'm pretty sure too, that it's the current that gets measured by the gauge.

You do really need to get hold of a multimeter to test this out. Do any of your car club buddies have one you could borrow?
Do the test Eberhard suggests and also, put the multimeter, reading current in line with the 9V battery and the gauge.

Even the cheapest meter will do for a start. You need one soon anyway, because it looks you have you're already an Arduino-addict :slight_smile:

Eberhard

Thats correct the guy was describing the fuel level sensor, but i thought it might be important to know and he didn't had any further specs on the gauge itself.

I do have a simple and cheap multimeter which can give me V, A and resistence in Ohm.
To be as clear as possible i will describe below what i have done to get the resistance value.

I done some measuring using the 14Volt drill battery fully charged, my multimeter has a turnknob which can be switched to measure 2000k, 200k, 20k, 2000 and 200 ohm. After measuring on all options i discovered that the 2000 ohm gave the best readable value of 150 (give and take a few)

my estimate is that the pointer is only showing a small 10% of its capabilities on the gauge (not the 20% mentioned before)

For some stupid reason Amp won't give a value (measured between + batt and + gauge)

And yes i am starting to get an addiction with the arduino and electronics in general, still got alot to learn as i am by far an Einstein hahahahh Anyway glad that there are people here who know there way in electronics! :wink:

For some stupid reason Amp won't give a value (measured between + batt and + gauge)

Hmm. Usually, when measuring current you need to change where the red lead is plugged in or you won't get proper readings. Its an easy mistake - did you change the leads after you measured the voltage?

And yes i am starting to get an addiction with the arduino and electronics in general

Get out while you can - lol

Regards,

Mike

Hi,

I do have a simple and cheap multimeter which can give me V, A and resistence in Ohm.
To be as clear as possible i will describe below what i have done to get the resistance value.

I done some measuring using the 14Volt drill battery fully charged, my multimeter has a turnknob which can be switched to measure 2000k, 200k, 20k, 2000 and 200 ohm. After measuring on all options i discovered that the 2000 ohm gave the best readable value of 150 (give and take a few)

Ok, you will have to take a little tutorial here on measuring resistance:

  1. You don't want or need a powersupply to be connected the component in question! So the best thing is remove ALL wires that might be attached to the Gauge. Actually the multimeter has a small build-in battery that it uses as a reference for measuring resistance. So you cannot measure resistance in a powered circuit.

  2. Now simply attach the two wires from the meter to the batt- and gauge- contacts and read the resistance-value like you already did.
    Maybe this link could help too
    Measuring Resistance Tutorial and Circuits - How to Measure Resistance - Test and Measurements - Hobby Projects
    If you're a visual guy try this (sorry, starts with a nagging ad)
    http://www.expertvillage.com/video/4885_electronic-circuit-measure-resistance.htm

For some stupid reason Amp won't give a value (measured between + batt and + gauge)

Usually for measuring current you have to plug one of you wires into a different socket on the the Meter (most labled 2A or 20A). Might be helpful if you still have the users manual of the meter.

Eberhard

Aha so that was what i was doing wrong! :wink:

Anyway for the Amps i had the knob at 20m and it gave a read out of 0,10
The resistance in ohm still 150 tot 151,6 (kind of fluctuating in between but in average closest to 150, could this be caused by my leads they are not clambs so i have to hold them during measurements)

Confusing stuff but i am getting there! Anyway i indeed forgot to switch the lead, will have a peak if i can find the manual online as i dont have it in anymore!

Hi Bastiaan,

now I found this schematic:
http://www.nsu-prinz-club-schwaben.de/schaltplan_nsutt-tts.pdf
The fuel gauge is called "Tankanzeige" in german and is shown to the left between the gauge for speed and RPM.

Looks like the layout of the contacts on the schematic resemble the layout of contacts in real life?
But is this the front-view or back-view of the gauge?

Then I would read this as

  • the brown wire goes to main car ground. May attached directly to the metal-case of the gauge?
  • the gray wire is for the light and should go to the +12V power supply (car battery) (have there been NSU Prinz with 6V supply?)
  • the black-violett one should also go to +12V (just different fuse than the one for measureing the fuel)
  • the black-white one goes to the sensor (which is nothing more than a variable resistor 10Ohms to 180Ohms if you're friend is correct.) The other side of the sensor goes to car-ground.

So to test this whole thing you should probably wire it like in the schematic and instead of the sensor use a few resistors from the range 10 -180 Ohms.
I can't recommend a normal potentiometer since I expect that a current of around 100mA will go through it, which probably overheat it. Resistors might get hot too, but they are cheaper.

Eberhard