Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

switching logic

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

  • #16
    Well, no matter what you make it out of, you need a state machine with three states, and a decoder. Those are two blocks that you can tackle separately.

    I'd use three relays for the state machine: wire them such that pressing one of the three (momentary) foot buttons latches its corresponding relay on while unlatching the other two. You now have a "one hot" state encoding.

    It might actually be easier to do that with normal relays than latching ones: or maybe you can wire up a diode matrix between the three foot buttons, and the latch and unlatch coils of some double-coil latching relays. (that would be the way to go if you had to run it off a battery)

    Then, use any left-over contacts on the relays to switch the actual amps. If there aren't enough contacts left, get more relays to make the "decoder" part of the circuit.

    They used to make whole computers out of relays, Enzo might even be old enough to remember that. So you can implement any logic or memory function with them.

    There is a schematic for the footswitch state machine floating around somewhere, made out of 74 series logic. I've also made a 4-button version with logic chips, and I might be able to find the schem for you. You'd just have to decode the outputs.

    Be sure and consider what will happen if some delicate size 12 boot tromps on two buttons at a time, or even all three.
    "Enzo, I see that you replied parasitic oscillations. Is that a hypothesis? Or is that your amazing metal band I should check out?"

    Comment


    • #17
      Steve's got it down, but I do think the latching relays are the way to go. They dramatically simplify the footswitch setup. All the OP has to do is apply DC voltages in this manner:

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

      It doesn't matter whether the relay is already to the left if you are pushing it to the left. It simply stays to the left. This is the biggest advantage of latching over normal relays. (Second biggest is obviously its statefulness.)

      No need for a separate state machine and decoder, as the two latching relays are stateful and decoding in and of themselves. And only the coils are involved in the footswitch circuit, with the relay switches completely free for use in the amp-control circuit(s).

      I expect that watching for accidentally stomping on two or more footswitches at once with a momentary setup is a burden placed upon the guitarist--whichever momentary footswitch he releases last will "win." Yes, while he's stepping on two simultaneously, there will be some funny fluctuations as the switch flips back and forth rapidly or gets stuck halfway between. So he'll just have to watch where his feet are stepping. The OP can help with that by placing the footswitches far apart enough on the pedalbox.

      Alternately, the OP could use a set of three normal SPST normally closed relays and diodes (where the natural state is for the relay's pole to be make with the one contact) so that pressing one footswitch breaks the circuits of the other two footswitches, but this still doesn't prevent the last switch released from winning. It just prevents fluctuations, which could save the guitarist some embarassment. (What I just described is beginning to get into what Steve referred to: a separate state machine involving the footswitches.)


      BTW, to the OP: You might find solid state latching relays that do not have any mechanical parts. This would be far better than mechanical ones, as you would never get the situation where the pole gets stuck partway between the two contacts. You could also probably operate these solid state latching relays with far lower voltages/currents than the mechanical ones, making it possible to use a 9V battery that will literally last for months or years in the pedalbox, saving the guitarist from having to deal with yet another wall wart.
      Last edited by dchang0; 12-12-2010, 06:46 PM.

      Comment


      • #18
        Many many thanks for all the advice. How's this looking?

        Click image for larger version

Name:	3 way footswitch.jpg
Views:	1
Size:	19.4 KB
ID:	819557

        Comment


        • #19
          Looks good. I was expecting you to use the dual coil latching relays. Easier by far than reversing voltage on the single coil ones.

          BTW, if the customer wants the last pressed (versus last released) footswitch to win, that's going to require sophisticated logic for sure.

          All this trouble to save one foot press, LOL! Sure was fun, though, giving the ol noggin a challenge.

          Comment


          • #20
            Alex, that looks about right. Just make sure that stepping on all three switches at once doesn't short the power supply. I could see that happening with the single coil latching relays.
            "Enzo, I see that you replied parasitic oscillations. Is that a hypothesis? Or is that your amazing metal band I should check out?"

            Comment


            • #21
              Yes, ther are single coil latching relays, opposite polarity toggles to opposite state. And ther are dual coil latchers, no polarities, just one coil per state. Those would be far easier to use.

              My relay background prefers the hold contacts, simple relays are TONS cheaper than latching ones.

              Make the pedal large enough you can space the switches to prevent unwanted combinations of buttons.

              I remember relay systems, Steve, in fact, I spent years working on pinball machines, which are nothing but huge relay logic trees. More sophisticated than you might think inside there.

              dchang, we have moved past my diagram, but a couple comments. It doesn;t matter where you break the hold circuit, as long as you open it somewhere. That lets the relay drop out.

              The reverse diode across the coil is not there as a latch or anything functional as far as the logic. it is there to prevent the switch contacts from arcing. The relay coil has inductance. When you break the circuit, that inductance will generate a current spike, and that can arc your switch contacts. I put that there because we were running off +5VDC.

              Chances are we wouldn't get much spark at 5v, but we might get popping in the amp as the spark gets picked up. We are using plain old switches, but if we were switching these relays with transistors, those diodes would keep the transistors from burning out. Look in any amp circuit with relays, and you will find a reverse wired diode across its coils.


              I highly recommend you add those diodes to any DC relay coil in your final circuit.
              Education is what you're left with after you have forgotten what you have learned.

              Comment


              • #22
                Man, Enzo, you are a compendium of knowledge!

                Thanks for the explanation. I've learned more here than in my freakishly expensive CS/EE courses in college.

                Comment


                • #23
                  I will definitely bung the reverse diodes in, thanks Enzo.

                  I have the stuff on order and reindeer permitting I should get it tomorrow or the day after. Then I'll let you guys know if it works. Btw we are switching a Badcat and one of those Gibson Goldtone stereo amps that they rebadged from Trace Elliott Twin somethings. They are a name band and give me a fair bit of work so I am grateful in more than one way for the help you guys have given me in working this out.

                  The Badcat is giving me the 5vDC, and actually is switching from Ch1 only to Ch1+2 mix, with one common contact, via the double-throw relay (CDE). I am using DPDT relays and the other halves of the relays will be lighting LEDs - I worked that part out for myself so stand by for fireworks.
                  Last edited by Alex R; 12-14-2010, 02:18 PM.

                  Comment


                  • #24
                    Try those awesome near-ultraviolet LEDs. They work like blacklights... Purple LEDs are also very rarely seen, so there's the "ooooooh" factor there too.

                    Glad to help, man.

                    Comment


                    • #25
                      Oh man, ther is a house nearby with strings of those deep deep blue almost purple lights in the yard, very intense color. Very cool. it is sort of like the light version of a subwoofer, if you get me.


                      There may or may not be an issue, but if this thing is switching two separate amps, avoid comingling their grounds. That is just asking to create a groundloop.
                      Education is what you're left with after you have forgotten what you have learned.

                      Comment


                      • #26
                        I was thinking good old green amber and red traffic-lights. Actually the reason isn't aesthetic, it's that the three-button Crate pedal box I bought on Ebay has the leds ready installed.

                        Purple is very cool I do agree. I have a bag of purple Fender jewels, was thinking of putting them in a dish by the door like the little sweets at nightclubs. They make nice little gifts. I tell customers they improve the tone, of course. So far no-one has taken me seriously, but it's gonna happen.

                        As to hum loops the Gibson doesn't need shielding so both wires can be isolated from ground, so that's ok. I'm not sure how the Badcat does its switching but its cable seems to be shielded and it's one of those multipin screw-on connectors they use for CB mics so I'll go with that as a ground for the LEDs and a shield.

                        Comment

                        Working...
                        X