user50250: I am having a digital output of 24VDC and 0.5A from ABB IRC5 controller. I need to feed this digital output to the digital input of Arduino uno. How can I do that? 

user4143: One common misconceptions is that the current limit of a GPIO pin applies to inputs.  It does not.
The 40mA "maximum sink" is only applicable when the pin is set to OUTPUT and is driven LOW - at which point the pin is connected to ground through a MOSFET.

Read: What Exactly is a GPIO Pin?

However, when the pin is in INPUT mode it is high impedance.  This means that it neither sinks nor sources current (apart from a very tiny leakage current).  The only thing that matters is the voltage.  That must:

Never go higher than 0.3V above VCC (5.3V if powered from 5V)
Never go lower than -0.3V
Have logic levels that are within the thresholds of the input:


Below 0.3 × VCC for LOW
Above 0.6 × VCC for HIGH


You can connect the input to a signal that is 5V and 1,000,000 giga-amps and all will be well.
However, if you inadvertently set the pin to OUTPUT and drive it LOW there will instantly be smoke.  For this reason it is common to add a small inline resistor (maybe 100Ω-470Ω) in order to limit any current through the circuit should the pin ever be set to OUTPUT and LOW.
Another "However", though:  If you are using a voltage divider to reduce your incoming voltage to conform to the values above (as shown by @user43648 and suitable values given by @EdgarBonet) the inline resistor is pointless. The voltage divider itself will have a very high output impedance which massively limits the current. This impedance is like having a resistance equivalent to both the provided resistors in parallel inline with your input.

user-1: You have 2 different questions here. First one can be answered by google search, it is literally the first result.
The Arduino Uno uses the atMEGA328 microcontroller, which has an absolute maximum rating of 40 mA source or sink per GPIO. Also, the total current through the supply or ground rails (i.e. the total of all current OP wants the GPIO pins to sink, or source) is rated to a maximum of 150 200 mA.
And you should not apply more than 5V.
Regarding second question, Google can help again.
 
Vin is your 24V from controller, Vout is your Arduino digital 5V input. With that established, use voltage divider formula to calculate R1 and R2 values. I hope you can do that?
That being said, I am disappointed, because I feel like you have put 0 effort into researching this.

50250: <p>I am having a digital output of 24VDC and 0.5A from ABB IRC5 controller. I need to feed this digital output to the digital input of Arduino uno. How can I do that? </p>
 4143: <p>One common misconceptions is that the current limit of a GPIO pin applies to inputs.  It does not.</p>

<p>The 40mA "maximum sink" is only applicable when the pin is set to OUTPUT and is driven LOW - at which point the pin is connected to ground through a MOSFET.</p>

<ul>
<li>Read: <a href="https://majenko.co.uk/blog/what-exactly-gpio-pin" rel="nofollow noreferrer">What Exactly is a GPIO Pin?</a></li>
</ul>

<p>However, when the pin is in INPUT mode it is <em>high impedance</em>.  This means that it neither sinks nor sources current (apart from a very tiny <em>leakage current</em>).  The only thing that matters is the voltage.  That must:</p>

<ul>
<li>Never go higher than 0.3V above V<sub>CC</sub> (5.3V if powered from 5V)</li>
<li>Never go lower than -0.3V</li>
<li>Have logic levels that are within the thresholds of the input:

<ul>
<li>Below 0.3 × V<sub>CC</sub> for LOW</li>
<li>Above 0.6 × V<sub>CC</sub> for HIGH</li>
</ul></li>
</ul>

<p>You can connect the input to a signal that is 5V and 1,000,000 giga-amps and all will be well.</p>

<p>However, if you inadvertently set the pin to OUTPUT and drive it LOW there will instantly be smoke.  For this reason it is common to add a small inline resistor (maybe 100Ω-470Ω) in order to limit any current through the circuit should the pin ever be set to OUTPUT and LOW.</p>

<p>Another "However", though:  If you are using a voltage divider to reduce your incoming voltage to conform to the values above (as shown by @user43648 and suitable values given by @EdgarBonet) the inline resistor is pointless. The voltage divider itself will have a very high <em>output impedance</em> which massively limits the current. This impedance is like having a resistance equivalent to both the provided resistors in parallel inline with your input.</p>
 -1: <p>You have 2 different questions here. First one can be answered by google search, it is literally the first result.</p>

<p><em>The Arduino Uno uses the atMEGA328 microcontroller, which has an absolute maximum rating of 40 mA source or sink per GPIO. Also, the total current through the supply or ground rails (i.e. the total of all current OP wants the GPIO pins to sink, or source) is rated to a maximum of 150 200 mA.</em></p>

<p>And you should not apply more than 5V.</p>

<p>Regarding second question, Google can help again.</p>

<p><a href="https://i.stack.imgur.com/yGXfk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yGXfk.png" alt="Vin is your 24V, Vout is your arduino digital input"></a> </p>

<p>Vin is your 24V from controller, Vout is your Arduino digital 5V input. With that established, use voltage divider formula to calculate R1 and R2 values. I hope you can do that?
That being said, I am disappointed, because I feel like you have put 0 effort into researching this.</p>
