Two Arduinos / One RX

I am trying to see if this is possible. I have seen many examples of two communicating to each other, but I need something slightly different.

I have one Arduino Uno V3 with a Protoneer CNC shield connected to the computer via USB. I would like to see if it is possible to have a second Uno listen to the data being sent to the first.

Basically, I would like the second Uno to listen to the GRBL data being sent to the first and process it on its own. Something like having both connected to the same RX...

I'd try to just Y the serial connection from the sender to the receivers and see how that goes.

There are just two Unos. One receives grbl data through USB. How can I get the second Uno to listen to the same data?

Oh my bad, I got stuck on to word serial and thought 2 TTL serial devices.

I take you want to 2 devices to receive the data at the 'same' time?

If the data receipt to the 2nd Uno can be delayed slightly the first Uno could retransmit the data to the 2nd Uno using software serial.

I don't think I have memory or pins left on the first though....

That would have been useful information in post#1.

A variation on the Y lead, but you may be able to listen to what UNO #1 is receiving on UNO #2 by connecting the 2 Rx pins together - pin 0. I think there may be a resistor in the serial line between the 328P and the on-board USB-Serial chip so you could "over-ride" the USB-Serial on the second UNO.

That was my first thought, but you lost me on the resistor part...

My only worry is if they need to send back any type of confirmation in order to receive the data.

They don't need to "talk" to each other, they just both need to receive the same grbl data being sent to the first UNO over the USB connection from the PC.

I just checked, and on a genuine UNO, there are 1K resistors fitted in the Rx and Tx lines from the on-board USB-Serial interface.

If you connect the 2 Rx lines using a jumper wure, then UNO #2 will hear everything that UNO #1 receives from your host PC.

Your UNO #1 will work as normal and interact with the host PC.

Remember that UNO #2 has to keep up with UNO #1 as it can only receive data, effectively just monitoring the serial stream.

You can have multiple RX, but only one TX.

The Uno has onboard USB to TTL Serial (the ATMega16U2 on official boards, usually a dedicated USB to Serial on clones) that drives RX on the ATMega328 through a 1k Ohm resistor. The resistor is so an external serial driver on the TX I/O pin "wins" when both the onboard USB to Serial and the external are connected.

Thus you can't just tie the TX I/O pins on the two boards together because their respective USB to Serial drivers will be competing, both through their 1k Ohm resistor.

You could bypass the resistor on the board actually receiving USB data by wiring to a test point or jumpering around the resistor.

I think, but haven't tried this, one can jumper pins 5 & 6 on the ICSP1 connector to hold the "RESET2" net low to disable the USB to Serial on the "listen only" Uno. Then one would just connect the TX I/O pins.

I think you understand what I'm trying to do.

Do you think tying the two RX will work.

UNO#1:
Connected with CNC shield and USB to PC. Processes grbl data being sent via ugrbl sender through USB and processes data through the CNC shield and motors.

UNO#2:
Listens to data being sent to UNO#1 and writes simple strings to LCD display. No manipulation just echos GRBL to LCD display.

I think I would need to check and see if the CNC shield is using those pins but the TX on the second UNO would not ever need to send anything back to the first UNO.

They just both need to receive the data being sent to the first UNO via the USB.

I don't know enough about GRBL to know how frequently the instructions are sent. The issue may be with how quickly you can write the GRBL instructions received by UNO #2 to your LCD.

It's possible that you may get a bunch of instructions very quickly and then a pause. If that's the case, then you may need to put your received instructions into a queue for writing to the LCD on UNO #2 and hope that the queue doesn't fill up.

Give it a try and see.

The CNC shield is on the USB-connected device, no?

What I'm suggesting is holding the USB to serial device on the non-USB-connected Uno in the reset state so it doesn't compete with the output from the other Uno when the RX pins are tied together.

The ISCP1 connector is used to flash the ATMega16U2 on a genuine Arduino. I'd be really surprised if any shield tried to use it.

Thanks, I'll make sure to add that in.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.