Relay bypass and integrator circuit, LED won't turn fully off

Started by patrick398, August 14, 2019, 08:52:10 AM

Previous topic - Next topic

patrick398

I've been using this bypass method for a little while, it's a simple relay bypass using a 555 and non latching dpdt relay. It works really nicely but the other day i was reading about integrators how they can turn square waves into ramps and i wondered whether i could use this to slow the bypass trigger enough to eliminate the small click.

Here's the bypass schem:



and i'm using a tl071 as the integrator. It appears to be working, there's definitely a slight ramp in the LED lighting but the problem is it's never fully off.

Here's the circuit i have on breadboard, apologies for the crude drawing. I've omitted the relay section for now just for simplicities sake



Is there a way to make this work or am i being naive in thinking i could be this simple?


R.G.

The TL07x series of opamps cannot make their output signal get closer than about 1.5-2V to either the positive or negative supply to the opamp. I suspect that changing the TL071 for half of an LM2902 or other single supply op amp would cure the issue where the LED never turns completely off. So would inserting one or two diodes in series with the LED. The diodes would eat up some of that residual voltage that's lighting up the LED.

But back at the click. There are many sources of clicks to be dealt with, and they all happen at nearly the same instant. If you don't cure them all, it still clicks. Here are some things to check:

555's are notorious for pulling big spikes of current when switching. Is your 555 a standard bipolar 555 or a CMOS type 555? It's possible that this could cure some of the click.

Relay coils produce a burst of magnetic field that moves through the relay, and a fast changing electrical field that radiates from the coil. These can get into the audio path and cause a click. You can fight this by slowing down the transition of the voltage on the coil.

Wiring can couple clicks into the audio path by causing voltage blips on the ground wires. Fight this by using local decoupling of the power supply at the 555 and relay driver and careful application of star grounding techniques.
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.

patrick398

Thanks R.G, good to know i can get this firing with a different op amp. I'll have to see if there's still an audible click when hooked up to the relay, if not this could be quite a neat little bypass, if not a little space hungry.
As far as i know the cmos 555 is not a drop in replacement so i'll order some and tinker with the schematic.
Is it possible the LED could also cause some of these current spikes?

anotherjim

What RG said.

That said, for the original problem you can try a CMOS opamp that allows input to ground and a bit lower. CA3130 is a single with the same pinout.
I suspect you can do it better/cheaper with a small MOSFET like 2N7000

patrick398

Quote from: anotherjim on August 14, 2019, 10:47:52 AM

I suspect you can do it better/cheaper with a small MOSFET like 2N7000

You lost me  :icon_redface:
You mean use 2n7000 as the integrator?

patrick398

Quote from: patrick398 on August 14, 2019, 10:45:09 AM
As far as i know the cmos 555 is not a drop in replacement so i'll order some and tinker with the schematic.


Looks like the TLC555 is actually a drop in replacement, i've just ordered one to see if it works. Would be nice not to have to include an extra chip

anotherjim

An RC low pass/timer is an integrator, but with an exponential curve instead of a straight line but that rarely matters outside of synth oscillators and LFO's. A Mosfet's high gate input impedance means the R can be very high so as not to load the control source or feed leakage current back into it. So too with a JFET, but do you want to use one of those on something trivial?
You could also try a Millar Integrator. This is the same capacitor feedback on an inverting amplifier as an opamp. I struggle to find an example (*) but I will say this is how it was done before cheap opamps, originally with tubes.
http://www.polytechnichub.com/miller-sweep-circuit-work/

Q1 is only the control input. Q2 is the inverting amplifier with a feedback C. An LED with limit resistor could be the collector load. The same thing works with FET's although the high input impedance of those means that Q1 may not be needed.

You may want the ramp to work in both directions in which case you need a series resistor from the control to the capacitor just like with the opamp solution.

* Search engine appears to consider "integrator" and "integrated" the same, so keeps throwing me opamp integrators!

patrick398

Thanks a lot Jim, that makes sense now.
I'm also not having a lot of luck using a search engine with regards to this.
Quote from: anotherjim on August 14, 2019, 04:37:23 PM
The same thing works with FET's although the high input impedance of those means that Q1 may not be needed.

So would it be possible to achieve this using a single 2n7000 say?

R.G.

Loosely, any inverting amplifier can be set up to act integrator-ish. This is easiest to do with opamps, but single transistors can do it as well. For the purposes of turning LEDs on and off, it's common to use either a bipolar transistor or a MOSFET with a series input resistor and a significantly large capacitor from the collector or drain to the base or gate. This is the Miller feedback that was mentioned.

It's worth noting that to make clicks and pops unnoticeable, you have two way to proceed. One is to lessen the magnitude of the pop getting to the audio path by doing things like better power bypassing and star(ish) wiring. Another is to slow the transition down so the rise or fall rate of the control signal is less audible if it does get into the audio. Humans don't hear sounds under about 20hz, so if you can slow the rise/fall rate to slower than about 50mS, the pop may still be there, but you won't hear it.

I used Miller integrators to quiet relay switching in some of the relay switching articles I put on Geofex.com. See
http://www.geofex.com/article_folders/rmtswtch/rmtsw.htm.
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.

patrick398

Quote from: R.G. on August 15, 2019, 10:44:02 AM
Loosely, any inverting amplifier can be set up to act integrator-ish. This is easiest to do with opamps, but single transistors can do it as well. For the purposes of turning LEDs on and off, it's common to use either a bipolar transistor or a MOSFET with a series input resistor and a significantly large capacitor from the collector or drain to the base or gate. This is the Miller feedback that was mentioned.

It's worth noting that to make clicks and pops unnoticeable, you have two way to proceed. One is to lessen the magnitude of the pop getting to the audio path by doing things like better power bypassing and star(ish) wiring. Another is to slow the transition down so the rise or fall rate of the control signal is less audible if it does get into the audio. Humans don't hear sounds under about 20hz, so if you can slow the rise/fall rate to slower than about 50mS, the pop may still be there, but you won't hear it.

I used Miller integrators to quiet relay switching in some of the relay switching articles I put on Geofex.com. See
http://www.geofex.com/article_folders/rmtswtch/rmtsw.htm.

I think the 'new topic' button should actually just redirect us to geofex, as usual it's the answer to my prayers haha. Thanks R.G!

patrick398

Ok so not really having any luck with this. I've tried using the 2n3904 circuit from geofex and that isn't curing the clicking. It's definitely slowing it down though, i can see that in the LED. I'm testing this with a pretty high gain circuit just so i can hear the clicks at their most prominent.

Also, the TLC555 has just arrived. It seems to half work. It triggers the relay on, but not off, so it just stays on once you engage. The datasheet says it is 'functionally the same' and can be used as a drop in for NE555 so i'm struggling to see why this might be.
Any thoughts?

R.G.

Quote from: patrick398 on August 16, 2019, 08:40:26 AM
Ok so not really having any luck with this. I've tried using the 2n3904 circuit from geofex and that isn't curing the clicking. It's definitely slowing it down though, i can see that in the LED. I'm testing this with a pretty high gain circuit just so i can hear the clicks at their most prominent.
If you can see the LED slowing down, then the LED drive signal isn't all of your click problem. It's important to remember that since everything happens almost simultaneously when a footswitch is triggered, there may be and probably are several different things that are contributing to clicking.

QuoteAlso, the TLC555 has just arrived. It seems to half work. It triggers the relay on, but not off, so it just stays on once you engage. The datasheet says it is 'functionally the same' and can be used as a drop in for NE555 so i'm struggling to see why this might be.
Any thoughts?
Probably the TLC555 doesn't have quite enough output current to drive that particular relay. The bipolar 555 is a real workhorse, and can source or sink on the order of 200-300ma on its output. A side effect of this big, burly, manly output is that the output transistors suck a lot of current from the positive supply and channel it into the negative supply internal to the chip while the output is in the middle of flying between high and low. The CMOS alternatives use vastly less current inside the chip to do the flip-flopping action inside, so they don't put big transients on the power and ground lines. They also don't have as much current capability as the bipolar devices.

"Functionally the same" can be taken to mean "the function of a monostable or astable in the 555 works the same" as opposed to "does everything exactly like the bipolar 555 does". I think that's what's troubling you. While the general function is the same, the details of exactly what the inputs must be probably differ in exactly how fast the input must change, the high and low voltages, picky thing like that. This kind of stuff was a perpetual attention getter during the heyday of the 555 in the 1970s and 1980s, when using some side effect of the quirks of the 555 to do some unusual thing was a popular pastime. My best guess as to why it won't turn off is that some combination of input signal quirks and current drive capability are interacting with the amount of current needed by the relay to make the more refined CMOS type misbehave.

Have you tried running both the relay and the LED from the collector of that 2N3904, similar to the geofex driver? I had good results with that one.
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.

patrick398

Thanks again for the help R.G.
I've had both the TLC555 and NE555 connected every which way, my brain is pickled, i can't even remember what was where and which was when.
I just started again with the TLC555 on the breadboard and hooked it up to the 3906 integrator thing from the geofex website. All seemed to be working nicely. I don't think i did anything differently from when it wasn't working before but there must have been something amiss. The 3904 on the relay and the LED definitely slows things down nicely on the 'disengage' part, there barely any audible pop there, i still feel like it's a little quick on the 'engage' part though.
Having said that, if these pops were being caused by current spikes from the 555 shouldn't the TLC have cured that?
It's just stopped working again for some reason, i'm tired, hungry, and have to go to work so i'll have to come back to this in a couple of days. I hate it when things end on a bad note haha

patrick398

I've got this thing working as quietly as i think is possible on the breadboard now, there's still a small pop but i think this is the coil noise being coupled into some of the other pins and i'm not sure if there's anything i can do about that.

Interestingly, if i powder the + side of the relay coil from its own 9v battery the pop is pretty insignificant. Since my breadboard is running off 9v power supply I've tried isolating the power to the coil and the rest of the circuit using the usual RC trick and even tried some 9v1 zeners, which is slightly better than without but still not as good as the battery.
Is it a bad idea trying to deal with issues like this on the breadboard?

EDIT: Just had another good listen and i think that the battery on the coil is actually just introducing less general noise and i was interpreting that as a quieter pop. Listening closely the pop seems about the same, but with battery there's less of the background fffffffffff.
I'm doing all this with my guitar volume down and my amp maxed so maybe i'm obsessing about this too much.