Measure a variable resistor connected to GND (measure a one-wire car sensor)

Hi guys,
I'm working on a project of an older car where the water temperature, oil pressure and fuel level are measured by a one-wire sensor, it means the sensor is connected to the vehicle GND (0v) and the gauge shows the resistance of the sensor.

Now, I would like to have alarms on a LCD Screen connected to an arduino mega if temperature hot, pressure low and level low.

My question is the schematic to do this. I found some guys they did it, or at least tried it.

example:

The first sounds good, but i did not understand how the schematic was finally done? Can anyone help me with the correct schematic?

The Resistances to be measured are: Water 100-400 ohm, Oil 100-250 ohm, Fuel 10-70 ohm

I think you probably need to clarify one-wire sensor. 1-wire is used by Maxim Semiconductor as a trademarked name for their 1-wire protocol. Your wording makes it sound like a literal single wire sensor. I have not heard of a single wire sensor that can measure water temperature, oil pressure, and fuel level so you might be referring to a daisy-chained 1-wire sensor network where you have three separate sensors on the same wire. Is that what you are looking for?

Do you have the existing gauges so you can measure the voltage across the sensors with the gauges connected? You'll get different voltages, especially since you're operating at 5V, but it would tell us something about the normal current through the sensors (Ohm's Law).

If I understand correctly, you need to add a resistor to each sensor to make a [u]Voltage Divider[/u] where the sensor is the "bottom" resistor.

For example, Let's assume you put a 400 Ohm resistor in series with the water sensor -
When the sensor is 400 Ohms, you'll get 5 x 400/(400+400) = 2.5V for an ADC reading of ~512. When the water sensor is 100 you'll get 5 x 100/(400+100) = 1V for an ADC reading of ~204.

Note that the output is non-linear... If the resistance is cut in half, the voltage (and corresponding ADC reading) are not cut in half. And, the added resistor for the water sensor doesn't have to be 400 Ohms. That just makes an easy example.

10 Ohms makes me a little nervous (because of the current) and that's why it would be helpful to check the normal voltage. I'd hate to see you fry the sensor and I would really hate to see the sensor in the fuel tank overheating!!!

@freaklabs: yes I think I explained wrong, each sensor has one wire, I can measure them with ohmmeter and the results are Water cold 100-400 hot ohm, Oil low 100-250 high ohm, Fuel low 10-70 full ohm, each sensor is direct on the vehicle ground and one wire goes out of them.

@DVDdoug: I don't need a linear result because I'm not going to show a progress bar or similiar, what I want to do is to show an alarm if Water Hot (maybe @400 ohm), Oil pressure Low (maybe @150 ohm) and Fuel Low (maybe @25 ohm). I have the gauges there, but i know that they are supplied by 12v directly.

don't need a linear result because I'm not going to show a progress bar or similiar, what I want to do is to show an alarm if Water Hot (maybe @400 ohm), Oil pressure Low (maybe @150 ohm) and Fuel Low (maybe @25 ohm).

If you want a result that is non binary then you need a linear measurement and then your software applies these thresholds.

If you want these threshold values set in hardware then you need a voltage comparator circuit that gives a logic level above the threshold and the inverse logic level below it.

You have not got a one wire sensor it is two wires, the second wire is just the chassis of your car.

:o ...it sounds more complicated than I expected...

I just want to have a signal for water temp if below 40ohm, for oil pres if above 150ohm, for fuel level if above 120ohm. If possible the easiest way...

May I ask how you guys would do it?

@Grumpy_Mike: yes you're absolutely right, after reflection it is a 2-wire sensor...

What about this?: A question about resistance measurement with arduino - Arduino Stack Exchange

may this work for my application?

Yes that link looks fine.
An Arduino can only measure voltage. You need to incorporating a second resistor in a potential divider circuit and work out the resistance from the voltage you measure, the known voltage across the whole circuit and the known value of the other resistor.

Great!
So this Schematic should be what I need?

and would do you suggest me as R1?

Yes that looks fine.

and would do you suggest me as R1?

Make it about the same size as your sensor’s resistance at the mid range of measurements.

Hello.
Will the gauges still be connected to the resistor senders?

If so you will need to use a DMM and check the voltage at the connection of the resistor and the gauge.
Checking and noting the voltage that corresponds with your alarm level.

You will not be measuring resistance directly.


Tom.. :slight_smile:

Ooooooh now I got it.... :slight_smile:

I just checked the voltage on gauges, they run at 8v without sensors and I measure voltage from 1.3v - 6.8v with connected sensors. I already have this here:

So the easiest way is measure the voltage on the gauges with this divider...

If you guys agree with, you helped me a lot!

It actually works with this divider! Many thanks for your help!