1
\$\begingroup\$

How to fix the Capacitor Voltage Divider (CVD) schematic to see C2 Out voltage? When I run simulation in OASIS SIMetrix I get:

*** ERROR *** Singular matrix

This may be due to a floating node or a loop of voltage sources and/or inductors. In particular, check node/pin C1_N. Check also that there is a ground node.

Schematic

--- EDIT ---

I would expect that C2 will be charged to 3.4V see Capacitor Voltage Divider Calculator

The V1 is a DC source (battery). I am trying to measure the Vbat using CVD. In the next step I am going to add Op Amp MAX40023 as the Voltage Follower (15G Rin and about 600 Ohm Rout to measure the Vbat by ATSAMR34 ADC each hour. I need to maximize the Vbat life by avoiding any unnecesary current leaks by not using rezistors.

\$\endgroup\$
4
  • 2
    \$\begingroup\$ Try adding a 10 Meg (or maybe more) resistor in parallel with each cap. \$\endgroup\$
    – John D
    Commented Sep 17, 2021 at 17:57
  • \$\begingroup\$ Add 1 Giga ohm to C2 out to GND, :-) What frequency is V1? \$\endgroup\$
    – jay
    Commented Sep 17, 2021 at 19:08
  • \$\begingroup\$ The V1 is a DC source (battery). I am trying to measure the Vbat using CVD. In the next step I am going to add Op Amp MAX40023 as the Voltage Follower (15G Rin and about 600 Ohm Rout to measure the Vbat by ATSAMR34 ADC each hour. I need to maximize the Vbat life by avoiding any unnecesary current leaks by not using rezistors. \$\endgroup\$
    – Ziggi
    Commented Sep 17, 2021 at 22:14
  • \$\begingroup\$ @Ziggi People reading your question should have all the info in there, not have to search throuhg comments to find it. I've added it to your question. \$\endgroup\$
    – Neil_UK
    Commented Sep 18, 2021 at 6:16

1 Answer 1

5
\$\begingroup\$

Simulators create a matrix of simultaneous equations, and then solve them. If a node has no DC continuity, as C2out doesn't, then at DC the matrix is going to have one fewer constraints than unknowns, which makes the system unsolvable, or in matrix algebra terms, a singular matrix. This is quite physical, you can imagine that output node having a DC voltage of 2 V, or 10 V, both are possible.

You need some DC continuity from C2out to anywhere with a defined voltage, GND is often the choice. A large resistor, 10 M or so, will do, as long as the time constants are large enough not to disturb your interpretation of the results. Larger resistors can be used, but eventually you'll run into numerical dynamic range problems if you try to use one too large.

That will of course define the DC output voltage. That's quite physical as well. If you build that circuit, the DC value of C2out will drift to whatever node it has any leakage path to. If you measure that voltage with a multimeter, you'll find the leakage current into the device makes it reach zero soon enough.

You can define 'initial conditions' on capacitor voltages in most simulators. You can also make that voltage source 0 before the start of the simulation, and jump to 4.5 V once the simulation starts, if you want to see the effect of steps into such a divider.

--- EDIT ---

If, as you say, you're trying to measure the DC voltage, it won't work, even with a 15 GΩ buffer following. Its leakage, and board surface leakage, will quickly render the voltage on the mid point meaningless. CVDs, capacitive voltage dividers, only work for AC, not for DC. In that sense, the simulator is warning you of the exact truth, that the output is undefined.

The LearningAboutElectronics link you've found is doing you a disservice by failing to warn about this.

There is a complicated way of using a CVD to measure battery voltage with low current.

schematic

simulate this circuit – Schematic created using CircuitLab

R1 and R2 ensure that both capacitors are fully discharged while the circuit is idle. When you want to take a battery measurement, pull NOT_MEASURE low, the PFET turns on and applies a step of the battery voltage to the CVD. The V_ADC node rises to the value you expect, and then immediately starts an RC decay down to 0 V due to R2. If you read the voltage on the ADC quickly enough, the resulting error will be small. Then send NOT_MEASURE high again, and the capacitor voltages settle down to 0 V for the next cycle.

R1 and R2 need to be small enough to reset the capacitor voltages before the next cycle. R1 needs to be large enough for minimal current consumption during measure, and R2 large enough to minimise the RC sag reading error during measure.

There is a potential problem that if the software allows a very long measurement, due to a crash for instance, charging C1 fully and discharging C2, then when the circuit goes idle, R1 will take V_ADC negative, which might be a problem depending on the ADC. The current is limited by R1, so the ADC should survive.

What people generally tend to do for low current consumption is a switched measurement circuit similar to what's shown for the CVD, but with modest value resistors which can drive the ADC without a buffer amplifier. The current used will be relatively high during the measurement period, but with a short measurement and a low reading rate, the average current consumption will be small.

schematic

simulate this circuit

\$\endgroup\$
2
  • \$\begingroup\$ I would expect that C2 will be charged to 3.4V see Capacitor Voltage Divider Calculator. \$\endgroup\$
    – Ziggi
    Commented Sep 17, 2021 at 22:22
  • \$\begingroup\$ OK thank you for explanation. I understand that to use the CVD is a tricky. I will go with resistor voltage divider and P-FET. What the smallest (package) FET for CMOS MCU 3.3V would you suggest? I will run single ADC measurement 250 nS each hour when the MCU will be awaken from the sleep. I need probably to test if the MCU ATSAMR34 will keep the logic level on the pin to enable/disable the FET during sleep. \$\endgroup\$
    – Ziggi
    Commented Sep 18, 2021 at 8:35

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.