Ohm meter

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I am good at analog hardware design, but, bad at programming. Ok, with that out of the way.

I am looking for help programming either an atmel AT83c5111 or TINY13 or TINY26 to read resistance. basically, I would like it to read 1k-99k or 100k-1000k in 1k or 10k incraments respectfully. More less a wire mapper, I could put a 1k or 10k resistor connected to a standard rj11 or rj45 connector plug into a jack and connect this device at the network end to display the corresponding value of the resistor. I would use a 74HCT164 or MAX7219 to drive the 7-segment LED display and a 2313 to read the input and output the result. The device would need to display whole numbers only, eg. 1.7k would display 1, 4.9k would be 4...to compensate for the wire.

Any suggestions would be greatly appreciated.

Thanks

Last Edited: Thu. May 13, 2004 - 11:38 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi!
AT90S2313 has no ADC and the only thing that you can measure with this MCU is Pulse Width or Period with Timer1 ICP. So one of decisions is to plug the resistor that you are measuring at the multivibrator's circuit (for example 74HC123), then the MCU triggers the multivibrator and measures the pulse width. You can build a LUT and find the corresponding value of the resistor. But the capacitance value must be very accurate and temperature stable. And also the clock frequency must be as higher as possible for more accurate measuring. The second possible decision is to put external ADC (I use 12-bit MCP3202). It would be good if that ADC is serial, because you can use the same pins DATA and CLK to load your shift register for LED indicator. The resistor under measurement, you can put in some resistor divider circuit or better I think is, if you use It in the feedback circuit of OpAmp, so that the resistor determine the gain, but some calculations must be made for optimal performance. It is better if you have separate suply voltage for your analog circuit (ADC's reference and OpAmp Vcc). Ok, that is what I think!

Daniel Nikolov
Bulgaria

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My error, I actually ment using either an atmel AT83c5111 or TINY13 or TINY26.

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'd use a demo version of CVAVR from www.hpinfotec.ro
The Code Wizard will do most of the hard work.
For the 1-100 range put a 10k resistor to +5 volt and then other end to the test resistance. The other end of the test resistance goes to ground.

int adcval, resistance;

adcval=read_adc(0);
resistance=(adcval*10)/(1024-adcval);

For the higher range switch to 100k and then
resistance=(adcval*100)/(1024-adcval);

Ralph Hilton

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

An Attiny26 would work very nicely. Normally, measuring resistance is done
by putting a known current through the resistance, then measuring the
voltage developed across it with a voltmeter. The Tiny26 has the "voltmeter",
so just add an "opamp" configured as a precision constant current source that
drives your external "unknown", and measure the voltage with the mcu's a/d
converter. The current source would use the Tiny26's built in reference, making
the system stable without needing calibration adjustments.
Drive the led display in a multiplexed fashion with the remaining
port pins, or use an inexpensive lcd module for longer battery life.
As an additional programming exercise, you could do away with the op amp
and make the Tiny26 also be the current source by using the pwm feature.
Shifting the design even further into software, you could even do this with a mcu
that only has an analog comparator.

Tom Pappano
Tulsa, Oklahoma

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ooh, Ooh!

Since you are mapping telco wire, etc. Make use of four conductors to
measure your resistor "plugs" with Kelvin connections, and wire length
won't be a factor at all! 8-)

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tpappano, Thanks for the info it is very helpful. Any examples or further thougts would be appreciated.

Thanks

Quote:
Since you are mapping telco wire, etc. Make use of four conductors to
measure your resistor "plugs" with Kelvin connections, and wire length
won't be a factor at all!

Can't do, I want to use it for coax and household 110 wiring also, but a good idea.