Need circuit for spdt action from spst relay

Thread Starter

codehead

Joined Nov 28, 2011
56
I have a musical effects device (Leslie simulator). The effect speed can be toggled between fast and slow with a footswitch on the device, or and external footswitch plugged into a jack on the rear panel; I'd like to control the speed remotely, by MIDI control, using that external control jack. I have a MIDI controlled relay.

Unfortunately, due to a lack of foresight in the design, that relayspstwon't get the job down. A minor design modification would have allowed that without changing any of the current functionality, but that's beyond my control...

OK, this would be a cinch if I either modify the guts of the effects device (though ugly hack), or if I make a little external box with a battery. I don't want to do that. I'm looking for simple solutionon that fits inside the phone plug's shell, preferably. I don't see one, so I'm asking here, in case there's an obvious option I'm missing.

The first attachment shows how a dual footswitch can control effect speed (fast/slow) and "brake" (stopping the effect modulation). I don't care about the latterI just need to switch speed. As you can see, this requires a spdt switch, while my relay is spst. Internally, it's apparent (from measuring current) that the ring and tip of the phone jack go to two processor-readable inputs that are pulled up to +5V with 10K resistors; the sleeve is ground.

So, when the relay is closed, one of the inputs needs to get clamped to ground and the other needs to remain open (or otherwise high), and when open the inverse needs to happen.

The second attachment illustrates conceptually what needs to happen, but don't take it literallyit just seemed like an adequate way to explain what I'm looking for. (To start, that diode drop between base and emitter would pull the tip connection down even when the relay is open, so the two states would be 0,0 and 0,1; I need 1,0 and 0,1 for the tip,ring.)

I have a hunch I don't have the current nor flexibility to make this work without an external power source. Maybe there's a cmos device that will give enough isolation, but I suspect I still won't get the two states I need.

Any ideas? Like I said, it's a cinch with external power, so i don't need any help if the answer is to go with a little box and battery.

Thanks.

Attachments

• 12.4 KB Views: 62
• 12.3 KB Views: 29

sheldons

Joined Oct 26, 2011
613
what would help a lot is a schematic of the effects unit you have so we could have a look see at what mods can be done.......

SgtWookie

Joined Jul 17, 2007
22,201
I think you were pretty close to a solution.

Have a look at the attached schematic & simulation.

When RLY1's contacts are open, R4 keeps Q2 off, and R3 feeds current to Q1's base, which pulls the "Slow" line down.

When RLY1's contacts close, Q1's base current source gets shorted to ground, turning Q1 off so signal Slow goes to +5v via R2. RLY1's contacts also sink current from Q2's base, causing Q2 to turn on. Since there is no negative supply, getting signal Fast down to around 0.8v is about the best we can do - however, this should be low enough for the Leslie effect to see the input as a logical zero.

If necessary, you can probably substitute 2N3904/2N3906 transistors for the 2N4401/2N4403 transistors, but you can get them in the 15-pack assortments of NPN and PNP transistors at just about any Radio Shack store. They may not have the 16k resistors in stock, but you could use a couple of 33k resistors in parallel to get ~16.5k, or various other series/parallel combinations of more common resistors. If the resistors are off by more than about 20%, your results probably won't be so good.

Give it a whirl and let us know if it works or not. If it doesn't work, it will help a lot to get some voltage measurements from GND to the tip and ring connections; also from the Q1 and Q2 bases to GND.

Attachments

• 99.4 KB Views: 49
Last edited:
Thread Starter

codehead

Joined Nov 28, 2011
56
I think you were pretty close to a solution.

Have a look at the attached schematic & simulation...

...Since there is no negative supply, getting signal Fast down to around 0.8v is about the best we can do - however, this should be low enough for the Leslie effect to see the input as a logical zero.
Wow, thanks sarge, that looks like a great approachI'm impressed with getting a viable answer back so quickly!

Yes, I think that will be low enough to drive it to logical zero (I assume it's pulled up to either a MCU port or DSP port). I did drive it there successfully with an npn while I was tinkering (haven't done electronics in decadesI had exactly one transistor in my parts storage, though many opamps, OTAs, various CMOS and TTL goodies...). I'll swing by the local electronics store this afternoon and let you know how it goes.

And I really appreciate the effort you went tothanks again.

SgtWookie

Joined Jul 17, 2007
22,201
Good luck with it....

I don't know if you are in the USA or not; it helps a great deal if you put your location (country, state or province and/or time zone) in your profile; "User CP", "Edit Your Details"; fill out location box, at the bottom click "Save changes" button.

The 15 piece Radio Shack transistor assortments usually contain:

NPN -
1) Five 2N2222, rated for Ic=800mA, good for up to about 500mA
2) Five 2N4401, rated for Ic=600mA, good for up to about 300mA
3) Five 2N3904, rated for Ic=200mA, good for up to about 100mA

PNP -
1) Five 2N2907, complement of 2N2222
2) Five 2N4403, complement of 2N4401
3) Five 2N3906, complement of 2N3904

While still expensive compared to ordering online, these assortments are probably one of their better values.

mcgyvr

Joined Oct 15, 2009
5,394
Or just get a SPDT relay..energize its coil with the SPST ones contacts. A single component and problem solved.

Thread Starter

codehead

Joined Nov 28, 2011
56
Thanks sarge, your circuit does the job. Cost $1.73 total for five of each transistor, and had the resistors. (It's going to be tight going if I can fit it all under the phone plug's cap with insulation, but if I have to put it in a little box at least no battery is needed I appreciate the help! I'll see if I can the favor to someone in the programming forum... Thread Starter codehead Joined Nov 28, 2011 56 Or just get a SPDT relay..energize its coil with the SPST ones contacts. A single component and problem solved. Except, as noted, I'm not going to bust open the sealed plastic box containing the MIDI relay. (I could probably saw it open carefully if I had a Dremel tool...) If I'd known that the effects pedal lacked forethought in its remote control implementation, I might have searched for and found a similar box from Sound Sculpture, about the same price as the MIDI Solutions box, but with four relays, two on each of two TRS jacksthat would have just required some simple wiring to work with the Ventilator. I just came across that device yesterday. Thread Starter codehead Joined Nov 28, 2011 56 what would help a lot is a schematic of the effects unit you have so we could have a look see at what mods can be done....... Yeah, I might have mod'd the unit itself, except that the component side was tucked up tight and out of sightwould have had to have taken have removed all of the rear panel jack nuts and other stuff to get it out, and at$450 I wasn't too crazy about having an "oops" moment with such poor visibility of what's up therewas just a better idea to leave the mods external.

They could have obviated the need for any mods with a tiny change to their firmware. There are three states (fast, slow, and brake), controlled by two bits; both left to float high is "brake", one (only) pulled low is "fast", the other (only) pulled low is "slow". Both low is undefined (not possible for their hardware remote dual footswitch); they need only have also defined that state as "fast", so that you could tie one low then use a single pole to switch between fast and slow.

SgtWookie

Joined Jul 17, 2007
22,201
Codehead,
Glad you got it to work. Yeah, it'll be pretty tight trying to squeeze that stuff into a jack cover, and that kind of construction would be pretty vulnerable.

Think what I'd do is use a small project box with a stereo jack one side, and a short 3-conductor cable with a stereo plug on the other; it's another piece of gear to keep track of, but it will be more reliable and physically stronger than being crammed in the jack cover.

Thread Starter

codehead

Joined Nov 28, 2011
56
Except, as noted, I'm not going to bust open the sealed plastic box containing the MIDI relay. (I could probably saw it open carefully if I had a Dremel tool...)
Actually, I just realized that the plastic MIDI Solutions box isn't welded/glued shut. It looks like the plastic sheet glue on top, with the logo and connections graphics, is obscuring four screws in the corners (I can feel slight indentations of the expected size when I press hard...yep, careful lifting with a razor blade reveals a philips head in one corner)...

Anyway, I'll go ahead and and finish this project for a total of less than \$4-5 including project box. Maybe I'll end up mod'ing the relay box down the road; it will depend mainly on whether I can replace the phone jack with a TRS elegantly, but probably...OK, for future reference, I opened it up; looks like the circuit board containing all components including the externally accessible stuff (two MIDI DIN jacks, 1/4" phone jack, and fuse holder) is wedged in there pretty tightly...

Thread Starter

codehead

Joined Nov 28, 2011
56
Maybe I'll end up mod'ing the relay box down the road; it will depend mainly on whether I can replace the phone jack with a TRS elegantly...
...ends up that the onboard jack is a TRS, with the Ring unused...might just look for a suitable spdt relay and add jumpers...

Last edited:

SgtWookie

Joined Jul 17, 2007
22,201
Dang! No room for a couple transistors and resistors inside the case, eh?

Thread Starter

codehead

Joined Nov 28, 2011
56
Dang! No room for a couple transistors and resistors inside the case, eh?
Actually, there's plenty of room...and options...

Since they were kind enough to install a TRS, I could put your transistor circuit in the box. The downside is that the MIDI relay box would no longer be general purpose—it's pretty much repurposed for this one use. At that point, I'd probably go with the small project box, strain-relief cable on both ends of a little vector board and make a short "snake swallowed a brick" cable.

The best solution for mod'ing the MIDI box would be replacing the spst relay with a spdt. That would let the box behave exactly as it does now with a mono cable, and spdt-enhanced with a stereo cable. It would be pretty simple except for the part about locating a suitable relay, I'm finding.

I'm not new to relays, but they've always been for high power uses (my first was more than 3 decades ago, mod'ing my real Leslie). For small signals, it's always been with CMOS. So, I've been digging on what's available...

This box has something labeled C051J2RAA ("American Relays, Inc."). I couldn't find that, but it's obviously a 5V, 500 Ohm coil, latching, spst. They use an 8-bit microcontroller, and gain four output ports on one side of the coil and four on the other, and pulse it on one end or the other. So far I haven't found a suitable relay, and I can't be too sloppy about it because there's not a lot of current available (the box gets its power from the MIDI current loop).

I'm going to research a little more on relays before giving up and going with the original plan.

Last edited:
Similar threads