Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Adafruit CP2104 Friend: Examples, Pinouts, and Specs

Image of Adafruit CP2104 Friend
Cirkit Designer LogoDesign with Adafruit CP2104 Friend in Cirkit Designer

Introduction

The Adafruit CP2104 Friend (Manufacturer Part ID: 3309) is a USB-to-UART bridge designed to facilitate seamless communication between a computer and microcontrollers or other serial devices. It features the Silicon Labs CP2104 chipset, which provides reliable and high-speed data transfer. This module is equipped with a built-in level shifter, making it compatible with both 3.3V and 5V systems, ensuring versatility across a wide range of applications.

Explore Projects Built with Adafruit CP2104 Friend

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Battery-Powered Smart Sensor Hub with Adafruit QT Py RP2040
Image of wearable final: A project utilizing Adafruit CP2104 Friend in a practical application
This circuit features an Adafruit QT Py RP2040 microcontroller interfaced with an APDS9960 proximity sensor, an MPU6050 accelerometer and gyroscope, and an OLED display via I2C communication. It also includes a buzzer controlled by the microcontroller and is powered by a 3.7V LiPo battery with a toggle switch for power control.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Sensor Hub with Adafruit QT Py RP2040 and OLED Display
Image of 512: A project utilizing Adafruit CP2104 Friend in a practical application
This circuit features an Adafruit QT Py RP2040 microcontroller interfacing with an MPU-6050 accelerometer, an Adafruit APDS-9960 sensor, and a 0.96" OLED display via I2C communication. It is powered by a 3.7V LiPo battery and includes a green LED with a current-limiting resistor connected to an analog pin of the microcontroller.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Smart Light with Proximity Sensor and OLED Display using Adafruit QT Py RP2040
Image of lab: A project utilizing Adafruit CP2104 Friend in a practical application
This circuit is a portable, battery-powered system featuring an Adafruit QT Py RP2040 microcontroller that interfaces with an OLED display, a proximity sensor, an accelerometer, and an RGB LED strip. The system is powered by a lithium-ion battery with a step-up boost converter to provide 5V for the LED strip, and it includes a toggle switch for power control. The microcontroller communicates with the sensors and display via I2C.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP8266 WiFi Module Serial Interface with Pushbutton Control
Image of esp01 progrmmer: A project utilizing Adafruit CP2104 Friend in a practical application
This circuit features an ESP8266 ESP-01 WiFi module interfaced with an Adafruit FTDI Friend for serial communication. The ESP8266's TXD and RXD pins are connected to the FTDI's RX and TX pins respectively, allowing for data exchange between the microcontroller and a computer. Additionally, a pushbutton is connected to the ESP8266's reset pin, enabling manual resets of the module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Adafruit CP2104 Friend

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of wearable final: A project utilizing Adafruit CP2104 Friend in a practical application
Battery-Powered Smart Sensor Hub with Adafruit QT Py RP2040
This circuit features an Adafruit QT Py RP2040 microcontroller interfaced with an APDS9960 proximity sensor, an MPU6050 accelerometer and gyroscope, and an OLED display via I2C communication. It also includes a buzzer controlled by the microcontroller and is powered by a 3.7V LiPo battery with a toggle switch for power control.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of 512: A project utilizing Adafruit CP2104 Friend in a practical application
Battery-Powered Sensor Hub with Adafruit QT Py RP2040 and OLED Display
This circuit features an Adafruit QT Py RP2040 microcontroller interfacing with an MPU-6050 accelerometer, an Adafruit APDS-9960 sensor, and a 0.96" OLED display via I2C communication. It is powered by a 3.7V LiPo battery and includes a green LED with a current-limiting resistor connected to an analog pin of the microcontroller.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of lab: A project utilizing Adafruit CP2104 Friend in a practical application
Battery-Powered Smart Light with Proximity Sensor and OLED Display using Adafruit QT Py RP2040
This circuit is a portable, battery-powered system featuring an Adafruit QT Py RP2040 microcontroller that interfaces with an OLED display, a proximity sensor, an accelerometer, and an RGB LED strip. The system is powered by a lithium-ion battery with a step-up boost converter to provide 5V for the LED strip, and it includes a toggle switch for power control. The microcontroller communicates with the sensors and display via I2C.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of esp01 progrmmer: A project utilizing Adafruit CP2104 Friend in a practical application
ESP8266 WiFi Module Serial Interface with Pushbutton Control
This circuit features an ESP8266 ESP-01 WiFi module interfaced with an Adafruit FTDI Friend for serial communication. The ESP8266's TXD and RXD pins are connected to the FTDI's RX and TX pins respectively, allowing for data exchange between the microcontroller and a computer. Additionally, a pushbutton is connected to the ESP8266's reset pin, enabling manual resets of the module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Programming and debugging microcontrollers (e.g., Arduino, ESP32, STM32)
  • Serial communication with sensors, modules, or other devices
  • USB-to-serial conversion for legacy systems
  • Prototyping and testing UART-based circuits

Technical Specifications

The Adafruit CP2104 Friend is a compact and powerful USB-to-UART bridge with the following key specifications:

Parameter Value
Chipset Silicon Labs CP2104
USB Interface USB 2.0 Full-Speed
UART Baud Rate Up to 921,600 bps
Voltage Levels 3.3V or 5V (selectable via jumper)
Power Supply USB-powered
Operating Temperature -40°C to +85°C
Dimensions 1.3" x 0.6" (33mm x 15mm)

Pin Configuration and Descriptions

The CP2104 Friend has a simple pinout for easy integration into your projects. Below is the pin configuration:

Pin Name Description
GND Ground connection
5V 5V output from USB (can power external devices, up to 500mA)
3.3V 3.3V output from the onboard regulator
TX UART Transmit pin (data sent from CP2104 to the connected device)
RX UART Receive pin (data received by CP2104 from the connected device)
DTR Data Terminal Ready (used for resetting microcontrollers like Arduino)
CTS Clear to Send (optional flow control pin)

Usage Instructions

How to Use the Adafruit CP2104 Friend in a Circuit

  1. Connect the CP2104 Friend to Your Computer:

    • Use a micro-USB cable to connect the CP2104 Friend to your computer. The device will automatically be powered via USB.
    • Install the necessary drivers for the CP2104 chipset (available on the Adafruit website or Silicon Labs' official site).
  2. Connect to Your Microcontroller or Device:

    • Connect the TX pin of the CP2104 Friend to the RX pin of your microcontroller.
    • Connect the RX pin of the CP2104 Friend to the TX pin of your microcontroller.
    • If needed, connect the DTR pin to the reset pin of your microcontroller for automatic reset functionality.
  3. Set Voltage Level:

    • Use the onboard jumper to select the appropriate voltage level (3.3V or 5V) based on your device's requirements.
  4. Test Communication:

    • Open a serial terminal program (e.g., Arduino IDE Serial Monitor, PuTTY) on your computer.
    • Select the correct COM port and baud rate to establish communication.

Important Considerations and Best Practices

  • Voltage Compatibility: Ensure the voltage level selected on the CP2104 Friend matches the logic level of your connected device.
  • Driver Installation: Install the correct drivers for your operating system to ensure proper functionality.
  • Cable Quality: Use a high-quality micro-USB cable to avoid connection issues.
  • Flow Control: If your application requires hardware flow control, connect the CTS pin to your device.

Example: Using CP2104 Friend with Arduino UNO

The CP2104 Friend can be used to program or communicate with an Arduino UNO. Below is an example of how to send data from the Arduino to your computer via the CP2104 Friend.

Arduino Code Example

// Example: Sending data from Arduino to computer via CP2104 Friend
// Ensure the CP2104 Friend's TX pin is connected to Arduino's RX pin,
// and the RX pin is connected to Arduino's TX pin.

void setup() {
  Serial.begin(9600); // Initialize serial communication at 9600 baud
  delay(1000);        // Wait for the serial connection to stabilize
}

void loop() {
  Serial.println("Hello from Arduino!"); // Send a message to the computer
  delay(1000);                           // Wait 1 second before sending again
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Device Not Recognized by Computer:

    • Ensure the CP2104 Friend is properly connected via a working micro-USB cable.
    • Verify that the correct drivers are installed for your operating system.
  2. No Data Transmission:

    • Double-check the TX and RX connections between the CP2104 Friend and your device.
    • Ensure the baud rate in your serial terminal matches the baud rate of your device.
  3. Voltage Level Mismatch:

    • Confirm that the voltage level jumper is set correctly (3.3V or 5V) for your device.
  4. Microcontroller Not Resetting:

    • Ensure the DTR pin is connected to the reset pin of your microcontroller.
    • Verify that your microcontroller supports auto-reset functionality.

FAQs

Q: Can the CP2104 Friend power my microcontroller?
A: Yes, the CP2104 Friend can provide 5V (up to 500mA) or 3.3V output to power your microcontroller, depending on the selected voltage level.

Q: Is the CP2104 Friend compatible with macOS, Windows, and Linux?
A: Yes, the CP2104 Friend is compatible with all major operating systems. Ensure you install the appropriate drivers for your OS.

Q: What is the maximum baud rate supported by the CP2104 Friend?
A: The CP2104 Friend supports baud rates up to 921,600 bps.

Q: Can I use the CP2104 Friend for hardware flow control?
A: Yes, the CP2104 Friend supports hardware flow control via the CTS pin.

By following this documentation, you can effectively integrate the Adafruit CP2104 Friend into your projects for reliable USB-to-UART communication.