# What determines the discharge time of Dual slope ADC?

I were watching a video about dual slope ADC's here on youtube simulate this circuit – Schematic created using CircuitLab

I understand that the charging equation is $$\frac{{V_{in}}\times{t_1}}{{R1}\times{C1}}$$

But bout discharging, the woman puts out something like this: I do not understand how discharging equation is $$\frac{{V_{ref}}\times{t_2}}{{R1}\times{C1}}$$

The way I see it, at time t1, Vref is positive and Vo1 is positive, and inverting input is GND, so when we switch off S1 and switch ON S2, another current will flow through C1 and charge the capacitor more. I don't see how this will discharge the capacitor.

Am I missing something here? Would you please help me to understand this?

• what would happen if vref and vin had opposite signs?? – Neil_UK Aug 28 '16 at 20:22
• Well, that makes sense. I am equally mad at myself and the tutor on youtube. It must have been pointed out that the reference is negative potential. anyway, thanks. – Alper91 Aug 28 '16 at 20:37

## 1 Answer

Maybe this is a better picture: - Note the -Vref bit