How to measure resistance? - MPU driven meter - Page 1
Forum section: electronics / projects

author: tdjastrzebski
author_rank: Newbie
timestamp: November 17, 2021, 02:45:32 pm
content: 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.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: November 17, 2021, 03:21:12 pm
content: 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.

author: tdjastrzebski
author_rank: Newbie
timestamp: November 17, 2021, 10:25:29 pm
content: @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.htmlDAC 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.

author: Marco
author_rank: Super Contributor
timestamp: November 17, 2021, 11:33:44 pm
content: 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.

author: tdjastrzebski
author_rank: Newbie
timestamp: November 18, 2021, 08:46:00 am
content: 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.

author: tdjastrzebski
author_rank: Newbie
timestamp: November 27, 2021, 05:03:08 pm
content: 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.