Connect with us

Designing an Ohm Meter

Discussion in 'Electronic Design' started by Jeffrey Drake, May 11, 2007.

  1. 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.
     
  2. linnix

    linnix Guest

    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.
    Forget about Basic Stamp II.
     
  3. 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
     
  4. Robert Baer

    Robert Baer Guest

    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.
     
  5. 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.
     
  6. 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.
     
  7. 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.
     
  8. MooseFET

    MooseFET Guest

    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.
     
  9. John Larkin

    John Larkin Guest

    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
     
  10. 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
     
  11. [snip]
    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
     
  12. Jamie

    Jamie Guest

    A stamp is a real uP, it's just the tools to write the code is what i
    don't like.
     
  13. John Larkin

    John Larkin Guest

    We're using an AD7793, mux'd diff-input 24-bit adc, and an external
    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
     
  14. Jamie

    Jamie Guest

    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.
     
  15. Joerg

    Joerg Guest

    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...
     
  16. It is not really a uP, it is a product containing a uP that (slowly)
    runs interpreted code.


    Best regards,
    Spehro Pefhany
     
  17. Robert Baer

    Robert Baer Guest

    Methinks the LM334 is neither a resistor nor a diode...
     
  18. John Larkin

    John Larkin Guest

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

    John
     
  19. 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
     
  20. Fred Bloggs

    Fred Bloggs Guest

    It does? Maybe since you defined Vr=Vs-Vx and hide it from yourself it
    seems that way, but Vs is still there....
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-