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
24,441
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
24,441
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.
 

prezzo

Joined Sep 23, 2020
21
Hi
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.
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.
Hi Mr Chips Im new here and dont know how to ask you a question direct and not on someone elses thread I am tring to acheive something similar connecting a pi to the pcb board on my Slave jukebox Pcb and do apologises I am not trying to hijack Regards Paul
 

MrChips

Joined Oct 2, 2009
24,441
Hi Mr Chips Im new here and dont know how to ask you a question direct and not on someone elses thread I am tring to acheive something similar connecting a pi to the pcb board on my Slave jukebox Pcb and do apologises I am not trying to hijack Regards Paul
Hi Paul
Simple. Start a new thread. If you are not sure which forum to place the thread, put it in General Electronics Chat. We can move it afterwards. If it is microcontroller related then put it in Microcontrollers.

Use a thread title that gives the reader some idea of what the content is about.
 

prezzo

Joined Sep 23, 2020
21
Hi Paul
Simple. Start a new thread. If you are not sure which forum to place the thread, put it in General Electronics Chat. We can move it afterwards. If it is microcontroller related then put it in Microcontrollers.

Use a thread title that gives the reader some idea of what the content is about.
Thank you
 

ronsimpson

Joined Oct 7, 2019
1,548
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.
If you are making your own network, you might want a address like "0" which goes to all slaves. Example: "reset". Then addresses 1-250 go to a single slave.
 

prezzo

Joined Sep 23, 2020
21
Thanks for the reply Mr chips
I am just beginning to learn circuitry so have I gone about it the correct way ?
and should my friend understand what is required ?
this project has facinated me and intend to learn programming in my spare time
this forum is great and has so many interesting subjects

Paul
 

MrChips

Joined Oct 2, 2009
24,441
Thanks for the reply Mr chips
I am just beginning to learn circuitry so have I gone about it the correct way ?
and should my friend understand what is required ?
this project has facinated me and intend to learn programming in my spare time
this forum is great and has so many interesting subjects

Paul
Hi Paul,
I suggest that you start a new thread.
 

John P

Joined Oct 14, 2008
1,914
If the range is very short, then I2C should work. The advantage that it would have versus anything UART-based is that the hardware and software are likely to be built into the processors, and all the user would have to do is connect the wires between them. Or SPI should work too, if it's possible to have a separate enable line for each slave.
 
Top