# How to make this circuit pass all conditions

I have this circuit (as part of a larger design):

simulate this circuit – Schematic created using CircuitLab

The resistors are with a tolerance of 1%.

On the input, V1, the circuit gets a pulse whose initial voltage is 28V to a certain voltage (shown later), with the Ton of the pulse being at a certain length (shown later).

The reference voltages are created using a micropower voltage reference IC and op-amps.

I need to make sure that when inputting these pulses, some will assert out2 to '0' and some will make it remain at '1'. (Please note that out1 is not really important here, I just included it in the schematic so you will know it is there).

Here are the voltages and pulse lengths that I am inputting to V1:

Out2 Should Remain at '1'      Out2 Should Assert to '0'
30V/80mSec                     30V/100mSec
40V/10mSec                     40V/20mSec
50V/5mSec                      50V/10mSec

The capacitor C1 is what concerns me. I don't know how to determine it's value. It is a SMT ceramic capacitor.

From what I understand, the capacitor has two jobs:

1. Filter spikes from the power supply (the P.S is a generator).
2. Provide timing (together with the resistors), so that certain pulses with certain lengths will assert Out2 to '0'.

The thing is, I have tried so many options for the capacitor and none seem to work for all conditions. I have tried both in simulation and in real life, and of course it doesn't always seem to match...

If I use too small capacitor (for example 1uF), then Vc will reach 3.62V too quickly, and Out2 will be '0' when it's supposed to be at '1'. If I use too big capacitor (for example 4.7uF), then Vc won't reach 3.62V, even at 30V/100mSec, meaning Out2 will not be '0' as intended, and so will remain at '1'. (I am 99% sure that I used LTSpice to simulate this circuit with a 4.7uF capacitor and it actually asserted Out2 to '0', but it did not happen with the actual device when I soldered a 4.7uF capacitor)

So here are my questions:

1. Lets assume I can use a capacitor and be done with it. How can I determine it's value? I have tried calculations and simulations and experimented with lots of capacitor values and none seem to work for all conditions.

2. Is there a solution that is smarter than just using a capacitor? Do note that the PCB already exists so I can't change my design too much, so using ICs is somewhat of a problem. I would however love to hear about these solutions, if they exist, both because I would see if it can somehow be implemented and because I would like to learn.

Thank you very much!

Edit:

$$\V(t) = V(inf) - (V(inf)-V(0))e^(-t/Tau)\$$

$$\V(t) = 3.62V\$$

$$\V(inf) = 3.68V\$$ (Because of voltage divider when input is at 30V)

$$\V(0) = 3.43V\$$ (Because of voltage divider when input is at 28V)

$$\t = 92mSec\$$ (fall time is 5mSec so I took a margin)

At the end of my calculations I got:

$$\Tau = 64.46mSec\$$

$$\Tau = R1||R2*C = 11.14k*C = 64.46m\$$

$$\C = 5.786uF\$$

But this result does not help me, as like I said, for 4.7uF, Everything passed except 30V/100mSec.

• Using the standard exponential formula for a charging capacitor have you calculated what voltage is reached with the pulses described? – Andy aka Dec 3 '18 at 7:59
• In my calculations, I used the 3.62V as reference and tried to find the right capacitor through that. So for example, I tried to calculate the right tau for 75msec (a bit less than 80msec) and through that, find the capacitor. – Eran Dec 3 '18 at 8:04
• Also, since tau is RC, my R was actually R1||R2. I hope it's correct. – Eran Dec 3 '18 at 8:06
• So please reveal those values. – Andy aka Dec 3 '18 at 8:24
• @Andyaka which values? In my schematic I have shown the values of R1, R2, and in the table I have shown the values of the voltages and pulse lengths. It is the capacitor which is a variable here, and I need to find it. – Eran Dec 3 '18 at 8:30