Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Measuring resistance with a PIC microcontroller?

Status
Not open for further replies.

nigelmercier

Member level 2
Joined
Nov 3, 2009
Messages
47
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
United Kingdom
Activity points
1,622
I want to make a replacement fuel gauge display for a boat, using a PIC microcontroller.

The sensor is a variable resistor activated by a float in the fuel tank; one terminal is connected to the 0V rail (although it may be possible to isolate it if necessary). The resistance of the sensor is to to be verified, but is likely to be either 0 Ohm to 180 Ohm, or 0 Ohm to 300 Ohm.

The existing display is a moving coil meter in series with the sensor and the 12V rail.

What would be the best way to use the existing sensor?
 

kender

Advanced Member level 4
Joined
Jun 19, 2005
Messages
1,422
Helped
138
Reputation
276
Reaction score
38
Trophy points
1,328
Location
Stanford, SF Bay Peninsula, California, Earth, Sol
Activity points
9,970
Here's a couple of pic-friendly methods for resistance measurement.
- Make a voltage divider consisting of the variable resistor (sensor) and a fixed resistor. Measure the voltage at the center of the divider with ADC.
- Run constant current through the sensor. Measure the voltage on the high side of the resistor with an ADC. You'll need a constant current source circuit.

Since the sensor resistance is relatively small, you may need to amplify the voltage before the ADC.

I guess, the existing meter is an ampere-meter in disguise. Constant voltage is applied across the level sensor resistance changes. The current varies linearly with resistance, which in turn varies with liquid level. Probably, the resistance of the ampere-meter is negligible.
 

glenjoy

Banned
Joined
Jan 1, 2004
Messages
963
Helped
72
Reputation
146
Reaction score
20
Trophy points
1,298
Location
Philippines
Activity points
0
To amplify it, you need to design a good instrumentaion amplifier.
 

kender

Advanced Member level 4
Joined
Jun 19, 2005
Messages
1,422
Helped
138
Reputation
276
Reaction score
38
Trophy points
1,328
Location
Stanford, SF Bay Peninsula, California, Earth, Sol
Activity points
9,970
glenjoy said:
To amplify it, you need to design a good instrumentaion amplifier.
InAmp and Kelvin connection to the sensor, is more accurate approach to a measurement like this. But if some error is tolerated, say 1% then, a simpler connection with a resistor referenced to common ground could work too. 1% translates to 2Ω for resistance of the wires, or about 100m of 18AWG wire.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top