How to wire a Button Box with LED Latching Buttons

Hi
I am trying to make button box but I am extremely new at electronics (I currently have an Arduino class but its has not gotten to this level of complexity). I made a schematic (which I am not sure is correct to begin with) of what I wanted to do before I buy the parts and was wondering if anyone could help me on how I should wire the latching button with the LED. I also was wondering if this button would work like a regular button in the code (I cannot attach it because I am a new user but its in the description of the video).

Uploading: LED Latching Switch Schematic.jpg...

I am using this video as a guide and has been extremely helpful.

Thanks!

Hello
Take a view here to get some ideas:

Have nice day and enjoy coding in C++.

You can promote yourself to the next level by reading other topics. Ten minutes will do it.

I was wondering how you would wire an LED Latching Button because it has 4 pins.

This is the one I am planning on getting :LED Latching Button

I also don't know if this button would work properly with the button matrix in the code.

Good to know

they have a description for the wiring:

It's a 12V switch though. It will work I expect, but the light may well be dim.

Yes I saw the wiring but I was a bit confused on how to wire them to the Arduino. Since I have to connect the wire to the analog and digital pins would the wire go like this?

Or would the wires going to the analog and digital pins be switched?

As mentioned by @wildbill the LED might not turn on or might be dim because it's meant for a 12V input but if you do that you'll kill your Arduino's input pin

On their drawing it seems that the + and - labeled pins are for the LED and the two non labeled pins are for the switch

so I would try something like this with a transistor (or equivalent with a mosfet)

(try this first without an arduino, just with a voltmeter to check for continuity and voltage)

  • the pin at the top would see HIGH when the switch is not pressed and LOW when it's pressed
  • the pin at the bottom would be used to turn on or off the LED ring on your button, something you would do in the code

If I were to use the RAW output pin (I don't mind if the LED is dim) and use that as the input to the button and not use a transistor would the rest of the wiring work?

You mean doing this ?

The switch would work but the LED would always been on (assuming 5V is enough)

you could also explore this


and drive the LED directly from a digital pin (with a current limiting resistor but may be there is one builtin)

Why analog?

I am trying to make a button matrix.

a button matrix with latching buttons ?

the drawing was for a single button connected as input pull-up to a digital pin

Yes! That's what I am trying to do. So in my case, I am trying to make a button matrix. Instead of wiring the other button (Across from the one you connected to the digital pin), would I wire it normally to one of the analog pins?

give it a try, but if you forget to unlock one button and lock another one up or down the chain, that can be weird. UX might not be great

I have been using this type of momentary buttons (if you don't need to heavy duty waterproof things)

https://europe1.discourse-cdn.com/arduino/original/4X/b/a/2/ba2134faa4bc0db9a64191ced4dda57a165fa039.png

with 5 V (and a resistor) and that turned out OK

You don't delete posts, you edit them using the "pencil" Icon. :roll_eyes:

Hi
Sorry, yesterday I couldn't respond because I had come to the limit of replies so I thought I would just delete them to see if I could make more replies.

Didn't work, did it? :face_with_raised_eyebrow:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.