DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: marcelomd on June 17, 2024, 01:17:33 AM

Title: Opto MOSFET relay switching module
Post by: marcelomd on June 17, 2024, 01:17:33 AM
Hi,
I just want to share something I did:

(https://i.postimg.cc/rVjRS3xg/image.png) (https://postimg.cc/rRkTC928)

(https://i.postimg.cc/rMF3C4X9/image.png) (https://postimg.cc/HV0w2WXH)

When developing my 2 channel preamp (https://www.diystompboxes.com/smfforum/index.php?topic=130710.msg1268208) I needed (I think) to switch both input and output of each channel at the same time. Plus indicator LEDs. A 3PDT was not enough.

After some discussion (https://www.diystompboxes.com/smfforum/index.php?topic=130724.msg1268469), I came up with this thing. It finally came from JLC and it works just as intended.

This switcher module:
- Uses a pair of TLP240A to switch a channel in or out.
- uses the good old 4049-based flip-flop from R.G.
- Is pretty much instantaneous and there`s no audible click.
- There`s also an input and output buffer to even things out.

Things to improve:
- Since I have buffers, maybe I only need to switch the input or output;
- For the same reason, I think I can omit the anti-pop resistors and RF filters from the channel inputs.
- Add some filtering to +V and feed the channels from there.

Anyway, there you go. Thanks for all the help.

(https://i.postimg.cc/pPTDZDZR/image.png) (https://postimg.cc/rD9FQs81)
Title: Re: Opto MOSFET relay switching module
Post by: marcelomd on February 13, 2025, 01:44:29 PM
Self-necro-posting!!!

This thing works really well EXCEPT the switch bounce is horrible. Only one of my switches workes ok. I've tried foot switches, finger switches, old school lever switches, etc.

Any clues on how to make it behave better? I can only think of incrementing the capacitance in parallel with the button (no chance to test it yet).

Thanks!
Title: Re: Opto MOSFET relay switching module
Post by: ElectricDruid on February 13, 2025, 04:29:11 PM
Quote from: marcelomd on February 13, 2025, 01:44:29 PMI can only think of incrementing the capacitance in parallel with the button

That's certainly the obvious first place to start. 100K/100n is only 10msecs time constant, and it's likely the 4049 triggers at about that (63%). Slower is probably better. Try 220n or 330n and see how you get on.
Title: Re: Opto MOSFET relay switching module
Post by: Ohioisonfire on February 14, 2025, 11:08:24 AM
Do you find there is any pop/click if you switch this while playing? Recently (https://www.diystompboxes.com/smfforum/index.php?topic=132943.0) I have been designing a circuit to mute the signal rhythmically (ie. square wave tremolo). I experimented with these Opto MOSFETs as a muting device but was getting horrible clicking. Since my mute is cycling on and off while playing I assumed it was due to the Opto MOSFET switching so rapidly. Maybe I moved on from these devices too quickly..
Title: Re: Opto MOSFET relay switching module
Post by: R.G. on February 14, 2025, 12:35:21 PM
Quote from: ElectricDruid on February 13, 2025, 04:29:11 PMThat's certainly the obvious first place to start. 100K/100n is only 10msecs time constant, and it's likely the 4049 triggers at about that (63%). Slower is probably better. Try 220n or 330n and see how you get on.
Dead on target. The two-inverter flipflop is not susceptible to multiple triggering at all, unless the bounce is after the time constant resets. I would raise the resistor. Up to 1M works there, by experience. I tend to use 50mS as a good bounce immunity time, and it seems to work reliably.

Quote from: Ohioisonfire on February 14, 2025, 11:08:24 AMDo you find there is any pop/click if you switch this while playing? [...] I have been designing a circuit to mute the signal rhythmically (ie. square wave tremolo). I experimented with these Opto MOSFETs as a muting device but was getting horrible clicking. Since my mute is cycling on and off while playing I assumed it was due to the Opto MOSFET switching so rapidly. Maybe I moved on from these devices too quickly..
The opto MOSFET is quiet on its own. It is an LED/photovoltaic circuit, and turns on and off slowly, for a MOSFET. Turn on and off times are in mSec. What will definitely make it click is if you have it switching the DC levels on either side. A switch to ground setup will mute quietly if you use caps to break any DC levels in and out, and tie the caps to ground with big pulldown resistors.
Switching DC will always click.
Title: Re: Opto MOSFET relay switching module
Post by: Ohioisonfire on February 14, 2025, 04:05:01 PM

Quote from: R.G. on February 14, 2025, 12:35:21 PMThe opto MOSFET is quiet on its own. It is an LED/photovoltaic circuit, and turns on and off slowly, for a MOSFET. Turn on and off times are in mSec. What will definitely make it click is if you have it switching the DC levels on either side. A switch to ground setup will mute quietly if you use caps to break any DC levels in and out, and tie the caps to ground with big pulldown resistors.
Switching DC will always click.

Appreciate the tips RG. I know I breadboarded the Opto MOSFET mute in a few different configurations with and without caps, I do not think I included pull down resistors in any of them. Will definitely be trying this out very soon. If it helps to provide anymore context, the clicks were significantly worse if I was playing while the mute triggered on and off than if I wasn't.

Sorry for hijacking your thread Marcelo!
Title: Re: Opto MOSFET relay switching module
Post by: marcelomd on February 15, 2025, 11:38:30 AM
Got it. Raise the resistor or the capacitor. I'll try it next week when I get home.

And nope... Didn't notice any clicks. I have capacitors on both sides of the switch. I thought I was being overly cautious but maybe not =)

Thanks, guys!
Title: Re: Opto MOSFET relay switching module
Post by: merlinb on February 17, 2025, 05:15:47 PM
Those MOSFETs are rated for 60V so you don't really 'need' the buffers or coupling caps at all...
Title: Re: Opto MOSFET relay switching module
Post by: marcelomd on February 20, 2025, 04:58:10 PM
Quote from: merlinb on February 17, 2025, 05:15:47 PMThose MOSFETs are rated for 60V so you don't really 'need' the buffers or coupling caps at all...

You mean connecting the input and output directly to the jacks and the preamp?
Title: Re: Opto MOSFET relay switching module
Post by: merlinb on February 21, 2025, 04:41:24 AM
Quote from: marcelomd on February 20, 2025, 04:58:10 PMYou mean connecting the input and output directly to the jacks and the preamp?
Basically yes. But perhaps include the series RC to retain some static protection (R1 & C2 etc), and perhaps 10M pull-down resistors for anti-pop.
Title: Re: Opto MOSFET relay switching module
Post by: marcelomd on March 06, 2025, 12:54:33 PM
Hi!
Tried 200nF+100k and it was almost good. 100nF+1M is perfect.

I'm using the buffers before and after to have some peace of mind, not caring what comes before or after the main circuit. Any downsides of having them other than parts+space?

Thanks!
Title: Re: Opto MOSFET relay switching module
Post by: merlinb on March 06, 2025, 04:11:12 PM
Quote from: marcelomd on March 06, 2025, 12:54:33 PMny downsides of having them other than parts+space?
Headroom of course! With no buffers there is practically no limit on signal levels passing through the switches. Also if you plug into vintage fuzz/wahs you retain the goodness of direct pickup interaction.
Title: Re: Opto MOSFET relay switching module
Post by: amptramp on March 07, 2025, 06:55:42 AM
The turn-on time for the TLP240A is 1 to 3 msec and the turn-off time is 0.2 to 1 msec so ramping the LED current up and down at a slower rate is going to soften any switch pops.  Using a switch debounce circuit that uses Schmitt trigger devices seems like a winning proposition as long as the switching time  of the switch input is given a time constant longer than the switch bounce.
Title: Re: Opto MOSFET relay switching module
Post by: rlsalzer on March 10, 2025, 11:50:26 PM
Where can I get this