Leon Anavi
IT Tips && Tricks

Mobile & Embedded

Created: 26.08.2024 07:07 Last Modified: 26.08.2024 07:09 Views: 299
Keywords: Arduino, CY4533, CYPD3177, PD, USB-C

Exploring USB-C PD with CY4533 and CYPD3177

Introduction to USB-C Power Delivery (PD)

The USB-C Power Delivery (PD) standard has revolutionized how we think about power delivery via USB. Unlike traditional USB, which provided limited power (typically up to 5V at 2A), USB-C PD offers a wide range of voltage and current levels, making it ideal for charging everything from smartphones to laptops. USB-C PD is flexible and efficient, dynamically adjusting voltage and current to meet the needs of the connected device. This allows for faster charging and the ability to power more demanding devices.

One of the key features of USB-C PD is its ability to negotiate power between the source and the sink. This negotiation happens through the exchange of Power Delivery Objects (PDOs), which define specific voltage and current levels. By configuring these PDOs, users can control how much power is delivered to their devices. This capability is particularly useful in DIY electronics projects, where precise control over power delivery is crucial.

In this blog post, we will explore how to select different voltage levels from USB-C PD using an Arduino, the Cypress EZ-PD Barrel Connector Replacement (BCR) evaluation kit CY4533, and the CYPD3177 USB-C PD sink chip. By leveraging the I2C bus, we can configure PDOs and dynamically change the voltage supplied to a device. Let?s dive into the details!

Setting Up the Hardware

To begin with, you'll need the following components:

  • Arduino Nano (or clone): This will serve as the microcontroller to send I2C commands.
  • Cypress CY4533 Evaluation Kit: This kit includes the CYPD3177 sink chip, which is responsible for handling the USB-C PD negotiation.
  • USB-C Power Source: A USB-C power adapter that supports multiple voltage levels (e.g., 5V, 9V, 12V, 15V, 20V).
  • Jumper Wires: For making the necessary connections between the Arduino and the CY4533 board.

The setup involves connecting the Arduino Nano to the CY4533 evaluation kit via the I2C bus. The I2C bus is a common protocol used for communication between microcontrollers and peripheral devices. In this case, the Arduino will send commands over I2C to the CYPD3177 chip to select different voltage levels.

Understanding the Arduino Sketch

The core of this project lies in the Arduino sketch, which controls the selection of different voltage levels. The sketch communicates with the CYPD3177 chip over I2C, sending commands to switch between available PDOs. These PDOs correspond to the different voltage levels offered by the USB-C PD source.

The Arduino sketch is designed to loop through the following voltage levels every 5 seconds:

  • 5V
  • 9V
  • 12V
  • 15V
  • 20V

The sketch begins by initializing the I2C communication and setting up the required parameters to interface with the CYPD3177 chip. It then enters a loop where it sequentially selects each voltage level, holding it for 5 seconds before moving to the next one. This process continues indefinitely, allowing you to observe the behavior of your USB-C PD power source as the voltage changes.

You can find the Arduino sketch on GitHub: Arduino Sketch for USB-C PD Voltage Selection.

Running the Experiment

With the hardware set up and the Arduino sketch uploaded, you're ready to test the configuration. Power the Arduino and the CY4533 evaluation kit using the USB-C power source. As the sketch runs, the voltage output from the USB-C adapter will change every 5 seconds, cycling through the 5V, 9V, 12V, 15V, and 20V levels.

You can use a multimeter or a similar tool to measure the output voltage at each stage, verifying that the correct voltage is being selected. This experiment demonstrates how the I2C communication and the PDO configuration work together to control the power delivery from the USB-C source.

Conclusion

This project showcases the flexibility and power of the USB-C PD standard, particularly when combined with an Arduino compatible development board and a dedicated sink chip like the CYPD3177. By configuring PDOs over the I2C bus, you can precisely control the voltage delivered to your devices, making this setup ideal for a variety of applications, from charging different devices to powering DIY electronics projects.

For those interested in further customization, the Arduino sketch can be modified to adjust the timing, select specific voltages, or even incorporate other sensors and components into the setup. The possibilities are vast, making USB-C PD a versatile tool for modern electronics.

To get started with your own experiments, check out the Arduino sketch on GitHub and explore the world of USB-C Power Delivery!



  Home | About | Contact | Disclaimer | Sitemap © 2009-2022 Leon Anavi. All rights reserved.