Help with jfet switching...

Started by david1991ross, August 31, 2021, 09:47:26 PM

Previous topic - Next topic

PRR

> The way LTspice works, it seems impossible to "press a switch" in the middle of a simulation run.

Look deeper. Even the antique version of SPICE that I use has a time-operated switch.

When you do this, check the parasitic values. Resistance can't go infinity to zero without blowing SPICE's mind, so they put some in. But the defaults may not be appropriate for your setup.

  • SUPPORTER

david1991ross

Quote from: duck_arse on September 07, 2021, 12:07:46 PM
your last shown version is missing the cap to ground from the C8//C10 node. it might be switch bounce. on the breadboard anyway, does spice include bouncy switches?
I've tried adding a cap to ground there but it doesn't seem to make any difference other than slowing down the recovery of the voltage.

Vivek

LTspice does not allow the user to interact with any component while the simulation is going on

So you cannot move your mouse over a switch and click it on/off in the middle of a simulation run

LTspice does not have any standard mechanical switches in its standard library. Other flavours of Spice might have switches

Some of the ways to emulate mechanical switches in LTspice are to use current controlled switches, voltage controlled switches, resistors whose value is set by step parameters, or behavorial resistors which accept a function with time as a parameter.

One way to emulated a bouncy switch is to use a piecewise function and encode the bounces we need.

PRR

Quote from: Vivek on September 07, 2021, 03:01:31 PMLTspice does not allow the user to interact with any component while the simulation is going on...

IMHO that would be weird (I know some do this).

" to simulate a simple switch that opens and closes at specific times "
https://www.analog.com/en/technical-articles/ltspiceiv-voltage-controlled-switches.html
  • SUPPORTER

R.G.

Nota bene: The variant of SPICE I'm using now does have switches that can be flipped by key presses, and other switch models that can be voltage triggered. In my testing I used a 1/2Hz clock source to trigger a switch so I could watch it repeatedly in the oscilloscope view.
True, I paid way too much for this variant of SPICE and the stuff that goes with it, but I'm old and my eyesight's weak, and the sun is in my eyes and ...  :icon_biggrin:
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

david1991ross

I'm continuing with the jfet switching schematic. I decided to start from scratch and trace the circuit of my Ibanez TS9, measuring both the values of components and the voltages along the way. What I've come up with is what I believe to be a highly accurate drawing of the Ibanez TS9's switching system, and it's very similar (although different in some ways) to a drawing by Steve Cerutti with help from R.G. Keen. Here is what I've come up with:


Here is the drawing that I used for reference:


I didn't bother doing the effect side of the build because I'm not so much interested in that right now. The main differences between the two drawings are the resistor and capacitor in series going from the collector to the base. I measured mine at being 100k and 1nF, whereas the alternate is 47k and 100pF.
Also, they drew two 56k resistors from 9V to the collectors of the NPN's whereas I measured one 56k resistor and one 39k resistor.

I decided to breadboard this once again and I get accurate voltage measurements between my Ibanez TS9 and my breadboard version when the LED is on. There is one problem still remaining. For whatever reason, I cannot get this to flip flop. It doesn't matter what switch I use, for some unknown reason it won't flip flop on the breadboard but it will on the PCB of the TS9

Here's a picture of my breadboard, I decided to make it as neat as possible:


I know it's been said that the circuit is finicky but I don't get why it would work with the PCB but not on the breadboard. Unless the breadboard itself is faulty but I do see anything to suggest that. Any thoughts on getting this to work? Do any of you see any errors?


Rob Strand

#26
QuoteI didn't bother doing the effect side of the build because I'm not so much interested in that right now. The main differences between the two drawings are the resistor and capacitor in series going from the collector to the base. I measured mine at being 100k and 1nF, whereas the alternate is 47k and 100pF.
Also, they drew two 56k resistors from 9V to the collectors of the NPN's whereas I measured one 56k resistor and one 39k resistor.
There's many variants of the JFET switching circuit, even if we stick to Ibanez.

There's two major variants of the Ibanez circuit.  One with the R+Diode in the emitter and later versions without R+Diode.

Across all circuits the collector resistors are anything from 10k to 56k.

The RC network on the base is a tricky one.  I've seen both 100k and 47k.  Your voltages look like it should be 100k but I don't believe the voltages should be symmetrical like on your schematic.   I'm not so confident about the cap value (1n might be correct).   Measuring either R or C in-circuit is likely to measure  incorrectly because of the parallel R.  Even if you removed the RC network from circuit you would need an LCR meter.   A generic cap meter is likely to measure incorrectly due to the presence of the parallel R.

The 10nF cap across the switch is often 1n.   However 10nF is a much better value.   In fact 47nF is better again.   What happens is as the switch wears out it bounces and the 47nF fends off the bounce a lot better.    (The 1nF is a well known problem on the old Ibanez potato bug 5-series TS5, CR5, PL5 etc. which have cheap switches.)
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

R.G.

Also note that they're using different transistors than you are unless you ran down some 2SC1815s.

Good engineering practice is to design so that variations in the transistors don't matter (much, at least), so I would expect the design on the PCB to have been done that way. But it's not possible to design all the variation out across all transistor types, only minimize the effect.

Try just changing the base-to-ground 56k resistors to something higher, maybe 100K or more. These resistors do two things. First, the historical reason they're there is that they shunt collector-base-leakage out of the base, enabling an "off" transistor to be really off. They're a legacy of logic design with germanium devices, which really, really needed a leakage path for switching. And they are a "desensitizing" resistor, in that some of the current from the opposite transistor's collector has to drive them as well as the transistor base, so the lower their value, the less sensitive the base they're connected to - they eat some drive current.

As Rob notes, the sizes of the caps get into the act too. The cap at the momentary switch stores up a bucket of charge that gets dumped into the connecting caps to the bases when the switch is closed. The caps to the bases and the resistors on the bases determine how much voltage that chunk of charge causes at the bases and how long the bases are driven by the transferred charge. The collector-to-base resistors and the base-to-ground resistors eat some of the transferred charge too, in the instant before the "on" transistor starts turning off. The coupled charge from the switch has to last long enough so the "on" transistor's collector starting up can reinforce the coupled charge in turning the "off" transistor "on". That's a long winded way of saying that the parts values matter, as do the gains of the transistors.

That still doesn't completely answer why it works on the PCB but not in a breadboard. To focus on some possible differences, you might try soldering up a test circuit with just parts lying flat on the work bench. I do this sometimes because I'm horrible about abusing breadboards, and my breadboards often develop loose contacts and give me very odd results that change if I move the circuit to a different part of the breadboard - and hence different contact points. It might be your breadboard, maybe.

R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Rob Strand

#28
FWIW, I did a quick ltspice sim to look at the range of cap values that work.
Constrained to old Ibanez circuit with the resistor and diode in the emitter circuit of the flip-flop.

Transistors vary but are are usually 2SCxxxxGR, GR means gains of 200 to 400.

I checked a few cases of different gains, cap across the switch and supply voltage.
The breaker is operating at low battery.

I found with those CR networks at 100k in parallel with 1n the flip-flops switch
the circuit will switch reliably over a wide range of value and down to low supply voltages.
With 100k in parallel with 470pF the behaviour at low voltages is marginal and is unlikely
to be what is used.

I conclude the 1nF cap in the CR neworks is likely to be correct.

[Don't draw the same conclusion for the boss circuit as they use different caps between the flip-flop and the switch.]

Here's the test set-up.

(No start-up circuit was added as it was starting up OK after the first switch pulse.  However, the flip-flop collector voltages were stuck on equal values and "incorrect" at start-up)





I did the same thing with the later version of the Ibanez switching circuit which doesn't have the resistor & diode in the emitters.
While the circuit is shown with a 1n cap on the switch 10n or 47n would be much better choices.



This circuit uses three less parts.

The advantage is it can pull the JFET gates down lower which means the switching has more headroom to keep the JFETs off.

The collector-base caps can be a little bit smaller, however, the 100k + 1n CR network works fine and are likely to be the correct values.   A few factory schematics have these values.

Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Vivek

Rob

You never give up on a problem !
You dig as deep as necessary, till issue is understood

Deep respects !


Rob Strand

QuoteYou never give up on a problem !
You dig as deep as necessary, till issue is understood

Deep respects !
You have a similar attitude.    I suppose part of it is comes from the fact you can see a solution should exist.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.