0
\$\begingroup\$

The circuit i have drawn is to sense currents of a Target uController operating at 3.3V. to see how it operates in sleep and normal operation. This information is then sent to the Interface uController ADC to log the current. Both circuits operate at 3.3V

enter image description here

I have drawn this circuit up so i can sense currents between nA to 450mA by manually switching the resistors in my shunt circuit and then using a precision op amp (MAX4239ASA+) to amplify the sensed voltage.

So the way i get the current range is by using 3 separate resistors.

  1. 0.01R for 1-450mA
  2. 10R for 1-100uA
  3. 10K for 1-100nA

The questions i have are:

  • Does the idea of this circuit work?
  • I am worried about people switching to the nA range and then there being a larger current drawn and thus blowing the circuit.
  • Would i require some sort of fuse or current limiting on each resistor leg? But then i feel this would alter the precise resistance of the leg.
  • Need help understanding what precision of current i would get for each resistance leg if the ADC is 10-Bits at 3.3V?
  • Is there any way to automate the switching of these resistors, almost a dynamic range? But i feel this would be dangerous.

Thanks, if anything else should be added or advice on a different op amp all is well!

\$\endgroup\$
  • 1
    \$\begingroup\$ Adding a fuse or other current limiter would increase the burden voltage. Have a look at the uCurrent gold. It may give you some ideas surrounding the implementation of a precision current sensor. eevblog.com/projects/ucurrent \$\endgroup\$ – bitshift Sep 7 '16 at 13:02
  • 1
    \$\begingroup\$ Why not just use a published and tested circuit like eevblog.com/projects/ucurrent -- the whole schematic is posted. \$\endgroup\$ – Scott Seidman Sep 7 '16 at 13:29
  • \$\begingroup\$ I don't really require everything on the schematic. Plus it has no current protection. \$\endgroup\$ – Andrea Corrado Sep 7 '16 at 13:34
  • 1
    \$\begingroup\$ The precision depends a lot on what accuracy all the involved resistors have and also on how stable the ADC reference voltage is. Some regular "dirty" bread & butter 3.3V might have all kinds of small noise on it, particularly if it originates from a switch regulator. It's not as easy as just staring at the ADC resolution. \$\endgroup\$ – Lundin Sep 7 '16 at 13:43
3
\$\begingroup\$

While your idea is perfectly reasonable in general terms, you need to do a little rethinking.

Does the idea of this circuit work?

Yes, and in general using a sense resistor is the standard approach.

I am worried about people switching to the nA range and then there being a larger current drawn and thus blowing the circuit.

You've got it backwards. If you switch in the nA resistor (10k) what will happen is the resistor will limit the current to the target device to such a low level that it will stop working. If the target power supply is, for instance, 3.3 volts, the maximum current which can flow is 3.3/10,000, or about 330 uA.

Would i require some sort of fuse or current limiting on each resistor leg? But then i feel this would alter the precise resistance of the leg.

For your application I don't see why you'd need protection (although Murphy is waiting in the wings, rubbing his hands in anticipation).

Need help understanding what precision of current i would get for each resistance leg if the ADC is 10-Bits at 3.3V?

10 bits is 1024 possible levels. So, for instance if your mA range is scaled to 450 mA, the resolution of the A/D will be 450 mA/1023, or 0.44 mA per step.

Is there any way to automate the switching of these resistors, almost a dynamic range? But i feel this would be dangerous.

You can use almost any switching device which can be driven by the interface device. However, particularly in view of your apparent inexperience, I'd advise small relays.

With your questions out of the way, let me address a few other problems. The first is the mismatch of full-scale ranges caused by your resistor selection. In general, for each range you should provide the same voltage drop across the sense resistor. Look at your proposed setup. The mA maximum voltage is (.01)(.45) or .0045 volts. This will require an op amp gain of 3.3/.0045 or 733. For the other scales, full-scale voltage is 1 mV, which will require a gain of 330. You'd do better to use something like a .02 ohm for your 450 mA scale, and call it a 0 to 500 mA range.

At these low voltages, you will need to use what it called a Kelvin connection at the sense resistors, and you're probably best off providing a dedicated op amp for each resistor. You haven't specified the supply voltage you're monitoring, but I assume it's something like 3.3 volts, so there is no danger of frying an op amp if you inadvertently get the wrong scale. As long as the op amp is powered by a voltage which is comparable to the supply voltage of the device being monitored, you really don't need to worry about damaging anything.

On the other hand, you are using only 3 ranges to handle about 9 orders of magnitude (1 nA to 450 mA), and this is really asking for trouble. When you switch ranges, the voltage drop across the resistors will change by 3 orders of magnitude. While this isn't a killer in your particular case, since the voltage drops are very low, it's a bad habit to get into.

As for your choice of op amp, the MAX4239 is perfectly reasonable, but with a few considerations. First, the 4239 must be run from a higher supply voltage than the test supply. Look at the data sheet, "Input common mode voltage". The 4239 is only rated for inputs less than 1.3 volts below the power supply. For a 3.3 test supply, you'd want a 5 volt supply on the 4239. Just as important, you need 3 4239s in an instrumentation configuration. I'm sure you looked at the data sheet example circuit

schematic

simulate this circuit – Schematic created using CircuitLab and thought "That could work." Nope. Sorry. Think about the constant current being pulled to ground through Ri and RG. If you use a gain of about 1000, with 100/100k as the resistors, a 3.3 volt supply will produce a constant current of 3.3/100k, or 33 uA. This will completely swamp your nA scale.

\$\endgroup\$
1
\$\begingroup\$

Does the idea of this circuit work?

Yes

I am worried about people switching to the nA range and then there being a larger current drawn and thus blowing the circuit.

Would i require some sort of fuse or current limiting on each resistor leg? But then i feel this would alter the precise resistance of the leg.

Adding some type of current limiting will increase the burden voltage and decrease the precision of the meter. Whether or not this can be tolerated will depend on your accuracy requirements.

The largest danger with an overload is the destruction of the shunt resistors through exceeding their rated power dissipation.

Is there any way to automate the switching of these resistors, almost a dynamic range? But i feel this would be dangerous.

One way to implement switching would be to use a MOSFET switch on each range. You would ideally choose a MOSFET with as low as possible Rdson. On the lowest ranges the resistance of the MOSFET may swamp the actual resistance of the shunt so this approach may be limited. The variable Rdson will also negatively affect accuracy. Without current limiting this could be dangerous.

\$\endgroup\$
  • \$\begingroup\$ Just to be clear, if we were on the nA range and 400mA passed through, what would likely to be happen, surely the resistor would blow? \$\endgroup\$ – Andrea Corrado Sep 7 '16 at 13:29
  • \$\begingroup\$ To put 400mA through 10kOhm would require a voltage of 4kV across the resistor. It would almost certainly be incinerated. The op amp would also fail due to having 4kV across its inputs. This is but the tip of the iceberg at that voltage. \$\endgroup\$ – bitshift Sep 7 '16 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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