Opto MOSFET relay switching module

Started by marcelomd, June 17, 2024, 01:17:33 AM

Previous topic - Next topic

marcelomd

Hi,
I just want to share something I did:





When developing my 2 channel preamp 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, 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.



marcelomd

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!

ElectricDruid

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.

Ohioisonfire

Do you find there is any pop/click if you switch this while playing? Recently 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..

R.G.

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.
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.

Ohioisonfire


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!

marcelomd

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!

merlinb

Those MOSFETs are rated for 60V so you don't really 'need' the buffers or coupling caps at all...

marcelomd

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?

merlinb

#9
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.

marcelomd

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!

merlinb

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.

amptramp

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.

rlsalzer