cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement the Tactile switch Logic and the LEDS Both Functionalities

Balayyaa
Visitor

For this circuit, how can I implement the tactile switch functionality using the dual-LED feature? Can any one explain how the circuit should be designed for a 28V input? I am unable Implement this Logic
Like My requirement is 28V I am getting upto 42mA So This switch Should Receive and that will be working like the Tactile and need to Glow the Once pressed one will glow if anoother Press other LED should Glow . How to Implement This Logic 

Balayyaa_0-1779294930746.png

please reply fast 

5 REPLIES 5
mfgkw
Senior III

Is there any STM32 involved?

Andrew Neil
Super User

Welcome to the forum.

Please see: How to write your question to maximize your chances to find a solution for best results.

 


@Balayyaa wrote:

For this circuit, how can I implement the tactile switch functionality using the dual-LED feature?


Not sure what you mean by that?

The functionality of a switch (tactile or other) is simply to be open or closed - that has nothing to do with the LEDs.

In your diagram, the switch contacts are between pins 1 & 4

The LEDs are between pins 2 & 3 - completely independent of the switch.

 


@Balayyaa wrote:

Can any one explain how the circuit should be designed for a 28V input? 


You mean 28V input to an STM32 ?

A voltage divider could do that.

Maybe an opto-isolator if the 28V is "hostile" ?

 


@Balayyaa wrote:

Glow the Once pressed one will glow if anoother Press other LED should Glow . 


So each press on the switch alternates which LED is lit ?

A simple state machine should do that ...

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
Peter BENSCH
ST Employee

And since the LEDs are connected in anti-parallel, you would need to drive them using a bridge circuit. You would just need to decide whether to power the LEDs from the 28V supply or from the MCU voltage. And that brings us back to the questions from @mfgkw and @Andrew Neil.

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Up to now there is no involvement of the Processor 

Balayyaa
Visitor

Hi peter 

 

Here I am not involving the MCU So with out the Bride circuit is there any solution Like any Digital Gates