Single push button switch LED circuit

Jaco Greyling's picture

Offline

Joined: Nov 04, 2020

Replies: 0
Single push button switch LED circuit
November 5, 2020 - 12:19am

Good day

I need help with finding the correct componants to use to achieve the following:

1 push button to select 3 individual LEDs with every push..i.e.
Scenario #1: from off status,push #1 & LED #1 switches on. Push #2,LED #1 switches off and LED #2 switches on.Push #3,LED #2 switches off and LED #3 switches on.Push #4 all LEDs off.

Scenario #2:from off status,push #1 & LED #1 switches on. Push #2,LED #1 and LED #3 switches on.push #3,LED #1&3 switches off and LED #2 (only) switches on.Push #4 all LEDs off.

A list of parts names will be appreciated as well as a possible pointing into the right direction with a diagram will be appreciated. Keep in mind that the switch and pcb must fit in a +- 1square inch unit (if possible)

Regards

Sourav Gupta's picture

Offline

Joined: Feb 12, 2018

Replies: 696

Cost of the circuit? use a microcontroller with 8 pin, for example PIC12F675, can easily programmed to do so.

Michal Podmanický's picture

Offline

Joined: Nov 06, 2020

Replies: 64

Ring counter to 4. I would use a 4017 IC. See datasheet, you maybe find close example.

Michal Podmanický's picture

Offline

Joined: Nov 06, 2020

Replies: 64

Or count to 3 and at 4th button press generate a reset. Reset state causes all Led off. U can use an IC with less pins than 4017.

For led combinations use a logic gates connected to outputs of 4017.

U didnt write, how you can switch from scenario 1 to 2.