# Designing an Ohm Meter

J

#### Jeffrey Drake

Jan 1, 1970
0
I am in the midst of designing an ohm meter. Due to certain design
constraints, I must use a Basic Stamp II for the first design. Later
designs will likely replace it with a real microcontroller.

I have been considering components to satisfy my needs.

I have been considering using an LM334Z (TO-92) to supply a constant
a resistor it can provide a temperature independent current source,
which I can supply the load resistor that is being tested. This way, I
can get a nice linear relationship that is not possible with a
wheatstone bridge. I have found the LM334Z to be $1.50 on digikey.ca (note Canadian), but would like a cheaper variety. To display the results, I have been looking at an LTC-4727JR 4 digit 16 DIP 7 segment display ($2.95 @ 5 quantity) but unsure what kind of
chip I can use to drive it.

I am looking into a digital potentiometer to provide an autoranging
ability.

One of the drawbacks to the Basic Stamp II is that it has no ADC on
it. I have found a project page that mentions the MAX187, but it is
insanely expensive on digikey. I have found other ADCs that are more
reasonably priced, but unsure what to look for.

Any suggestions?

- Jeffrey Drake.

L

#### linnix

Jan 1, 1970
0
I am in the midst of designing an ohm meter. Due to certain design
constraints, I must use a Basic Stamp II for the first design. Later
designs will likely replace it with a real microcontroller.

I don't understand why, but it's your decision.
I have been considering components to satisfy my needs.

I have been considering using an LM334Z (TO-92) to supply a constant
a resistor it can provide a temperature independent current source,
which I can supply the load resistor that is being tested. This way, I
can get a nice linear relationship that is not possible with a
wheatstone bridge. I have found the LM334Z to be $1.50 on digikey.ca (note Canadian), but would like a cheaper variety. To display the results, I have been looking at an LTC-4727JR 4 digit 16 DIP 7 segment display ($2.95 @ 5 quantity) but unsure what kind of
chip I can use to drive it.

You can drive it with an AVR. This is an example of multiplexed digit
drivings. It's not as bright as static drivings, but quite visible.

http://linnix.com/proto/led.jpg
I am looking into a digital potentiometer to provide an autoranging
ability.

One of the drawbacks to the Basic Stamp II is that it has no ADC on
it. I have found a project page that mentions the MAX187, but it is
insanely expensive on digikey. I have found other ADCs that are more
reasonably priced, but unsure what to look for.

AVR comes with 8 channels of 10 bits ADC.
Any suggestions?

P

#### Paul E. Schoen

Jan 1, 1970
0
linnix said:
I don't understand why, but it's your decision.

You can drive it with an AVR. This is an example of multiplexed digit
drivings. It's not as bright as static drivings, but quite visible.

http://linnix.com/proto/led.jpg

AVR comes with 8 channels of 10 bits ADC.

You can get a complete LED or LCD panel meter at www.mpja.com for less than
$10/1. If you find their Chinese source you can probably buy them for a couple bucks if you order a bushel or two. They use a version of Intersil/Maxim ICL7117 which drives the LED display directly. You can make a programmable current source from a 50 cent op amp, a 5 cent transistor, and a few resistors, with a MUX driven by the Basic Stamp (if you must). A PIC12F629 has four multiplexed 10 bit A/Ds, and costs less than a dollar. The$30 PICkit includes the IC and a breadboard with a USB
programmer.

You really need to look at all the specs you (or your customer) require, as
well as the quantity you will be making. Being constrained to a Basic Stamp
sounds like homework. The meter must have some really unique features if
you expect to build them and sell them. An autoranging multimeter can be
purchased for less than $30. Paul R #### Robert Baer Jan 1, 1970 0 Jeffrey said: I am in the midst of designing an ohm meter. Due to certain design constraints, I must use a Basic Stamp II for the first design. Later designs will likely replace it with a real microcontroller. I have been considering components to satisfy my needs. I have been considering using an LM334Z (TO-92) to supply a constant current source. I am thinking about this one, because with a diode and a resistor it can provide a temperature independent current source, which I can supply the load resistor that is being tested. This way, I can get a nice linear relationship that is not possible with a wheatstone bridge. I have found the LM334Z to be$1.50 on digikey.ca
(note Canadian), but would like a cheaper variety.

To display the results, I have been looking at an LTC-4727JR 4 digit
16 DIP 7 segment display ($2.95 @ 5 quantity) but unsure what kind of chip I can use to drive it. I am looking into a digital potentiometer to provide an autoranging ability. One of the drawbacks to the Basic Stamp II is that it has no ADC on it. I have found a project page that mentions the MAX187, but it is insanely expensive on digikey. I have found other ADCs that are more reasonably priced, but unsure what to look for. Any suggestions? - Jeffrey Drake. With a diode and a resistor you canNOT provide a temperature independent current source... A resistor is reasonably temperature independent; neither a diode nor a resistor are useable for a current source and a diode is not linear. T #### Tony Williams Jan 1, 1970 0 Jeffrey Drake said: I am in the midst of designing an ohm meter. Due to certain design constraints, I must use a Basic Stamp II for the first design. Later designs will likely replace it with a real microcontroller. To display the results, I have been looking at an LTC-4727JR 4 digit 16 DIP 7 segment display ($2.95 @ 5 quantity) but unsure
what kind of chip I can use to drive it.

You might be able to do something with the Intersil
7106/7107 or 7135 DPM chip, or similar.

Configure it to be a ratiometric ohmeter, driving
a 1999 or 19999 display.

Use the Stamp 2 to simply look at the Over/Under-range
signals from the DPM chip, and set the required range
and decimal point.

J

#### Jeffrey Drake

Jan 1, 1970
0
With a diode and a resistor you canNOT provide a temperature
independent current source...
A resistor is reasonably temperature independent; neither a diode nor
a resistor are useable for a current source and a diode is not linear.- Hide quoted text -

- Show quoted text -

The data sheet for the LM334Z indicates that you can do it. Normally,
the LM334 is a temperature dependent current source, i.e. you can use
it as a temperature sensor too.

J

#### Jeffrey Drake

Jan 1, 1970
0
You can get a complete LED or LCD panel meter atwww.mpja.comfor less than
$10/1. If you find their Chinese source you can probably buy them for a couple bucks if you order a bushel or two. They use a version of Intersil/Maxim ICL7117 which drives the LED display directly. You can make a programmable current source from a 50 cent op amp, a 5 cent transistor, and a few resistors, with a MUX driven by the Basic Stamp (if you must). A PIC12F629 has four multiplexed 10 bit A/Ds, and costs less than a dollar. The$30 PICkit includes the IC and a breadboard with a USB
programmer.

You really need to look at all the specs you (or your customer) require, as
well as the quantity you will be making. Being constrained to a Basic Stamp
sounds like homework. The meter must have some really unique features if
you expect to build them and sell them. An autoranging multimeter can be
purchased for less than $30. Paul- Hide quoted text - - Show quoted text - The project is similar to homework, but isn't (given the semester is over). The situation is that I wanted to borrow the basic stamp from school, and this is the obligation I signed up for. It isn't the best, but I am doing it anyways. - Jeff. M #### MooseFET Jan 1, 1970 0 I am in the midst of designing an ohm meter. Due to certain design constraints, I must use a Basic Stamp II for the first design. Later designs will likely replace it with a real microcontroller. I have been considering components to satisfy my needs. I have been considering using an LM334Z (TO-92) to supply a constant current source. I am thinking about this one, because with a diode and a resistor it can provide a temperature independent current source, which I can supply the load resistor that is being tested. This way, I can get a nice linear relationship that is not possible with a wheatstone bridge. I have found the LM334Z to be$1.50 on digikey.ca
(note Canadian), but would like a cheaper variety.

To display the results, I have been looking at an LTC-4727JR 4 digit
16 DIP 7 segment display ($2.95 @ 5 quantity) but unsure what kind of chip I can use to drive it. I am looking into a digital potentiometer to provide an autoranging ability. One of the drawbacks to the Basic Stamp II is that it has no ADC on it. I have found a project page that mentions the MAX187, but it is insanely expensive on digikey. I have found other ADCs that are more reasonably priced, but unsure what to look for. Any suggestions? Are you sure you need an ADC at all? Perhaps a comparitor and being clever can do the job just as well. Do you have a PWM output or a DAC or anything like that? How quickly do you need the answer to come out? The digital pot for autoranging is a bad idea. They are good for making small changes not big ones. You will want to change the current level by a factor of more than 1000 when you go from the 0-100 Ohm scale to the 0-10M scale. You may want to think about pulsing the current on and off at a few Hz. Your voltage measurement circuit is likely to have an offset in it. You can measure the offset this way and remove it. J #### John Larkin Jan 1, 1970 0 I am in the midst of designing an ohm meter. Due to certain design constraints, I must use a Basic Stamp II for the first design. Later designs will likely replace it with a real microcontroller. I have been considering components to satisfy my needs. I have been considering using an LM334Z (TO-92) to supply a constant current source. I am thinking about this one, because with a diode and a resistor it can provide a temperature independent current source, which I can supply the load resistor that is being tested. This way, I can get a nice linear relationship that is not possible with a wheatstone bridge. I have found the LM334Z to be$1.50 on digikey.ca
(note Canadian), but would like a cheaper variety.

To display the results, I have been looking at an LTC-4727JR 4 digit
16 DIP 7 segment display ($2.95 @ 5 quantity) but unsure what kind of chip I can use to drive it. I am looking into a digital potentiometer to provide an autoranging ability. One of the drawbacks to the Basic Stamp II is that it has no ADC on it. I have found a project page that mentions the MAX187, but it is insanely expensive on digikey. I have found other ADCs that are more reasonably priced, but unsure what to look for. Any suggestions? - Jeffrey Drake. If you are measuring an unknown resistance (and not something nonlinear like a diode) just do this: Vs---------+------- Vs | | Rr | +------- Vx | | Rx | | | gnd Now measure Vs and Vx. Let Vr = Vs - Vx then Rr/Rx = Vr / Vx so Rx = Rr * Vx / Vr This is a ratiometric measurement, in that the final value depends only on the reference resistor Rr and the linearity of the digitizer. Vs falls out of the equations. We do this in our multiplexed RTD digitizers, with one good reference resistor and a cheap delta-sigma ADC, and we get accuracy of a few tens of PPM. If you use a multiplexed differential-input 24-bit delta-sigma ADC, you can measure Vr and Vx directly, Kelvin mode even, to absurd accuracy. John S #### Spehro Pefhany Jan 1, 1970 0 If you are measuring an unknown resistance (and not something nonlinear like a diode) just do this: Vs---------+------- Vs | | Rr | +------- Vx | | Rx | | | gnd Now measure Vs and Vx. Let Vr = Vs - Vx then Rr/Rx = Vr / Vx so Rx = Rr * Vx / Vr This is a ratiometric measurement, in that the final value depends only on the reference resistor Rr and the linearity of the digitizer. Vs falls out of the equations. We do this in our multiplexed RTD digitizers, with one good reference resistor and a cheap delta-sigma ADC, and we get accuracy of a few tens of PPM. If you use a multiplexed differential-input 24-bit delta-sigma ADC, you can measure Vr and Vx directly, Kelvin mode even, to absurd accuracy. John With an ADC that has true differential reference (such as the ICL7106 or the binary output ICL7109) you can do it without any external calculation. Best regards, Spehro Pefhany P #### Paul E. Schoen Jan 1, 1970 0 [snip] The project is similar to homework, but isn't (given the semester is over). The situation is that I wanted to borrow the basic stamp from school, and this is the obligation I signed up for. It isn't the best, but I am doing it anyways. - Jeff. If the Basic Stamp has a comparator, or if you can add one to the circuit, you can make an A/D converter by implementing a bridge with one leg having a resistor R1 to V+ and a capacitor C1 to GND, and the other with a known resistor R2 to V+ and your unknown Rx to GND. The comparator reads the difference between the capacitor voltage and the unknown resistor. Connect an output GP from the Stamp to the capacitor, and hold it low. Tristate it, and start a counter. Stop the counter when the comparator trips. The count will be nearly proportional to resistance of the unknown, especially for low values. You might add a small R3 in series with GP to limit discharge current. V+ V+ | | R1 R2 | | GP--+--COMP---+ | | C1 Rx | | GND GND For autoranging you will need to change R2 using a MUX. For better linearity change R1 to a constant current source, or you can use a table read algorithm to compensate for the RC curve. If you have a fast clock and a slow R1C1 TC, you can get a large number of counts and fairly good resolution. You can implement a BCD counter in software. Driving an LED display (common anode) is best done with a BCD to 7-segment driver, and 4 PNP transistors or P-channel MOSFETs to V+, using 4 more outputs to scan the digits. Developing the code for this will be a good learning exercise, and your total parts cost will be only$3 or so.

If you really want a high precision instrument, you will need to pay more
for parts and use something like a PIC.

Have fun,

Paul

J

#### Jamie

Jan 1, 1970
0
Jeffrey said:
I am in the midst of designing an ohm meter. Due to certain design
constraints, I must use a Basic Stamp II for the first design. Later
designs will likely replace it with a real microcontroller.

I have been considering components to satisfy my needs.

I have been considering using an LM334Z (TO-92) to supply a constant
a resistor it can provide a temperature independent current source,
which I can supply the load resistor that is being tested. This way, I
can get a nice linear relationship that is not possible with a
wheatstone bridge. I have found the LM334Z to be $1.50 on digikey.ca (note Canadian), but would like a cheaper variety. To display the results, I have been looking at an LTC-4727JR 4 digit 16 DIP 7 segment display ($2.95 @ 5 quantity) but unsure what kind of
chip I can use to drive it.

I am looking into a digital potentiometer to provide an autoranging
ability.

One of the drawbacks to the Basic Stamp II is that it has no ADC on
it. I have found a project page that mentions the MAX187, but it is
insanely expensive on digikey. I have found other ADCs that are more
reasonably priced, but unsure what to look for.

Any suggestions?

- Jeffrey Drake.
A stamp is a real uP, it's just the tools to write the code is what i
don't like.

J

#### John Larkin

Jan 1, 1970
0
With an ADC that has true differential reference (such as the ICL7106
or the binary output ICL7109) you can do it without any external
calculation.

ADR421 reference, which we needed anyhow. Rref is a Susumu .05%, 15
PPM resistor, stock from digikey! Anybody can now put together a
parts-per-million measurement system from fairly cheap, easily
available parts. That's sort of amazing.

John

J

#### Jamie

Jan 1, 1970
0
Spehro said:
It is not really a uP, it is a product containing a uP that (slowly)
runs interpreted code.

Best regards,
Spehro Pefhany
Well that explains it.. what junk!

are you sure it's not compiled down to something a little more
efficient? Mabe like P-Code or something? I seem to remember getting
an update to the tools that allowed for more functionals things to
take place with the same Stamp.

J

#### Joerg

Jan 1, 1970
0
John said:
ADR421 reference, which we needed anyhow. Rref is a Susumu .05%, 15
PPM resistor, stock from digikey! Anybody can now put together a
parts-per-million measurement system from fairly cheap, easily
available parts. That's sort of amazing.

The analog parts, yes. But your converter is north of $5. While waiting at the dentist this morning I thought about digitizing a laser controller I did for a client. Maybe put a DSP in there. Because some day they may (or will) need one that's re-configurable on the fly, at least for the PID loop behavior. 16 bits ain't quite enough so BOM cost became quite mind boggling, fast. Rather quickly gravity hit and I was back sketching up CD4051's and stuff. Again... S #### Spehro Pefhany Jan 1, 1970 0 A stamp is a real uP, it's just the tools to write the code is what i don't like. It is not really a uP, it is a product containing a uP that (slowly) runs interpreted code. Best regards, Spehro Pefhany R #### Robert Baer Jan 1, 1970 0 Jeffrey said: The data sheet for the LM334Z indicates that you can do it. Normally, the LM334 is a temperature dependent current source, i.e. you can use it as a temperature sensor too. Methinks the LM334 is neither a resistor nor a diode... J #### John Larkin Jan 1, 1970 0 The analog parts, yes. But your converter is north of$5.

That's a cheap part! We use some Hittite mmic amps that are \$190 each.

John

S

#### Spehro Pefhany

Jan 1, 1970
0
Well that explains it.. what junk!

are you sure it's not compiled down to something a little more
efficient? Mabe like P-Code or something? I seem to remember getting
an update to the tools that allowed for more functionals things to
take place with the same Stamp.

It's tokenized and stuff like comments is/are stripped, but the bottom
line is that you simply cannot run native code from a (serial) EEPROM
on a PIC of that kind.

They say execution speed is around 250usec/BASIC instruction, which
means that each instruction averages ~1,250 machine cycles @ 20MHz.

Best regards,
Spehro Pefhany

F

#### Fred Bloggs

Jan 1, 1970
0
John said:
If you are measuring an unknown resistance (and not something
nonlinear like a diode) just do this:

Vs---------+------- Vs
|
|
Rr
|
+------- Vx
|
|
Rx
|
|
|
gnd

Now measure Vs and Vx.

Let Vr = Vs - Vx

then Rr/Rx = Vr / Vx

so Rx = Rr * Vx / Vr

This is a ratiometric measurement, in that the final value depends
only on the reference resistor Rr and the linearity of the digitizer.
Vs falls out of the equations.

It does? Maybe since you defined Vr=Vs-Vx and hide it from yourself it
seems that way, but Vs is still there....

Replies
10
Views
394
Replies
22
Views
2K
Replies
6
Views
880
Replies
5
Views
982
Replies
0
Views
380