Connect with us

Ten way relay switch required.

Discussion in 'General Electronics Discussion' started by Oli, Jun 3, 2015.

Scroll to continue with content
  1. Oli

    Oli

    4
    0
    Jun 3, 2015
    Hi , I've signed up to the forum for one particular problem , but I'm sure that I'll be using it again - there's lots of interesting stuff here!
    I'm making a control board with footswitches to send commands to a laptop music program. ( a looper). I've hacked an old usb keyboard and am fitting momentary switches for the footswitches to replicate keystrokes, but there are ten loops available and I'd like to have the one that's active with a lit LED to indicate its status. I have some DPDT momentary switches and I thought that half the switch could be the switch for the keystroke and the other half light the LED for that loop. so I need to find a chip that had say 12 pins a side so that a momentary voltage on pin 1 would switch a 6 volt circuit through to pin 24, then if pin 2 had a voltage applied it would switch the 6 volts to pin 23 etc .... so basically a relay that latches on if a momentary voltage is applied , then switches off if the trigger voltage is applied to a different switch which itself becomes live.
    It seems the kind of thing that should be available in chip form , or maybe I'm being optimistic .
    Any help appreciated.
     
  2. Fish4Fun

    Fish4Fun So long, and Thanks for all the Fish!

    464
    105
    Aug 27, 2013
    Hey Oli! Welcome to the forum!

    Hrmmmm.....I am not sure you have a firm grasp on the way a keyboard works....all of the "keys" are momentary switches configured in rows and columns....inside the keyboard is a uController that "scans" the rows and columns thousands of times per second looking for a "key press event".....by "reading the matrix" the uController then "locks out" further input for a fixed period of time (typically a few mS to 500mS depending on the keyboard settings)....the Host PC typically also has "ignore" settings that prevent a "long string" of a single character from being associate with each keystroke.....

    Now, onto the "hacking" of the USB keyboard.....because typical "scan rates" in keyboards are in the radio frequency range, adding long, unshielded wires to the membrane switches will likely prove problematic....there are a myriad of other problems with your approach, but for brevity, I would suggest you investigate Arduino Prototyping boards.....These boards host an Atmel uController and a USB interface for connecting to a PC. There are lots of "Sketches" available for various types of keyboard input.....if you modify one of these to suit your needs then it will be fairly trivial to write a PC application to echo whatever "keystrokes" you want from the Arduino using something like Visual Basic's "SendKeys" function.....This may sound complicated, but it is likely the easiest way to DIY a keyboard wedge....

    Good Luck!

    Fish
     
    Arouse1973 likes this.
  3. Oli

    Oli

    4
    0
    Jun 3, 2015
    Hi Fish , thanks for the reply. The problem isn't with the keyboard hack , I've done that by taking my lead from this site
    http://runawaybrainz.blogspot.co.uk/2012/01/hack-reverse-engineer-and-re-purpose.html
    which seems to work fine . It's just that if I have a choice of multiple loop options from a number of footswitches I'd like to light the active one up with an LED so I know where I am. Since the footswitches are momentary , it has to trigger a switch to switch on one LED circuit and also switch off the last one used . Basically then a router that routs a 6v potential through a choice of several outputs ( 10 is the maximum , in reality I think I'll probably end up using 6 for simplicity) by applying a momentary voltage to the appropriate trigger.
     
  4. Osmium

    Osmium

    67
    17
    Jan 28, 2013
    Look up the 4017 ic. has 10 outputs and a trigger input. Then use this to drive transistor switches. Use a debounce ic (MAX16054 or similar) on your footswitch.
     
  5. Osmium

    Osmium

    67
    17
    Jan 28, 2013
    oops... no, I'm wrong. The 4017 will switch in sequence. But I think you need "one and only one" output out of 10 with 10 inputs...
     
  6. Osmium

    Osmium

    67
    17
    Jan 28, 2013
    Should be able to do it with a 10 bit latch and 12 monostables. 10 monos are connected to the footswitches and generate a 100ms (say) pulse (also acts as debounce). Mono 11 is triggered by any of the monos (1 thru 10) being triggered (or gate) - to produce a delay of say 10ms at the end of which mono 12 triggers to provide a "Latch" signal to the latch ic(s). The latch inputs are tied to each of the (1 thru 10) mono outputs. In effect, the latch will copy a 1 for whichever switch has been pressed and all the others will be 0. That's off the top of my head... there may be better ways... go google.
     
  7. Oli

    Oli

    4
    0
    Jun 3, 2015
    Thanks for replies. I had thought that it would be a pretty basic operation for a chip to handle , but I have no experience of logic and non-analogue circuits and was clearly wrong. I'm going to do it with latching relays , but the number of connections is huge with 10 outs so I'll start with 4 and either add another bank of 4 or go up to 6 or 8 if I decide to make a PCB for it . (My PCB skills are still pretty rudimentary).
    Anyway , thanks again for your interest and replies , I'll post the finished build in a while.
     
  8. AnalogKid

    AnalogKid

    2,410
    685
    Jun 10, 2015
    As long as you can guarantee that only one switch will be pressed at a time, this will work:

    Start with an "octal latch". Each chip has 8 inputs, 8 outputs, and a clock input that latches all 8 inputs. 2 chips = 16 channels, 3 chips = 24 channels, etc. Each of your switch outputs does two things. First, it is an input to one of the latch inputs. Second, all switch signals are connected together in what is called a diode-or. This is a way of combining them into a common clock command while keeping them electrically separate for the individual latch inputs. When any switch is pressed, all latches are clocked, capturing a snapshot of all switch states. Only one of those switch states will be on, so only one LED will be driven. All latch output signals go to LED driver transistors, or a driver transistor array like the ULN2003 that has 7 channels. For 12 channels:

    2 - 74hc574 (4 channels unused)
    2 - ULN2003 (2 channels unused)
    12 - 1N914 or 1N4148 small signal diodes
    12 - resistors, one at each latch input to hold it low until its switch is pressed
    2 resistors and 1 capacitor - clock signal delay to assure the latches capture things correctly

    With this circuit, the LED drive goes low on activation. That is, it pulls one lead of the LED to GND, rather than pulling the other lead up to 6 V as in your description.

    ak
     
    Martaine2005 likes this.
  9. Oli

    Oli

    4
    0
    Jun 3, 2015
    Thanks for all the responses , thought I'd post my solutions. I went with analogue because I didn't want another learning curve right now! First solution was to use latching relays
    This works by using a common rail to take a trigger voltage from the momentary switch k1 of a circuit with the LED "off" through the relay when switch k2 is closed and along the rail to any other relay that is switched "on" and has k3 and k5 closed , and it triggers the reset at the same time as switching its own LED "on".
    It works but it seemed a bit complicated , sledgehammer to crack a nut etc. So I came up with something using thyristors. I had bought some thinking I'd need to slow down the trigger to one of the switches on the relay so they switched in the right order , but found it worked fine without. The thyristors however , have this quality where they (I think) have a connection from gate to ground before they open their anode-cathode circuit. So in this circuit loop33.png looper9.jpg the momentary switch takes a voltage to the gate but before the thyristor creates a circuit through the LED it shorts to ground and any thyristor that is "on" is switched off.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-