Use Arduino as USB to TTL: ESP-01, ESP32-CAM and GPS Wiring
Use Arduino as a USB to TTL converter: RESET-to-GND jumper or empty sketch, why TX goes to TX, 5 V vs 3.3 V levels, and wiring for ESP-01, ESP32-CAM and GPS.
When you use an Arduino as a USB to TTL converter, you get the fastest way to send AT commands to an ESP-01, flash an ESP32-CAM or hook a GPS module up to your computer without owning a separate adapter. The Arduino Uno already has a USB-to-serial chip on board; take the main processor out of the picture and that chip can talk to any serial module through pins D0 and D1. With a single jumper wire, your Uno becomes a USB to TTL adapter for as long as you need it.
In this guide you'll learn why the Uno can do this, the RESET-to-GND and empty-sketch methods, and why the wiring is TX to TX and RX to RX, the opposite of what you'd normally expect. Then we cover wiring tables for the ESP-01, ESP32-CAM and NEO-6M GPS, the 5 V vs 3.3 V level warning, SoftwareSerial and hardware serial bridge sketches, and when it's time to switch to a dedicated converter.

Why can an Arduino Uno work as a USB to TTL converter?
An Arduino Uno has two separate chips. The main processor, the ATmega328P, doesn't speak USB; it only talks over two-wire UART serial. The small chip beside the USB socket converts USB data from the computer into a serial signal: on an original Uno R3 it's an ATmega16U2, and on clones it's usually a CH340. This converter's TX and RX lines go both to the 328P and to pins D0 and D1 on the edge of the board. Silence the 328P and only the USB chip is left on the line, so D0 and D1 behave just like the TXD and RXD pins of a stand-alone USB to TTL module.
| Board | USB chip | Use as USB to TTL |
|---|---|---|
| Arduino Uno R3 (genuine) | ATmega16U2 | Yes: RESET to GND or empty sketch |
| Uno and Nano clones | CH340 | Yes: RESET to GND or empty sketch |
| Arduino Nano (genuine, V3) | FT232RL | Yes: RESET to GND or empty sketch |
| Arduino Mega 2560 | ATmega16U2 | Yes; also with a Serial1 bridge sketch |
| Leonardo and Micro | None, the ATmega32U4 has native USB | RESET method doesn't work; needs a Serial1 bridge sketch |
| Uno R4 Minima and WiFi | None, the processor handles USB itself | RESET method doesn't work; needs a Serial1 bridge sketch |
Method 1: connect RESET to GND
The quickest method is to connect the RESET pin on the power header to GND with a jumper wire. As long as RESET is held LOW, the ATmega328P doesn't run and all its pins stay high-impedance, so it drives nothing onto D0 and D1. You don't need to upload anything to the Uno, and it doesn't matter what sketch is on it. When you're done, just pull the wire out and the Uno goes back to running its old sketch. The only drawback is that you can't upload to the Uno while the wire is in place: try it and avrdude throws an error.
Method 2: upload an empty sketch
If you'd rather not use a RESET wire, upload an empty sketch to the Uno (File > Examples > 01.Basics > BareMinimum). Because it never calls Serial.begin(), the 328P's serial unit stays off and D0/D1 sit waiting as inputs.
1// Boş sketch: ATmega328P'nin pinleri giriş olarak kalır, D0/D1 hattı USB yongasına bırakılır
2// Empty sketch: the ATmega328P's pins stay as inputs, leaving D0/D1 to the USB chip
3void setup() {
4}
5
6void loop() {
7}This method has one small side effect: every time you open the Serial Monitor the Uno resets, and the bootloader listens on the serial line for about a second. Data you send to the module during that first second can get mixed up. With RESET to GND the processor is always held, so that never happens, which is why RESET to GND is more reliable when flashing ESP boards.
TX to TX, RX to RX: why is the wiring straight?
Two serial devices are normally wired crossed: one's TX (transmitter) goes to the other's RX (receiver). When you use the Uno as a USB to TTL converter, though, the wiring is straight: the module's TX goes to the Uno's TX (D1) and its RX to the Uno's RX (D0). The reason is that the labels on the board are printed from the ATmega328P's point of view. D1 says "TX" because it's the 328P's output, but that same line is the USB chip's input (RX). Since we bypass the 328P and talk straight to the USB chip, the labels flip. In short, the crossover has already been done inside the board.
| Uno pin | For the ATmega328P | For the USB chip | Connect the module's |
|---|---|---|---|
| D0 (RX) | Input (receiver) | Output (transmitter) | RX (through a divider on 3.3 V modules) |
| D1 (TX) | Output (transmitter) | Input (receiver) | TX |
| GND | Ground | Ground | GND (always shared) |
5 V vs 3.3 V: a level warning
The Arduino Uno runs at 5 V, so the signal its USB chip sends out on D0 is 5 V too. The RX input of the ESP-01, the ESP32-CAM and many GPS modules is meant for 3.3 V and is not officially 5 V tolerant. So use a voltage divider on the line from D0 to the module's RX: put 1 kΩ from D0 to the module's RX and 2 kΩ from the module's RX to GND, and the output is 5 × 2 / (1 + 2) = 3.33 V. You can try other values in the voltage divider tool and read the theory in voltage divider. The other direction needs no divider: the 3.3 V coming from the module's TX is read as HIGH by the USB chip.
AT commands and flashing an ESP-01

| ESP-01 pin | Connect to | Note |
|---|---|---|
| VCC | AMS1117 3.3 V output | The Uno's 3.3 V pin isn't enough |
| GND | GND | Shared with the Uno and the regulator |
| TX (GPIO1) | Uno D1 (TX) | Straight wiring |
| RX (GPIO3) | Uno D0 (RX) | Through a 1 kΩ / 2 kΩ divider |
| CH_PD (EN) | 3.3 V | Directly or through 10 kΩ |
| RST | Floating or 10 kΩ to 3.3 V | Touching it to GND briefly restarts the module |
| GPIO0 | Floating for AT, GND for flashing | Its level at power-up selects the mode |
| Uno RESET | GND | ATmega328P disabled |
- Connect the Uno's RESET pin to GND and wire the ESP-01 as in the table; leave GPIO0 floating.
- In the Arduino IDE, select the Uno's port and open the Serial Monitor at 115200 baud with the line ending set to Both NL & CR.
- Type AT and send it; you should see OK. AT+GMR shows the firmware version. Garbage characters at power-up are normal: the ESP8266 prints its boot message at 74880 baud.
- To upload your own program, connect GPIO0 to GND and restart the module (touch RST to GND briefly, or cut and restore the power). Choose Generic ESP8266 Module under Tools > Board, select the Uno's port and upload.
- When the upload finishes, disconnect GPIO0 from GND and restart the module; your program starts running.
This setup is for trying the module straight from your computer. If you'll use the ESP-01 permanently in an Arduino project, the Uno doesn't act as a converter but as the board that drives the module over SoftwareSerial; the full AT command list, a web server example and pin details are in the ESP-01 module guide.
Uploading code to an ESP32-CAM with an Arduino Uno

| ESP32-CAM pin | Arduino Uno | Note |
|---|---|---|
| 5V | 5V | Powers the board |
| GND | GND | Shared ground |
| U0T (GPIO 1) | D1 (TX) | Straight wiring |
| U0R (GPIO 3) | D0 (RX) | Through a 1 kΩ / 2 kΩ divider |
| IO0 | GND | Only while uploading |
| Uno RESET | GND | ATmega328P disabled |
- In the Arduino IDE, choose AI Thinker ESP32-CAM under Tools > Board; if there's an Upload Speed option, set it to 115200, the most stable speed through an Uno.
- Connect IO0 to GND and press the RST button on the back of the ESP32-CAM once; the board enters download mode.
- Click Upload. If the Connecting.... line keeps growing in the output, press RST once more.
- When you see "Hard resetting via RTS pin", the upload is done. Remove the IO0 wire and press RST again.
- Open the Serial Monitor at 115200 baud; you'll see the board's boot messages and the IP address printed by the camera example.
On a dedicated converter, the DTR and RTS lines put ESP boards into download mode automatically; through an Uno those lines never reach the board, so you handle IO0 and RST by hand. The camera and Wi-Fi together draw short current peaks, so if you see "Brownout detector was triggered", power the board from a separate 5 V 2 A adapter and join the grounds; fixes are in ESP32 brownout. For every connection error see ESP32 failed to connect, and for the board itself how to use the ESP32-CAM.
Connecting a GPS module to your computer (NEO-6M)
One of the nicest things about using the Uno as a converter is watching a GPS module's raw data straight on your computer. Connect the NEO-6M's TX to the Uno's D1 (TX) and its RX through the divider to D0 (RX), power the module from 5V and pull RESET to GND. Open the Serial Monitor at 9600 baud and you'll see NMEA sentences starting with $GPGGA, $GPRMC and $GPGSV streaming in once a second. Better still, u-center, u-blox's Windows program, can connect to the Uno's COM port at 9600 baud and show the satellites on a sky map; there you can change the module's update rate or baud rate and save it permanently. Using the module from Arduino code is covered in NEO-6M GPS module.
Method 3: a SoftwareSerial bridge (crossed wiring)
Sometimes you don't want the Uno silent but in the middle: the module runs at a different speed from the Serial Monitor, you want to leave D0/D1 unused, or you want to filter the incoming data. In that case you upload a small bridge sketch to the Uno and wire the module crossed to other pins: the GPS TX goes to D4 and its RX, through the divider, to D3. The sketch passes every byte from the module to the computer and every byte from the computer to the module. SoftwareSerial is reliable on the Uno up to 38400–57600 baud; at the ESP-01's 115200 it drops bytes. So before using an ESP-01 this way, send AT+UART_DEF=9600,8,1,0,0 with Method 1 to lower its speed to 9600 permanently. You can't flash ESP boards through this bridge.
1// SoftwareSerial köprüsü: modül <-> Arduino Uno <-> bilgisayar (çapraz bağlantı)
2// SoftwareSerial bridge: module <-> Arduino Uno <-> PC (crossed wiring)
3#include <SoftwareSerial.h>
4
5const long PC_BAUD = 115200; // Seri Monitör hızı / Serial Monitor speed
6const long MODULE_BAUD = 9600; // NEO-6M: 9600; ESP-01'i önce 9600'e indir / lower an ESP-01 to 9600 first
7
8SoftwareSerial module(4, 3); // RX = D4 (modülün TX'i), TX = D3 (modülün RX'i, 1k/2k bölücüyle)
9 // RX = D4 (module TX), TX = D3 (module RX, via 1k/2k divider)
10
11void setup() {
12 Serial.begin(PC_BAUD);
13 module.begin(MODULE_BAUD);
14 Serial.println(F("Kopru hazir / Bridge ready"));
15}
16
17void loop() {
18 if (module.available()) Serial.write(module.read()); // modülden bilgisayara / module to PC
19 if (Serial.available()) module.write(Serial.read()); // bilgisayardan modüle / PC to module
20}On the Leonardo, Micro and Uno R4, USB is built into the processor, so the RESET-to-GND method doesn't help; but D0 and D1 on these boards carry a second hardware serial port (Serial1) that's independent of the computer. On the Arduino Mega, Serial1 is on pins 19 (RX1) and 18 (TX1). The bridge sketch below runs on these boards without SoftwareSerial's speed limit; the wiring is crossed again, and the divider rule for 3.3 V modules still applies.
1// Donanım seri köprüsü: Leonardo, Micro, Mega 2560 ve Uno R4 için (Serial <-> Serial1)
2// Hardware serial bridge for Leonardo, Micro, Mega 2560 and Uno R4 (Serial <-> Serial1)
3const long MODULE_BAUD = 115200; // ESP-01 AT yazılımı çoğu zaman 115200 / ESP-01 AT firmware is usually 115200
4
5void setup() {
6 Serial.begin(115200); // USB tarafı / USB side
7 Serial1.begin(MODULE_BAUD); // Leonardo ve Uno R4: D0/D1, Mega: 19 (RX1) ve 18 (TX1)
8}
9
10void loop() {
11 while (Serial1.available()) Serial.write(Serial1.read()); // modülden bilgisayara / module to PC
12 while (Serial.available()) Serial1.write(Serial.read()); // bilgisayardan modüle / PC to module
13}Which method when? Switching to a dedicated converter
| Method | Wiring | Practical speed | Flashing ESP boards | Note |
|---|---|---|---|---|
| RESET-to-GND jumper | Straight (TX-TX, RX-RX) | 115200 and up | Yes, IO0 and RST by hand | Quickest setup, no upload needed |
| Empty sketch | Straight | 115200 and up | Yes, IO0 and RST by hand | Bootloader listens for 1 s when the port opens |
| SoftwareSerial bridge | Crossed, D3/D4 | 38400–57600 | No | The Uno can run its own code too |
| Serial1 bridge (Leonardo, Mega, R4) | Crossed | 115200 and up | Not recommended | The board's second hardware port |
| Dedicated CH340 or CP2102 module | Crossed | Up to 921600 | Yes, automatic via DTR/RTS | 3.3 V option, the most reliable route |
An Uno-based converter is perfect for a one-off test, rescuing a misbehaving module or exploring a GPS over a weekend. But if you flash ESP boards often, want a 3.3 V logic line without fiddling with dividers, want uploads to start on their own via DTR and RTS, or need the Uno for another project, it's time to buy a dedicated USB to TTL module. CH340 and CP2102 modules are very cheap, most have a 3.3 V / 5 V selection jumper, and there are ready-made programming boards for the ESP32-CAM too. For choosing one see USB to TTL converter, and for driver problems how to install the CH340 driver.
Common mistakes and how to fix them
| Symptom | Likely cause | Fix |
|---|---|---|
| Serial Monitor stays completely empty | The wiring is crossed, or GND isn't shared | With RESET to GND, connect TX to TX and RX to RX; join the grounds |
| Garbage characters | The baud rate doesn't match the module | ESP-01 AT 115200 (older modules 9600), ESP8266 boot 74880, ESP32 115200, NEO-6M 9600 |
| I type AT but get no reply | Wrong line ending setting | Choose Both NL & CR in the Serial Monitor |
| The ESP-01 keeps resetting | The Uno's 3.3 V pin can't supply the current | A separate 3.3 V supply with an AMS1117 and a 100–470 µF capacitor next to the module |
| Failed to connect to ESP32 (No serial data received) | IO0 isn't at GND or RST wasn't pressed | Connect IO0 to GND and press RST; press it again during Connecting... if needed |
| avrdude error when uploading to the Uno | The RESET-to-GND wire is still in, or a module is on D0/D1 | Remove the wire and the module, then upload |
| The ESP32-CAM doesn't run after uploading | IO0 is still at GND, so the board waits in download mode | Remove the IO0 wire and press RST |
Using the Uno as a USB to TTL converter is also the best way to understand how UART works; once you see why TX and RX are crossed, most serial communication problems solve themselves. For the basics, see UART serial communication. With the one-way and two-way serial communication projects between two Arduinos in the BlueGrays app, you can try the same idea step by step with circuit diagrams and commented code.
Frequently asked questions
Can using an Arduino as a USB to TTL converter damage it?
Not if you do it right. Tying RESET to GND only holds the processor, and the board runs normally once the wire is removed. The real risk is sending 5 V into 3.3 V modules, so use a divider on the line from D0 to the module's RX and never put 5 V on an ESP module's VCC pin.
Why does TX connect to TX when using Arduino as USB to TTL?
The TX and RX labels on the board are written for the ATmega328P. When you bypass the processor and use the USB chip directly, the D1 (TX) line is actually the USB chip's receiver and D0 (RX) its transmitter. So the module's TX goes to D1 and its RX to D0; the crossover is already done inside the board.
Can an Arduino Nano be used as a USB to TTL converter?
Yes. CH340 clone Nanos and genuine FT232RL Nanos work just like the Uno: connect RESET to GND or upload an empty sketch, and wire the module straight to D0 and D1. The 5 V logic and divider rule for 3.3 V modules is the same on the Nano.
Can I upload code to an ESP32-CAM with an Arduino Uno?
Yes. With RESET tied to GND, connect the Uno's D1 to the ESP32-CAM's U0T and D0 through a divider to U0R, power the board from 5V, pull IO0 to GND and press RST. There are no auto-reset lines, so you enter download mode by hand; setting the upload speed to 115200 keeps the link stable.
Can an Arduino Leonardo or Uno R4 be used as USB to TTL?
Not with the RESET-to-GND method, because these boards have no separate USB-to-serial chip; USB lives inside the processor. Instead, upload a small bridge sketch that uses the Serial1 port on D0 and D1. With that sketch the wiring is crossed and it works fine at 115200 baud.
Which baud rate should I pick in the Serial Monitor?
Pick whatever speed the module talks at. The ESP-01's AT firmware usually uses 115200 baud, ESP8266 boot messages come at 74880, the ESP32 at 115200 and the NEO-6M GPS at 9600 baud. An HC-05 Bluetooth module expects 38400 baud in AT mode.
Projects to build after reading this
See all projects
LED Blink
The very first hello of electronics: switching a single LED on and off. The Arduino turns the LED on and off at short intervals, so the light blinks quickly.

HC-SR04 Distance Measurement (Serial Display)
The HC-SR04 sensor works just like a bat finding its way in the dark: it sends out a sound you cannot hear, listens for the echo and measures how far away the object in front of it is.

Temperature and Humidity with DHT11
How warm is your room, and is the air humid or dry? The DHT11 sensor measures temperature and humidity, and the Arduino writes the values on a two-line LCD screen, refreshing every couple of seconds.

LED Blink with ESP32
Teaches basic GPIO output usage with ESP32. We achieve a blinking effect by turning an LED on and off from a digital pin. ESP32 version of the classic blink project on Arduino UNO; the basic blink commands in the Arduino environment are the same, but the ESP32's pin layout and 3.3 V GPIO levels differ from those of the Arduino UNO.

One-Way Communication Between 2 Arduinos
You get two Arduinos talking over a single wire: press the button on one and the LED on the other lights up, press it again and it goes off.

Two-Way Communication Between 2 Arduinos
Two Arduinos are wired together and talk to each other: press the button on one and the light on the other comes on, press it again and it goes off.

Control an LED from Your Phone via Bluetooth
A small rehearsal for switching the lights in your room on and off from your phone.

ESP32 Wi-Fi STA Connection (with LCD Screen)
In this project, we connect the ESP32 to the home Wi-Fi network in Station (STA) mode in a secure, fault-tolerant manner. We store the SSID and password in a separate secrets.h file to prevent leaking to Git, set up an auto-reconnect mechanism, and display the RSSI signal level and IP address on an I2C LCD screen. The internal LED works as a status indicator. It is a production-grade connection manager.
More articles
BlueGrays app
Build this circuit step by step on your phone
Wiring diagram, code and parts list on one screen. 500+ Arduino, ESP32 and Pico projects ready to build.
Scan with your phone
Point your camera at the code and your phone's app store opens.
or open the store

