Soft Latch Relay Bypass - Adding Bi-Color LED

Started by facon, March 05, 2015, 12:33:57 PM

Previous topic - Next topic

facon

I was wondering if anybody has any ideas on a simple way to use a bi-color LED with this soft latch bypass circuit. I want to have it red when off and green when on. I don't completely understand the circuit. Is this something as simple as moving the resistor on the cathode side of the LED and connecting the the red anode to a different part of the circuit?


R.G.

Quote from: facon on March 05, 2015, 12:33:57 PM
I was wondering if anybody has any ideas on a simple way to use a bi-color LED with this soft latch bypass circuit. I want to have it red when off and green when on. I don't completely understand the circuit. Is this something as simple as moving the resistor on the cathode side of the LED and connecting the the red anode to a different part of the circuit?

It's a fairly simple complementary transistor latch, with the leftmost transistor set up to provide the proper signal level to flip it the other way when the switch is pressed. But that doesn't matter.

The complementary latch is simple, but it's annoyingly difficult to get multiple outputs out of. You wind up using many parts to do it. I'll cobble something up , but count on it using at least two transistors.   :icon_eek:

The mess of transistors, Rs and Cs needed to do things like this are what pushed me to using a CMOS hex inverter chip.
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.

facon

Thanks RG. I know it's a funny thing to ask if a bit more is involved, but I use 6 Moogerfoogers that all use this exact same way of displaying bypass status. On stage, I like knowing it it's receiving power or not when I first power on. I did see your list of ways to accomplish this with Millennium Bypass, but wasn't sure if any of them could be implemented.

I don't really think customizing the resistors for each LED is absolutely necessary.  The voltage drop difference between the two is only .2 V. This is what I'll be using: http://www.mouser.com/Search/ProductDetail.aspx?R=559-3501-007Fvirtualkey64500000virtualkey645-559-3501-007F

Also, I'm not tied to this specific circuit. If there is another way to accomplish this with a momentary switch, I'm all ears!

R.G.

Here's one I like:



Only the leftmost two inverter sections are involved in the latching. The momentary switch reliably flips the state of both inverters, first time, every time. If you can use the CD4xxx series of inverters, like CD4049, CD4069, CD40106, they can work directly from 9V.

The third inverter from the left drives an LED directly. This one goes on and off with the state of the latch, so it's good for the simple one-LED case. The fourth inverter section is used to drive the MML (Mickey Mouse Logic) one shots of the capacitors, inverters, and transistors to the right. Those can be ignored for your purposes.

To get what you want, only use the first four inverters starting from the left. Use a common-cathode bicolor LED, and drive one anode from the third inverter, the other from the fourth. You can either ground the common cathode and use two different resistors, one in each anode path to adjust for the different brightnesses of the two LEDs, or use a single resistor in the cathode-to-ground and drive both anodes directly from their respective inverter outputs.

You have two inverters left over for other stuff. Strictly speaking, you could drive the LED directly from the outputs of the first two inverters without loading down the inverters too much, especially if you're using the CD4049, which has a lot of current output for a CMOS gate. If you do that, you can get three dual-LED indicating flipflops from each 16-pin package. But mostly one needs one IC per box, so there are often spare inverters.
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.


Transmogrifox

Another trick that works with a bi-color LED is to always leave green powered and only switch red on and off.  It makes a less pure bright red, but red definitely dominates.

Usually you want about 2.5 mA to 3 mA in the LED.  The relays I have are 5V, 110 ohm coil resistoance.  At that, 3 mA * 110 =330 mV, far below current needed to turn on the relay.

The red leg of the LED goes to Q2 collector through a reasonable current-limiting resistor (say 3.3k), and the green leg goes through 4.7k to +9V, and the common cathode goes to ground.

When the relay is de-energized, it conducts the small ~3mA current through the red leg overwhelming the visual evidence of the green LED.  When the relay is energized, the red leg is pulled to ground, turning off the red LED, and then you see green.

A visual trick that works  -- I've tried it ;)  I'm assuming battery power consumption isn't a concern if you're using a non-latching relay...

And by the way -- I had a soft latch transistor circuit almost identical to above, but it uses one less transistor than above:
http://www.diystompboxes.com/smfforum/index.php?topic=110084.msg1008317#msg1008317

RG's CMOS circuit is hard to beat for simplicity.  My suggestion is just another way to skin the cat if you happen to have a bunch of NPN's and PNP's on hand and don't have CMOS gates in your pile of parts.

trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

R.G.

Quote from: facon on March 05, 2015, 04:09:20 PM
Like this?
Pretty much. One place to be cautious is the current the relay pulls. In the case of the relay on your schemo, it has a 405 ohm coil and needs 22.2 ma of coil current. If you're using specifically the CD4049, it specifies that it can pull a minimum of 8ma low, and typically 16ma. That's a little shy for your relay. But CMOS gates parallel well. Just parallel up the E and F sections with the D section and it should drive the relay OK. Be sure to put a reverse catch diode across the coil so when the coil turns off the diode clamps the flyback voltage back to the + power supply. The internal diodes will probably maybe do this on their own, but they're more delicate than an external diode.

If you're using the lower current CMOS gates, use an external transistor with a 4.7K to 10K base resistor to pull down the coil. Or a BS170/2N7000 driven directly from one of the gate outputs.
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.

facon

Thank you both for your help. I already have a layout made for this one, so I think I'll try it out.

I can find a relay with lower coil current. I just landed on that one because I have the eagle file for it. I don't have any experience with relais, so I'm not sure I'll find the right one right away. It makes more sense to use the least that I can to accomplish the task. If I have three effects in one box, then I'll only need two CD4049s.

Any advice on a good relay candidate for this circuit? I'm looking for quality and not worried about saving money (unless it's over $40/each or something). I'm assuming most of what I'll find is going to be higher quality than the standard industrial switches that are normally used.