maximum cable lenght for arduino

hello i have some problem with arduino,
i would like connect with arduino digital pin a sensor with 100ma and 5v but arduino digital pin is 40ma .what can i do for this? i use this sensor http://www.geeetech.com/index.php?main_page=product_info&cPath=13&products_id=205
the second question is: i would like use 5 cable with arduino and sensor. and i ask if i use line driver for this connection,and who is the maximun cable length with arduino digital pin and sensor?
also can i put the 5v and gnd in 5v 5A Power Supply?
i put 16 sensor in the arduino.
and the end i would like a schematic for optocoupler because i would like this in digital pin

sorry . but i dont know very good english, because i am from greece.

thank you very much.

The 5vdc current requirement is as you said 100ma, so this cannot be supplied by a output pin but rather directly from a +5vdc power source, like even the arduino +5vdc pin. The digital output of the sensor is a open collector type that needs to be wired to a digital input pin with either an external pull-up resistor or with the internal pull-up for the pin enabled by software. The signal will go low when the sensor sees something within it's sensing range, and high if nothing is seem.

If you want to control the +5vdc power to the sensor to save power consumtion until your program wants to activate the sensor then possible a simple relay could route +5vdc power to the sensor through the relay contacts.

Because the sensor is a simple on and off signal and not likely subject to high frequency switching, I would think you could run better then 50 feet or better without needing any special driver/receiver chips for the signal line.

Hope that helps.

Lefty

retrolefty:
The 5vdc current requirement is as you said 100ma, so this cannot be supplied by a output pin but rather directly from a +5vdc power source, like even the arduino +5vdc pin. The digital output of the sensor is a open collector type that needs to be wired to a digital input pin with either an external pull-up resistor or with the internal pull-up for the pin enabled by software. The signal will go low when the sensor sees something within it's sensing range, and high if nothing is seem.

If you want to control the +5vdc power to the sensor to save power consumtion until your program wants to activate the sensor then possible a simple relay could route +5vdc power to the sensor through the relay contacts.

Because the sensor is a simple on and off signal and not likely subject to high frequency switching, I would think you could run better then 50 feet or better without needing any special driver/receiver chips for the signal line.

Hope that helps.

Lefty

To add onto Lefty, the cable length will be regulated by the 5 volt, 100ma requirement. V/I = R; 5V / 100ma = 50 ohms. So anything up to 50 ohms round-trip is allowable, technically.

So yea, safe to rule out cable distance, for small distances.

24ga is 0.02567 ohms per foot = 2000 feet
22ga is 0.01614 ohms per foot = 3100 feet
20ga is 0.01015 ohms per foot = 4900 feet

i would like connect this product one per pin digital.