Help for reading a 24V button

Hi, I'm pretty new in arduino and I want to read the status of a 24V button. How could I do this? I was thinking about using a relay, but how do I then read the status of my button? Because I can't just hook up a 24V button to an arduino.

Welcome to the forum

Perhaps start by deciding what voltage you are dealing with

What do you mean? I'm dealing with a 24V led button.

Ooh. You mean AC or DC? It's 24VDC.

If the 24 volts is "reliable" you can use a voltage divider (2 resistors). Resistors that sum-up to about 10K are about right.

If there's a possibility of voltage spikes you can use an over-voltage protection circuit. But, increase the resistance to at least 1K. Or you can use the voltage divider and just add a diode.

A relay can work if you have enough "power" for the relay coil.

And opto-isolator is another option.

Then why does the topic title refer to 12V ?

Changed it. Sorry, stupid me. It is 24VDC.

Is it part of something else already?
Details.

OK, you show us the complete circuit in which your "24V button" is connected and tell us what a "24V button" actually is, and we'll talk. Until then, all nonsense. :roll_eyes:

1 Like

How about a circuit like this? It assumes +24V DC on the input from the button. The transistor will conduct when the 24V is present, and open when it is not. This will "translate" the higher voltage signal into a safe voltage for the Arduino, whether it is 5V or 3.3, this will work.
0Arduino01

Or a simple voltage divider:
24-5Vdiv

Nothing like impatience, is there? :face_with_raised_eyebrow:

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