Relay for pedal bypass

Started by knutolai, June 10, 2014, 01:32:52 PM

Previous topic - Next topic

knutolai

Sooo.. I wanna move to using latching relay-bypassing instead of the noisy old 3PDT mechanical stomp switches. I found the Panasonic TQ2-5V (http://pewa.panasonic.com/assets/pcsd/catalog/tq-catalog.pdf) relay which looks like the most commonly used, but I'm a little unclear on how to interpret the schematic and I don't want to risk burning the coil.



Pins 2, 3, 4 and 7, 8, 9 make up the two toggle switches. Looking at the schematic the TQ2-5V is a "Single Side Stable"-type Relay. Does this mean pins 5 and 6 are unconnected (just part of the relay packaging, not the circuit)? Could I hook it up in a configuration like this? Where Pin 1 is connected to "+V" and Pin 10 to the NPN collector.
(image is a edit of this Geofex circuit http://www.geofex.com/FX_images/ltchrly.gif)



EDIT: bad datasheet link

R.G.

Quote from: knutolai on June 10, 2014, 01:32:52 PM
Sooo.. I wanna move to using latching relay-bypassing instead of the noisy old 3PDT mechanical stomp switches. I found the Panasonic TQ2-5V relay which looks like the most commonly used, but I'm a little unclear on how to interpret the schematic and I don't want to risk burning the coil.

Pins 2, 3, 4 and 7, 8, 9 make up the two toggle switches. Looking at the schematic the TQ2-5V is a "Single Side Stable"-type Relay. Does this mean pins 5 and 6 are unconnected (just part of the relay packaging, not the circuit)?
There are three kinds of relay coils that you'll commonly run into. These are (1) single side stable; this version is stable when NOT energized, and pulls to the opposite position when and only as long as you pull current through the coil; (2) single coil latching; stable in both "set" and "reset" positions, and moved between the two by a proper-direction pulse of current into the coil; it remains in the place it was last left until you pulse it the opposite way; and (3) dual coil latching: two coils, pull one of them to make it go "set", one to make it go "reset" and it will stay where you put it until told to go the other way by a pulse on the opposite coil.

If you have a single side stable, then it will stay reset until you pull current through the coil, and then release when you stop the current. Yes, in this relay from that data, 5 and 6 are unused except on the dual coil latching version.

QuoteCould I hook it up in a configuration like this? Where Pin 1 is connected to "+V" and Pin 10 to the NPN collector.
(image is a edit of this Geofex circuit
Yes. That is what that circuit was intended to do.
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.

knutolai

Great stuff R.G.! Yes I had a quick read up on the different types. Some helpful diagrams on the different types can be found below for anyone as (formerly) clueless as me.
http://www.ni.com/white-paper/3960/en/ (1-coil and 2-coil latching)
http://www.ia.omron.com/data_pdf/guide/36/generalrelay_tg_e_3_1_3-4(classifications).pdf (Single side stable, page 2)

I really like the concept of Single Side Stable type as it can be set up to flip to bypass automatically in a incident where the power supply is killed. A smart true bypass  :icon_surprised:

Seljer

Quote
QuoteCould I hook it up in a configuration like this? Where Pin 1 is connected to "+V" and Pin 10 to the NPN collector.
(image is a edit of this Geofex circuit
Yes. That is what that circuit was intended to do.


Err, wouldn't the cap in between the 3rd and 4th inverter only let a short pulse through when you hit the switch?

knutolai

#4
QuoteErr, wouldn't the cap in between the 3rd and 4th inverter only let a short pulse through when you hit the switch?
You are right. I was a little hasty when rearranging the schematic. The original was intended for a 2-coil latching relay. If I understand it correctly the 4. inverter as well as its pull-up resistor and cap should be removed entirely. No?

Like this.

Is there perhaps a smaller chip that will perform the same task as those three inverters?

R.G.

Yep. I didn't notice that. If you're using a single-side-stable, you want the three CMOS gates to be a flipflop and hold the transistor on or off.

Note that you can also put the LED and series resistor across the relay coil.
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.

mth5044

Quote from: knutolai on June 10, 2014, 02:12:54 PM
Is there perhaps a smaller chip that will perform the same task as those three inverters?

Yap, a microcontroller, and not the hard-learn-C++-code-impossible kind. PICAXE is very simple to use for this kind of stuff and is relatively inexpensive. You cause use the 8pin IC to do it.

Seljer

Or 'borrow' the multivibrator circuit used in the Boss pedals if you have an excess of discrete components.

R.G.

Quote from: knutolai on June 10, 2014, 02:12:54 PM
Is there perhaps a smaller chip that will perform the same task as those three inverters?
There is, but there is a tradeoff in small versus simple.
The single CMOS hex inverter is cheap and available every where, and you get one flipflop as shown with half the chip, two resistors and one cap. Add more resistors and another cap and you have two flops.
It's a 14 or 16 pin chip, true, but it's a remarkably simple solution.

For smaller, you're kind of stuck with some more difficult choices. You can do it all in an 8-pin DIP with a small microprocessor. To do that, you need to be able to program that uC, so there's a first hill to get over, but after that it's easy. There are low cost BASIC language compilers and such to make the programming easier, and very low cost ways to program the PIC family I'm most familiar with. But that also needs some kind of 5V regulator to power the uC (I think this will apply across the board for uCs).

You can do it with opamps; I can conceive of a way to do that three-opamp circuit with a dual opamp, but I'd have to do some circuit design to be surer. Finally, there are two-inverter CMOS chips; unfortunately, they're only available in SMD.

And there is the Boss/Ibanez two-transistors/8 resistors/4 caps/etc./etc. circuit.
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.

knutolai

#9
Yeah I've thought about the microcontroller option. The relay already needs a 5v regulator so it could share the supply, but it feels like a lot of work compared to the analog option.

QuoteYou can do it with opamps; I can conceive of a way to do that three-opamp circuit with a dual opamp, but I'd have to do some circuit design to be surer.

I'd be very interested in seeing that! Kinda feel obligated to give it a try finding a solution with that limitation myself :P

Is the third inverter really necessary? I'm guessing its there for stability

Seljer

Quote from: knutolai on June 10, 2014, 05:23:55 PM
QuoteYou can do it with opamps; I can conceive of a way to do that three-opamp circuit with a dual opamp, but I'd have to do some circuit design to be surer.

I'd be very interested in seeing that! Kinda feel obligated to give it a try finding a solution with that limitation myself :P

I've seen that one "in the wild" in an Engl amp footswitch (though they were using a quad opamp as a bunch of set-reset flip flops, not toggle flip flops)

R.G.

Quote from: knutolai on June 10, 2014, 05:23:55 PM
Is the third inverter really necessary? I'm guessing its there for stability
In a way. It's there to ensure that loading from the transistor drive doesn't affect the operation of the flipflop by loading.  It's probably not needed, but then there are still three unused inverters even after using that extra.  :icon_biggrin:

That's one reason I mentioned the two-inverter SMD device.

IF you do this with a pair of opamps, be sure the opamps have an input common mode range that includes whatever voltage you throw at them. In the simple circuit, this will be rail to rail at the inputs. If you have no such opamps, you'll need to use other components to make the circuit safe for your opamps. You might - and probably would - get by with the single-supply variant of opamp which has inputs that include the minus supply rail. The LM2904 might work, as might one of several dual comparators. These will require futzing around with resistors, input range, and so on that CMOS inverters laugh at.
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.

Seljer

#12
Hmm, in spice I just got the same circuit functioning with two bare NPN transistor inverting stages (emitter grounded, 10kiloohm on the base and a 10kiloohm from collector to the positive supply) + a third NPN to drive the relay/LED without loading everything else down.  Same deal with the 1Meg+capacitor and 100k as in the CMOS inverter circuit.

The 'fancy' multivibrator circuit used in the boss/ibanez pedals has the added benefit of simultaneously generating the negated signal as well as offering smoother transitions right?


edit: haha, decided to redraw it and realized I'm reinventing the wheel
It behaves well in the simulator with the values specified but I'd advise you to breadboard it first

knutolai

#13
QuoteIF you do this with a pair of opamps, be sure the opamps have an input common mode range that includes whatever voltage you throw at them. In the simple circuit, this will be rail to rail at the inputs. If you have no such opamps, you'll need to use other components to make the circuit safe for your opamps. You might - and probably would - get by with the single-supply variant of opamp which has inputs that include the minus supply rail. The LM2904 might work, as might one of several dual comparators. These will require futzing around with resistors, input range, and so on that CMOS inverters laugh at.

Rail-to-rail opamps are on my next grocery list so I'll give that a go, though I suspect I might require enough components that it's hardly worth the effort.

However!! I did some searching and found a 555 timer circuit which I think might do the trick.

Haven't got any of these chips either, but from the description this looks like a T flip-flop which is just what I need. Very low part count too. (The transistor, base resistor and lamp is ofc not necessary)
The description is here: http://www.555-timer-circuits.com/flip-flop.html

R.G.

If you go that way, be sure to use the CMOS version of the 555. The bipolar version has horrible current spikes.
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.

Dave W

That's where it's at.


J0K3RX

#17
Quote from: Dave W on June 10, 2014, 08:13:51 PM
http://www.smallbearelec.com/servlet/Detail?no=1253


And of course this has been posted here before... hex files are there if you feel like gettin yer prog on :icon_biggrin:
http://stompville.co.uk/?p=260

http://stompville.co.uk/?p=423

R.G. - Whatever happened to Transmogrifox? Like all signs have been wiped from the internet... I have a crap ton of 12f683's and I am lazy :icon_rolleyes:
Doesn't matter what you did to get it... If it sounds good, then it is good!

PRR

>> a smaller chip that will perform the same task....
> microcontroller... the 8pin IC...


Hex-inverter is 14 pins, can do two relays.

I suppose this 8-pin PIC can do two relays also, or maybe there's only one relay, so perhaps it's moot.

I suspect the Hex is still cheaper than a micro. (Maybe less than a buck difference?)

> relay already needs a 5v regulator

No it doesn't. Put a resistor in series.

And here is where antique obsolete CMOS pulls ahead. The classic series works on 3V-18V and really does not care.

Of course it may really come down to finding all the half-buck parts in one place to minimize shipping costs. (When is Amazon going to get those delivery drones to bypass the delivery monopolies? And how can a drone fly cheaper than my share of a 10-ton truck?)
  • SUPPORTER

mth5044

Quote from: PRR on June 11, 2014, 01:00:48 AM
>> a smaller chip that will perform the same task....
> microcontroller... the 8pin IC...


Hex-inverter is 14 pins, can do two relays.

I suppose this 8-pin PIC can do two relays also, or maybe there's only one relay, so perhaps it's moot.

I suspect the Hex is still cheaper than a micro. (Maybe less than a buck difference?)

True, but once you get the basic code idea down, you can very quickly do a 10 relays in all different types of switching schemes easily with a 20pin IC where it might take 5 14 pin hex inverter chips. For something like one or two relays, maybe it's not worth it, but the potential to expand with minimal increase in parts is there.