Description
CH340 Programming Adapter for ESP32-CAM
This adapter is designed for ESP32-CAM development boards. Its CH340G USB-to-serial converter provides USB-to-UART communication and 5V power through a micro-USB port. The onboard regulator supplies 3.3V to the board. DTR and RTS signals support automatic reset and boot mode during uploads, so a separate FTDI adapter is not required for the listed setup.
Specifications listed
- Compatibility: AI-Thinker ESP32-CAM and compatible clones
- USB connector: micro-USB; CH340G USB 2.0 full-speed interface
- Input power: 5V USB; onboard regulation to 3.3V
- USB-to-UART converter: CH340/CH340G
- Control signals: DTR and RTS for auto-reset and auto-boot
How it works
The adapter mounts onto the ESP32-CAM header. The CH340G converts USB to UART; DTR and RTS can switch the ESP32-CAM between normal operation and flashing mode during an upload.
Applications
- IoT prototyping and connected-camera development
- Firmware uploads, testing and debugging
- Learning ESP32 and embedded vision
Pinout
The adapter has a six-pin connector aligned with the ESP32-CAM header. The listed connections are:
- 5V → ESP32-CAM 5V
- GND → Ground
- TXD (CH340) → ESP32-CAM RX (GPIO 3)
- RXD (CH340) → ESP32-CAM TX (GPIO 1)
- IO0 → Pull to ground to enter flashing mode, using a button or jumper
- RST (if present) → Reset pin for manual restart
Check the board revision and pin labels before connecting. Use the marked 5V input and ensure the USB supply can provide enough current for the ESP32-CAM. Avoid short circuits and do not apply 5V to UART logic pins.
Code example
The source calls this an Arduino Uno example, but the code uses ESP32-CAM GPIO 4 for its flash LED and is intended for an ESP32-CAM board. It initializes serial at 115200 baud and blinks GPIO 4 once per second. Verify that the selected board profile and GPIO 4 flash-LED wiring match your module.
// Test de l’adaptateur et de la connexion série : clignotement de la LED flash
const int ledPin = 4; // GPIO4 = LED de flash
void setup() {
Serial.begin(115200);
pinMode(ledPin, OUTPUT);
}
void loop() {
digitalWrite(ledPin, HIGH);
delay(1000);
digitalWrite(ledPin, LOW);
delay(1000);
}
Purpose and parts
The example checks power and serial communication between the Arduino IDE and ESP32-CAM. The listed parts are an AI-Thinker ESP32-CAM, this CH340 micro-USB programming adapter, and a micro-USB cable.
Code notes
- Serial.begin(115200) starts the serial connection at 115,200 baud.
- pinMode(ledPin, OUTPUT) configures the flash LED pin as an output.
- digitalWrite and delay alternate the LED state every second.
GPIO assignments can vary between ESP32-CAM board revisions. Confirm the exact board pinout before use.










