Electronic – Switched capacitor circuit

pcbpcb-designswitched-capacitor

I have been trying to debug this circuit for the last week but still cant seem to find the issue. The circuit I have is shown below:
enter image description here

This circuit was implemented based on this paper

The idea of the circuit is that there will be two cycles, charging and balancing cycle. In the charge cycle, Q2 closes, Q1 opens and therefore only C2 will charge. then Q2 opens and Q1 closes and therefore the two capacitor will be charge balancing. I will attempt to measure the cycles it will take to charge C1 to 4V. If I measuring the voltage with a differential probe across C1 I should in theory see an steadily increasing voltage.

However the issue is once I implemented the circuit based on MAX4641 (datasheet), When I do a probe of the voltage with a scope across C1 the voltage read out is 5v instantly with absolutely no steps. one thing to note is that I did put an DIp switch at the C2 to allow easy debugging.

the steps I have gone over currently are:
-made sure the clock signals are correct and no overlapping and accounting for the gate turn on/off time.
-probing the Q2 source gives a square wave that goes from 2v to 5v but isn't time varying.
-change C1 to a massive 220uF capacitor, but the voltage still instantly shoots to 5v across that as well

I am really out of ideas as the circuit seems to work in simulations but just doesn't work when it goes onto a PCB.
Thanks!

Best Answer

When I do a probe of the voltage with a scope across C1 the voltage read out is 5v instantly

That might be a problem if you are using an earthed scope and your signal generator is also earthed on its return wire. Instead, try probing the drain of Q1 and the top of C1 with two probes and subtract the voltages.

$$\boxed{\text{OR}}$$

C1 could charge instantly (well not really instantly, read-on...) because of leakage current in Q1. It might take a few hundred milliseconds or even a few seconds but, by the time you come to check it out, it will have charged and the show is over so to speak.

$$I = C\cdot \dfrac{dv}{dt}\longrightarrow dt = \dfrac{C\cdot dv}{I}$$

So, if C = 1 uF and \$I_{LEAKAGE}\$ = 1 uA then it'll charge to about 5 volts in 5 seconds.