Need help with powering incandescent clock project with USB-C - Page 1
Forum section: electronics / beginners

author: zlaurin
author_rank: Contributor
timestamp: April 13, 2024, 07:03:03 pm
content: Hello, I am a hobbyist (with little electrical knowledge) making an incandescent display clock and I was wondering if anyone could help me with what to do for the power.I plan on using USB-C to power my project and I was wondering if anyone could suggest a port detection IC (or some other method) to make sure that the source is capable of delivering 3A so that I can cut the power to the displays if it's not (the clock needs ~1.8A total and I don't want to damage the source if it can't supply that). I've found this IC but I was wondering if it is right for my use case and if anyone knows of a better chip (with a larger footprint ideally) or a better alternative.https://fscdn.rohm.com/en/products/databook/datasheet/ic/interface/usb_pd/bd91n01nux-e.pdfI'm also looking for a way to regulate the voltage from the USB-C as I've seen online that the range is quite large (4V-5.5V) on top of the voltage drop from the cable. The incandescent tubes I'm using are rated for 4.5V and I don't want to damage or decrease their lifetime because of a fluctuating or over voltage (I don't have any spares), so I'm looking for a way to regulate the voltage at 5V (which I will bring down to 4.4V for the tubes with a diode).Here is a diagram of how I plan on powering my project, in pink is what I need help with

author: wasedadoc
author_rank: Super Contributor
timestamp: April 13, 2024, 07:07:39 pm
content: Will the supply be USB-C or USB-C PD?

author: tooki
author_rank: Super Contributor
timestamp: April 13, 2024, 07:10:13 pm
content: Where did you see that USB can go down to 4V? That’s absolutely out of spec. USB specifies 5V ±5%, meaning 4.75V…5.25V.Use a good cable and voltage drop will be minimal.You can use an adjustable LDO, buck converter, or if you really are so concerned about undervoltage, a buck-boost converter to regulate to 4.5V. If using a buck converter or LDO, and the input voltage fell below the expected voltage, the output voltage will simply be a bit low, which the incandescent filaments won’t mind the tiniest bit.

author: wasedadoc
author_rank: Super Contributor
timestamp: April 13, 2024, 07:15:29 pm
content: Easy inexpensive solution is to use an official Raspberry Pi PSU for 4B. 5 Volt 3A. Good quality. Captive output cable terminating in USB-C plug. No need for clock to check ability to supply the required current.Available in black or white.https://www.pishop.ca/product/raspberry-pi-15w-power-supply-us-white/?src=raspberrypi

author: zlaurin
author_rank: Contributor
timestamp: April 13, 2024, 07:17:33 pm
content: > Will the supply be USB-C or USB-C PD?I entend on powering it with a wall charger, but I was under the impression that if I use a power detection IC like the one I linked, I could cut the current to the tubes if the source isn't 3A and prevent it from blowing up or anything like that in the event it's plugged into a laptop or something.

author: zlaurin
author_rank: Contributor
timestamp: April 13, 2024, 07:24:29 pm
content: > Where did you see that USB can go down to 4V? That’s absolutely out of spec. USB specifies 5V ±5%, meaning 4.75V…5.25V.The power detection IC I linked has a Vbus detection voltage of 3.67V and an over voltage detection starting at 6V up to 7V for instance. My goal is to fool-proof this (in case someone uses a crappy cable or power source) as it'll be used as a regular nightstand alarm and I might give it away to a family member.

author: wraper
author_rank: Unknown
timestamp: April 13, 2024, 07:32:01 pm
content: Quote from: tooki on April 13, 2024, 07:10:13 pmWas bumped up to 5.5V retroactively.https://www.eevblog.com/forum/chat/they-raised-max-usb-output-voltage-from-5-25v-to-5-50v-retroactively/

author: zlaurin
author_rank: Contributor
timestamp: April 13, 2024, 07:33:04 pm
content: Also important to note the same USB-C receptacle will be used to program the MCu (it doesn't have a connector and instead just D+ D- pins) and not just to power the clock, so I need to make sure that the incandescent displays (and probably LEDs) don't receive power when it's plugged into my computer for uploading the code as I don't want to break anything.

author: tooki
author_rank: Super Contributor
timestamp: April 13, 2024, 07:45:38 pm
content: Ok, after a little digging I found the source for the 4V claim: itispart of the USB-C standard. But it’s the voltageafterworst-case voltage drop in the cable. (Not before it, as OP seemed to think.)See page 226 ofhttps://www.usb.org/sites/default/files/USB%20Type-C%20Spec%20R2.0%20-%20August%202019.pdf

author: tooki
author_rank: Super Contributor
timestamp: April 13, 2024, 07:48:58 pm
content: Quote from: zlaurin on April 13, 2024, 07:24:29 pmThen I’d just use a buck-boost converter with a wide input range, so that no matter what comes in, you get your desired voltage out.

author: zlaurin
author_rank: Contributor
timestamp: April 13, 2024, 07:56:04 pm
content: Quote from: tooki on April 13, 2024, 07:48:58 pmAlright, thanks for the suggestion. And for the power detection IC to make sure the source is 3.0A should I use what I linked or do you have a suggestion for a better one / better method?

author: tooki
author_rank: Super Contributor
timestamp: April 13, 2024, 08:16:21 pm
content: I don’t have any direct experience with USB-C power for projects, sorry!But also, are you certain about your 1.8A power draw? That seems like an enormous amount of current for an incandescent display. (Typical is 10-20mA per segment. So unless you’re running a 13+ digit display, that number seems really high.)

author: zlaurin
author_rank: Contributor
timestamp: April 13, 2024, 10:04:00 pm
content: Quote from: tooki on April 13, 2024, 08:16:21 pmI have 8 tubes with 7 segments and a period each (0.025mA per segment), 8 backlight LEDs (0.020mA) and a miniature grain rice 0.025mA incandescent bulb (for indicating stuff like Bluetooth pairing or sleep mode or something).

author: xvr
author_rank: Frequent Contributor
timestamp: April 14, 2024, 11:39:59 am
content: Do not mix up USB-C and USB-C Power Delivery (PD). This is different standards and used in different places. USB-C used for data passing and it CAN'T provide 3A to consumer. USB PD used for smart chargers, and it CAN provide 3A. Sometimes both of them can be implemented in one device (like Docking Station, for example), but in most cases it different devices.Cheap charger could supply 3A without supporting PD at all, so you need dedicated Charger/PSU with a good quality.To test 3A capability you need USB PD client side chip. Something like this -https://www.st.com/en/interfaces-and-transceivers/stusb4500.html(In your case it could be a little overkill)Your original rohm chip seems to implement required functionality, but I didn't find any info in its DS about voltage/current negotiation.

author: BeBuLamar
author_rank: Super Contributor
timestamp: April 14, 2024, 11:51:42 am
content: I am curious that is there a reason that you need to power your project with USB-C?

author: coromonadalix
author_rank: Super Contributor
timestamp: April 14, 2024, 02:31:36 pm
content: same here i would never use a project like this feeded from an usb-c port even if the usb port design say sohave you tough one second, that "device" who will supply your project may heat and dissipate ... and may or could fail

author: zlaurin
author_rank: Contributor
timestamp: April 15, 2024, 01:10:31 am
content: Quote from: BeBuLamar on April 14, 2024, 11:51:42 amMy MCu doesn't have a connector so I need a USB-C receptacle anyway for the D+ / D- pin, so I figured I might as well power it from USB also.

author: zlaurin
author_rank: Contributor
timestamp: April 15, 2024, 01:22:49 am
content: Quote from: xvr on April 14, 2024, 11:39:59 amYes I was also wondering the same thing. It obviously can detect if the source is capable of delivery 3.0A at 5V but does it actually request it? Or do I need another real PD chip on top of that one (which like you said would be a bit overkill)?From what I could find online, if you stick a certain resistor (5.1K) to ground on the CC1/CC2 pin of the receptacle, you can get up to 3A without PD (https://forum.digikey.com/t/simple-way-to-use-usb-type-c-to-get-5v-at-up-to-3a-15w/7016). So does the chip include these resistor and will in fact be able to get me 3A at 5V without having to do anything else if it detects that the source is capable of delivering it? Do I need to add the resistors? In the datasheet there's this section I highlighted but I'm not sure it means what I think it means (see attachment).I'd appreciate it if anyone knowledgeable in USB could clarify this for me. Here's another link to the datasheethttps://fscdn.rohm.com/en/products/databook/datasheet/ic/interface/usb_pd/bd91n01nux-e.pdf

author: abeyer
author_rank: Frequent Contributor
timestamp: April 15, 2024, 02:33:27 am
content: At 5V 3A no active negotiation is needed (nor allowed, I believe.)Available current at 5V is communicated passively by forming a voltage divider between the source and sink resistors and measuring the resulting voltage. The chip you link does that and outputs the result on TCC0/TCC1 and the table below your highlight describes that: they'll both be high if the source can provide 3A.The hackaday USB-C series offers a pretty reasonable "just enough for a hobbyist" description of type C & PD behavior and is worth reading through if you're going to use it in projects:https://hackaday.com/series_of_posts/all-about-usb-c/

author: sleemanj
author_rank: Super Contributor
timestamp: April 15, 2024, 03:50:06 am
content: In basic terms, to ensure that you have 3A available from theUSB-Csource, all you need to do is pull down each of the CC pins with 5.1k (separately), and then if either CC pin is above about 1.5v (1.7v - 8% I think) then you should have a 3A capable supply.If both CC pins are below 1.5v, then you have less current available.But remember that people might use a Type-A to Type-C cable on a Type-A supply and in that case, checking CC pins isn't enough, or might be entirely false. If Type-A to Type-C use is a possibility you'd need to also interrogate the D+/D- lines for that varied collection of voltages that Apple and others used.I think the chip linked above also just deals with CC, there are probably some that will look at both CC and D+/-Monitoring the bus voltage and shutting down if it sags (ie, brown out detection) is probably a more universal way of handling it gracefully.

author: xvr
author_rank: Frequent Contributor
timestamp: April 15, 2024, 07:59:41 am
content: Resistor is obly one the ways PD negotiation work (and this way is legacy one). PD can also perform digital 2 way negotiation protocol over CC lines. So 5.1k resistor will work out not for all PSU. Dedicated chip will be better.

author: sleemanj
author_rank: Super Contributor
timestamp: April 15, 2024, 09:03:17 am
content: Quote from: xvr on April 15, 2024, 07:59:41 amWe are not talking about PD negotiation, just the default VBus (5.0v) current ability which is advertised according the specification through the use of pullups at the DFP and then you test it by forming a voltage divider with the 5.1k pull downs on the UFP.See Pages 10-12 of the Microchip advisory note AN1953 for a summary...https://cdn.sparkfun.com/assets/e/b/4/f/7/USB-C_Datasheet.pdfYou only need to get into actual PD negotiation if you need more than 5v or 3A.And as above, if people will use a Type-A to C cable anyway, it's all moot, you can't rely on CC and you can't do PD.

author: zlaurin
author_rank: Contributor
timestamp: April 18, 2024, 02:22:08 am
content: Hey so I've been thinking about it and won't the the IC (BD91N01NUX) just output the 'USB Type-C Plug Detach' state if someone uses a USB-A to C cable?In that case could I not just design my circuit so that the incandescent tubes receive poweronlyif the detected state is 'USB Type-C 3.0 A', and if not just the MCu gets powered (which doesn't require a lot of power). That way I can program it with a USB-A or USB-C cable and it won't matter (as both have the D+ / D- pins and supply 5V which is all I need) and only if it's powered with the correct 3A USB-C power adapter the incandescent tubes will light up.Any thoughts? Am I correct in assuming that the IC will detect the plug as detached if it's a USB-A to C?