If my sensor is outside my house and I want to keep my Raspberry Pi inside the house, how do I connect them? If it is near the sensor I can connect them using jumper wires, but how to connect them using normal line wires?

  • What is the problem that you're facing? Did you connect the sensor and it doesn't work? Or you can't figure out how to mechanically attach longer wires? Or you don't have any wires and want to buy some? Jul 2 '18 at 12:41
  • I am asking whether longer line wires will work or will there be loss of data? @DmitryGrigoryev Jul 2 '18 at 15:02

There are small wireless boards, that provide TTL-level serial interface and can be connected to your RPi and whatever you use at home, your programs just send the data as over wired serial connection, but you don't need actual wires for that to work. Connection speed 9600bps can work as far as 100m, I have managed to lower the data rate down to 1200bps and improve range to a few kilometers.

The record was 60km with Yagi antenna =)

  • Can you post a link where I can buy them? Jul 1 '18 at 13:12
  • @ShreyasMishra ebay.com and search for "ttl serial wireless module"?
    – lenik
    Jul 1 '18 at 15:32
  • That will need electronics, at both ends. Jul 2 '18 at 22:54

There will be a voltage drop over long cables. Therefore you need to make your sensors work in a current mode, and ensure that you have enough voltage to drive them.

I would build an op-amp circuit or long tail pair transistor circuit. You will keep all components in side, except the sensor, and some of the cable.

Not the answer you're looking for? Browse other questions tagged or ask your own question.