I need to make Raspberry Pi as my master and communicate with several slave devices (5-6 Attiny2313 in my case) that are kept 20-30 m (65-100 ft) away. Following are the requirements:

  1. cheap (preferably no external hardware)
  2. uses minimum number of wires (preferably two wires)
  3. speed can be very low.. it is not an issue... i just need to turn some devices on and off at the slave end.
  4. reliable over distances of 20-30 m (65-100 ft)

Please suggest me some communication protocol that can handle all these requirements.


I recommend using RS-485. You can attach several devices to one pair of wires with very reasonably-priced hardware, and the interface chips usually include good isolation to prevent ESD problems.

Use the slowest baud rate that is acceptable to the amount of data you need to communicate.

  • 1
    Some details would help: what RS-485 chips work? What kind of wiring? What libraries are there for Raspberry Pi and ATTiny for managing RS-485?
    – scruss
    Feb 15 '14 at 14:35
  • Yes, this is technically an answer, but unless you provide some background details and info on how to program/use it, it requires the OP to do more research, instead of being able to continue on with their project. We are glad you are getting involved, however, this answer could use some work. Mar 16 '14 at 16:25
  • can someone please guide us to some references for using rs485 and Pi May 20 '14 at 4:16

Should be doable with a RF Link Transmitter on the Raspberry Pi and RF Link Receivers on the remote boards. You'll have to use a Manchester encoding library on the Raspberry Pi (like this one [untested]), and a decoding library (like this) on your microcontrollers. Use short messages (say 1 byte address, 1 byte command) and put wire antennae on the transmitters and receivers.

Note that this will send only; you'll have no idea if the microcontrollers have done their job properly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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