uC Latching Relay True Bypass - nearly!

Started by bobindah, March 20, 2012, 06:35:53 PM

Previous topic - Next topic

R.G.

Quote from: tempus on June 04, 2012, 01:39:09 PM
Quick question on the H11F1M - am I reading the datasheet right? Is 1.75 v the maximum you can use to switch these things?
If you mean on the LED side, yes. That's the LED forward voltage. However, that's almost of no consequence at all, because what you want to do is to use a *current* through the LED to switch it. You want off to be zero current in the LED, and you get this by making the voltage into the LED much less than the 1.75V "on" voltage. You want the on state to be something like 3 to 10 milliamperes, which you get by putting a voltage larger than 1.75V through a resistor into the LED.

For a 5V drive, the voltage across the resistor is 5V -1.75V = 3.25V. You then pick a current you want; perhaps 8ma; then the resistor is R = 3.25V/0.008 = 406 ohms. This is not a standard value, but 390 ohms is, and that would give you a bit more current, which is OK.

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.

tempus

Ahh right - funny I wasn't even thinking about it like trying to light an LED, which is exactly what it is. So of course you use the proper sized resistor to control the current, just like in a normal LED. That makes sense now. I may have to order a few of these next time I place an order with Mouser and see if they can fix my popping problem.

Thanks RG


bobindah

Hi,

my appologies for not replying sooner, my appendix decided to explode so I have been out of for a while! But I'm all fixed now so back on it!

I have made some progress, I gave up on the H11F1 cos it was a bit costly for my liking (I wanted to make a few as friends were interested) though I think it could be the ultimate answer - I decided to play with different FET's in the mute position - I found that the J175 has quite a resistance (RDSon) when compared to some other FET's, in my tests this meant that even when it was in mute mode I could still faintly here the pedal (it wasn't fully attenuating the signal) I decided to look in my parts bin and came up with the 2N7000 (which is N-channel rather than the P-channel) This seems to have silenced the pops better **There is still a faint pop, but compared to a 3PDT switch for example I think its pretty darn quiet.
Anyways I think I'm happy with the circuit and have fitted it to a few different pedals for a friend of mine and he's gigged them successfully (DS-1, SD-1, Tube Screamer etc) and it seems to have made them nice and true bypassy. My design is pretty similar to the one on SmudgerD's Stompville http://stompville.co.uk/?p=260 site, mine just has a 2N7000 mute to ground on the output - I used a simple 0.1uF cap / 100k resistor slowdown circuit to reduce the pop from the actual FET.
I like the idea of replacing the 78L05 with a device that has a much lower QC too, that would make this circuit use hardly any current at all. I also settled on using the attiny13 as he as because it is quite affordable from taydar - I program it using my Arduino as an ISP.
I'm not sure if using an N-Channel Mosfet is ideal in this instance but it does seem to work well by my ears! thanks to everyone for all your help :)
perfing with the alien

merlinb

Quote from: bobindah on June 21, 2012, 08:54:30 AM
I found that the J175 has quite a resistance (RDSon) when compared to some other FET's, in my tests this meant that even when it was in mute mode I could still faintly here the pedal (it wasn't fully attenuating the signal) I decided to look in my parts bin and came up with the 2N7000

Don't forget you can connect multiple FETs directly in parallel to reduce Rds(on) and so get better offness...

R.G.

A MOSFET as opposed to a JFET will do a better mute, all right; the on resistance is much lower. But it brings its own problems, in the form of a substrate diode from source to drain that cannot be avoided, only worked around. This means that as a shunt-to-ground, signals bigger than about 0.4V peak will start to be distorted and signals bigger than about 0.6V will be clipped. As a series device, it will block signals when off, but only up to about the same signal size, where the diode will start to conduct.

There are ways around this, but they add complexity and cost. But if it works for your setup, that's great!

As merlin notes, you can parallel JFETs for lower Rdson; you can also use a second JFET as a series switch element, turning the series JFET off and the shunt JFET on to block signal. This arrangement can give profound signal attenuation. Again, you have to make two gate control signals and they have to be out of phase.

I'm glad to hear that the setup is working for you and your friend, but even happier that the appendix was fixed successfully.
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.

tempus

Quote from: R.G. on June 21, 2012, 10:35:21 AM
A MOSFET as opposed to a JFET will do a better mute, all right; the on resistance is much lower. But it brings its own problems, in the form of a substrate diode from source to drain that cannot be avoided, only worked around. This means that as a shunt-to-ground, signals bigger than about 0.4V peak will start to be distorted and signals bigger than about 0.6V will be clipped.
R.G., do you mean that if a MOSFET is connected like this:



(the BS170 shunt at the right) it will distort? I kind of figured that since it was only shunting to ground, it would basically be invisible when off since it's not in the signal path, but would shunt when turned on.

Thanks

PS Glad you got your setup working bob. I'm kind of in your boat; I can't quite get rid of the last bit of switching pop (more of a thump in my case). I'll be sure to post if I find a solution, especially since we're using similar circuits.


Hoffmann

Quote from: bobindah on June 21, 2012, 08:54:30 AM
Hi,

my appologies for not replying sooner, my appendix decided to explode so I have been out of for a while! But I'm all fixed now so back on it!

I have made some progress, I gave up on the H11F1 cos it was a bit costly for my liking (I wanted to make a few as friends were interested) though I think it could be the ultimate answer - I decided to play with different FET's in the mute position - I found that the J175 has quite a resistance (RDSon) when compared to some other FET's, in my tests this meant that even when it was in mute mode I could still faintly here the pedal (it wasn't fully attenuating the signal) I decided to look in my parts bin and came up with the 2N7000 (which is N-channel rather than the P-channel) This seems to have silenced the pops better **There is still a faint pop, but compared to a 3PDT switch for example I think its pretty darn quiet.
Anyways I think I'm happy with the circuit and have fitted it to a few different pedals for a friend of mine and he's gigged them successfully (DS-1, SD-1, Tube Screamer etc) and it seems to have made them nice and true bypassy. My design is pretty similar to the one on SmudgerD's Stompville http://stompville.co.uk/?p=260 site, mine just has a 2N7000 mute to ground on the output - I used a simple 0.1uF cap / 100k resistor slowdown circuit to reduce the pop from the actual FET.
I like the idea of replacing the 78L05 with a device that has a much lower QC too, that would make this circuit use hardly any current at all. I also settled on using the attiny13 as he as because it is quite affordable from taydar - I program it using my Arduino as an ISP.
I'm not sure if using an N-Channel Mosfet is ideal in this instance but it does seem to work well by my ears! thanks to everyone for all your help :)
Any chance for posting schematics?

chris1001

Hi Bobindah, I'm also experiencing relay clicks with an ATtiny/relay switching circuit. What do you mean exactly by "2N7000 mute to ground on the output " - how is this connected, and to where? Is your schematic similar to the Stompville one?

Cheers


Quote from: bobindah on June 21, 2012, 08:54:30 AM
Hi,

my appologies for not replying sooner, my appendix decided to explode so I have been out of for a while! But I'm all fixed now so back on it!

I have made some progress, I gave up on the H11F1 cos it was a bit costly for my liking (I wanted to make a few as friends were interested) though I think it could be the ultimate answer - I decided to play with different FET's in the mute position - I found that the J175 has quite a resistance (RDSon) when compared to some other FET's, in my tests this meant that even when it was in mute mode I could still faintly here the pedal (it wasn't fully attenuating the signal) I decided to look in my parts bin and came up with the 2N7000 (which is N-channel rather than the P-channel) This seems to have silenced the pops better **There is still a faint pop, but compared to a 3PDT switch for example I think its pretty darn quiet.
Anyways I think I'm happy with the circuit and have fitted it to a few different pedals for a friend of mine and he's gigged them successfully (DS-1, SD-1, Tube Screamer etc) and it seems to have made them nice and true bypassy. My design is pretty similar to the one on SmudgerD's Stompville http://stompville.co.uk/?p=260 site, mine just has a 2N7000 mute to ground on the output - I used a simple 0.1uF cap / 100k resistor slowdown circuit to reduce the pop from the actual FET.
I like the idea of replacing the 78L05 with a device that has a much lower QC too, that would make this circuit use hardly any current at all. I also settled on using the attiny13 as he as because it is quite affordable from taydar - I program it using my Arduino as an ISP.
I'm not sure if using an N-Channel Mosfet is ideal in this instance but it does seem to work well by my ears! thanks to everyone for all your help :)

R.G.

Quote from: tempus on June 21, 2012, 11:39:12 AM
R.G., do you mean that if a MOSFET is connected like this:
(the BS170 shunt at the right) it will distort? I kind of figured that since it was only shunting to ground, it would basically be invisible when off since it's not in the signal path, but would shunt when turned on.

Sorry, I missed this when it was originally posted.

Every MOSFET currently available, including the BS170, has a body diode from the source to the drain. For N-channels, the body diode anode is on the source and the cathode is on the drain. So any circuit that puts more than about 0.4V from source to drain on the source-drain in the reverse direction that it would be for amplifying will forward bias that diode.

There are schemes to cope with this, such as using two MOFETs source-to-source to get the diodes opposing, and then using floating gate drives in opposite directions to make the MOSFETs turn on at the same time, making a low resistance through them, but this gets complicated fast. For the simple case of shunt muting, a JFET is the only easy answer. Reverse-connected bipolars with large capacitors on the collector driven by ... well, that gets complicated too.
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.

defaced

Thinking out loud here...

If the MOSFET were connected as a follower could you turn it into a mute if you connected it as such:
input signal - coupling cap - MOSFET gate with control voltage imposed on it (two states, one for MOSFET on, one for mute), MOSFET source connected to output jack. 
The obvious problem would be the quality of the control signal because it would be coupled into the audio, but with regard to the body diode, would this function as expected? 
-Mike

R.G.

Quote from: defaced on January 25, 2013, 04:11:32 PM
Thinking out loud here...

If the MOSFET were connected as a follower could you turn it into a mute if you connected it as such:
input signal - coupling cap - MOSFET gate with control voltage imposed on it (two states, one for MOSFET on, one for mute), MOSFET source connected to output jack. 
The obvious problem would be the quality of the control signal because it would be coupled into the audio, but with regard to the body diode, would this function as expected? 
It would serve as a mute, but it brings along the same thing that plagues mute circuits of all kinds - control signal feedthrough. The control signal has to be a few volts to turn a MOSFET on and off, and the source follows the control signal, so the control signal comes through to the source almost 100%. Big pops and clicks.

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.

tempus

Thanks for your reply on this RG.

QuoteEvery MOSFET currently available, including the BS170, has a body diode from the source to the drain. For N-channels, the body diode anode is on the source and the cathode is on the drain. So any circuit that puts more than about 0.4V from source to drain on the source-drain in the reverse direction that it would be for amplifying will forward bias that diode.

OK that makes sense, but would this affect the signal? I'm kind of picturing the guitar signal, if it surpasses 400mV, forward biasing the drain-source junction which would cause the signal going to ground to be distorted. Is this accurate? Would there be any distorting of the signal on its way out to the amp (gtr out) as a result of this? Or would the mute circuit actually cause more popping rather than less?

Thanks again

R.G.

Quote from: tempus on January 25, 2013, 08:48:26 PM
OK that makes sense, but would this affect the signal? I'm kind of picturing the guitar signal, if it surpasses 400mV, forward biasing the drain-source junction which would cause the signal going to ground to be distorted. Is this accurate? Would there be any distorting of the signal on its way out to the amp (gtr out) as a result of this? Or would the mute circuit actually cause more popping rather than less?
The signal being muted needs to be DC-free. If the signal has an overall DC level, then even a perfect muting circuit (if one of those existed) would still cause a pop by "muting" the DC level. So we'll presume that any DC has been removed by either careful amplification or DC blocking with a capacitor.

Given that, the signal sees the MOSFET as either a low resistance to ground in both positive and negative directions during muting, or a diode from ground when not muted. The polarity of the signal that reverse bias the diode have no issues. But the opposite polarity that tend to turn the diode on start being clipped when the signal peaks get large enough to start the diode conducting. For silicon, this is something like 0.4V at the first hints of conduction. Beyond that, the signal gets ever more clipped in one direction only.

As a result, a single MOSFET used to shunt-mute signals is limited to signals smaller than a couple of hundred millivolts peak when not muting before distortion becomes objectionable.

This behavior makes single MOSFET series or shunt muting not very practical.
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.

tempus

Thanks again for your reply RG.

I think I understand what you're saying, but I'm not sure how the signal gets clipped. Following the electrons, I'm seeing them going straight through unimpeded for signals below, say, 200mV. Beyond that, some of them are going to start to get diverted by the now forward biased MOSFET, which would reduce the output, but aren't they only being clipped as they are being diverted to ground anyway? In my design (above) the MOSFET is shunting the signal to ground, so the protection diode isn't actually in the signal path (or is it?). Would this actually affect the sound? I'm curious because I've been using this design for a couple years now and never really noticed any change in my sound (although I haven't been looking too close either).

Also, slightly off topic, would the 2007 suffer from the same problem? Fairchild calls it an N-Channel Enhancement Mode Field Effect Transistor, not a MOSFET, but it appears to have the same protection diode as a MOSFET on a JFET symbol.

Thanks

R.G.

#35
Quote from: tempus on January 26, 2013, 01:42:19 PM
I think I understand what you're saying, but I'm not sure how the signal gets clipped. Following the electrons, I'm seeing them going straight through unimpeded for signals below, say, 200mV. Beyond that, some of them are going to start to get diverted by the now forward biased MOSFET, which would reduce the output, but aren't they only being clipped as they are being diverted to ground anyway? In my design (above) the MOSFET is shunting the signal to ground, so the protection diode isn't actually in the signal path (or is it?). Would this actually affect the sound? I'm curious because I've been using this design for a couple years now and never really noticed any change in my sound (although I haven't been looking too close either).
Let's approach this another way. Imagine that the MOSFET is a perfect shunt-muting switch; that is, with 0V on the gate, it is an open circuit, and with several volts on the gate, it is a perfect short circuit. So far so good. Now put in an ordinary diode with its anode to ground and its cathode to the drain of the MOSFET.
And now, imagine that you have the MOSFET set to "don't mute", which means it's an open circuit, and can simply be removed from the schematic.

Now all you have is the diode, anode to ground and cathode to signal. Any signals more than minus 200-400mV will turn on the diode and be clipped by it. The positive-going excursions of the signal turn the diode more off, and are not affected.

This imaginary diode is always there in every MOSFET. It's an inherent part of the silicon process that makes MOSFETs as we know them today.

If you have used it and have not notices it in the sound, either you've been feeding it signals less than the size that starts to make the diode conduct, or you ear may like the slight single-sided distortion on peaks. That's possible.

QuoteAlso, slightly off topic, would the 2007 suffer from the same problem? Fairchild calls it an N-Channel Enhancement Mode Field Effect Transistor, not a MOSFET, but it appears to have the same protection diode as a MOSFET on a JFET symbol.
Got a link? A quick look at the Fairchild site didn't turn it up. I probably looked in the wrong places.

>> Did you mean 7002? If so, that's a MOSFET in the same line as I was discussing.

>> A better way to do this is to use a P-channel JFET like a J175. The control sense is reversed, as a high signal turns the JFET off and lets signal through, while a low control signal turns the JFET on and shunts signal to ground. It suffers from some issues, but has no parasitic reverse diode to muck things up. The control signal can be thought of as a "let my signal through" enabling signal.
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.

stirfoo

Could a photoresistor be used to mute? Attach to tip and sleeve then couple to an LED. Lower resistance = lower volume. Kind of like the tremolo circuit in the Radio Shack DIY thread.

R.G.

Yes, it can. This is subject to the limitations of the photoresistor, which has limited off-ness and also limited on-ness.

Most photo resistors can get to several megohms of dark resistance and between several hundred and a few thousand ohms of on-resistance. How well this works as a mute depends on the source impedance of the signal.

There was a guitar plug with an internal photoresistor set up to let you swell your guitar signal by covering or uncovering the opening that let in light. I believe it was set up in series, where covering the opening faded the signal out. That was patented, oddly enough. I can't think it would work all that well on stage, where the lighting is variable, and changes as you move around. But, hey, for some things might be OK.
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.

remmy

I have been giving this a go over the last couple of days using an Arduino to program an attiny85 and have it work with a optical MOSFET SSR for the muting, I have been using Mrki's comments on the Stompville site as a starting point http://stompville.co.uk/?p=260

QuoteThis should be a proper routine when the switch change is detected:
1. trigger the mute ( spare MCU pin – 100uF parallel to GND – series 1K resistor – optical MOSFET SSR (Toshiba TLP222G e.g.))
2. delay 2ms (to allow mute to take place)
3. set / reset relay
4. set LED low / high
5. delay 10ms (to ensure the relay has finished switching)
6. disable the mute

I'm happy enough with the code I have come up with though I will tinker with it more tomorrow I imagine after I have taken the circuit from my breadboard into a pedal.  One issue I have that has got me stomped is that I am getting pops with the circuit which is not down to the relay as they are there when I remove the relay.  They are also coming through the amp when I leave the mute active.  ???

I am hoping that getting the circuit off of the breadboard and into an enclosure will help.  The signal ground is isolated from the power ground, though I have noticed no difference when they are not isolated from each other.  I will post an update tomorrow once I have it boxed up.
Success is buried in the garden of failure.

caldersm

Remmy,

Did you get his working with the optical mosfet...?  Did you figure out how to eliminate the popping...?

I have run into this same situation.....can you share your success or failure...?  Can you post the code you came up with...?

Thanks so much....looking forward to your reply.

Regards,
Steve