Hello every one, i have a task to read Siemens logo 12/24Rco relay status using raspberry pi. The logo is place 3m away from raspberry pi. One option is to connect GPIO pin by pullup resistor but Vcc for pin is 3.3V and there may be some voltage drop occur as logo place 3m away from pi.
It shouldn't be a problem.
The resistance of 6m of wire (3m x 2) is very low compared to 10K so the voltage will go from almost 3.3V to almost zero when the relay operates.
If noise pick-up is a problem, add a resistor of say 100 Ohms in series with the relay contacts and add a capacitor from 'GPIO IN' to ground at the pi end of the cable. I would suggest 100nF as a good value and do not go more than about 1uF.
It shouldn't be a problem.
The resistance of 6m of wire (3m x 2) is very low compared to 10K so the voltage will go from almost 3.3V to almost zero when the relay operates.
If noise pick-up is a problem, add a resistor of say 100 Ohms in series with the relay contacts and add a capacitor from 'GPIO IN' to ground at the pi end of the cable. I would suggest 100nF as a good value and do not go more than about 1uF.
It depends on where the cable has to run. If it passes places where it is likely to pick up strong interference it would be best to use a shielded cable but otherwise any cable that has sufficient insulation to protect against outside voltages should be OK. The current is very small so you could use thin (7/.02) hook-up wire for example. If you use two separate wires, twist them loosely as this will help to reduce noise pick-up.
In one job I did, the switch contacts were nearly 100m away and it still worked fine.
Here my recommendation to improve it:
* switch 24V.
* feed the switched 24V through the cable to the raspberry (this improves signal to noise ratio)
* use a resistive voltage divider to get valid raspberry input levels (maybe 10k /1k, this reduces RPi input signal impedance)
* use a capacitor at the RPi input to suppress noise
* use two diodes for RPi input protection.
... but be careful that the ground on the Pi is at the same potential as the ground on the 24V supply. Under no circumstances should you use the potential divider method if the relay is powered from equipment that is not isolated from the AC mains. The relay method provides voltaic isolation, if it's there for a reason I would stay with plan 'A'.