USB PD "Vendor Defined Messages" (VDMs) - Page 1
Forum section: electronics / projects

author: TimNJ
author_rank: Super Contributor
timestamp: June 07, 2019, 06:17:25 pm
content: Hi everyone,I'm working on a system using USB Power Delivery (PD) and am struggling to understand the specifications/features. Maybe someone here has experience with USB PD signalling/communication.I have a USB PD source capable of 5V and 20V. I want my powered device to request 20V, butonlyafter it has identified the power source as a particular product ID/serial number. Basically, the powered device has to "authenticate" the source as "genuine" first. A typical PD system doesn't care about this. If the powered device needs high power, it will select the highest-power profile advertised by the source, no questions asked.I've spent a few hours now, searching through the USB PD spec, and some white papers published by IC manufacturers. One thing that caught my eye was "Vendor Defined Messages" (VDMs). These messages are allowed to contain information not explicitly defined in the USB specification. My question is: Can I use VDMs to interrogate the power source for some sort of product ID?Both the source and the device are custom. I would imagine I couldn't use off-the-shelf USB PD controllers. Think I would have to use a micro-controller to implement the USB PD stack + additional VDM signalling.Any thoughts on the feasibility of this? Maybe it's better off to send some data over D+ /D- separately.Thanks.

author: amyk
author_rank: Super Contributor
timestamp: June 08, 2019, 01:09:08 am
content: Don't do it. The last thing we want is more incompatible chargers and vendor-lockdowns.

author: NiHaoMike
author_rank: Super Contributor
timestamp: June 08, 2019, 01:49:31 am
content: If you just want to reject poor quality chargers, check the voltage sag at full current.

author: TimNJ
author_rank: Super Contributor
timestamp: June 08, 2019, 02:02:51 am
content: Thanks to both of you. Trust me, I hate vendor-locking just as much as anyone.Quote from: NiHaoMike on June 08, 2019, 01:49:31 amClose. This is a medical system. The idea is to reject chargers which do not have medical approvals. In this case, it would be locked to a single supply, yes, but it's not intended to be a scheme to sell replacement chargers or anything.Just don't want someone to grab a consumer-grade USB PD supply off AliExpress and plug it into the system.Also, I don't really agree with the idea to use USB PD in this application. Not my idea. Maybe a standard power adapter with a non-standard connector would be good enough. Or a 3rd wire to do some sort of psuedo-analog-handshaking thing.Thanks.

author: Whales
author_rank: Super Contributor
timestamp: June 08, 2019, 04:23:21 am
content: Use a custom connector? That way it's clear to people that you need the very specific charger, and they can't replace it without intentional effort.If you use a USB connector then any amount of DRM is going to be confusing and difficult to accept. You don't want doctors/healthcare confused about why your device is not working.

author: jbb
author_rank: Super Contributor
timestamp: June 08, 2019, 04:42:21 am
content: I suggest you talk to your standards approval people / regulatory bodies right now. It could be a big problem that someone could plug in any dodgy USB charger at any time.For example, if the device has leads to a patient, they might say “a cheap and nasty adapter could fail and expose the patient to mains voltages. DRM won’t help with that, so it’s a safety failure.”This approach might be pessimistic, but could be a useful angle that lets you convince your stakeholders that a custom plug is the best waybecause it reduces project risk at the certification stage.(After saying ‘srakeholders’ I now feel dirty.)

author: TimNJ
author_rank: Super Contributor
timestamp: June 08, 2019, 02:36:01 pm
content: Thanks to both jbb and Whales for your thoughts. There are medically approved USB PD Type-C adapters on the market. It is interesting that you can get a medical approval on a USB PD adapter, yet any other adapter will work the "same". (I guess whether or nototherUSB PD devices have medical approvals is irrelevant when getting certified.) But it does raise a question about the system, in general.As others have suggested, I don't see why it needs to be USB PD in the first place..Sometimes, it's a marketing thing. USB Type-C connectors are new and cool. But, if human safety is at risk, being new and cool seems pretty moot.Thanks again!