0

I want to build a project that contains multiple Arduino nano's, each connected to one controlling Raspberry Pi. I would like to send one signal (a string of characters or numbers) which would be the master state, which the other Arduinos would react to based on their programming. What is the best way to do this?

Can the Arduino support a protocol for this, or will it need additional hardware?

Max distance: 30 meters

9
  • Interesting. is RS485 bus the way to go? Looks like it needs extra hardware.
    – Hoytman
    Commented Sep 5, 2015 at 4:08
  • Yes, but the extra hardware is pretty trivial. I read recently (I can try to find the reference) that RS232 (normal serial) was not intended for long runs. In any case a Nano is 5V signal, not even RS232.
    – Nick Gammon
    Commented Sep 5, 2015 at 4:59
  • Perhaps there is a better solution
    – Hoytman
    Commented Sep 5, 2015 at 15:53
  • Perhaps, but I2C and SPI are designed for even shorter cable runs. Serial is probably the most reliable, but the voltage drop over 30 m, plus noise picked up, is likely to make it unreliable. You could get one of those cheap radio transmitters, but that again is extra hardware.
    – Nick Gammon
    Commented Sep 5, 2015 at 21:10

1 Answer 1

1

Rule 1 do not connect Arduino pins to long wires.

You can achieve your your goal in many ways, a serial interface looks good from here. I am doing it with a RS485 interface, note it is an interface not a protocol. You can use CAN, Wi-fi and many others. It sounds like all the units except 1 will be receiving data, the other is transmitting it to the other devices. RS485 will work good and it needs only 5V. It will work over several thousand feet and some reasonable speeds. You can use a UART either hardware or software to accomplish the task with a RS-485 driver at each node. You need to remember you need to wire from point to point with the terminating resistors only on the end nodes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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