connect 24V to an Arduino

Hello all,

I want to connect the digital output of an API(Automate Programmable Industriel),that can send a voltage of 24V , but the highest voltage of an Arduino is 5V.

So I need a converter (24V to 5V), do you have any component to get it? or there is another method?

Thank you in advance.

Perhaps an optoisolator such as a 4n25 .

is it can resist 24V as an Input voltage?


Read this:

Make sure your LED series resistor is large enough to limit the forward current to that in the data sheet.

Thank you ^^