Measuring low resistance with uC

Discussion in 'Embedded Systems and Microcontrollers' started by fadingfastsd, Aug 10, 2010.

  1. fadingfastsd

    Thread Starter New Member

    Aug 10, 2010
    Hi guys,

    I'm new to the site, but figured I'd quick introduce myself and ask my question. I'm Evan, 27 y/o, and have an BSEE from San Diego State in 2007. I've specialized in motorcycle charging systems & electronics (designing & manufacturing stators, flywheels, voltage regulators, etc = more electromagnetics and mechanical design than EE work) for the last couple years.

    I did take some embedded computing courses as electives in college, but overall I'm pretty new to microcontrollers.
    I have available to me a Microchip PIC, programmer, and dev board, and a Parallax Basic Stamp and dev board, so I can use either to do this project.

    Once get this working I can port my code to use either platform.

    Now on to my problem!

    I don't want to describe the overall purpose of this project, as I'm hoping to finish a product to bring to market eventually.

    The issue I'm having is measuring a low resistance (0Ω-150Ω) with a microcontroller. I have tried to do this using the RCTIME function with the Basic Stamp, but this function is based on measuring the time to discharge a capacitor through the unknown resistance, and is not accurate at such low resistances. Adding a ~1k resistor in series brings it into the RCTIME functions useful range, but makes the low changes in resistance negligible.

    I'm basically measuring the resistance of a potentiometer and upon knowing the value, manipulate output pins on the uC based on the resistance.

    Any ideas on how to make this measurement in this low resistance range?
  2. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    Typically you would simply apply something like 5V to one side, ground the other side and use the micro to measure the voltage off the pot wiper with an ADC.. Then simply control your output pins based on the value read.
  3. sage.radachowsky


    May 11, 2010
    Yes, what he said, and because it's such a low resistance, I would make it switchable as well, so you don't burn up power.

    If it's a pot (3-lead device with a varying tap on a fixed resistance) then you can do this. Tie one side of the pot to the drain of an N-channel MOSFET, and tie the source of that transistor to ground. Tie the other side of the pot to a known voltage. Connect the uC ADC input to the middle lead of the pot. Then program the uC to switch on the MOSFET, read the voltage at the tap, and switch it off. The it's simple math to figure out the resistance.

    If it's really a rheostat (2 terminal) instead of a pot (3 terminal), then you can use another resistance to make the divider. Tie one side of the unknown resistance to the drain of an N-channel MOSFET, and tie the source of that transistor to ground. Tie the other side of the unknown resistance to a 1K resistor, and tie the other side of that resistor to a known voltage. Then program the uC to switch on the MOSFET, read the voltage at the high side of the unknown resistance, and switch it off. Once again it's simple math to figure out the resistance (different math than the first but still simple).
  4. mushin123

    New Member

    Aug 28, 2010
    You can build a constant current circuit using an opamp and a transistor. Pass the known current through the unknown resistance and measure the voltage with the microcontroller. You can set the constant current value to any value to accommodate your resistance range.



    Jul 13, 2010
    Wheastone bridge may helpful to u in his condition..

    3 known reg and 1 unknown and by using a simple equation you can find the reg..
    and as you need presition in your reg value kelvin's bridge will be more useful..

  6. rjenkins

    AAC Fanatic!

    Nov 6, 2005
    If it is genuinely a potentiometer (three terminals), simply connect it across the 5V supply and read the voltage from the wiper with an ADC input.

    If the continuous current through it is too high, connect a 150 or 330 ohm resistor in line with the 5V feed. The output range will be reduced but still quite accurate.

    If it's only a two terminal device, connect it in series with another resistor (again 150 or 330 Ohms) across 5V and treat the combination as a potentiometer - the output being from the junction with the resistor. The output voltage will be in the 0 - 2.5V with a 150 Ohm feed resistor for 0 - 150 Ohm on the device.

    With either circuit, you could feed the 'top' of the potentiometer either via a transistor switch from 5V, or even directly from a PIC output pin (as long as the current is low enough), so you can only enable power momentarily for each reading.
    You will get slightly less accuracy, it's down to whether you need to save power.


    Jul 13, 2010