USB Power Delivery (USB PD) along with Type-C specification aims at providing Universal Charger functionality where multiple different devices requiring different voltages and currents can be charged using a single USB PD charger. Even though universality is a key feature of USB PD Chargers, some charger designs requires recognition of a particular sink connected to it.
Any USB PD capable device is recognized through the combination of its VID and PID. VID refers to Vendor ID, which is allotted by USB-IF. PID refers to Product ID which is fixed by vendor for a particular product. This VID and PID information can be obtained from the sink by sending “Discover Identity VDM” message. Sink in response to this VDM message sends Acknowledgement which includes VID and PID of the sink device.
Following is the code snippet to send Discover Identity VDM message after the completion of PD negotiation between source and sink. The PD port is disabled if VID and PID of sink doesn’t match the expected values (expected sink device).
CYPD3171-24LQXQ_CLA project from CCGx Power SDK is used to test the code functionality.
bool send_discover_id(uint8_t port)
{
/* Format the command parameters.
Single DO with standard Discover_ID command to SOP controller.
Timeout is set to 100 ms.
*/
ccg_status_t stat;
cmd_buf.cmd_sop = SOP;
cmd_buf.cmd_do[0].val = 0xFF008001;
cmd_buf.no_of_cmd_do = 1;
cmd_buf.timeout = 100u;
/* Initiate the command. Keep trying until accepted. */
while ((stat = dpm_pd_command(port, DPM_CMD_SEND_VDM,
&cmd_buf, pd_command_cb)) != CCG_STAT_SUCCESS)
{
/* Can implement a timeout/abort here. */
if (abort_cmd)
return false;
}
/* Command has been queued. We cannot block for callback here. */
return true;
}
App event APP_EVT_PD_CONTRACT_NEGOTIATION_COMPLETE is triggered in app_event_handler function once the PD negotiation is complete. Discover Identity message is sent after negotiation complete event through a timer callback.
Attached to this post is the project which recognizes Ez-PD BCR as valid sink and turns the provider FET off when sinks other than BCR are connected. All changes to project are made in app.c file.
Show LessBJT Base drive | MOSFET gate drive |
Current driven device | Voltage driven device |
Current must be applied between the base and emitter terminals to produce a flow of current in the collector | MOSFET produces a flow of current in the drain when a voltage is applied between the gate and source terminals |
P = Ciss*(Vg)^2*fsw,
Where, Ciss = input capacitance.
Vg = gate drive supply voltage.
fsw = switching frequency.
1. Basic circuit:
2. Push Pull circuit:
3. Accelerating Turn off time (Toff) of the MOSFET:
4.
5. Pulse Transformer drive:
CYPD3174-16SXQ is targeted at Opto Coupler Feedback applications with a Opto Coupler Feedback Bootloader. It has a reduced pin list compared to CYPD3171 and CYPD3175.
It could also be used in directed feedback application with a modified hardware and firmware.
The schematic is shown below:
The firmware is derived from the CYPD3175-24LQXQ_pa_direct_fb with minor modifications. The only things changed are the device part number of bootloader and the project.
Show LessThe following topics were discussed in brief in Part1 of this blog,
Key takeaways from the following blog:
The main motive behind this blog is to eventually build the understanding of Power Electronic Converters in USB applications. It comprises of different topics and concepts under one blog which are discussed in a proper sequential order to make everyone understand the application of PE who are new to this field.
Characteristic comparison of Linear and Switched Mode Power Supply (SMPS):
| Linear Voltage Power Supply | SMPS |
Definition | It completes the stepping down of AC voltage first then it converts it into DC. | It converts the input signal into DC first then it steps down the voltage up to the desired level. |
Efficiency | Low efficiency i.e. about 20-25% | High Efficiency i.e. about 60-65% |
Voltage regulation | Voltage regulation is done by the voltage regulator. | Voltage regulation is done by the feedback circuit. |
Magnetic material used | Stalloy or CRGO core is used | A ferrite core is used |
Weight | It is bulky. | It is less bulky in comparison to the linear power supply. |
Reliability | More reliable in comparison to SMPS. | its reliability depends on the transistors used for switching |
Complexity | Less complex than SMPS. | More complex than the Linear power supply. |
Transient response | It possesses a faster response. | It possesses a slower response. |
RF interference | No RF interference | RF shielding is required as switching produces more RF interference. |
Noise and Electromagnetic interference | It is immune to noise and electromagnetic interference. | The effect of noise and electromagnetic interference is quite significant; thus, EMI filters are required. |
Applications | Used in Audio frequency applications and RF applications. | Used in chargers of mobile phones, DC motors, etc. |
Inference: From the above comparison, we can conclude that SMPS is the best fit for USB power supplies based on the following characteristic: Efficiency, Voltage regulation, Magnetic material, weight, and copper requirement.
USB standards and their power profiles:
Specifications | Maximum Voltage (Volt) | Maximum current | Maximum Power (Watt) |
USB 2.0 | 5 | 500 mA | 2.5 |
USB 3.0 and USB 3.1 | 5 | 900 mA | 4.5 |
USB Battery Charging 1.2 | 5 | 1.5 A | 7.5 |
USB Type C | 5 | 3 A | 15 |
USB PD 3.0 | 20 | 5 A | Up to 100 |
Standard Voltage profiles associated with USB Power delivery: 5V, 9V, 12V, 15V, 19V and 20V
Standard Power profiles associated with USB Power adapters: 18W, 33W, 45W, 65W, and up to 100W (Power factor correction circuitry is required for power levels above 65W).
SMPS (Switched Mode Power Supply)
Block diagram:
The block diagram of SMPS is attached in image6.
Explanation:
Rectification stage
Introduction:
Working:
Controlled DC Stage
Introduction:
Non-isolated topology | Corresponding isolated topology |
Buck converter | Forward converter |
Buck-Boost converter | Flyback Converter |
Basic Converter working:(explained using buck converter example)
D = ton/Ts =Vcontrol/Vsawtooth
Nonisolated Buck-Boost Converter:
Voutput/Vinput = D/1-D
where D = duty ratio (explained in the previous section)
Flyback converter (Isolated Buck-Boost Converter)
Vd = Vo + (Vs * Ns/Np)
When T1 is ON, Diode D1 is reverse biased. Hence voltage across it is the sum of output voltage plus the reflected input voltage.
Vt1 = Vs + (Vo * Np/Ns)
When T1 is OFF, switch T1 is reverse biased (open). Hence voltage across it is the sum of input voltage plus the reflected output voltage.
DCM:
Valley Switching:
Quasi-Resonant Mode:
CCM:
Topics i would be covering in my next blog
People who are interested to learn more than discussed here and if there are any mistakes or errors in the written blog, please let me know in the comments section.
Regards
Abhilash P
Show LessVarious definitions on What is Power electronics?
Different Applications of Power Electronics:
Power Electronic Converters:
Linear and Switched Mode Converters:
Some pros and cons of using Power Electronic Converters:
Pros | Cons |
High Energy Efficiency Fast Dynamic Response Higher reliability and Cost-effective Environmentally clean and safe Quiet operation | Generates harmonics Poor power factor operation |
Power Electronic Switching Devices:
Current driven devices | Bipolar Junction Transistors (BJT) MD switch Gate Turn Off (GTO) |
Voltage Driven devices | Metal Oxide Semiconductor Field-effect transistor (MOSFET) Insulated gate bipolar transistor (IGBT) MOS controlled thyristor (MCT) |
Pulse driven devices | Silicon controlled rectifier (SCR) Three terminal AC switch (TRIAC) |
Uncontrolled | Diode Diode for alternating current (DIAC) |
Semi-controlled | Silicon controlled rectifier (SCR) Three terminal AC switch (TRIAC) |
Fully controlled | Bipolar Junction Transistors (BJT) Gate Turn Off (GTO) Metal Oxide Semiconductor Field-effect transistor (MOSFET) Insulated gate bipolar transistor (IGBT) Integrated gate-commutated thyristor (IGCT) |
Switch | Power Capability | Switching speed | Application |
BJT | Medium | Medium | SMPS Bridge inverters DC-DC converters Power factor correction circuits |
MOSFET | Low | Fast | SMPS DC-DC Converters |
GTO | High | Slow | HVDC transmission |
IGBT | Medium | Medium | Inverters Choppers UPS Harmonic compensators |
MCT | Medium | Medium | Rectification Inverters Choppers |
Switched Mode Power Supply (SMPS):
Converter | Maximum Power (Watt) | Typical Efficiency | Magnetics Required (for energy storage during operation at each half cycle) |
Buck | 500 | 85 | Inductor |
Boost | 150 | 70 | Inductor |
Buck-Boost | 150 | 70 | Inductor |
Sepic | 150 | 75 | Dual or coupled inductor |
Cuk | 150 | 75 | Dual or coupled inductor |
Fly-back | 150 | 75 | Transformer |
Forward | 150 | 75 | Transformer Inductor |
Push-pull | 500 | 80 | Transformer Inductor |
Half-bridge | 1000 | 85 | Transformer Inductor |
Full bridge | 2000 | 85 | Transformer Inductor |
The basic operation of Fly-back converter:
(credits: Ned Mohan. Conveters, Applications and Designs)
Topics I will be discussing in part 2,
Regards
Abhilash P
Show LessThe attached document consists of an offline guide to Cypress EZ-PD Type C USB Products. This document can also be used as an offline guide for customers by onsite sales and field application engineers.
Regards
Abhilash P
Show LessThe CCGx Host SDK and Power SDK contains a noboot project along with the main firmware project for each firmware example to allow debugging. This is done using the Debug option on PSoC Creator through a SWD debugger such as MiniProg3 or MiniProg4. However, we cant use debug mode for the main firmware project directly since it contains the bootloader that doesnt allow the debugging the application.
To debug the main firmware project with the bootloader, follow the steps below. The CCG3 (CYPD3125-40LQXIT) notebook project from the Host SDK is used as an example here.
1. Go to the Design Wide Resources file and assign the Debug Select to SWD. Make sure that the SWD pins for the device are not assigned to anything else and are free for debug.
2. Build and program the .hex file onto the device. You can use the Program option on PSoC Creator for programming it as well.
If the device is not acquired, configure the port settings as shown below.
3. With the same setup connected, use the Attach to Running Target option to acquire the device.
4. Since the firmware is already running on the device, the debugger will access it from the point it was attached. The Reset option can be used to issue a Soft Reset to the device and bring the firmware execution to main() again.
Version: *R
West Bridge®: Astoria™ USB and Mass Storage Peripheral Controller
Features
Functional Overview
Turbo-MTP Support
Turbo-MTP is an implementation of Microsoft’s MTP enabled by West Bridge. In the current generation of MTP-enabled mobile phones, all protocol packets needs to be handled by the main processor. West Bridge Turbo-MTP switches these packet types and sends only control packets to the processor, while data payloads are written directly to mass storage, thereby bringing the high performance of West Bridge to MTP.
Show LessCYPD3177(BCR) has provided four sets of resistor divider networks are used to determine the voltage and current range that the EZ-PD BCR device will negotiate
with the USB Type-C power adapter. However, if it still cannot meet your requirement, you can change the PDO through its I2C register.
This blog gives a breif introduction on how to change the BCR register based on BCR HPI Spec.
1. Hardware Connection
Figure 1
Connect SCLK and SDAT of MiniProg to CY4533 as is shown in Figure 1. Set the rotary switch (SW1) to position 1 so CY4533 support 5V/0.9A by default. Use a CY4500 EZ-PD Protocol Analyzer to capture the cc communication between CY4533 and the power adapter.
Figure 2
As is shown in Figure 2, CY4533 request 5V/0.9A due to the max requesting VBUS set by rotary switch is 5V/0.9A.
2. Send I2C command in Bridge Control Panel to control BCR
Figure 3
Check the PD_STATUS register first. The value of PD_STATUS register is 00 A4 05 00. It means the explicit contract has been established between BCR and the charger. BCR is acting as a power sink and the two device both supports PD 3.0. To replace the default sink PDO, write the corresponding packet into the data memory start from 0x1800. For Byte 0-3, ASCII string “SNKP” (i.e 0x50 0x4B 0x4E 0x53) must be sent to make BCR update its sink PDO list. In this example, PDO 0 is set to 5V/0.9A and PDO 1 is set to 15V/1.75A. The remaining bytes are set to 0 because not all 7 PDOs are used. Refer to Section 6.4 of Universal Serial Bus Power Delivery Specification for the description of Fixed Supply PDO. Figure 3 is the I2C commands sent and response from BCR.
Figure 4
After enabling the PDO0 and PDO1 mask by sending command to SELECT_SINK_PDO register, BCR will re-negotiate the PD contract with the power adapter. PD_RESPONSE register should be checked after sending command on command registers. 0x02 is the code for successful operation.CC communication is captured by CY4500 in Figure 4.
There are two dongle reference design based on CCG3:
Type-C plug to DisplayPort: https://www.cypress.com/documentation/reference-designs/ez-pd-ccg3-usb-type-c-displayport-cable-solution
Type-C plug to HDMI/VGA/DVI: https://www.cypress.com/documentation/reference-designs/ez-pd-ccg3-usb-type-c-hdmi-adapter-solution
Charge-Through Dongle (equal to Type-C plug to USB3.0/HDMI/Type-C (charge only)) :https://www.cypress.com/documentation/reference-designs/ez-pd-ccg3-usb-type-c-charge-through-dongle
If you are going to merge a single Type-C port (Receptacle) into your USB3.0/DisplayPort/HDMI input device. The Type-C plug is not nice to show up on your products. This blog is recommended to take a look.
Below content is schematic explain Type-C receptacle DRP Reference Design (Power source & DisplayPort Sink and USB 2.0 host role <Need wire DP/DM to USB2.0 host.>).
1. Block Diagram:
2. In Details:
a. Part number can suit for this design (Since USB bootloader firmware project is not applied to all of CCG3 device, this design cannot apply to all of devices of CCG3 to save bootloader customize efforts.):
b. PS8742B can be replace with others same function DE MUX (Support DisplayPort Sink at least). CCG3 support I2C/PWM/GPIO control. This design use I2C control (CCG3 is I2C master).
c. DP_Indicator is used for inform DisplayPort/HDMI sink control system that DP ALT Mode is entered and DisplayPort signals is coming.
d. USB2.0 Switch wire to CCG3 internal billboard by default. If attached USB2.0 Device and sink on Type-C receptacle, USB2.0 switch will switch to USB2.0 host in the system.
Show Less