Hi i'm building this elevator system, and as safety precautions im using two infrared sensors at bottom and top, when i use sensor very close to arduino it works fine but when i extend the distance with long wiring, i cant get healthy results, it acts like it sees something when it doesnt.
My guesses are:
long wiring caused either too much noise or high resistance prevents it working right.
supplying it from arduino from 10 meters maybe not a good idea?
wires are too thin or not shielded so signals are not protected.
A <=5cm distance sensor (PWM output) as end stop for an elevator seems strange.
It seems you don’t need additional parts for this sensor.
Coudn’t find anything in the datasheet of the sensor of it’s output drive capacity (current).
I would try Cat-6 wire (low capacitance), and run output and ground on one pair.
5volt on a second pair, and ground on the remaining two pairs.
This sensor pulses ~70mA through the IR LED.
An electrolytic cap (~470uF) from +5volt to ground at the sensor end might help smooth the supply.