Ways to connect Master Pi and Slave Pi ?

Thread Starter

vgmenaka

Joined Sep 11, 2020
2
Hi,

I am planning to connect 3 Raspberry pi and 2 Arduino. One is Master pi and the other two pi's are the slave.
Slave Pi’s and Arduino's are connected to sensors. Master Pi should connect with the router via LAN.

I want to control the slave pi's and Arduino's via master pi and get the data's from the slave and update the phpMyAdmin database.

So I need both way communication between master pi and the slave pi's and Arduino's

Could you please suggest the ways to connect the master pi and slave pi's and Ardunio with pros and cons?

Please find the attached picture for a better understanding.
 

Attachments

MrChips

Joined Oct 2, 2009
21,842
Welcome to AAC.

What is the maximum distance between computers?
My preferred method would be a single RS-485 bus. If all the slaves are within 1 metre of the master then a single-wire half-duplex bus with TTL levels using UART will work.
 

Thread Starter

vgmenaka

Joined Sep 11, 2020
2
Hi,
Thanks a lot for your reply
Yes . Master and slaves within 1 meter only. Could you please explain more about the single-wire half-duplex bus with TTL levels using UART will work.?
 

MrChips

Joined Oct 2, 2009
21,842
The actual physical connection is not important since it can be implemented in many different ways. The important part is the communication protocol.

All transmission uses 8-bit serial UART format, with or without parity.
In a master-slave bus system the master is in control. The master initiates the process. Only a slave with the correct address is allowed to respond. Every message from the master has a slave address, command, data, checksum.
 
Top