1

I want to measure the current in a 5V circuit. The current is between 50uA and 2.5mA. The current is from a NTC and it changes slowly (10Hz measurement is fast enough).

Here is the typical application circuit from the MCP6N11 datasheet. My circuit is very similar.

enter image description here

I intend to use the Instrumentation Amplifier MCP6N11 (because it does the job and I can buy it locally) with the output connected to a 12 bit ADC MCP3204.

I plan two identical circuits (to measure similar sensors). For the same current the circuits should produce the same digital value in the ADC.

I am thinking how I can make sure to see identical values. Because even if I use 0.5% resistors they are likely different in each circuit. I could have i.e. a nominal 100 Ohm resistor which is one time 99.5 Ohm and the other one 100.5 Ohm.

I see the following options:

  1. Add a trim pot parallel to Rsense or Rf or Rg and adjust it so that the circuits match.
  2. Like 1 but with a fixed parallel resistor, i.e. 100 Ohm with a parallel 47k Ohm resistor
  3. Don't change the resistors. Adjust the digital output of the ADCs in the microprocessor (i.e. a * 1.013 = b)

What is the best approach to do this? Initially this has to work with a temperature of about 20 to 50 degrees Celsius. But in the future maybe it should work for automotive temperature range.

I don't really know how accurate I have to build this and how accurate I can build this with of the shelf parts. I try to make the accuracy better than 1% - if possible without a huge amount of work.

Edgar
  • 273
  • 1
  • 2
  • 15
  • 2
    _"For the same current the circuits should produce the same digital value in the ADC."_ over the full measurement range? That will not happen. – Bruce Abbott Jan 09 '20 at 06:21
  • I read the long answers in this "forum" and I think it's often fascinating and I try to learn from it. But sometimes I wish there would be just one or two paragraphs like: Use option x because of xyz. ;) – Edgar Jan 09 '20 at 06:52
  • 2
    @Edgar If we knew your business, in great detail, then maybe there could be a one or two paragraph answer for you. We could say, "Do this, then do that." But we don't know it and you only write a little, anyway. So how can you expect one or two paragraphs? Doesn't make sense to ask for it. None of us (none that I know, anyway) have a working crystal ball. We are "just folks," like you, trying to get by. – jonk Jan 09 '20 at 07:07
  • 1
    @Edgar Accuracy requires calibration against a standard. Usually, these standards are found at places like NIST (US) or DIN (Germany.) You will need traceability to them. Directly calibrated by them is best. But often, you cannot afford to hire them to do that work. Next would be to maintain a standard that was directly calibrated by them and to maintain it in some fashion that it is stable for a while (before re-calibration by them.) Etc. But you can't know accuracy for an entire system. Not a priori. You need traceability. Are you looking to make instruments for sale that read the same? – jonk Jan 09 '20 at 07:08
  • @jonk: I try to make a small circuit which measures one current and then "produces" a similar current which is x% manipulated. I do the manipulation with a microcontroller. So I want to measure current A and current B with similar circuits to control and check my manipulation. It's a hobby project and I try to learn the things which I am working on. And this is what I try to learn in the moment: How to make sure two circuits produce the same result. – Edgar Jan 09 '20 at 07:30
  • 1
    @Edgar Okay. Hobbyist. That's like me. Have a look at [this answer](https://electronics.stackexchange.com/a/310500/38098) I gave, some time back. Walk through those terms and tell me which of those are important to you and which are *not* important to you. – jonk Jan 09 '20 at 07:53
  • 2
    @jonk: Wow, what an answer! Important for me is the repeatability and the detectability. If I use my circuit for an hour then I want that for the same current the two ADC values are the same with little error. I don't care if it is accurate. I.e. if it shows 1.400mA for both currents but in reality it is 1.500mA that is not a big problem. It is also not a big problem if on the next day, maybe 20 degrees warmer, it will show 1.300mA. Important for me is that the two circuits, both in the same case, show the same value if the current is the same. – Edgar Jan 09 '20 at 09:45
  • 1
    @Edgar Then probably you will need only to worry about offset and gain variations over the range. You can handle that in a variety of ways. Is there an MCU involved? – jonk Jan 09 '20 at 10:00
  • @jonk: Yes, the MCU will likely be an ESP32 or maybe an Arduino – Edgar Jan 09 '20 at 10:41
  • 1
    Edgar like everything else the best question has purpose and specs with tolerances for absolute at 25'C and relative with any ambient change like temperature, aging, component + design choice tolerance, ppm or %, error stackup (total). Everything matters. It's just some more than others. Without this info , it is just an rough estimate. A better answer follows good question. But I like that you listed what you thought were options. It tells me how you think. When you dont know the stackup, give similar specs of other products for output range and expectations... 0 to 100 mA =+/-1 accuracy. – Tony Stewart EE75 Jan 09 '20 at 16:11
  • 1
    For example: A XTAL Spec: **absolute** errors. 25'C tolerance , cap value error and initial tolerance, aging 2ppm @ 1st yr and 1ppm/yr after that, assuming within shock limits for thermal and mechanical and calibration, design errors, **Relative** errors: temperature range and curve limits, calibration. – Tony Stewart EE75 Jan 09 '20 at 16:16
  • 1
    @Edgar I don't know your approach; hardware or software. But I think your added relatively minimal requirements (in comments) mean you can work through it as a hobbyist and not as a substantial team effort. You will need sources which can yield a variety of calibration points which you can rely upon to be the same as you switch from one test unit to another and you'll need software that gathers data and generates calibration tables. You may want to add a method for figuring out offset each time your code starts up. (A method for gain would also be nice.) – jonk Jan 09 '20 at 17:43
  • 1
    @Edgar Also, there isn't only one way to do things. Sometimes, you can work out methods which are more immune to offset variation than others (subtraction of two ADC measurements.) Or immune to gain variation (this usually requires some "tricky" mathematics and usually only works in certain scenarios.) Or able to self-calibrate both each time they start up (more thinking, perhaps more circuitry, etc.) But these thinking details are up to you. There are also plenty of example designs provided by MCU manufacturers. You should become familiar with them before proceeding. Much of good use there. – jonk Jan 09 '20 at 17:47

2 Answers2

1

Specify a realistic accuracy, then work to that.

Hint, to find out what's realistic, do an error analysis including drift over time and temperature, as well as initial tolerance of the components. Initial tolerance can be calibrated out, drift between calibration and measurement cannot be.

Neil_UK
  • 158,152
  • 3
  • 173
  • 387
1

I found an answer by watching one of Dave's videos. He needs similar 10k resistors and his solution is to check a couple of the resistors which he has with the multi meter to find resistors which match as good as possible. Sounds like a great low tech solution to me. That's what I will do with the resistors which I need.

https://youtu.be/8-qar5vgnbc?t=173

Edgar
  • 273
  • 1
  • 2
  • 15
  • Same, Paul (Mr Carlson) and Dave (EEVblog) both just hand grade what resistors they have and go from there. Having done that it probably makes the most sense to hobbyists as a good solid starting point. Get a decent multimeter :) – twobob Mar 08 '20 at 11:23