1

People often use Arduinos to send data over serial to other peripherals (flashing firmware onto modules, etc) by pulling RES to ground, connecting the TX and RX pins to the device being programmed, and then sending data to the Arduino over serial. As an alternative, one could also remove the ATmega instead of grounding RES.

That being said, there should be no reason why one could not receive data from a connected device in the same way. However, no matter what I try, I never succeed in using an Arduino to relay serial input from another device over USB.

I have even tried setting up a simple echo to no avail (even though the TX and RX LEDs flash):enter image description here

Is it even possible?

  • 1
    When you program a device in the way you suggest data is already flowing in both directions. That is why you have to connect both TX and RX to the other device. There must be something fundamentally wrong with your setup for your loopback test to fail. – Majenko Jul 30 '17 at 20:24
  • @Majenko I am using Arduino's own serial monitor and have an Arduino Nano/Uno (tried both) connected to my computer, with the RESET pin being pulled to ground, and TX connected to RX. Sound alright? – DividedByZero Jul 30 '17 at 20:32
  • @Majenko I have also tried this with another laptop, and different serial monitors (picocom, minicom and screen) – DividedByZero Jul 30 '17 at 20:40
  • 1
    Well, I just replicated the circuit you show above and used minicom and it worked perfectly. – Majenko Jul 30 '17 at 20:54
  • 1
    @Majenko Yep. Strangely, when I connect another Arduino that is outputting something to serial, I can get this to work.. But the loopback still doesn't work... – DividedByZero Jul 30 '17 at 21:03
1

Yes, it can, and the wiring diagram you have drawn works perfectly for me using minicom in Ubuntu.

The majority of serial communication is bi-directional anyway - especially when using it to program a device.

There is absolutely no difference between interfacing the built-in USB->UART adaptor to an external device of your choice and interfacing it with the ATMega328P chip. Just because the ATMega328P chip is on the same board doesn't make it in any way special - it is just a UART interfaced device.

If your setup is not working you can try:

  1. Physically remove the ATMega328P chip to see if that is interfering even when held in reset
  2. Check for software that may be interfering with your communication, such as the notorious ModemManager.
  • I have tried removing the ATMega from the Uno, and also tried using a Windows laptop. That being said, however, you have answered my question, so I will accept this as an answer. Troubleshooting my issue seems off topic for this site. – DividedByZero Jul 30 '17 at 23:26
  • Maybe your wires are not working right. – Majenko Jul 30 '17 at 23:27
  • Hmm, the wires work fine when the serial in is coming from another Arduino (running a sketch) – DividedByZero Jul 30 '17 at 23:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.