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.

Puch Button Switching?

Status
Not open for further replies.

cjkent

New Member
hi everyone, i'm new here, i have a project that something like this..

Five Push button and a five LED 1.5v with 12Volts Supply

my question is how to make a diagram for this?

if Push Button #1 press, LED #1 will ON(Lights) and the rest is "OFF"
if Push Button #2 press, LED #2 will ON(Lights) and the rest is "OFF"
if Push Button #3 press, LED #3 will ON(Lights) and the rest is "OFF"
if Push Button #4 press, LED #4 will ON(Lights) and the rest is "OFF"
if Push Button #5 press, LED #5 will ON(Lights) and the rest is "OFF"

pls help...
 
hi everyone, i'm new here, i have a project that something like this..

Five Push button and a five LED 1.5v with 12Volts Supply

my question is how to make a diagram for this?

if Push Button #1 press, LED #1 will ON(Lights) and the rest is "OFF"
if Push Button #2 press, LED #2 will ON(Lights) and the rest is "OFF"
if Push Button #3 press, LED #3 will ON(Lights) and the rest is "OFF"
if Push Button #4 press, LED #4 will ON(Lights) and the rest is "OFF"
if Push Button #5 press, LED #5 will ON(Lights) and the rest is "OFF"

pls help...

Just wire 5 SPDT switches in series such that the normally closed contact of one switch wires to the common contact of the next switch in series. Put 12vdc in series with a current limiting resistor (500 ohms should work fine for standard red LEDs). Wire the other end of the resistor to common contact of the first switch. Wire a LED (anode end) to each switche's normally open contact. Wire all the LED cathode ends together and wire back to the negative terminal of your 12v supply.

There are certainly others ways to do it with a lot more components, but to just obey your 'truth table' above, 5 simple spdt pushbutton switches will do it. I suspect your truth table is incomplete as it does not state desired action if more then one switch is pushed at the same time or if the lamp should latch on when pushed as to stay on when it's switch is released, and that would take more logic depending on the actual action desired. So my guess is that you didn't full specify what is required and my simple switch wiring was just to show you the falicy of incomplete specifications.
 
Last edited:
Hi cjkent,

one question just to complete the requirements: Are you going to use momentary push buttons or switches?

Boncuk
 
A while back there were a couple of threads looking for 1-of-3 and 1-of-5, sometimes called "radio button", circuits. Here are some circuits that I played around with to that end. These are latching, so push-and-release will maintain the selection. The 1-of-3's can be expanded to 1-of-5's by adding component sets. I'm sure there were other possibilities, but these are what I had on hand to post.

(The program for my PICAXE version is in this Thread: https://www.electro-tech-online.com/threads/24v-flip-flop-help-required.36985/)



Ken
 

Attachments

  • 1of5 relays.gif
    1of5 relays.gif
    30.5 KB · Views: 318
  • 1of3 Toggle CD4001.gif
    1of3 Toggle CD4001.gif
    35.8 KB · Views: 348
  • 1of3 Toggle CD4043.gif
    1of3 Toggle CD4043.gif
    36.3 KB · Views: 735
  • 1of3 Toggle PICAXE.gif
    1of3 Toggle PICAXE.gif
    26.4 KB · Views: 383
Last edited:
Thanks for the reply..

Leftyretro
can you give me a simple diagram how to series the spdt push button?


KMoffett
i think you got me, but do you have a simple circuit for my project?


Boncuk
i want to use push button not a switch.


this is something like..
if Push Button #1 press, LED #1 will "ON"(Lights) and the rest is "Off"
if Push Button #2 press, LED #2 will "ON"(Lights), and LED #1 automatic "OFF" and so on.... this means that only LED #2 is active.
 
Thanks for the reply..
KMoffett
i think you got me, but do you have a simple circuit for my project?

jckent,

Though it may seem like a simple problem...it is rather complex electronically. The simple solution is a ganged, interlocking, mechanical push-button switch:
**broken link removed**

Ken
 
will this work
resistor
---------------battery---[220r]----
[ + ]
[ ]
[----[switch]------------->[------]
[ ]
[----[switch]------------->[------]
[ ]
[----[switch]------------->[------]
[ ]
[----[switch]------------->[------]
[ ]
[----[switch]------------->[------]
leds
 
diagram didnt work
but all diode anodes are connected together
and all switches the same
current limiter in series with bat.
 
thejamesclan circuit is good (and simple)...if...you don't want any LED to remain ON after you lift your finger off the button. My assumption was a latch-on function. What's your requirement there?

Ken
 
Last edited:
i assumed that the circuit wanted was as simple as that and
latching switches used.
i was confused at the use of gates and stuff.
not enough desighn spec i fear.
 
thejamesclan,

I like your circuit...sort of a "priority decoder".

Ken
 
will this work
resistor
---------------battery---[220r]----
[ + ]
[ ]
[----[switch]------------->[------]
[ ]
[----[switch]------------->[------]
[ ]
[----[switch]------------->[------]
[ ]
[----[switch]------------->[------]
[ ]
[----[switch]------------->[------]
leds
can you make this circuit easier, i mean i realy don't know where to connect the battery, the resistor, the button and the LED.

thank you.
 
jckent,

Though it may seem like a simple problem...it is rather complex electronically. The simple solution is a ganged, interlocking, mechanical push-button switch:
**broken link removed**

Ken

Actually this project of mine is for a 1 Coin Slot to all Computers with Timer each. because right now each computer have coin slot and i want to make it 1 coin slot to 5 computers.

The used of a Push Button is to select what computer you want to play then drop the coin, so the time is goes to that computer you select. same thing to the other computer.

hope you understand what i mean.

thanks
 
cjkent,

Can you tell us if you want the LED to stay light after you take your finger off the push button? That determines whether thejamesclan's circuit will work for you , or not.

Ken
 
cjkent,

Can you tell us if you want the LED to stay light after you take your finger off the push button? That determines whether thejamesclan's circuit will work for you , or not.

Ken

no, i mean if LED#2 is "ON" this will automatic "OFF" if you press Push Button #1 now LED#1 is "ON" so LED#2 is now "OFF"

attached file is the Push button that i want to use.
 

Attachments

  • SW-500YE.jpg
    SW-500YE.jpg
    10.9 KB · Views: 175
Thejamesclan's circuit will not work for you. :(

1. If your push button switch has only 2 contacts (I can't tell) it won't work for jamesclan's circuit at all...it requires 3-contact (SPDT) switches.

2. With that circuit, all lights are off with no switch pressed. The correct LED will light as long as the switch is held down. But as soon as you let up on a switch all the LED's are out again. To use your original format for thejamesclan circuit:

if no Push Button is pressed all the LED's are "OFF"
if Push Button #1 press, LED #1 will ON(Lights) and the rest is "OFF"
if Push Button #1 is released all the LED's are "OFF"
if Push Button #2 press, LED #2 will ON(Lights) and the rest is "OFF"
if Push Button #2 is released all the LED's are "OFF"
if Push Button #3 press, LED #3 will ON(Lights) and the rest is "OFF"
if Push Button #3 is released all the LED's are "OFF"
if Push Button #4 press, LED #4 will ON(Lights) and the rest is "OFF"
if Push Button #4 is released all the LED's are "OFF"
if Push Button #5 press, LED #5 will ON(Lights) and the rest is "OFF"
if Push Button #5 is released all the LED's are "OFF"

With your requirement, one of my circuits or something similar will be the only solution. If someone can come up with a more simple solution I would be very interested. I like simple! :)

Ken
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top