Need Help to determine Mosfet Switch on time formula

Started by bluelagoon, July 02, 2024, 05:08:43 AM

Previous topic - Next topic

bluelagoon

Here is a circuit for a back to back Mosfet Switch, where the author has given a formula for the switch on time to the circuit. Only I am having difficulty understanding the formula given.
Hoping someone from the Brainiac crew onboard, could please help me decipher and make better sense of the formula given.

"Q1 and Q2 are MOSFETs - these can pass signals regardless of polarity so are great for switching audio. An intrinsic part of a MOSFET is its body diode, as shown in the circuit symbol. This will conduct if the audio signal is loud enough so that any loud click, such as switching between transmit and receive, will still pass through even when the MOSFET is off. The solution is to connect two with the body diodes back-to-back.

Q1 and Q2 will switch on when their gates are sufficiently positive relative to their sources - for the 2N7000 this is about 2V. R2 ensures the sources are at ground potential but its value (10K) is high enough so as not to short the audio to ground.

On RX the control pin (RX_5V) is at 5V and C1 (3.3uF) charges through R1 (100K). C1 will take about 100K x 3.3u x loge(5/(5-2))=168ms to reach 2V and switch on Q1 and Q2.

During TX the control pin is at ground and C1 can discharge through D1 turning off Q1 and Q2 quickly."




Rob Strand

#1
Equation for charging a capacitor through a resistor,
Vc = Vf + (Vi - Vf)exp(-t/(R*C))

Vi = initial voltage = 0V ; cap discharged
Vf = final voltage = 5V ; 5V control signal
Vc = cap voltage at t = threshold voltage of MOSFET ~ 2V at switch time

Re-arrange to get t,
Vc = Vf + (Vi - Vf)exp(-t/(R*C))
=> (Vc - Vf)/(Vi - Vf) = exp(-t/(R*C))
=> exp(t/(R*C)) = (Vi - Vf) / (Vc - Vf)
=> t = RC * ln((Vi - Vf) / (Vc - Vf))
     = RC * ln((Vf - Vi) / (Vf - Vc))
     = RC * ln((5 - 0) / (5 - 2))
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

bluelagoon

Thanks Rob, for taking the time to paraphrase this formula,
I'm sure it makes perfect sense to you and other electronics wizards, but its like a foreign language to myself.
The mind boggles how it can be so easily understood by some, as yourself, and even retained, it really is rather involved to say the least.
And it may take me a while to get my head around just this one formula.

Wondering for starters what the "exp" in the formula stands for, then I'll have another look at it and maybe get some sense, but be prepared for more questions.
Also did you arrive at the same outcome of 168 millisecond's same as was proposed from the original assessment ?

And to get that figure higher or lower, how would I go about that, changing C1 cap and R1 resistor values,?
Thanks

antonis

#3
Charging

Discharging

"exp" (something) indicates exponential function and equals to esomething..

Quote from: bluelagoon on July 02, 2024, 07:07:51 AMAlso did you arrive at the same outcome of 168 millisecond's same as was proposed from the original assessment ?

Just check 100000 X 0.0000033 X 0.510..
(the later results from ln(5/3)

Quote from: bluelagoon on July 02, 2024, 07:07:51 AMAnd to get that figure higher or lower, how would I go about that, changing C1 cap and R1 resistor values,?

Right.. :icon_wink:
Due to RC time constant being directly proportional to switching time, you may raise R or C (or both) for longer time and vice versa..

"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

PRR

Quote from: bluelagoon on July 02, 2024, 07:07:51 AMto get that figure higher or lower, how would I go about that, changing C1 cap and R1 resistor values,?

To get it longer, use a bigger capacitor and/or a more-ohms resistor.

There's almost never an exception to that rule.

It is usually "linear" in this sense: if you want 13 times slower, use 13 times more Ohms or 13 times more uFd. (Or 6 more of one and 2 more of the other- timing is rarely 10% precise and if it is, good luck.)
  • SUPPORTER

Rob Strand

The diode in the circuit quickly discharges the cap.   The off-on time constant is set by RC but the on-off time constant is quite fast.

FWIW, most pedals with JFET switching have time constants on both edges and the idea is to have smooth fade-in of one signal and fade-out of the other.

If you add resistor in series with the diode you could slow down the on-off time.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

bluelagoon

okay, than you once again you good folk at DIYstomboxes. Get the gist of it a little better, but not sure will ever fully comprehend those formula calcs.
Cheers.

Rob Strand

Quote from: bluelagoon on July 03, 2024, 03:37:31 AMokay, than you once again you good folk at DIYstomboxes. Get the gist of it a little better, but not sure will ever fully comprehend those formula calcs.
Cheers
With RC circuits the formulas ends up simplifying to t = k*R*C  where the k value sits between 0.5 and 1.0, and t is time for each transistion.  If you did your calculations using a simple formula like t=0.7*R*C you wouldn't be far off reality.  (RC oscillators have two transitions and sometimes different R values so you apply that to each transition and end up something like Period = 1.4*R*C. The NE555 is a good example.)
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.