How to connect multiple systems (laptops) to single Arduino

Hi Folks,

I have a requirement for my project, I have to connect multiple laptops to single Arduino. If any laptop gives the signal the Arduino has to perform the respective operation. How can I achieve this?

Thanks in advance.

Regards,
Dileep Kanta B.

A Mega would allow you to monitor 4 Serial inputs. How many laptops do you need to connect ?

Method 1) Ethernet Shield and Ethernet library
Method 2) any Ethernet to serial device in conjuction with an appropriate serial to TTL module

Hi UKHeliBob,

I need to connect 6 laptops minimum to single Arduino.

dileepkantapop:
Hi UKHeliBob,

I need to connect 6 laptops minimum to single Arduino.

Wire or wireless?

wired.

A reasonably simple solution would be to connect each PC to its own Arduino and have those Arduinos communicate with the master Arduino by wireless - such as nRF24L01+ modules which are cheap and reliable.

Have a look at this Simple nRF24L01+ Tutorial.

...R

PS ... I wrote the above while you were writing the previous Reply. IMHO this is a situation where a wireless solution should be simpler.

However if you really do want a wired solution and if you have a USB-TTL converter for each PC then with a few diodes and a resistor you could connect the TTL Rx and Tx signals of all all of them to a single serial port on the Arduino. The problem, however, is to regulate things so only one PC can talk at any one time.

...R

Can we use USB hub, Multiple laptops are connected using USB hub then USB hub is connected to Arduino. I tried this but it's not working.

dileepkantapop:
Can we use USB hub, Multiple laptops are connected using USB hub then USB hub is connected to Arduino. I tried this but it's not working.

No. That is not at all what a USB hub is for.

How can you connect mutliple PCs to the same hub?

...R

Robin2:
A reasonably simple solution would be to connect each PC to its own Arduino and have those Arduinos communicate with the master Arduino by wireless - such as nRF24L01+ modules which are cheap and reliable.

Have a look at this Simple nRF24L01+ Tutorial.

...R

PS ... I wrote the above while you were writing the previous Reply. IMHO this is a situation where a wireless solution should be simpler.

However if you really do want a wired solution and if you have a USB-TTL converter for each PC then with a few diodes and a resistor you could connect the TTL Rx and Tx signals of all all of them to a single serial port on the Arduino. The problem, however, is to regulate things so only one PC can talk at any one time.

...R

dileepkantapop:
Hi UKHeliBob,

I need to connect 6 laptops minimum to single Arduino.

If it is indeed 6 laptops that you are going to communicate with, then I would take up Robin2 advice as you can "easily" create 6 pipes to connect/communicate each PC to the arduino.

you can see and overview of the system here:
nRF24L01 – How It Works, Arduino Interface, Circuits, Codes

if it was 4 or less I would have gone for a MEGA with a USB2UART coverter connected to each serial port.

Robin2:
No. That is not at all what a USB hub is for.

How can you connect mutliple PCs to the same hub?

...R

I have connected using a USB cable to the USB hub from multiple laptops and USB hub main input to the Arduino.

sherzaad:
If it is indeed 6 laptops that you are going to communicate with, then I would take up Robin2 advice as you can "easily" create 6 pipes to connect/communicate each PC to the arduino.

If you study my examples you will see that there is no need to use multiple pipes and also the fact that there are 6 pipes does not limit you to communicating with 6 other nRF24s. Also note that an nRF24 has only a single wireless so it can only receive message at a time - but messages are very quick.

...R

The simplest solution is with RS485.

Computers have an A-type connector; the other side of the cable that fits in there is a (variation of a) B-type. That only fits in one port in the hub.

You must have a very special hub (or it isn't a hub) or hacked your own cables (A-type to A-type) to be able to connect multiple PCs to one hub.

If you want to use USB, for each computer, you will need a USB to I2C module. You will then need to put all the I2C on the I2C bus and use the I2C library.