News:

SMF for DIYStompboxes.com!

Main Menu

JFet switching with 3.3V logic

Started by AdamB, July 08, 2019, 12:56:48 PM

Previous topic - Next topic

AdamB

[indifferent::engine]
http://www.indifferentengine.com

AdamB

Here's the latest schem with the caps in as you suggest


[indifferent::engine]
http://www.indifferentengine.com

Rob Strand

#22
QuoteHere's the latest schem with the caps in as you suggest
I have to apologize, I screwed up a bit when I added stuff to your schematic.  It's not quite there.

Hopefully, this is right,


Notice I've added 2x 1M resistors .
It's getting pretty complicated.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

AdamB

Okykoke, I'm not at my desk today but will take a look tomorrow and see if I understand, thanks!
[indifferent::engine]
http://www.indifferentengine.com

AdamB

Right found some time after-all. Good spot on the flipped mosfet, tried to clean up the schematic by moving it over and mirroring but just rotated it instead of flipped it lols.

Here's the latest version:


[indifferent::engine]
http://www.indifferentengine.com

AdamB

Riiiight. Had a chance to build this finally. Only a quick test but it's looking a lot better - for some reason it still doesn't like the wet side being closed, I have to leave the wet side open for the dry switch to operate correctly. If I have dry open and wet closed the dry side produces distortion (like the jfet hasn't opened fully again...).

It's usable for what I need in this form, as I can just mute the wet output in software, but ideally I'd like to figure out why it causes this problem - it'd help for future projects and also for my understanding of this stuff.

There's also some slight thumps when switching, bigger cap C19 needed perhaps?
[indifferent::engine]
http://www.indifferentengine.com

Rob Strand

QuoteRiiiight. Had a chance to build this finally. Only a quick test but it's looking a lot better - for some reason it still doesn't like the wet side being closed, I have to leave the wet side open for the dry switch to operate correctly. If I have dry open and wet closed the dry side produces distortion (like the jfet hasn't opened fully again...).
Something weird is going on.  As far as the switching is concerned the Wet and Dry paths are essentially the same.   The only thing different is the specific JFET in each position.  So if you swap the JFETs does that move the problem to the DRY signal?   That would be an extremely good sanity check.

Another extremely good check would be to pull the JFETS and put in links.  I'd pull the JFETs out entirely.  It would be good to try one at a time then both.  See if you get the same problems.   Also see if there's a pattern.   It might be the circuit itself oscillating or acting funny.

QuoteIt's usable for what I need in this form, as I can just mute the wet output in software, but ideally I'd like to figure out why it causes this problem - it'd help for future projects and also for my understanding of this stuff.
IMHO it's good to take that stance.  Weird problems often point to a bigger or more devious problem.

My guess is there's something different about the Wet circuit.  It can't be a DC issue on the Wet side.   What is feeding the Wet signal?  If you have a BBD or digital device driving the Wet side and there's not enough anti-aliasing filter there would be a high frequency modulation signal present on the wet line.  That will cause all sorts of havoc with the JFETs.   While you cannot hear the high frequency signal it can affect the circuit.

Another possible cause is the circuit feeding switch starts to oscillate when both wet and dry are active.  While it might happen more easily with a resistive mixer, the virtual ground mixer you are using is fairly immune to that effect.

QuoteThere's also some slight thumps when switching, bigger cap C19 needed perhaps?

Under normal circumstances you shouldn't get thumps. It might turn out that once the weird problem above is solved the thumps disappear.   Those caps should be plenty big enough.  One caveat is if the JFET cutoff voltage "Vgsoff" or VP  is too low the JFETs will see faster transitions than the RC circuit.  In which case a larger cap might help.

What's actually feeding the Wet and Dry signals?   Knowing that might help find the crack causing the problem.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

AdamB

The dry side is the dry guitar fed via a TL072 unity gain buffer.

The wet side is the output from a codec chip (CS4272), looks a little something like this:



I soldered the jfets in so can't switch them (debugging lesson learnt...). However what I'll try tonight is seeing whether the wet side operates correctly when the dry side is left closed. That way we can at least say that the jfet circuits operate as intended when used independently? Will try that tomorrow and report back.

[indifferent::engine]
http://www.indifferentengine.com

Rob Strand

#28
QuoteI soldered the jfets in so can't switch them (debugging lesson learnt...). However what I'll try tonight is seeing whether the wet side operates correctly when the dry side is left closed. That way we can at least say that the jfet circuits operate as intended when used independently? Will try that tomorrow and report back.

See how you go.  You might be able to lift some caps or resistors before the switch and that will let you wire them back "cross connected"  to do the test.

My gut feeling is there's some HF modulation on the output of the codec (or more precisely the filter).  I realized you have use the recommended output filter.  I'm assuming you are running at a high sample/clock rate so the is filtering the clock out.   One hidden source of clock leak-through is the common-mode rejection of the opamp.   So while the stage looks like a filter perhaps stuff is still getting out.  You could try putting a cap, say 10nF ***, across R89.  That will form a low-pass filter with R88 and hopefully remove any remnant high frequency rubbish.

[*** This value is a little heavy handed. It's only for the purpose of testing the theory.]
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

AdamB

OK can confirm the following;

The wet switch never works properly, even when used isolated from the dry one. So I'd assume the problem is with the wet side (either the switch itself or the interference from the output signal like you suggest).

Built up a second board with different JFETs and got the same behaviour so I'd assume it's not the JFETs themselves, unless this batch of jfets are bad.

What I guess I don't understand is why interference from the wet signal would cause the dry switch to not function when the wet switch is closed. Does that make sense? I would think you'd just hear some grungy output from the wet side mixed with the dry signal. Or is that not the case?

I'll try the capacitor trick tomorrow and see whether that influences things.
[indifferent::engine]
http://www.indifferentengine.com

Rob Strand

#30
There's definitely something weird going on.  The cause is something outside of the general workings of the circuit, which is also why it's difficult to understand!
QuoteThe wet switch never works properly, even when used isolated from the dry one. So I'd assume the problem is with the wet side (either the switch itself or the interference from the output signal like you suggest).
Yes, at this point it's looking that way.

QuoteBuilt up a second board with different JFETs and got the same behaviour so I'd assume it's not the JFETs themselves, unless this batch of jfets are bad.
The dry side works so I guess they *can* work.   

QuoteWhat I guess I don't understand is why interference from the wet signal would cause the dry switch to not function when the wet switch is closed. Does that make sense? I would think you'd just hear some grungy output from the wet side mixed with the dry signal. Or is that not the case?
I don't understand it either but I can see that if there's some high frequency modulation on the wet path it would certainly cause problems and that would be a very good reason why wet is different to dry.

With these weird cases you can only propose a theory then see if it's true or not.

QuoteI'll try the capacitor trick tomorrow and see whether that influences things
See how go.  If you see *some* improvement it might mean that method is on the right track.  It could be you need a higher-order filter to remove the problem entirely.

Are you sure your clock frequency is correct?  if it's low that would make all the filtering ineffective and promote the behaviour we are seeing?

Do you have an oscilloscope?
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

AdamB

Haven't gotten to this yet but will do asap and report back.

QuoteDo you have an oscilloscope?

No, no oscilloscope - that's on the wish list. Definitely a wise investment at this point I think.
[indifferent::engine]
http://www.indifferentengine.com

Rob Strand

QuoteHaven't gotten to this yet but will do asap and report back.
No problem.

QuoteNo, no oscilloscope - that's on the wish list. Definitely a wise investment at this point I think.
You might be able to measure the clock frequency with your DMM if it has that feature.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

AdamB

Some small update on this - after a lot of messing around I've never managed to make the JFET switching work. Last thing I tried was switching to SMD parts to see whether it was bad TH transistors - it's interesting that the performance was then better but never good enough.

I've "solved" the problem for my needs by using a TLP222G photoFET as a dry-kill switch instead. This seems to work well enough for what I want to do.
[indifferent::engine]
http://www.indifferentengine.com

ElectricDruid

Glad you found something that worked for your purposes, but sorry to hear that you never got the FETs sorted. I was selfishly hoping you'd come up with a fantastic and ready-tested solution I could use for a few ideas I have!

It's frustrating when something apparently so simple gets so complicated. It happens all the time though!


AdamB

Ha sure! Always good when someone else has done the work, that's the beauty of the DIY community. The photoFET works quite well so might be worth taking a look to see if it suits what you want to do - it's a single 4pin DIP package - it's not particularly transparent but the pedal I'm building isn't true bypass anyhow so I'm not too fussed about it.

Pin 1 is driven by the MCU to open and close the switch and the other 2 pins connect the signal. I've also seen an arrangement where it grounds the signal to mute it (this then makes the switch transparent by not having the signal passing through the switch when the signal is on), but I haven't actually tried that yet - I figured in my setup I'd then need to add another buffer between the wet input and where the dry splits off to stop it grounding the input to the effect, and I've already got quite a high part count on this thing!

I'll post a schematic when I'm done - I switched to using a CS4272 codec on the newer prototypes and it's not quite working yet - I think it's the way I setup the clocking (I've since invested in a cheap oscilloscope and it seemed to be clocking at only 50Hz lol) so I've made changes and I'm now waiting on the latest boards to arrive from the PCB fab.
[indifferent::engine]
http://www.indifferentengine.com

Ratskietv

#36
I use this circuit to switch audio on off with microcontroller. When 5v in base of 2n3904 the audio should off, but it not. When i check voltage. The audio off.

https://postimg.cc/9wqBKT6Q
https://i.postimg.cc/9wqBKT6Q/20230913-132430.jpg