1
\$\begingroup\$

I've got two Arduinos. One connected via USB to a PC, then another with its RX connected to the RX of the first Arduino. Both have a common ground through through the USB and another wire connecting the two grounds together.

Basically I want to send serial via one USB connection, but have two Arduinos receive the the same message.

I thought I could connect both RX pins together, meaning the FTDI chip sends the data to both Arduinos.

But when I connect the two RX together, only the second Arduino gets the message, like it absorbs the signal.

Question: Is there a simple way to get one usb cable to talk to 2 Arduinos without modifying the firmware of the first Arduino?

Edit: Both are Arduino UNO

\$\endgroup\$
4
  • \$\begingroup\$ Could you say which arduino you're speaking about? There are many models. \$\endgroup\$
    – jonathanjo
    Nov 27, 2023 at 15:22
  • \$\begingroup\$ It should work. But we don't know what you are doing and how. Maybe one Arduino is 3.3V device, and other is a 5V device, and there is a 5V output signal. If so, it obviously does not work. You can't arbitrarily connect random signal voltages together and expect them to work. \$\endgroup\$
    – Justme
    Nov 27, 2023 at 15:58
  • \$\begingroup\$ @jonathanjo Updated the question. No both 5v. TX works fine, if I go RX to TX I can see the messages the first Arduino is sending to back through USB, but RX to RX is a no go \$\endgroup\$ Nov 27, 2023 at 16:10
  • \$\begingroup\$ @JamesWilliams So are you using the same RX pin that is still connected to USB UART TXD? You can't connect two outputs together. \$\endgroup\$
    – Justme
    Nov 27, 2023 at 17:17

1 Answer 1

1
\$\begingroup\$

If you look at the circuit diagram of the Uno and strip out everything except the portion connecting the serial output of U3 (another ATMega, actually, not a FTDI chip) to the RXD of the CPU ZIC1, you have the circuit shown below. With your link between the two RXD lines.

You see that you have two outputs (PD3 of the two U3s) joined by 2K resistance; you can't have two outputs joined together. They then feed the two PD0 inputs (aka RXD).

Fundamentally, you have to avoid the two-outputs-joined situation.

Your choices, without changing the firmware of Arduino A:

  1. Disconnect: Cut the track on Arduino B so its U3-PD3 isn't connected to anything (which means you won't be able to program it through the bootloader, only the ISP socket)
  2. Avoid Use software serial on Arduino B (ie, a different pin, not PD0), which requires changing the software of B, and would have a limit on the baud rate.
  3. Not an Output Hold Arduino B's U3 in reset, which will make all its outputs high-impedance. You could do this by holding RESET2 to GND, such as by shorting pins 5 and 6 of ISP1, perhaps with a removable connector. enter image description here
\$\endgroup\$
2
  • \$\begingroup\$ Software serial sounds like a good plan will give that a go. Thank you \$\endgroup\$ Nov 28, 2023 at 11:07
  • \$\begingroup\$ @JamesWilliams I was looking at the circuit diagram again, looks like you could hold U3 in reset, then its PD3 won't be an output. This is certainly the easiest to try, and then no code changes; also if your serial rate is too high for software serial. \$\endgroup\$
    – jonathanjo
    Nov 28, 2023 at 11:46

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.