1
\$\begingroup\$

I am looking to implement a small coin cell operated circuit that uses a microcontroller, a current source and an op-amp to measure a variable resistance between 10 Ω and 1 MΩ. In order to implement this, I've made a preliminary schematic to outline which parts to use, in no way final or fully specified (resistor values to be calculated / determined).

I have used a PMOS to turn the entire circuit on via a momentary switch, as I would like the circuit to show information on a small OLED screen (not in the schematic) while the button is pressed.

The button press supplies a VDD of 3 V to the MCU, op-amp, and current source. The resistor, specified by R-top and R-bottom, can be within another circuit which is already powered on, and therefore the entire sense circuit should be off and "disconnected" from the resistor (hence the two N-MOSFETs). The things I am wary about in the circuit:

  1. 10 Ω - 1 MΩ is a very large range; I plan on using a microcontroller with a 10 bit ADC at 3 V or 12 bit ADC at 1.2-1.8 V. Which op-amp configurations should I look at? Which op-amp would be a good fit for this purpose (I am thinking low voltage, rail-to-rail)? Would a log op-amp be better in this case (considering they seem to use many more pins / this circuit should be battery operated)?
  2. Will the two NMOSFETs properly allow the measurement of the resistor? I am unsure if the drain-source potential difference will be enough to keep them conducting / provide a low resistance path, low enough for a measurement out of the op-amp.
  3. I am unsure if there are better ways to implement this, or if there are better ICs available specifically for this purpose.

Schematic

\$\endgroup\$
5
  • 2
    \$\begingroup\$ 1st question -- what level of accuracy do you need ? \$\endgroup\$
    – jp314
    Dec 28, 2021 at 4:21
  • \$\begingroup\$ @jp314 The resistance should vary in multiples of ten like a decade box (10, 20 .. 100, 110, 120 ... all the way up to 999.99 kOhm). At this point, I'm not entirely sure how accurate I can make it, but the more accurate the better, but I am not expecting high accuracy knowing that it will most likely use a 10bit ADC and be operated off of a coin cell. \$\endgroup\$
    – md-raz
    Dec 28, 2021 at 4:26
  • \$\begingroup\$ That's 100,000 different values. That requires at least a 17 bit ADC and an impossible 10 ppm accuracy reference R. \$\endgroup\$
    – jp314
    Dec 28, 2021 at 13:26
  • \$\begingroup\$ @jp314 Thank you for the insight, I had not thought of it that way. Since that is the case, a direct amplified voltage drop measurement will not be accurate enough to be feasible, I will have to use a more "clever" method to determine the resistance. \$\endgroup\$
    – md-raz
    Dec 28, 2021 at 15:33
  • \$\begingroup\$ i would say 100,000 dynamic range is very well feasible. Do you need that in precision (relative to full scale value) or in absolute accuracy (compared to a calibrated standard)? The former is easy (see answer below); the latter is much more difficult. \$\endgroup\$
    – tobalt
    Dec 28, 2021 at 18:00

2 Answers 2

1
\$\begingroup\$

As stated by jp314, you absolutely must specify the required precision everywhere in your range. You also must specify the required sample rate.

If your only requirement is 10 - 1M ohm , with 10 ohm absolute precision (i.e. 10 ppmFS resolution or ~17 bits) and low sample rate, a very simple way is the following:

Pass a constant current through your resistor and buffer the voltage dropped across it with a simple op amp follower. Then convert the voltage using a single comparator into a pulse density stream (poor man's delta-sigma modulation), which you can read directly with your MCU.

\$\endgroup\$
6
  • \$\begingroup\$ This sounds promising. I am wondering if a discrete component (CS5511-ASZ or similar) to do the delta-sigma operation would be better? How would this compare to using a pulse density stream? I should further specify that I only want to take a single measurement at button press, and the resistance will be static while the measurement is being taken. \$\endgroup\$
    – md-raz
    Dec 28, 2021 at 15:50
  • \$\begingroup\$ @md-raz a discrete DS ADC has IMO more cons than pros: more power, more cost, larger, more interface lines with MCU needed, fewer bits resolution. the PDM needs only one line, one comparator, way below 1 mA supply current and has arbitrarily many bits resolution. The drawback is that you need to average/filter the PD stream back to an analog value using MCU arithmetic, whereas the discrete modulator will directly provide a 16 bit value (which is btw insufficient to achieve 10ppmFS resolution). \$\endgroup\$
    – tobalt
    Dec 28, 2021 at 17:54
  • \$\begingroup\$ @tolbalt I was thinking about this further, would this be possible with just a current sense into the ADC of the microcontroller? Correct me if I am wrong, but If I take 100k samples of the ADC measurement and then set each sample to a one or zero (adding on the previous error values) and then finally average and map it to my VDD voltage (firmware PDM?) that should give me an accurate representation of what the voltage is and I could calculate the resistance from that. \$\endgroup\$
    – md-raz
    Dec 29, 2021 at 4:57
  • \$\begingroup\$ @md-raz What do you mean by "current sense into the ADC"? \$\endgroup\$
    – tobalt
    Dec 29, 2021 at 5:55
  • \$\begingroup\$ By that I mean the voltage drop measured through an op-amp mapped from zero to VDD \$\endgroup\$
    – md-raz
    Dec 29, 2021 at 14:37
1
\$\begingroup\$

You can also use an integrator with a reset pulse.

You need just "count" until a programmed level. Calibration would obviously be needed. Don't forget to make a self-calibration of the voltage power supply as a reference before measuring.

As it is powered by a small battery, I would add also a Tx 433MHz for transmitting data to a remote receiver, on a regular time basis ... or when pressing a button, then going to a very low current "sleep mode".

\$\endgroup\$
3
  • \$\begingroup\$ Antonio51 - Hi, Please be careful not to make many small edits, especially not within a short time. Remember that every edit pushes that topic to the top of the "active questions" page. So if you keep making small edits, that keeps pushing the same question to the top, which keeps other questions lower down - that's not fair on them. Edits should not be "trivial" without a very good reason. So, please, wait a while, collect your pending edits on your PC (or in your head :-) ) and make fewer, bigger, edits when the edit really makes a big improvement to the Q or A. Thanks! \$\endgroup\$
    – SamGibson
    Dec 28, 2021 at 14:16
  • \$\begingroup\$ Ok. I did not think about "pushing" ... Sorry. \$\endgroup\$
    – Antonio51
    Dec 28, 2021 at 15:11
  • \$\begingroup\$ Antonio51 - Hi, I know Stack Exchange has many quirks :-( FYI if you go to the "our home page" here: electronics.stackexchange.com you can see that the questions are listed in descending order of last modification (i.e. last edit or creation) of any part of that topic - question or answer. So if someone keeps making small edits to one answer on a question, then that question will keep being pushed to the top of that display list. Just FYI, new comments do not push the topic to the top of that list (but comments are only allowed for certain things, of course). I hope that helps. \$\endgroup\$
    – SamGibson
    Dec 28, 2021 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.