electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

Measuring resistance with a PIC microcontroller?


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> Measuring resistance with a PIC microcontroller?
Author Message
nigelmercier



Joined: 03 Nov 2009
Posts: 1
Location: United Kingdom


Post03 Nov 2009 18:24   

Measuring resistance with a PIC microcontroller?


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?
Back to top
kender



Joined: 19 Jun 2005
Posts: 1231
Helped: 88
Location: Stanford, SF Bay Peninsula, California, Earth, Solar System, Milky Way


Post03 Nov 2009 18:45   

Re: Measuring resistance with a PIC microcontroller?


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.
Back to top
glenjoy



Joined: 01 Jan 2004
Posts: 1028
Helped: 47
Location: Philippines


Post03 Nov 2009 23:08   

Measuring resistance with a PIC microcontroller?


To amplify it, you need to design a good instrumentaion amplifier.
Back to top
Google
AdSense
Google Adsense




Post03 Nov 2009 23:08   

Ads




Back to top
kender



Joined: 19 Jun 2005
Posts: 1231
Helped: 88
Location: Stanford, SF Bay Peninsula, California, Earth, Solar System, Milky Way


Post04 Nov 2009 2:50   

Re: Measuring resistance with a PIC microcontroller?


glenjoy wrote:
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.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> Measuring resistance with a PIC microcontroller?
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
Measuring voltages with pic! (1)
Measuring Relay contact resistance. (3)
Communication of PC with PIC microcontroller (2)
GPS with PIC microcontroller (6)
serial communications with PIC microcontroller (4)
visual basic 6 with pic microcontroller (7)
Power-on Delay with PIC Microcontroller (4)
PIC microcontroller or equivalent with wifi?? (3)
Internet connecticity with pic (or any microcontroller) (5)
interfacing xilinx cpld with pic microcontroller (2)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS