Author Topic: USB C PD  (Read 1841 times)

0 Members and 1 Guest are viewing this topic.

Offline artagTopic starter

  • Super Contributor
  • ***
  • Posts: 1284
  • Country: gb
USB C PD
« on: July 22, 2020, 08:14:43 pm »
I'm designing a product that needs up to 15W. I'd like to use USB C PD at higher than 5V to keep the current low. I can do this with existing PD triggers or perhaps with a processor but there seem too many options.

If I ask for 12V and get it, I can run a DC-DC converter to provide 5V at the load point. This seems like a good architecture.

But what should I do if the PD negotiation only lets me have 5V. Should I refuse to start ? Or accept 5V and a resulting voltage drop at 3A ? This might mean upconverting.

It seems as though, in order for it to 'just work' for the user, I'd have to have a buck/boost converter taking the highest voltage it can get from the power supply, and trying to make up (perhaps with reduced functionality) if I can get only a low voltage.

How is it expected to negotiate and work (from the user's point of view, not technically) to make best use of the options available ? Or have they screwed up and provided every conceivable option but no reasonable strategy ?
 
 

Offline OM222O

  • Frequent Contributor
  • **
  • Posts: 768
  • Country: gb
Re: USB C PD
« Reply #1 on: July 22, 2020, 08:31:14 pm »
USB PD is non trivial and takes a lot of coding + special negotiating ICs (if you don't wanna run out of ram on your MCU). If you can use just a buck converter and turn for example 20v down to 5 (which is very easy to do) then you're set. But if you want it to be able to actually accept charge AND charge other devices then you need PD.
 

Online jbb

  • Super Contributor
  • ***
  • Posts: 1265
  • Country: nz
Re: USB C PD
« Reply #2 on: July 23, 2020, 01:00:09 am »
I’m not an expert on the standard, but I think you’re allowed to not operate if you don’t get enough power.

If you want to be formal, I think you’re not meant to go above 5V until you go past 15W. So you can define your product as needing 16W :-)

However, you need to consider your use case. One thing I haven’t been able to get good data on is “how much power can this USB C port on my laptop output?”  So if you need USB Comms and >15W power you might run the risk of the device not working with many USB C sources.

On converters... do you really need 5V inside? That would be buck boost converter country. If you could get it to work at 4V that might work with buck only...

It’s handy how the USB power spec leaves just enough room to charge a LiIon cell.
 

Offline w169

  • Newbie
  • Posts: 1
  • Country: fr
Re: USB C PD
« Reply #3 on: July 23, 2020, 03:47:32 pm »
Look at page 11 of this document:
https://www.st.com/resource/en/application_note/dm00536349-usb-typec-power-delivery-using-stm32xx-series-mcus-and-stm32xxx-series-mpus-stmicroelectronics.pdf

If your device is programmed to request any PDO (Power Delivery Output) from the Source, you should get it!
Then you've to carefully place protections on your hardware to avoid its destruction.
For example if you select the right R1/R2 on this component (https://www.st.com/resource/en/datasheet/tcpp01-m12.pdf), it should do the job.
R1/R2 will actually set the voltage limit of your application and trigger the internal over voltage protection when exceeded (p:12).
 

Offline mgwalker95

  • Contributor
  • Posts: 28
  • Country: us
Re: USB C PD
« Reply #4 on: July 24, 2020, 12:37:59 am »
Are you trying to design a PD source, a PD sink or a DPR(dual role port both a source and a sink)?

If you are designing a PD sink look into the STUSB4500. Here is a sparkfun breakout board for it: https://www.sparkfun.com/products/15801
 

Offline artagTopic starter

  • Super Contributor
  • ***
  • Posts: 1284
  • Country: gb
Re: USB C PD
« Reply #5 on: July 24, 2020, 12:11:40 pm »
It's not so much the components I need to implement it that's a problem (though those can be interesting, thanks). It's the philosophy or user expectation that I'm concerned about.

The big advantage I see of USB C PD is that I can use a generic supply yet provide more than USB 2 offers. It's possible, with careful reading of the specs, for an informed user to replace a custom power supply or an over-specced USB 2 power supply.

Yet it appears that although USB C PD offers through negotiation all the capability I need, it doesn't  guarantee it. It's still possible for a naive user to replace the power supply with another USB C supply and it will fail to meet the required specs (eg it might offer only 5 & 15V, not 20V). And all I can do is silently fail.

The appliance is an enhanced table lamp (a PD sink). It doesn't have a screen or other UI where it could report an inability to charge. The best it might manage - and this would require some otherwise unnecessary circuitry - is to give some sort of gas-gauge error indication such as a low red light.

 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3925
  • Country: de
Re: USB C PD
« Reply #6 on: July 24, 2020, 01:57:33 pm »
The appliance is an enhanced table lamp (a PD sink).

If it is a table lamp, then why to bother with USB chargers in the first place?  :-//

I know, everyone has one but is the complexity (PD + DC-DC converter), risk of users using incompatible chargers (not every USB C charger is PD or 20V capable), risk of someone connecting this to their laptop ("plug fits so it should be safe and work, right?") worth it?

A small off-the-shelf power brick at the right voltage will solve all these problems.

USB is really meant to support and power computer peripherals. While it can be used and abused for other things, it doesn't mean it always makes sense to do so.
« Last Edit: July 24, 2020, 01:59:04 pm by janoc »
 

Offline artagTopic starter

  • Super Contributor
  • ***
  • Posts: 1284
  • Country: gb
Re: USB C PD
« Reply #7 on: July 24, 2020, 03:29:06 pm »

Table lamp is a bit disparaging, but gives an accurate idea of the function. It does contain USB parts that may need reprogramming, a battery that needs charging, etc. It would have a buck converter even if run from a brick. All that is irrelevant though, especially in the case of USB PD which is very much aimed toward charging.

It could use a power brick, yes.

I dislike them. There are a thousand varieties with different capabilities and connectors. Using the wrong one can cause damage. Most people don't know how to choose the right one. 

If I can buy a generic item that can safely and cheaply be replaced by something off the shelf in any country, why would I use a brick ?
« Last Edit: July 24, 2020, 03:33:49 pm by artag »
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 4034
  • Country: us
Re: USB C PD
« Reply #8 on: July 24, 2020, 04:09:40 pm »

Table lamp is a bit disparaging, but gives an accurate idea of the function. It does contain USB parts that may need reprogramming, a battery that needs charging, etc. It would have a buck converter even if run from a brick. All that is irrelevant though, especially in the case of USB PD which is very much aimed toward charging.

It could use a power brick, yes.

I dislike them. There are a thousand varieties with different capabilities and connectors. Using the wrong one can cause damage. Most people don't know how to choose the right one. 

If I can buy a generic item that can safely and cheaply be replaced by something off the shelf in any country, why would I use a brick ?

That's fine, but you really should have provision to warn when an incompatible USB source is attached.  You aren't really avoiding the compatibility issue just replacing it with a different one.  You should be avoiding the possibility of damage -- if the other parts in your system are compliant.  If you enable charging at 3A/5V there is still the possibility that someone will use a non-compliant "high speed" USB A->C cable that illegally reports 3A charging capacity which can damage cheap USB A chargers and potentially your device if the charger does something stupid on overload.  Using a 16 W power delivery profile to require 9V or higher voltage will prevent that, at the cost of not being able to run from the USB-C ports on a lot of computers which can do 5V/3A but not higher voltages.

You will probably want to use an off the shelf controller such as the STUSB4500 mentioned above.  USB type C w/ power delivery is rather complicated with lots of possible configurations.  A pre-programmed controller is going to have its implementation fairly well vetted.  At least so one hopes.

 

Offline fordem

  • Regular Contributor
  • *
  • Posts: 234
  • Country: gy
Re: USB C PD
« Reply #9 on: July 25, 2020, 01:15:20 pm »
Yet it appears that although USB C PD offers through negotiation all the capability I need, it doesn't  guarantee it. It's still possible for a naive user to replace the power supply with another USB C supply and it will fail to meet the required specs (eg it might offer only 5 & 15V, not 20V). And all I can do is silently fail.

I accept that this was not a scientific approach, but at the time I was just being curious.

I have several USB C powered devices, and the USB C chargers that were supplied with them - one of these is a Samsung wireless charging pad and a second is a Lenovo ThinkPad - the ThinkPad uses a 20V 65W charger, which will power the Samsung charge pad, however the Samsung charger (rated at 5V, 2.0A; 9V, 1.67A or 12V, 2.1A) will not power the ThinkPad - more to the point, the ThinkPad does not report any errors, it just does not recognize that a charger has been connected.

So as you say, it appears the spec may offer the capability you need, but does not guarantee it.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf