Searching \ for 'determining a resistance value' in subject line. ()
Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=determining+resistance
Search entire site for: 'determining a resistance value'.

Truncated match.
'determining a resistance value'
1997\10\13@233647 by

I need to read a varying resistance value, it may range form 20k to
200k. I am planning to use the 16C73 for it's A/D. I am playing arrouind
with an A/D that I have hooked up to my parallel port to make testing
easier, so it would take me only a few minutess to test any suggestions,
even if it only MIGHT work. Any ideas on how to this would be greatly
Louis Marquette

>I need to read a varying resistance value, it may range form 20k to
>200k. I am planning to use the 16C73 for it's A/D. I am playing arrouind

Louis,

another approach would be converting resistance into frequency or pulse
width and measure these with the PIC. Depending on the precision and
resolution you need, either simple RC combination connected to a PIC pin
(prefferably with a Schmit-trigger input) or CMOS 555 timer or RC oscilator
with an OpAmp or a fancy U/f converter like AD654 are some of your other
options.

Please, state the precision, resolution (and perhaps speed) you expect from
the measurement, so that the answer can be more specific.

Regards,

Josef

At 11:36 PM 10/13/97 -0400, Louis Marquette wrote:
>I need to read a varying resistance value, it may range form 20k to
>200k. I am planning to use the 16C73 for it's A/D. I am playing arrouind
>with an A/D that I have hooked up to my parallel port to make testing
>easier, so it would take me only a few minutess to test any suggestions,
>even if it only MIGHT work. Any ideas on how to this would be greatly
>Louis Marquette
>
>

Let's remember ohm's law: R=V/I
So, if R is your variable, and your A/D measures voltage, you need a costant
I. There are  a number of ways to build a constant current source, but the
easiest is to use a BJT.  Check any analog book that has transistor circuits

Try a dallas semi ds1623? i think pot chip with up and down pins needs 2
digital pins only maybe you could use a '57 cheeper than '73 swings and

just a thaught Steve.....

1997\10\14@190434 by
At 11:36 PM 10/13/97 -0400, Louis Marquette wrote:
>I need to read a varying resistance value, it may range form 20k to
>200k. I am planning to use the 16C73 for it's A/D. I am playing around
>with an A/D that I have hooked up to my parallel port to make testing
>easier, so it would take me only a few minutes to test any suggestions,
>even if it only MIGHT work. Any ideas on how to this would be greatly
>Louis Marquette
>

You can measure resistance quite accurately but slowly with out an A/D
converter.

----------
Rref           |              |
---- /\/\/\/-------- | Pf          |
|                        |              |
|                        |              |
|                        |              |
--------|                         |             |
|         | --------------------| Ps        |
/         |                         |             |
Rx \       == C                    |             |
/         |                          ----------
|         |
|         |
---      ---

The technique requires two port pins. Pf is feedback pin
configured as an output. Ps is a sense input which is only
used to sense if the voltage at the junction of Rref and
Rx is above or below the trip point of the gate input.

Rref is a reference resistor that is used to establish the low
value to be measured. In this case 20K.

Rx is the unknown resistor. 20 to 200K

The way this works is to sense the logical value on the pin Ps
and feed its compliment back to Pf. The ratio of 1's feddback
to the total number of intererations is a direct function of the ratio
of Rref and Rx.

C is a small filter capactor used to smooth voltage changes at the
sense junction. Its value should make the Rref , C time constant
about equal to the loop time. Its value isn't critical to the point where
it can be eliminated.

T
Rx =  Rref   ( -------- )
2 H - T

Where T is the total loop passes and H is the number returning a
high value to Pf.

The beauty of this type of radiometric measurement is accuracy
can be traded directly for measurement time. 256 interations will
yield about 1% accuracy. Since errors terms are constant the
dynamic range will be quite large (about 20K to 2.0M with 256 interations)

Walter Banks
At 09:09 AM 10/14/97 -0500, you wrote:
>At 11:36 PM 10/13/97 -0400, Louis Marquette wrote:
>>I need to read a varying resistance value, it may range form 20k to
>>200k. I am planning to use the 16C73 for it's A/D. I am playing arrouind
>>with an A/D that I have hooked up to my parallel port to make testing
>>easier, so it would take me only a few minutess to test any suggestions,
>>even if it only MIGHT work. Any ideas on how to this would be greatly
>>Louis Marquette
>>
>>
>
>Let's remember ohm's law: R=V/I
>So, if R is your variable, and your A/D measures voltage, you need a costant
>I. There are  a number of ways to build a constant current source, but the
>easiest is to use a BJT.  Check any analog book that has transistor circuits
>

Of course, there are all kinds of ways to do this without an A/D (like the
555 based VCO mentioned in one of the other messages) or you could let the
pic pulse a pin high/low and have it connected thru the resistor to a pic
input pin and then a cap from that input pin to ground. The length of time
it took from the time the output went high to the time that the input went
high could be related to the resistance value. Of course, this would be
logarithmic (sp?) not linear.

If you want to use an A/D (the simplest but most expensive method) then I
would recommend a voltage divider. Simply a resistor of known value to
positive from the a/d input and then the resistor to test from the a/d
input to ground. This would also not be completely linear (formula would be
Vout = Vcc * ( Runk / (Runk + Rknown))
But if Rknown was a small value, it would cause only a small correction to
be necessary.

The constant current source and A/D is the most accurate method.

Sean

Sean Breheny,KA3YXM
Electrical Engineering Student
Louis Marquette wrote:

> I need to read a varying resistance value, it may range form 20k to
> 200k. I am planning to use the 16C73 for it's A/D. I am playing arrouind
> with an A/D that I have hooked up to my parallel port to make testing
> easier, so it would take me only a few minutess to test any suggestions,
> even if it only MIGHT work. Any ideas on how to this would be greatly
> Louis Marquette

You could try a Whaetstone bridge if you know the range of your unknown
resistance.
The a large resistor between the legs of the bridge to measure the
difference in resistance. When your unknown is equal to the other side of
the bridge you'll have no voltage over the centre resistor.
Hey! You could even use a digital pot or two to "tune" the bridge instead of
measuring the (differential) error!

Cheers! and good luck

--
Eric van Es               | Cape Town, South Africa