Author Topic: How to measure resistance? - MPU driven meter  (Read 1262 times)

0 Members and 1 Guest are viewing this topic.

Offline tdjastrzebskiTopic starter

  • Newbie
  • Posts: 7
  • Country: pl
How to measure resistance? - MPU driven meter
« on: November 17, 2021, 02:45:32 pm »
Hi All, I am deliberating on what would be the best way to build a simple, MPU-driven ohm and volt meter.
It has to use the same common input for resistance and voltage and a single power supply (max 5V), 1 Ohm accuracy in lowest range, range up to 1MOhms and 100V (AC and DC), 1% accuracy would be sufficient, 0.1% would be perfect.
It needs to be MPU-driven, so no manual range switches etc.
With the right MPU, measuring voltage is not a challenge - even fast sampling and (e.g.) true RMS calculation.
However, I am not sure how to go about measuring resistance. I do not need to measure current.
I would appreciate any hints/advice.
« Last Edit: November 17, 2021, 04:54:30 pm by tdjastrzebski »
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3359
  • Country: nl
Re: How to measure resistance? - MPU driven meter
« Reply #1 on: November 17, 2021, 03:21:12 pm »
The classical way is to make some accurate current sources to put a known current through your resistor and then measure the voltage over it.

Another way is to have a reference voltage and some fixed resistors and then put one of those resistors in series with your unknown resistor to make a voltage divider. Your uC can calculate the resistance from that.

A lot of ADC's have built in PGA's which you can use as a part of the auto ranging circuit.

The principles are quite simple, but it gets increasingly more difficult if you want more resolution and accuracy and want to add over voltage protection.

There are a lot of service manuals of old laboratory grade measurement equipment floating around on the 'net and these can be a nice source of examples. Especially the old HP ones have lengthy descriptions of how the circuit works and calibration procedures and more.

Another option is to use a chip that is designed for handheld DMM's. These often have (almost) everything needed built in for measuring anything that the DMM can measure. such a chip can also have 30 or more CMOS switches built in for the auto ranging and this greatly simplifies the circuit you have to design yourself.  You can also use datasheets and application notes of such IC's as a starting point for your own design.
 
The following users thanked this post: tdjastrzebski

Offline tdjastrzebskiTopic starter

  • Newbie
  • Posts: 7
  • Country: pl
Re: How to measure resistance? - MPU driven meter
« Reply #2 on: November 17, 2021, 10:25:29 pm »
@Doctorandus_P Thank you for the hints. This is what I just came up with, inspired by this publication: https://www.maximintegrated.com/en/design/technical-documents/app-notes/3/3464.html
DAC measures positive and negative voltage with reference to COM, it can measure AC and DC components simultaneously, overvoltage protection is omitted for clarity. Any comments appreciated.
 

Online Marco

  • Super Contributor
  • ***
  • Posts: 6721
  • Country: nl
Re: How to measure resistance? - MPU driven meter
« Reply #3 on: November 17, 2021, 11:33:44 pm »
DAC=Digital to Analogue Converter. You're doing Analogue to Digital Conversion.

Might want to check if the ADC has a buffered input, otherwise you'll probably need to add a buffer.

PS. MPU I/O outputs are not very low resistance, just putting them in pull down mode is not going to cut it for setting the measurement current.

PPS. the 3v Vref is too low, 7.5mA*500 Ohm is already 3.75V, also you'll probably need a negative rail to drive the MOSFET.
« Last Edit: November 18, 2021, 02:00:28 am by Marco »
 
The following users thanked this post: tdjastrzebski

Offline tdjastrzebskiTopic starter

  • Newbie
  • Posts: 7
  • Country: pl
Re: How to measure resistance? - MPU driven meter
« Reply #4 on: November 18, 2021, 08:46:00 am »
Of course, I meant ADAC. Thanks, that's right. I think I may need Vref higher than 3V - also because there is going to be an additional (~0.7V) voltage drop on the Schottky diode. Low-power, high-voltage Schottky diodes (e.g. 1A/2kV CD214A-R12000R) have relatively high Vf. Unless, instead of a diode I use another MOSFET.
True, using MPU's IOs in OD mode may not be a good idea. E.g. STM32L041 guarantees max voltage drop 0.4V - way too much.
As far as the ADAC buffer, I think considering fast sampling (~1kHz) and moderate accuracy requirements ~1nF capacitor should do.
Probably additional resistor(s) and capacitor should be added to the OpAmp feedback loop.
I think this general concept may be worth trying.
« Last Edit: November 18, 2021, 11:29:09 am by tdjastrzebski »
 

Offline tdjastrzebskiTopic starter

  • Newbie
  • Posts: 7
  • Country: pl
Re: How to measure resistance? - MPU driven meter
« Reply #5 on: November 27, 2021, 05:03:08 pm »
For those who may came across this topic: I found excellent discussion on current source options and modern design in the below listed three white papers published recent years by Texas Instruments.
• High-side current sources for industrial applications (SLYT768)
• Precision Current Sources and Sinks Using Voltage References (SNOAA46)
• Tips and tricks for designing with voltage references (SLYC147)
I do not publish links as they may change but documents are easy to find with Google by their IDs.

I am probably going to move forward with this design.
« Last Edit: November 27, 2021, 05:52:27 pm by tdjastrzebski »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf