Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Multiple flipflop (piano switch)

GrahamR

New Member
Hi all.
I thought this would be a straightforward development from a "two-key piano switch", ie an ordinary flipflop, but it's got me baffled, which admittedly doesn't take much.
I can't find anything online. Is it so easy that nobody's bothered posting it? Or am i searching for the wrong thing?
Thanks very much,
 
A piano switch is normally an on off affair. ( basically a row of switches that look like a piano)

I take it you are attaching to logic to toggle when operated. is this what you are looking for?
 
Ok, maybe I'm showing my age.

Do you know those mechanical multi-button switches you used to get on radios etc for MW, LW, VHF...? You pressed one button down and the previous one popped up, and so on? They were colloquially called "piano switches". I don't know their actual name, if they had one.

I'm thinking of an electronic version. Obviously an ordinary flipflop will do the same thing as a two-button one. You "press" one side, electrically, and that side stays high while the other side goes low, and vice versa.

I'm trying to think of a "multi-button" flipflop, where "pressing" any stage sends that output high whilst lowering all the others.

Is that clearer? :)

Thanks,
 
Ok, maybe I'm showing my age.

Do you know those mechanical multi-button switches you used to get on radios etc for MW, LW, VHF...? You pressed one button down and the previous one popped up, and so on? They were colloquially called "piano switches". I don't know their actual name, if they had one.

I'm thinking of an electronic version. Obviously an ordinary flipflop will do the same thing as a two-button one. You "press" one side, electrically, and that side stays high while the other side goes low, and vice versa.

I'm trying to think of a "multi-button" flipflop, where "pressing" any stage sends that output high whilst lowering all the others.

Is that clearer? :)

Thanks,

As far as I'm aware they have never been known as 'Piano switches', as they have no relation to how piano keys work - they are known as 'radio switches', and are even called that in Delphi and Visual Basic etc.

As soon as you use the correct name, loads of options pop up:


It could be done with flip flops, and would have been decades ago, but in any remotely modern times a micro-controller makes far more sense.
 
All right, fine.
Now that I've started thinking in flipflop terms, or at least discrete logic ICs, does anyone have a suggestion for that? And curiosity, and a knack for puzzles?

It seems it should be a small development, like 3 criss-crossed transistors instead of 2 (for a 3-way one), etc, but I'm still brain-wracking.
 
You want to be talking to MM (MusicManager) He makes a lot of stuff like that.

If I did it it would use a small pic or a little GAL and I can output what I want from an input. But I like programming... I'm gong to do something with relays... I'll post when I'm done.
 
All right, fine.
Now that I've started thinking in flipflop terms, or at least discrete logic ICs, does anyone have a suggestion for that? And curiosity, and a knack for puzzles?

It seems it should be a small development, like 3 criss-crossed transistors instead of 2 (for a 3-way one), etc, but I'm still brain-wracking.

You're still pretty vague about it's intended purpose, I posted a link to a radio switch in post #5, and googling gives loads of hits - but is that what you want?.

You mention a 'knack for puzzles', you're not wanting a 'quiz buzzer' set up are you?, that's something entirely different again.

If it's NOT that, then there is a circuit called a 'ring of three counter', bit like a bistable but with three stable states, and it's easily extended to be a 'ring of four' counter etc. I've no idea if that could be used to make a radio button circuit or not?, I last used one 50+ years ago :D (and we got it out of a book in the college library).
 
Here is a single chip solution, 8 keys (I think based on resources left might be
able to do 32 or more). Each key debounced. I chose ISR to handle each key.
You could use onchip reg to read the key vs the ISR approach. Or a scanned mux,
many possibilities, again all onchip. The result of the key controls the DDS in turn
feeds the Wavedac to produce sine/tri/ramp/square/arbitrary to gen sound if so
desired.

1746799027814.png
 
Sigh! "knack for puzzles" referred to the enjoyment of puzzling out the circuit!

There's no vagueness in its purpose - it's just something I've occasionally puzzled over, and finally ended up here. I don't remember why I wanted it originally.

Could you have posted just the schematic from the .circ in post #5?
Yes, I could look at a ring of 3 (etc) counter, thanks.
 
Sigh! "knack for puzzles" referred to the enjoyment of puzzling out the circuit!

There's no vagueness in its purpose - it's just something I've occasionally puzzled over, and finally ended up here. I don't remember why I wanted it originally.

Could you have posted just the schematic from the .circ in post #5?
Yes, I could look at a ring of 3 (etc) counter, thanks.

Yes I could, but if you click on the link you get the full information and explanation.
 
For your amusement to puzzle out how it works, below is the LTspice sim of a NAND-latch based Radio PB circuit:
The SWs are NO PB switches.
The circuit is immune to switch-bounce.
Note that the output latches to its respective input, no matter the input sequence.

1746810513606.png
 
Last edited:
What Nigel is referring to is called a game show circuit. You are after a variation of that, called, yes, a radio button circuit. There are many schematics for these on the innergoogle, and threads for both on other forums.

Here is one I posted on another forum. It uses a different approach that Carl's. Connecting C3 to any of the switch inputs makes that input default ON at power-on.

ak

RadioButtons-8-1-c.gif
 
Last edited:
Here is one I posted on another forum.
I assume the purpose of C1 is to delay the clock until the D input has settled, but that seriously violates the MAX transition time for the clock (below), and could result in spurious operation of the FF.

The normal BJT turn-on delay should be all you need.
Also the slower 74HC574 has a more relaxed requirement for the clock transition time, so might be a preferred device to use here.

1746818767584.png
 
Last edited:

Latest threads

New Articles From Microcontroller Tips

Back
Top