Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

switching logic

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • switching logic

    I've never really thought much about the logic of slightly less simple switching... and now I have to. A customer wants to control two amps from one three-button footswitch. I will try to explain..

    Amp A has a simple make-break boost function. I will call the two poles A1 and A2
    Amp B switches a central pole two ways to combine or separate channels. Three poles: B1 makes to either B2 or B3.

    The three buttons need to create three states, like this:

    Button 1 - break A1/A2, make B1/B2, break B1/B3
    Button 2 - break A1/A2, break B1/B2, make B1/B3
    Button 3 - make A1/A2, break B1/B2, make B1/B3

    The three-button thing is the problem of course - how to make pressing one button undo the actions of the other two.

    I've been thinking about using relays as I have a 5vDC supply available and the customer would also like LED indicators. But it is overstraining my poor brain.

    The answer may well be obvious but don't be afraid of pointing it out. Or it may be impossible without logic chips, which I would prefer to avoid as that's a whole other learning process... but if it's the only way...

  • #2
    You can treat the B pole as if it is binary, since you never have the state where B1 makes to NEITHER B2 nor B3. In other words, B is either 0 (make B1/B2, break B1/B3) or 1 (break B1/B2, make B1/B3).

    A is easier to recognize as binary, because it's either 0 (break A1/A2) or 1 (make A1/A2).

    That will simplify your states diagram:

    Button 1 - A: 0, B: 0
    Button 2 - A: 0, B: 1
    Button 3 - A: 1, B: 1

    You could therefore break this down to a two independent button solution where button X toggles state A and button Y toggles state B. But the customer probably wants three buttons anyway, and the customer is always right.

    But hey, a binary B pole is better than a true three-state B pole, which would give you a matrix of six permutations.


    I foresee you using two relays (at least). Relay A is a SPST, make or break. Relay B is a SPDT, make left/break middle/make right.

    Relay B is the challenge, because you would need to reverse the voltage through the EM coil to make sure the break middle state doesn't occur. But that means you have a binary situation for the EM coil: same voltage, but either positive or negative. THAT is where you'll probably use diodes or transistors to flip the voltage.

    OR, if it is possible to wire it so that if Relay B is a SPST make or break, that the break in Relay B becomes a make in a third Relay C. Then, Relay B and Relay C become a make left or make right network with no break in the middle.
    Last edited by dchang0; 12-11-2010, 08:08 PM.

    Comment


    • #3
      Whoa, wait! IIRC, they make SPDT relays that are make left/make right with no break in the middle. (Technically, these may be called SPST, since they throw only one direction.) That would solve your problem nicely.

      Edit: Yes! They call them SPST Dual Make Relays. So your B pole could be easily accomplished.

      Comment


      • #4
        Relay B is the challenge, because you would need to reverse the voltage through the EM coil to make sure the break middle state doesn't occur. But that means you have a binary situation for the EM coil: same voltage, but either positive or negative. THAT is where you'll probably use diodes or transistors to flip the voltage.

        I have no idea what this means. Please explain.


        His B is a simple two throw switch. I don;t know what this no break thing is.

        A typical toggle switch (or pushbutton, or relay or whatever form you want for the switch) breaks from one throw to swing over and make with the other. There is a brief moment as the contacts move when neither side is connected. This is normal. That is a "non-shorting" switch. There is a very SMALL minority of special purpose switches designed to make the one side before breaking with the previous side. SO for one small moment during the transistion, the moving contact is in connection with BOTH throws. This of course also means that the two throws are briefly connected together. This is called a "shorting" switch, because the two sides are shorted together as the contacts toggle.

        I don't think a shorting switch is what he wants for his B circuits.
        Education is what you're left with after you have forgotten what you have learned.

        Comment


        • #5
          The first idea I gave is based on a relay designed like this:

          Click image for larger version

Name:	SPDTnormallyopen.png
Views:	1
Size:	50.0 KB
ID:	819539

          It is, I believe, called a "SPDT normally open" relay. Takes -5VDC to push it to the left terminal and +5VDC to pull it to the right. This is a bad idea for the OP because it leaves the problem of it being "break" in the middle (0VDC on the coil).

          So then I described what should be called a "SPDT normally closed" relay:

          Click image for larger version

Name:	SPDTnormallyclosed.png
Views:	1
Size:	51.3 KB
ID:	819540

          This is make left by default (0VDC on the coil) and make right at +5VDC. Much more useful for the OP.

          If he needs partial isolation between circuits, that's where the SPST dual make stuff comes in.

          Click image for larger version

Name:	SPDTdualmake.png
Views:	1
Size:	53.2 KB
ID:	819541

          I guess this would be a SPST dual make. 0VDC is break for both terminals. +5VDC is make for both terminals. Now that I think about it, this is not going to be useful for the OP because it results in make+make or break+break, but without total isolation between circuits.

          Complete isolation would be DPDT.

          Click image for larger version

Name:	DPDTnormallyclosed.png
Views:	1
Size:	53.6 KB
ID:	819542

          As shown, this is a DPDT normally closed relay, with 0VDC being make left, +5VDC being make right--for both poles. That'll probably be what he ends up using.

          Also, I expect that he'll use relays to drive other relays to keep the circuits completely isolated from one another (especially to keep the amps from connecting directly to each other).

          Sorry, when I was typing the prior posts, it was on a cell phone at lunch, and I kept getting interrupted by conversations.
          Last edited by dchang0; 12-12-2010, 01:57 AM.

          Comment


          • #6
            I see, I am not familiar with the first type relay.

            The second is the common SPDT. The two throws are called "normally closed," and "normally open." When the relay energizes, then the normally closed contact opens and the normally open contact closes. The normally part always refers to the relay itself, not the condition of hte circuit. For example a relay could be wired to be energized almost all the time, thus closing the normally open contact most of the time. That does not alter the fact it is the normally open contact.

            That is the only application of the term normally open ( or closed) that I am aware of. Relays are not normally closed or open, contacts on them are.

            Your third relay is a DPST. And the fourth is indeed DPDT.


            The OP basic switching requires a SPST and a SPDT. However, having extra contacts on a relay can come in handy as "hold contacts, "for example. And in fact two small DPDT relays would cover this, who cares if we have leftover contacts?

            You probably can have relays controlling relays, but you can also probably use diodes for ANDing.
            Education is what you're left with after you have forgotten what you have learned.

            Comment


            • #7
              OK, look at this, tell me if it will work or have I missed something obvious.

              DPDT relays

              Button #2 and #3 are normally open MOMENTARY switches. Press #2 and the B relay energizes. One half of the B relay is the switching for the guys amp. The remaining contacts work for us as "holds." Look down to normall open on B. Whenever B energizes those contacts close and complete the circuit, causing B to remain energized even after releasing the button #2. It completes the circuit to ground through the NORMALLY CLOSED #1 switch, also momentary. Pressing #1 opens the hold circuit and relay B relaxes.

              Button #3 works similarly. but it energizes both A and B relays. The diodes are there to prevent unwanted interactions between the buttons. Just like before, the A relay uses the extra contacts on itself as holds, those are hte normally open on A contacts, which also complete the circuit to ground through button #1.

              So:
              #3 pulls in both relays
              #2 pulls in B
              #1 drops out either or both.



              OOps, I can;t go between #3 and #2. I can trigger either of those and back to off, and once #2 is on, I can add A by pressing #3. But I can't get from #3 back to #2 directly. I beed to add a couple cancel contacts there. I'll work on it, meanwhile maybe this is interesting or helpful, of it might suggest an approach to someone.
              Attached Files
              Education is what you're left with after you have forgotten what you have learned.

              Comment


              • #8
                Hey, that's genius! You are effectively drawing a decision tree in circuit form. You've added "latching," and maybe it's better to wire FS1 to break the latches on RLA and RLB rather than break the actual circuit.

                Your diagram will get the OP within a few steps of his goal, easily.

                I'm not sure about the actual diode-as-latch-across-the-coil as drawn, though. Feels too much like a perpetual motion machine to me, but hey, maybe it does work in real life... Doesn't really matter though, because the message/concept is still clearly conveyed.

                Comment


                • #9
                  YESSSSS! Turns out there is such a thing as a "latching relay" that remembers the last state it was in WITHOUT requiring current running through the coil.

                  Relay - Wikipedia, the free encyclopedia

                  To the OP: with latching relays and the simple diode logic Enzo provided, you should be able to pull off your plans. Latching relays would also likely make it easier to step from FS3 to FS2.

                  Comment


                  • #10
                    Hmm, now that I think about it, if you use latching relays, you DO NOT NEED diode logic. Nor do you need diodes to direct current.

                    The footswitches (all momentary) simply apply positive or negative voltages to the relays as needed.

                    So, lets say you have two relays: RLA and RLB. Both are latching SPDT.

                    FS1: applies -5VDC to both relays to push both to the left (0, 0).
                    FS2: applies -5VDC to RLA to push it left and +5VDC to RLB to push it to the right (0,1)
                    FS3: applies +5VDC to both relays to push both to the right (1,1).

                    This accomplishes exactly what you need AND any footswitch can equally override the others. You might use diodes to direct the positive and negative voltages, but you could probably get away without them because the voltages/currents applied are all momentary.

                    Comment


                    • #11
                      First of all thank you to you both! [I am editing this post wholesale now as I just read the Wikipedia article properly]

                      I think that most latching relays work like the one in the pic - latching on and off alternately with each pulse of +ve DC with pawl and ratchet type action. The twin-coil type with the -ve coil to reverse the action may be rarer, and as I only have +5vDC I can't really use that type without major surgery.

                      The problem I ran into with momentary switches and latching relays of the alternating type was the question of how to stop the relays getting out of phase and messing up the switching if one of them should miss or double its action. But is there any way we can manage this with a +5vDC supply only?

                      Thanks again guys - it really is quite tricky isn't it?

                      Last edited by Alex R; 12-12-2010, 10:43 AM.

                      Comment


                      • #12
                        Omron | Relays, Switches and Indicators | Relays | Electromechanical Relays | Omron |G6EK134PSTUS5DC

                        How about this one - does twin-coil mean it acts like dchang's suggested type?

                        Comment


                        • #13
                          OK I've been away answering my own questions, so please forget all the above, I'll leave it up there as examples of how not to, etc..

                          The reason momentary switches and latching relays is the way to go is there's no switching voltage applied permanently, once the relays have been fired into position everything returns to neutral, so there's no switching voltage to switch off when you press subsequent buttons for a new permutation.

                          The reason we'd need +ve and -ve voltage to make dchang0's neat solution work is that it would give us enough permutations to fire the relays into the three different positions. But I only have +5vDC and would like to do this without DC-DC converters if poss.

                          I was trying to think of a way of getting enough permutations of ways of firing the relays with only +vDC and I took a look at relay types in this useful document: http://docs-europe.electrocomponents...6b8002a233.pdf

                          If we use this type of relay:

                          Click image for larger version

Name:	twin coil relay copy.jpg
Views:	1
Size:	24.6 KB
ID:	819548

                          - we can get the permutations by applying voltage either to one coil or the other.

                          OK how'm I doing?

                          Comment


                          • #14
                            Nope, hang on (the learning process continues...)

                            Is this what you meant, dchang0 (bottom left diagram, fig.4)?

                            Click image for larger version

Name:	relay types.jpg
Views:	1
Size:	215.6 KB
ID:	819549

                            - you just apply reverse polarity to the coil to reverse the action? That ought to make it simple...

                            Comment


                            • #15
                              Yep, I now discover that DC polarity one way sets the single-coil latching relay, and the other way resets it. I'll plan on that basis and let's see if it works. Nice to have the double-coil option if necessary.

                              Should be possible to tap LEDs off this, at least for buttons 2 and 3.

                              I should retitle this thread 'What I Learned About Relays'. This: http://docs-europe.electrocomponents...6b8002a233.pdf was so useful and clear, I'm posting it again.

                              Comment

                              Working...
                              X