We use cookies to provide our visitors with an optimal site experience. View our privacy notice and cookie notice to learn more about how we use cookies and how to manage your settings. By proceeding on our website you consent to the use of cookies.
Just to be clear, the above post is talking about the rich tradition of workbench warranty voiding behavior, stray wires, perfboard and all.
Having an Arduino read CC1 and CC2 on analog inputs looking for a value of 268 or higher out of 1023, otherwise shutting off current use above 500mA wouldn’t be too hard.
If you really want to get basic use something like TLV840MADL13DBVR to turn on the gate of a transistor to unlock higher current consumption.
Hi. I want to use usbC connector as just power in (VBUS) to power my designed board (UFP) and only need to draw upto 3A (5V), connecting 5.1K ohms to CC1 and CC2 would not be enough and do the job? or i need usbC controllers?
the usbC controllers do more than what i simply need and are expensive.
Without CC monitoring (see my earlier comments if you want the technical details) you’re only allowed to draw 0.5A, drawing more than that is a violation of the usb specification and risks causing damage to other devices e.g. if people naively plug your device into a port that isn’t designed to handle high current and isn’t adequately protected.
Of course you can just choose to not care and make a non-compliant device, nobody can stop you, but if you want to be well-behaved use some IC that checks for you whether you’re allowed to draw 3A, e.g. the BD91N01NUX (whose TCC0/1 outputs indicate the max current), and use that to switch power to the rest of your device (or otherwise limit your current consumption to the indicated limit).
Hi. thanks for your reply. what solution you have if i want to use usbC connector only as my power input and always be in sink mode (UFP) and forced 3A all the time without using I2C or any communication to mirco\cpu\soc? my micro is not powered up so i cannot communicate to usbC controller. so i need standalone solution for force 3A sink set on usbC controller.
I already answered that: use the part I mentioned (or any other part that performs a similar function) to detect whether 3A is available, and use that to switch power to the rest of your device on or off (e.g. using a FET or a load switch). I never mentioned any microcontroller communication, the BD91N01NUX has no I2C, it simply performs source detection (using the CC pins) and outputs the result on its status pins. In particular, to determine whether 3A is available, combine its TCC0 and TCC1 outputs with an AND or NAND gate, depending on whether you want an active-high or active-low signal.
There is no such thing as “force 3A sink”, the source does not care how much current you want, it simply tells you whether you’re allowed to draw 3A, 1.5A, or only 0.5A, and as sink you’re required to comply. If you cannot reduce your consumption below the limit, you need to switch yourself off entirely.
Hi. The BD91N01NUX can detect the current through CC1 and CC2 and show in TCCO0 and TCCO1 but for this IC you can not set current you need? like 0.5A, 1.5A and 3A. Am I right?
If my board (UFP or sink), current request from source (DFP), is 3A, how i can set this with BD91N01NUX?
I think for part like TUSB320, you can set different current (0.9A, 1.5A or 3A) in UFP mode through I2C.
the source does not care how much current you want, it simply tells you whether you’re allowed to draw 3A, 1.5A, or only 0.5A, and as sink you’re required to comply. If you cannot reduce your consumption below the limit, you need to switch yourself off entirely.
This is simply how USB-C works, so using a different chip makes no difference. For example the TUSB320 as UFP in GPIO mode will use its OUT1/OUT2 outputs to report the current limit advertised by the source, while in I²C mode it will report the current limit via the I²C register field CURRENT_MODE_DETECT (and you can also configure the advertised current limit in DFP mode via CURRENT_MODE_ADVERTISE, but that’s of course irrelevant here).
The only way to make power-related requests to the source is using USB Power Delivery communication, but that’s just makes things even more complicated and isn’t needed in your case (unless you want receive more than 5V or use more than 3A). If you want to make a well-behaved device that complies with the Type-C specifications, the simplest you can do is what I’ve already explained: use some suitable chip (e.g. BD91N01NUX) to determine the Type-C Current advertisement and use its status output to switch power to the rest of your device so that it remains off if connected to source that doesn’t support 3A.
BTW, I do not recommend using the TUSB320 since it has an important design flaw: it only performs current limit detection once, but if the source subsequently changes its advertised current limit then the TUSB320 will not communicate this change to you, making it impossible to comply with the new limit. There’s no workaround in GPIO mode, the datasheet says “System software must periodically perform a I2C_SOFT_RESET in order for the CURRENT_MODE_DETECT register to be updated based on the state of the CC pins”, but that’s obviously horrible and moreover this is too slow to be able to react to changes within the required amount of time (max 60 ms), so the TUSB320 makes it impossible to comply with the USB Type-C specifications as UFP. I’m not sure if more recent variants of this chip fixed this problem, their datasheets are unclear.
(Also, just a side-note: you mentioned 0.9A in your comment, but that is a limit that specifically applies if you’ve established a single-lane USB3 connection to the DFP/source, and the source doesn’t advertise 1.5A or 3A.)
Assuming your customer base will allow it, you could do like the Raspberry Pi 4 does, ignore most of the spec and let people know you need a separate dumb 3A power supply with a USB C connector to power your device.
You should also specify a nice large gauge wire (the official Pi Power Supply uses 18AWG) to avoid the large voltage drop @ 3A in a meter long cable (1 meter of 24AWG @ 3A = 0.5V).
Of course non-compliance is always an option. But do consider that people are notoriously bad at paying attention to instructions, and people may just hook up a device without even being aware there were instructions to be followed. The benefit of following the USB spec is that it’s designed to protect devices from damage even if people aren’t really thinking about what they’re doing beyond “does it physically fit?”
Either way, if you’re gonna ignore the spec and copy the Raspberry Pi 4, be careful to not copy their mistake of tying the CC pins together (to share a single pulldown resistor instead of using a separate pulldown for each CC pin), since that will result in no power whatsoever being delivered to your device if it’s connected using an active or e-marked cable.
Hello Paul, I have taken on a small project of adding a USB-C port to a cup holder in my car using the 1568-1958-ND -Sparkfun USB-C Breakout Board and cannot get it to provide the 5V, 3A output for charging a phone. I’ve tried several methods including the 5.1K ohm resistors, and also a DC-DC 12V in/ 5V 3A output at the USB-C board, and the phone won’t recognize the power source. Can you offer some advice…I’m a novice at best.
The schematic of the part you mentioned (Sparkfun BOB-15100) shows it has integrated 5.1kΩ pulldowns, but that’s actually the problem: a power sink (consumer) port needs to have those, but you’re trying to make a power source port.
You need to remove the two 5.1kΩ resistors that are on the board and instead connect each CC pin to VBUS via a 10kΩ (±5%) resistor. I also recommend shorting D+ to D- to mark it a “dedicated charging port” in accordance to the USB Battery Charging 1.2 specification.
It would also be a good idea to add some kind of overcurrent protection (and the USB spec requires this). Officially a USB-C port is also supposed to wait until it detects a sink device connected (by monitoring the voltage on the CC pins) before it supplies 5V on VBUS.
Just to be certain I’m answering the actual inquiry, it appears you want to add a USB charging port to your car’s cup holder.
That is basically just a raw connector mounted on a PCB, there is no way for it to do what you want in any safe cost effective way.
You should by a USB charger designed for installation in an automobile. It will accept 12VDC from the cars’ power supply and safely convert it to meet USB specifications.
Here’s a very fancy, and fun, version sold by Crutchfiled.
We are currently working on a project that involves the use of a USB-C cable. One end is of Type-C, and the other end is open for soldering to a magnetic pin (which connects to the device for charging). Our default cable follows the standard USB specifications, providing 5.25V at 0.5A.
I would like to inquire about the feasibility of adding a 5.1k pulldown resistor on one or both CC lines to enable the USB-C power supply to provide a stable 5V. Is a 5.1k pulldown resistor sufficient for this purpose, or is it necessary to incorporate a PCBA in our product port or within our cable?
Your guidance on this matter is greatly appreciated.
How much current are you seeking to source for this?
Your ‘Downstream Facing Port’ is a magnetic connector. How many contacts is your magnetic connector going to have?
Are you going to break out CC1, and CC2 so your Downstream Facing Port has RP resistors installed? If you’re looking for more than 500mA, is your DFP going to monitor the voltage on CC1, CC2?
Is this a personal project or something intended for sale?
The current is currently at 0.5A, which is sufficient for small devices. Two contacts will serve as the Downstream Facing Port.
Yes, we’re not going to follow standard CC1 and CC2 arrangement.
This project is for sale and the design has not been finalized.
As I’m not a professional engineer, I’m curious about whether the 5.1k pull-down resistor will effectively stabilize the voltage at 5V while maintaining a current of 0.5A
“CC1”/“CC2” is only used to name pins (A5/B5) of a USB-C receptacle. For USB-C cable plug these pins are named “CC” (A5) and “VCONN” (B5).
For your use-case the “CC” pin of the plug needs a 5.1kΩ (±20%) pulldown to indicate that you’re a power sink, while “VCONN” must be left not-connected. This should suffice as long as you don’t draw more than 500 mA.
Your cable is what the USB-C specification calls a “Legacy Device Adapter”, i.e. same as any type-C to (standard/mini/micro) type-B cable except you don’t need any of the data lines and you replace the type-B plug by your custom plug. Here’s a diagram from the specification showing such a cable/adapter mated to a USB-C receptacle (on the left):
Pinout on USB-C plug:
GND: A1, B1, A12, B12, shell
VBUS: A4, B4, A9, B9
CC: A5
all other pins should be left not-connected.
Just to be clear, the 5.1kΩ pulldown does not have any direct effect on the supply voltage, it is just to signal to the upstream port that a sink (power consumer) device has been attached, which is required to get the port to enable its VBUS supply.
Once enabled, VBUS is required to be between 4.75V and 5.5V (measured at the port) as long as you don’t draw more than 500 mA.