> Hi all!
>
> How can I to build an ohmimeter using a Pic16c711?
> If somebody to know of something, answers me.
> Thanks!
>
> --
> +-----/-------------------------\-----+
> | \ CASSIANO J. PEREIRA / |
> | \ Eng. Eletrtnico / |
> |-------\---------------------/-------|
> || -> LAPRO - Centro 6 - UNISINOS <- ||
> || emails: .....casspereiraKILLspam.....sinos.net ||
> || EraseMEcassianospam_OUTTakeThisOuTexatas.unisinos.br ||
> +-------------------------------------+
________________________________________________________________
YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk! For your FREE software, visit:
dl.http://www.juno.com/get/tagj.
<P><FONT SIZE=2 FACE="Arial">Read the adc pin.</FONT>
<BR><FONT SIZE=2 FACE="Arial">then calculate the voltage drop.</FONT>
<BR><FONT SIZE=2 FACE="Arial">Like this:</FONT>
<BR><FONT SIZE=2 FACE="Arial"> drop = 5 - adcvalue;</FONT>
<BR><FONT SIZE=2 FACE="Arial">Then figure out what value resistor drops x amount of voltage.</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">IT may NOT WORK...</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">Hope this helps,</FONT>
<BR><FONT SIZE=2 FACE="Arial">Andrew</FONT>
</P>
</UL>
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">I can be a little more definate. It won't work! The input impedance of the adc is pretty high and worse, is not precisley defined, so unless the the resistor you are measuring has a very high value, you will only drop a very small amount of voltage. Remember a resistor will only drop voltage when a current is flowing through it.</FONT></P>
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">The normal way to measure a resistor is to put a known current through it and measure the voltage drop. You extend the range of an instrument, you would have several ranges that would put different amounts of current through the resistor. You simply apply ohms law R=V/I.</FONT></P>
<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">The tricky(er) bit is making a precision current source which isn't my speciality, but I'm sure someone on the list will oblige.</FONT></P>
On Mon, 7 Feb 2000 08:22:29 -0500 Andrew T Kelley <k_andrewspam_OUTJUNO.COM>
writes:
> That is easy.
>
> 5V
> | |
> |___[res]__| ADC Pin
> |
>
> Read the adc pin.
> then calculate the voltage drop.
> Like this:
> drop = 5 - adcvalue;
> Then figure out what value resistor drops x amount of voltage.
>
>
> IT may NOT WORK...
>
>
Right, it probably won't. You can either use a pull-up resistor to +5V
(assuming the A/D is using +5V as its reference) and have the unknown to
ground (which will give a nonlinear A/D versus resistance curve) or use a
current source as the pull-up, which will give a linear curve. The
current source could be made using any of several techniques. Could be a
current mirror, a PNP transistor with zener, a constant current diode, or
an op-amp constant current source. If you don't mind floating the unknown
resistor, you can use an op-amp to do both the constant current and
current to voltage conversion.
If, for example, you ground the noninverting input, connect the
inverting input through a 1K to -1V, put the unknown resistor between the
inverting input and the output, the output voltage (in volts) will
represent the unknown resistance in k ohm. You can scale resistors and
voltages to whatever you need.
________________________________________________________________
YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk! For your FREE software, visit:
dl.http://www.juno.com/get/tagj.
Any electronic instrumentation measures the physical variable element by
comparison, or to another known part or to a known internal reference.
All the other kind of magic only with "Magic Lights and Sound" in
Holywood, or using a RC timming constant :)
You can choose any of the following 3 options.
Pick any TWO from "Fast", "Good", "Low Cost".
OPTION #1:
(Not easy, Not simple)
The most common way to produce a ohm-meter is via a constant current
source.
The above circuit will try to supply 1mA through UR doesn't matter
what. High values of UR will generate high voltage to ADC input, zero
ohms at UR, will generate 100mV at ADC input.
As the current is constant 1mA (with some UR), there is a 100mV over RF
always, so your software should reduce it from the actual ADC output.
RF = 100 Ohms, and UR from zero to 4900 Ohms will generate ADC input
voltages from 100mV up to 5000mV. So, RF would be your scale range.
RF = 10 Ohms, UR range up to 490 Ohms.
RF = 100 Ohms, UR range up to 4900 Ohms.
RF = 1000 Ohms, UR range up to 49k Ohms.
RF = 10k Ohms, UR range up to 490k Ohms.
ADC input overflows above 5V means the op-amp output swings toward +10V
(>5Vdc) when UR is above RF range. UR = infinite (open), op-amp output
goes close to +10V.
You could also control VREF to change range (restrictions).
OPTION #2:
(Simple, but not easy)
Using a discrete ADC unit that can accept a VREF from 0.1 to 4Vdc, you
could build this circuit:
PIC port pin A output-----.
|
R Unknown
|
PIC port pin B input------o
|
=== C
|
Gnd
Flip A to + and measure time it takes to charge C.
Long time means High Value R.
Create a linearization formula to process the measured time, or a PWM
output at A (increasing the + pulse width along with the time), so the
ramp on C will be linear.