Half the number of analog 4 pole tactile switches with transistors? Is it "multiplexing"?

Discussion in 'Analog & Mixed-Signal Design' started by LokisKitten, May 12, 2018.

  1. LokisKitten

    Thread Starter New Member

    Oct 25, 2017
    5
    0
    I created a very basic tone organ kit which uses a 555 timer and a probe to then touch 1 of 13 different pins to create a tone from a speaker.

    I wanted to convert the system from that into a push button based design, add a volume control and on/off toggle switch. Parts 2 & 3 are easy and I've prototyped them. However I can only see one obvious way of doing the button idea - use 13 tactile push buttons to create the tones!! That's a lot of wasted buttons. Because they are the standard 4 pole tactile switches you get in Arduino kits.

    So I thought:

    "Surely there's a way of using these 4 pole switches to create a 'multiplexed' way of creating tones. Halving the number of switches needed as each button takes two inputs and has two outputs. Granted they're all connected. But surely there's a way of isolating each side - maybe using transistors?

    But my knowledge of transistors is sketchy at best. But I thought maybe I can use a transistor on one side of every switch which only activated when a toggle switch is ON. So each push switch has two output tones based on the toggle switch. The toggle switch btw would be simply providing power to the collectors of every transistor connected to every switch. I've read up on transistors some and I have a vague idea......this is where I'm getting lost. Does this sound possible? Crazy? Doable? Any ideas what I should be searching for or thinking of? Maybe relays instead? Maybe just buy single pole switches instead?

    I have a few theory books but not knowing what to look for I'm a bit lost.

    Can anyone help please? I'd be eternally grateful and you'd be immortalised on my blog for helping me create my first customised project box installed project. :)
     
  2. ebeowulf17

    Well-Known Member

    Aug 12, 2014
    1,897
    319
    Am I guessing correctly that in the existing setup the movable pin is part of the RC circuit for the 555, and that you're choosing the R based on which resistor you touch?

    If so, I think the voltage drop through the transistor would change all of your frequency calculations into funky non linear equations. Not sure - maybe it's not as bad as I think, but I think it could get weird on you.

    You could use a SPDT switch as your "shift" switch, such that in one position it runs signal to pole 1 of each switch and in the other position it runs signal to pole 2 of each switch. Each of the poles on each switch could then go to its dedicated resistor without changing any of the frequency calculations.

    If it were my project, I'd rather have one button per note, but if you want to reduce button count, it's certainly possible.

    If my guess about being in the middle of the RC circuit is wrong, and you just need simple logic high/low signals, then there are several ways to do this with transistors or logic gates.
     
    LokisKitten likes this.
  3. LokisKitten

    Thread Starter New Member

    Oct 25, 2017
    5
    0
    You're absolutely right. Its an array of resistors coming off a 555 timer and touching the pole connects up a different resistor.

    Thanks for the "SPDT" word though. You'd be surprised how hard it can be to know what you're looking for when you don't know even the basic name for it. But you could draw it maybe.

    I'll look for some SPDT switches that fit the bill and buy a pack of 25 and ebay the rest or something.

    Thanks for your help! I really appreciate and when I blog about it with pics I'll be sure to PM you with the piece and link to your profile (or website if you have one).
     
  4. ebeowulf17

    Well-Known Member

    Aug 12, 2014
    1,897
    319
    Glad I could help! I totally understand about the "just need to know the right word" phenomenon. I've had times at work where I spend a week searching in vain for something I know must exist... and then when I finally discover the right search term there are dozens or hundreds to choose from on the very next search. It goes from impossible to easy in the blink of an eye!

    As for links and updates, I look forward to seeing how this turns out, and I'd encourage you to share the blog link here, not just in a PM, in case others are interested in seeing the final solution. I guess I'm not 100% sure if that's considered a no-no, like you're advertising a commercial product on the forum, but I think as a follow up to a question you've posted here it would make sense to share the result here. Either way, best of luck!
     
  5. BobTPH

    Well-Known Member

    Jun 5, 2013
    1,089
    210
    The typical tact switches are not 4 pole or even 2 pole. They at SPST (single pole single throw). They have 4 pins, but they are in pairs that are permanently connected together, so, effectvely, they have just 2 contacts.

    Bob
     
  6. ebeowulf17

    Well-Known Member

    Aug 12, 2014
    1,897
    319
    Doh!

    I just went along for the ride, working my way through multi-pole switching logic, and didn't bother to think about the initial assumptions.

    Yeah, you're totally right. The tactile switches in question are almost certainly the normal ones, which means my proposed solution wouldn't work at all.
     
  7. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    6,729
    1,932
    That depends on what your solution is. I'm still not clear.

    The only way to get n notes without n switches is to have the user press more than one switch at a time. For 12 notes and fewer than 12 switches, the next step would be pressing two switches simultaneously, for a total of 7 switches. The minimum possible arrangement is the binary sequence - 3 switches for 7 notes, 4 switches for 15 notes, etc. n switches yields (2^n)-1 notes. But for note #15 you have to press all four switches.

    So, what is it you want to achieve?

    ak
     
  8. ArakelTheDragon

    Active Member

    Nov 18, 2016
    526
    23
    We are not surprised how hard it is to find something if you do not know the term. We have had this problem also.

    Either press more than 1 switch at a time, or output 2 tones, 1 after another on the press of 1 switch, or make it dependant on time.
     
  9. ebeowulf17

    Well-Known Member

    Aug 12, 2014
    1,897
    319
    Well, it's not my project to begin with, but my understanding of the thread starter's intent was that 6-7 buttons would have two possible notes each. An additional button, pressed simultaneously, would give you access to the second note for each button. I think the more complicated combinations would be avoided.
     
  10. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    6,729
    1,932
    Five buttons, pushing any 1 or any pair, would yield 15 different notes. However, getting them to even approximate the frequencies of a chromatic scale would be impossible.

    All possible combinations of 1, 2, 3, 4, and 5 simultaneous buttons yields a total of 31 possible notes.

    ak
     
  11. ebeowulf17

    Well-Known Member

    Aug 12, 2014
    1,897
    319
    Yeah, I don't see any way to reduce the switch count with normal, single pole tactile switches and still hit the desired notes.

    There might be a way to matrix things with transistors or MOSFETs, but I'm guessing it would be far more complicated, bulky, and expensive to do that than to just use 13 dedicated switches.
     
  12. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    6,729
    1,932
    There is, but it takes at least one if not several switched constant current sources.

    ak
     
    ebeowulf17 likes this.
Loading...