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.

One and only one circuit

Status
Not open for further replies.
I have been racking my braintrying to figure out how to make a circuit to produce a one and only one output. I would like to do this with analog components or a few (2-3) discrete ICs, as they are easier for me to obtain. Here's the jist:

Button A is pushed, output A on, all others off
Button B is pushed, output B on, all others off (including A)
Button C is pushed, output C on, all others off (including B and A)

The initial circuit will be for six inputs/outputs, but I would like to make it scalable so more inputs/output can be added later.

In addition, I also need to know when any button is pushed. This output would be momentary. I thinking of a multiple input or gate, or in the case of analog parts, a series of diodes connected to a resistor and transistor forming the analog OR gate.
 
The function is called "radio buttons". I can't visualize this created from analog circuitry. Attached is a "simple" digital 1-of-3 selector circuit. You need to add one CD4043 for every 4 switches. But you need...N*(N-1) diodes...almost exponential growth. ;)

Ken
 

Attachments

  • 1of3 Toggle CD4043.gif
    1of3 Toggle CD4043.gif
    36.3 KB · Views: 590
The function is called "radio buttons". I can't visualize this created from analog circuitry. Attached is a "simple" digital 1-of-3 selector circuit. You need to add one CD4043 for every 4 switches. But you need...N*(N-1) diodes...almost exponential growth. ;)

Ken

Yikes! That would be a lot of diodes! To add to the options, some delay would be acceptable. In other words, looking at the 4043 example, the set and reset occur simulataneously. It would be acceptible for the reset to occur and then the set to occur. I'm just thinking out load while trying to minimize the diodes.
 
Is this for a commercial product or a personal one? What's the absolute maximum number of switches you will need?

Ken
 
Personal for now, but I've had some interest in the design. In the personal version, all the buttons will be in the same box, in a produced version, the buttons may need to be in seperate boxes.

I need six to start and can easily see another four (total of ten) for my own use. In a production area 12 to 15 would not be out of the question.
 
Last edited:
Here's as simple as I can get. Have one FF (or latch) per PB. Connect each PB to the Set input of it's respective FF. Also connect each PB through a diode to trigger a ≈1ms one-shot (time not critical) connected to the Reset inputs of all the FFs. Thus when you push any PB, the one-shot will reset all the FFs but the FF connected to the PB will be set after the one-shot signal terminates.

This requires 1 diode and FF per PB, and 1 one-shot per circuit. You can buy ICs with two or more FFs or latches per package. The one-shot can be a 555 or 4047, or simply an RC connected to the Reset inputs (C in series, R to ground.)
 
Last edited:
I like that! :)

Ken
 
Here's as simple as I can get. Have one FF (or latch) per PB. Connect each PB to the Set input of it's respective FF. Also connect each PB through a diode to trigger a ≈1ms one-shot (time not critical) connected to the Reset inputs of all the FFs. Thus when you push any PB, the one-shot will reset all the FFs but the FF connected to the PB will be set after the one-shot signal terminates.

This requires 1 diode and FF per PB, and 1 one-shot per circuit. You can buy ICs with two or more FFs or latches per package. The one-shot can be a 555 or 4047, or simply an RC connected to the Reset inputs (C in series, R to ground.)

I was working on thinking along those lines. The diode could be incorporated at the PB switch instead of on the PCB and I was also thinking of something like an octal latch 74ALS573 would work for the FF. What about switch bounce, should I worry about that?
 
Last edited:
Another way is to use spdt switches. Each switch would provide a high to the data input of it's respective flilp-flop, and a clock signal to all flip-flops when activated. The clock would be delayed a couple ms for setup time. When inactive, each switch would provide a low to it's flip flop's data input.
 
I was working on thinking along those lines. The diode could be incorporated at the PB switch instead of on the PCB and I was also thinking of something like an octal latch 74ALS573 would work for the FF. What about switch bounce, should I worry about that?
Switch bounce is not a problem since it's the same as pushing the same button more than once. You still get the same result.

The 74ALS573 has a single D input per latch so the circuit would be slightly different. The PB would go to its respective D input. The one-shot would momentarily enable the latch (LE) input. The output enable (/OE) would be connected to ground.

If power could be of concern you may want to use a CMOS device such as the 74HC573 instead of the TTL device.

Make sure you have a resistor on each PB output to ground to generate a definite logic zero when the PB is open.
 
Switch bounce is not a problem since it's the same as pushing the same button more than once. You still get the same result.

The 74ALS573 has a single D input per latch so the circuit would be slightly different. The PB would go to its respective D input. The one-shot would momentarily enable the latch (LE) input. The output enable (/OE) would be connected to ground.

If power could be of concern you may want to use a CMOS device such as the 74HC573 instead of the TTL device.

Make sure you have a resistor on each PB output to ground to generate a definite logic zero when the PB is open.

What happens if the clock fires on a bounce low? Granted from an operational aspect it wouldn't hurt anything as all outputs would go to zero, but it might be a bit annoying to have to puch the button a second time.
 
What happens if the clock fires on a bounce low? Granted from an operational aspect it wouldn't hurt anything as all outputs would go to zero, but it might be a bit annoying to have to punch the button a second time.
That is a possibility. Just make the one-shot time longer than any switch bounce time. >100ms should be adequate.
 
Is there a possibility that you can push two or more buttons at once? That will be a problem.

Ken
 
Originally Posted by ADWSystems
What happens if the clock fires on a bounce low? Granted from an operational aspect it wouldn't hurt anything as all outputs would go to zero, but it might be a bit annoying to have to punch the button a second time.


That is a possibility. Just make the one-shot time longer than any switch bounce time. >100ms should be adequate.

Your suggestion doesn't use the clock. Tie it low.
 
Last edited:
Your suggestion doesn't use the clock. Tie it low.
The "clock" in this case is the signal to Latch Enable (LE) input of the 74xx573, which is needed. There is no clock input on that device.
 
Yeah... I was thinking of your original idea, which used the "set" and "reset" pins of a flip-flop.
 
Is there a possibility that you can push two or more buttons at once? That will be a problem.
I've done that with mechanical push buttons on old radios. In some cases they both stay in. It was a problem in you pushed them all in at once and they all stayed. No way to reset them.;)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top