A loopback test is a troubleshooting procedure to test the serial communication between the PC and Arduino board with a dedicated USB to Serial converter chip.
Supported boards
- Arduino UNO R3 (and older revisions)
- Arduino UNO R3 SMD
- Arduino Mega2560 Rev3 (and older revisions)
- Arduino Mega ADK Rev3
- Arduino Nano (classic)
What you’ll need
- 2 x female/female jumper cables (or some other way of connecting pins on the board)
- A data USB cable compatible with your board
Performing the test
-
Disconnect the board from your computer or battery.
-
Remove any shield, jumper cables, or other connections to the board.
-
Connect a jumper cable from the RESET pin to any GND pin.
-
Connect a jumper cable from the RX pin to the TX pin.
-
On Mega boards, which have several serial ports, you can use RX0 and TX0.
-
Wiring diagrams for UNO and Nano can be found in Examples.
-
-
Open Arduino IDE or the Cloud Editor.
-
Connect the board to your computer and select it with the Board selector. If your board is an Arduino Nano, you’ll need to manually select “Arduino Nano”. The Board selector is not available in IDE 1 – use the Tools > Port and Tools > Port menu options instead. To learn more, see Select board and port in Arduino IDE.
-
Open the Serial Monitor. If you’re using Arduino IDE, click the
button in the top-right corner, or select Tools > Serial Monitor in the menu bar. If you’re using the Cloud Editor, select Monitor in the sidebar.
-
Enter a message and click Send. Your message should immediately be echoed by the board, and appear in the output field below.
Performing a loopback test in the Arduino IDE serial monitor.
If the loopback test failed
Note
This test will always fail for the CH340 USB to serial chip used on some derivative boards.
A failed loopback test failed indicates that the USB to TTL serial adapter is damaged and that the board should be replaced. Contact us for questions about warranty, or visit the Arduino Store.
If the loopback test passes
A successful loopback test means that the board can communicate with the computer but is unable to upload or run the sketch. This can be the result of a missing or corrupted bootloader. You can burn a new bootloader using another Arduino board as an ISP programmer, see Burn the bootloader on UNO, Mega, and classic Nano using another Arduino.