5

I'm trying out computer to computer serial communication using 2 Arduino Unos (both connected to different computers). Right now, I use the Software Serial library, which redirects data from the SoftwareSerial ports to the hardware Serial (over USB to the PC).

Is there any way to bypass the 328p chip, and only use the 16U2, which works as a USB to Serial converter? Will the circuit in the diagram work? By connecting the GND to RST on both the Unos, the 328p gets disabled, which in theory should all me to directly tap into the serial line of the 16U2.

Circuit

7
  • Have you tried it?
    – Majenko
    Mar 28, 2017 at 8:48
  • Just tried it, it works fine. Tried 1 mega-baud, but there were a few errors
    – Carl
    Mar 28, 2017 at 9:02
  • That's to be expected.
    – Majenko
    Mar 28, 2017 at 9:06
  • I'd probably add some resistors in between, in case the ground potential of both PC is a bit off. Not sure if this adequate, or if this is even a problem to begin with.
    – Gerben
    Mar 28, 2017 at 9:29
  • i don't think you want a resistor on the ground, if that's what you're getting at...
    – dandavis
    Mar 28, 2017 at 11:42

2 Answers 2

1

As per your diagram, ground the reset pin on both Arduinos and connect TX to RX on the one to RX to TX on the other. Alternatively, if your Unos have a socketed 328P, you can remove it.

(This answer summarized from the comments above in order to take it off the "unanswered" list.)

0

The circuit you have drawn will work for PC to PC coms. Essentially your connection diagram looks like this:

PC1 -(USB)- Arduino1 -(TTL serial)- Arduino2 -(USB)- PC2

To answer your second question, you can bypass the 328p chip by removing them both as they are not needed. The 16U2 converts the USB to TTL serial which it provides to the Arduino on pins 0 and 1. Since the ATmega328p microcontrollers aren't being used (ie in reset state) then you may as well remove them and use them on another project.

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.