1
\$\begingroup\$

I have an ultra low power design running on CR2032 where it is critical to monitor precisely the current usage and the primary cell voltage during dev.

So I added a second MCU dedicated to instrumentation, it is powered by its own rechargeable battery and shares GND with the DUT, it also gets the current range from the auto scaling circuit.

Current sensing is done via an auto scaling circuit made of op amps and P MOS (9mR) switching automatically a shunt ladder ranging from 1K to 1R according to the power usage. The operation is standalone and the MCU gets the current range on a GPIO for each range.

Scaling from mV is done by an high side instrumentation amplifier MAX9938.

Conversion is done by the MCU ADC.

This provides a very good precision and is perfect for the current, effectively ranging from nA to uA and mA (can reach A if needed).

The problem is for voltage sensing. The discharge curve of CR2032 is very flat until it drops abruptly at the end of life, thus a sub-millivolt accuracy is a must. Also the useful voltage range is limited, 2.8V to 3.2V at the very most. So with ADC accuracy (12bit) it would make sense to scale 2.7-3.2 to 0-3.3V, for 400/4096=0.09mV steps precision (in a noise free ideal world).

I can do it with opamp in simulation, but it takes a 2.5V voltage ref, a bunch of resistors, a -1V and a +4V rail, all that feels bad and I am pretty sure it will only works in the simulation, I expect it to be off in real world.

the infamous opa scaler

So I wonder if anyone has an idea, or knows some trick, to basically scale 2.7 to 3.2V range into 0 to 3.3V, cleanly, with few parts and not too much funny stuffs (I admit that a voltage reference of 3.2V may be necessary).

All that, provided that the DUT and the instrumentation share a GND, so there is no possibility for virtual ground or at least the 0 to 3.3V final signal has to be referenced to GND and scale down to 0V (or close). I wish it could be done with rail to rail single supply opamp. I already have two "special" rails: -8V, -7 (after an LDO) and -2V. I also have 4.0V from the MCU LiP0, and 3.3V from another LDO.

Also, due to the scenario it is mandatory that the impedance to the battery is very high, I can always use the same MAX9938 (25x to 200x) to sense millivolt on high side, but the problem is to introduce this offset so that 2.8V at the battery sense gives 0V at the output.

\$\endgroup\$
5
  • \$\begingroup\$ You defined a problem and accepted an answer without energy consumption specs for the monitor, device, the battery, nor the communication interface. Why is that? The CR2032 has an energy capacity of 235 mAh and an average effective series resistance, ESR of about 1Kohm. \$\endgroup\$ Commented Dec 11, 2021 at 1:15
  • \$\begingroup\$ Not sure to undersatnd the comment. The "monitor device" consumption is out ofthe scope of this question. As mentioned it is powered by ot own LiPo are we are not interested in monitoring it consumption, the device energy budget is also out of the scope of this question which was only related to high side "span" voltage monitoring. \$\endgroup\$
    – user301880
    Commented Dec 13, 2021 at 6:23
  • \$\begingroup\$ In other words you are saying all the discussion of current sensing , and MCU is irrelevant and the 3.3V has 0 error \$\endgroup\$ Commented Dec 15, 2021 at 22:51
  • \$\begingroup\$ Well, i provided enough context information to reply the question, which was : how to get a span on high side. Brhans answered it perfectly. I am not sure what is the purpose of passive agressive comments nor putting words in my mouth. The question is answered and other peoples looking for te same problem will find a clear question and good answer, looks good enough to me. \$\endgroup\$
    – user301880
    Commented Dec 17, 2021 at 19:45
  • \$\begingroup\$ A clear question is , How to optimize analog voltage scaling 2.7 to 3.2V input range into 0 to Vref=3.3V with <x % accuracy.? Then a simple answer can be = Compute Gain & Offset from ΔMean and ΔRange \$\endgroup\$ Commented Dec 18, 2021 at 11:25

1 Answer 1

1
\$\begingroup\$

This might work for you. It scales the input 2.7V - 3.2V into 125mV - 3.275V.

schematic

simulate this circuit – Schematic created using CircuitLab

I've used a similar circuit myself ant it worked out well.
In this other answer I run through the simple math to solve it.

\$\endgroup\$
3
  • \$\begingroup\$ which op amp? any low voltage "real" rail to rail single supply? Pretty neat! i could do the same with 5V for the LiPo too \$\endgroup\$
    – user301880
    Commented Dec 11, 2021 at 0:29
  • \$\begingroup\$ Yes it should work with anything which claims rail-to-rail I/O. If you power the opamp off your LiPo then that'll give you a little extra headroom too. \$\endgroup\$
    – brhans
    Commented Dec 11, 2021 at 2:23
  • \$\begingroup\$ very neat solution, thanks again for the suggestion \$\endgroup\$
    – user301880
    Commented Dec 11, 2021 at 8:54

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.