Author Topic: USB-C power supply protection  (Read 2555 times)

0 Members and 1 Guest are viewing this topic.

Offline schotkkyTopic starter

  • Contributor
  • Posts: 20
  • Country: au
USB-C power supply protection
« on: May 14, 2026, 03:24:45 am »
Hi all

I am new to the forum, hopefully someone can help with this. I have a schematic (attached) but I am not sure about the polarity of the SS34 diode, seems confusing. The person that designed the circuit for me is certain that this is the correct orientation. But also, the same person did a few very basic mistakes along the way which I had to catch, so I am a bit skeptical of this.

It's an audio circuit than runs on 5V and includes an ESP32 microcontroller module, which has two options of power supply, USB-C or standard barrel 2.1mm jack for flexibility.

Is the orientation of the SS34 diode correct, Cathode towards the input of the positive power supply both on the USB-C connector and the 2.1mm jack?

Whatever the answer, can you please briefly describe the reason of the answer, I'd like to understand why... thanks
« Last Edit: May 14, 2026, 05:24:13 am by schotkky »
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 2414
  • Country: pl
Re: USB-C power supply protection
« Reply #1 on: May 14, 2026, 09:44:27 am »
Welcome to the forum.

You wrote “the SS34 diode.” But there are two: D1 and D2. Which one did you mean?

Regardless of that, both ends of D1 are connected to the same conductor. VBUS (5V) bypasses that diode completely if the USB cable is connected. If the cable isn’t present, D1 is hanging in the air. Both remain true regardless of the direction. So D1 in this spot wouldn’t work even if it was in the opposite direction.

D2 would block current too, so I do not know, what the circuit designer meant with it. The circuit looks a bit like drawn in KiCAD. Mismatches between pin numbering in KiCAD diode symbols and SPICE’s device D model did happen. In footprints too. If the author tried to circumvent that by reversing symbols, that would explain why they’re oriented this way. Which of course is no excuse at all: one should assign pins correctly in footprints or the SPICE model.

D3 and D4 are also in parallel. That may be intended, if they’re both meant to be placed near the connectors. But then… why is capacitor C1 not between them? It’s not strictly an error and in general I’d ignore it. But given the SS34 diodes part, it smells weird.

Why 📎 | We live in times when half of people have IQ below 100.
 

Offline schotkkyTopic starter

  • Contributor
  • Posts: 20
  • Country: au
Re: USB-C power supply protection
« Reply #2 on: May 14, 2026, 10:20:54 am »
Hi thank you. Yes I meant the SS34, sorry if it was confusing, the SMAJ5.0A is for reverse polarity protection which seems fine. The SS34 is supposed to serve the OR-ing when both USB-C and 2.1mm jack are connected, so power is drawn from whichever input has higher voltage and the same voltage doesn't go to the other power supply.

The explanation for connecting the Cathode to positive input was that the power supply is the "load".... But it makes me think will it let current run, it seems counter intuitive connecting Cathode to positive input power supply in series. It's usually the other way around.
 

Offline PGPG

  • Super Contributor
  • ***
  • Posts: 1295
  • Country: pl
Re: USB-C power supply protection
« Reply #3 on: May 14, 2026, 12:32:17 pm »
Diode arrow shows the direction in which diode allows current to fly.
If your 5V you want to supply from USB socket (looks it is your case) than diode should point (with its arrow) from USB socket to your 5V net.
If you want to power something connected to USB socket from your 5V then the diode should point from your 5V to USB.
The same with U3 socket. If your 5V need be powered from it the diode should be reversed.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 14121
Re: USB-C power supply protection
« Reply #4 on: May 14, 2026, 01:25:36 pm »
The 22uF capacitor is too large.  The maximum permissable capacitance on Vbus is 10uF.  Exceeding this may trip the host port's overcurrent protection on physical connect or cause other devices on the same root hub to brown out, momenterily disconnect, and re-enumerate.

I'd also want to see a polyfuse or similar after the Schottky steering diodes and before the TVS diode to give a better chance of the whole device surviving gross overvoltage due to e.g. incorrect PSU plugged into the barrel jack or a malfunctioning USB C PSU.

Note that your audio circuit may often not get a full 5V.  USB Vbus may drop as low as 4.75 V at the load (4.4 V for low power 100mA loads) and the SS24 diodes will typically drop around 300 mV, so you may have under 4.5V to work with.
« Last Edit: May 14, 2026, 01:34:06 pm by Ian.M »
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 2414
  • Country: pl
Re: USB-C power supply protection
« Reply #5 on: May 14, 2026, 06:41:10 pm »
Hi thank you. Yes I meant the SS34, sorry if it was confusing, the SMAJ5.0A is for reverse polarity protection which seems fine. The SS34 is supposed to serve the OR-ing when both USB-C and 2.1mm jack are connected, so power is drawn from whichever input has higher voltage and the same voltage doesn't go to the other power supply.
You again wrote “the SS34”, and now you also added “the SMAJ5.0A”. There are two of each, so which “the”? It’s also a rhetorical question, pointing to the description being unclear. It doesn’t demand any answers: I replied to both possible interpretations.

As for D3 and D4 (SMAJ5.0A): both are there to “swallow” short high voltage spikes, not to protect against reverse polarity. They can’t do the latter.(1) And there is no risk of reverse polarity on USB side either way.

The explanation for connecting the Cathode to positive input was that the power supply is the "load"....
Are you sure your designer is a human and not an LLM? Because that sounds like gibberish! :)

But it makes me think will it let current run, it seems counter intuitive connecting Cathode to positive input power supply in series. It's usually the other way around.
Yes. When OR-ing power, anodes go to power sources, cathodes to the circuit being powered.(2)


(1) They may be a part of reverse polarity protection based on a fuse. But there is no fuse in this circuit.
(2) For pedantic completness: when on high side. But I can count on my fingers seeing circuits with negative supplies.
Why 📎 | We live in times when half of people have IQ below 100.
 

Offline schotkkyTopic starter

  • Contributor
  • Posts: 20
  • Country: au
Re: USB-C power supply protection
« Reply #6 on: May 15, 2026, 02:56:52 am »
The 22uF capacitor is too large.  The maximum permissable capacitance on Vbus is 10uF.  Exceeding this may trip the host port's overcurrent protection on physical connect or cause other devices on the same root hub to brown out, momenterily disconnect, and re-enumerate.

I'd also want to see a polyfuse or similar after the Schottky steering diodes and before the TVS diode to give a better chance of the whole device surviving gross overvoltage due to e.g. incorrect PSU plugged into the barrel jack or a malfunctioning USB C PSU.

Note that your audio circuit may often not get a full 5V.  USB Vbus may drop as low as 4.75 V at the load (4.4 V for low power 100mA loads) and the SS24 diodes will typically drop around 300 mV, so you may have under 4.5V to work with.

Ok thanks for your input, it's definitely helpful. Will need to change the cap to 10uF. Also may need to add that polyfuse after the SS34.

I know there will be a voltage drop in the circuit to around 4.5-4.7V or so, is there a better way to handle this?

I'm just still unclear if the orientation of both SS34 is correct since of its unusual wiring in series here?
 

Offline schotkkyTopic starter

  • Contributor
  • Posts: 20
  • Country: au
Re: USB-C power supply protection
« Reply #7 on: May 15, 2026, 03:08:39 am »
Hi thank you. Yes I meant the SS34, sorry if it was confusing, the SMAJ5.0A is for reverse polarity protection which seems fine. The SS34 is supposed to serve the OR-ing when both USB-C and 2.1mm jack are connected, so power is drawn from whichever input has higher voltage and the same voltage doesn't go to the other power supply.
You again wrote “the SS34”, and now you also added “the SMAJ5.0A”. There are two of each, so which “the”? It’s also a rhetorical question, pointing to the description being unclear. It doesn’t demand any answers: I replied to both possible interpretations.

As for D3 and D4 (SMAJ5.0A): both are there to “swallow” short high voltage spikes, not to protect against reverse polarity. They can’t do the latter.(1) And there is no risk of reverse polarity on USB side either way.

The explanation for connecting the Cathode to positive input was that the power supply is the "load"....
Are you sure your designer is a human and not an LLM? Because that sounds like gibberish! :)

But it makes me think will it let current run, it seems counter intuitive connecting Cathode to positive input power supply in series. It's usually the other way around.
Yes. When OR-ing power, anodes go to power sources, cathodes to the circuit being powered.(2)


(1) They may be a part of reverse polarity protection based on a fuse. But there is no fuse in this circuit.
(2) For pedantic completness: when on high side. But I can count on my fingers seeing circuits with negative supplies.

Damn sorry, in my head I was thinking of both SS34 as they are connected the same way.

It was a real person haha, but not the best one it appears. Now this makes me think it would be good if someone re-evaluated the whole circuit, doesn't really make me confident to proceed until all possible and actual issues are sorted. This guy was supposed to be better than me, that's why I hired him, but I had to go through every single detail of the circuit to catch the mistakes and it is as much as I know, and now turns out there are more, like that too large capacity at VBUS on the USB-C...

So to put this simple and straightforward, looking at the power section as it is shown now, what changes are needed to make this properly functional. So far are making the 22uF cap to no larger than 10uF, and I guess I need to flip both SS34, is this correct? Anything else?
« Last Edit: May 15, 2026, 03:40:02 am by schotkky »
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 2414
  • Country: pl
Re: USB-C power supply protection
« Reply #8 on: May 15, 2026, 08:35:21 am »
Damn sorry, in my head I was thinking of both SS34 as they are connected the same way.
No problem. That was mostly a hint for the future. And making it clear that we talk about two cases, if by any chance you missed there are two such diodes.

It was a real person haha, but not the best one it appears. Now this makes me think it would be good if someone re-evaluated the whole circuit, doesn't really make me confident to proceed until all possible and actual issues are sorted. (…)
Spotting mistakes, asking why, and being sceptical about the design is a great way to learn. I swear it’s in fact one of the best ways. It offers the drive, the focus, and the emotional feedback. So don’t hesitate and, if anything looks suspicious, ask. You either learn by finding the author being wrong, or by you yourself getting corrected. :)

(…) This guy was supposed to be better than me, that's why I hired him, but I had to go through every single detail of the circuit to catch the mistakes and it is as much as I know, and now turns out there are more, like that too large capacity at VBUS on the USB-C...
One important note. Don’t forget that every post here is only an opinion. We are not an authoritative source of knowledge.

So to put this simple and straightforward, looking at the power section as it is shown now, what changes are needed to make this properly functional. So far are making the 22uF cap to no larger than 10uF, and I guess I need to flip both SS34, is this correct?
D2 is bypassed completely in this circuit. So until this part is corrected, it doesn’t matter which direction the diode goes. I attempted to make that part clearer here:

2817810-0

Why 📎 | We live in times when half of people have IQ below 100.
 
The following users thanked this post: Doctorandus_P

Offline schotkkyTopic starter

  • Contributor
  • Posts: 20
  • Country: au
Re: USB-C power supply protection
« Reply #9 on: May 16, 2026, 12:26:14 am »
Damn sorry, in my head I was thinking of both SS34 as they are connected the same way.
No problem. That was mostly a hint for the future. And making it clear that we talk about two cases, if by any chance you missed there are two such diodes.

It was a real person haha, but not the best one it appears. Now this makes me think it would be good if someone re-evaluated the whole circuit, doesn't really make me confident to proceed until all possible and actual issues are sorted. (…)
Spotting mistakes, asking why, and being sceptical about the design is a great way to learn. I swear it’s in fact one of the best ways. It offers the drive, the focus, and the emotional feedback. So don’t hesitate and, if anything looks suspicious, ask. You either learn by finding the author being wrong, or by you yourself getting corrected. :)

(…) This guy was supposed to be better than me, that's why I hired him, but I had to go through every single detail of the circuit to catch the mistakes and it is as much as I know, and now turns out there are more, like that too large capacity at VBUS on the USB-C...
One important note. Don’t forget that every post here is only an opinion. We are not an authoritative source of knowledge.

So to put this simple and straightforward, looking at the power section as it is shown now, what changes are needed to make this properly functional. So far are making the 22uF cap to no larger than 10uF, and I guess I need to flip both SS34, is this correct?
D2 is bypassed completely in this circuit. So until this part is corrected, it doesn’t matter which direction the diode goes. I attempted to make that part clearer here:

[ Attachment Invalid Or Does Not Exist ]

Yup couldn't agree more with everything you said, thank you.

For one of the VBUS missing the diode... I gave exactly the same feedback to the designer, isn't it bypassed like this, one pin having the diode and the other not, he said "it will work"... I don't understand his logic. Yeah probably the 5V will there but the diode is useless.

Now I don't know if I need two SS34, one on each VBUS or some other solution. Also still unsure of the orientation
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 2414
  • Country: pl
Re: USB-C power supply protection
« Reply #10 on: May 16, 2026, 04:07:50 am »
Or-ing two voltage sources looks like that:



Putting a barrel jack on the left, putting a USB receptacle on the right:



All four VBUS and all four GND lines are bound together.

Completing with the capacitor, voltage spikes suppression, and CC1/CC2 pins:



Note I did not specify the value of C1 capacitor. I don’t have an opinion on that matter. I also left shield connection undecided.

« Last Edit: May 16, 2026, 04:23:01 am by golden_labels »
Why 📎 | We live in times when half of people have IQ below 100.
 

Offline unikeyname

  • Contributor
  • Posts: 46
  • Country: th
  • fill in here.
Re: USB-C power supply protection
« Reply #11 on: May 16, 2026, 04:34:45 am »
Or-ing two voltage sources looks like that:

we could use ideal diode no? there are the one like CH213B which is an ideal diode with 2 VIN/2 VOUT. It's a joy to use as well.

Per C1 if you happen to use CH213B or so, it can be 1-10uF, based on WCH reference design and datasheets.

EDIT: sorry guys, C1 in this context are meant to the one after guard rail(which is normally 0.01/0.1/1uF based on your MCU's reference design). C3 (the one before guard rail) is the one need to be 1-10uF.


Limitation of that chip is it can only do 6.5V max, so no other voltage level of USB-PD; each VIN can not exceed 0.5A; and some other shortcoming which you may want to check out its datasheet.

# Reference:

- [CH213B | WCH(Jiangsu Qin Heng) | SMT | JLCPCB](https://jlcpcb.com/partdetail/WCH_Jiangsu_Qin_Heng-CH213B/C48393289)
« Last Edit: May 17, 2026, 01:14:16 am by unikeyname »
EE guy.
 

Offline schotkkyTopic starter

  • Contributor
  • Posts: 20
  • Country: au
Re: USB-C power supply protection
« Reply #12 on: May 18, 2026, 12:55:22 am »
Or-ing two voltage sources looks like that:

(Attachment Link)

Putting a barrel jack on the left, putting a USB receptacle on the right:

(Attachment Link)

All four VBUS and all four GND lines are bound together.

Completing with the capacitor, voltage spikes suppression, and CC1/CC2 pins:

(Attachment Link)

Note I did not specify the value of C1 capacitor. I don’t have an opinion on that matter. I also left shield connection undecided.

Now this is what makes more sense to me, thanks a lot for putting this together in a very clear way!

Component value and stuff I'll figure that out from official schematics related to the specific parts, really appreciate your help here. I'll redraw the circuit the guy made in this manner and compare to this just to see that he made over there
 

Offline schotkkyTopic starter

  • Contributor
  • Posts: 20
  • Country: au
Re: USB-C power supply protection
« Reply #13 on: May 18, 2026, 01:13:11 am »
Or-ing two voltage sources looks like that:

we could use ideal diode no? there are the one like CH213B which is an ideal diode with 2 VIN/2 VOUT. It's a joy to use as well.

Per C1 if you happen to use CH213B or so, it can be 1-10uF, based on WCH reference design and datasheets.

EDIT: sorry guys, C1 in this context are meant to the one after guard rail(which is normally 0.01/0.1/1uF based on your MCU's reference design). C3 (the one before guard rail) is the one need to be 1-10uF.


Limitation of that chip is it can only do 6.5V max, so no other voltage level of USB-PD; each VIN can not exceed 0.5A; and some other shortcoming which you may want to check out its datasheet.

# Reference:

- [CH213B | WCH(Jiangsu Qin Heng) | SMT | JLCPCB](https://jlcpcb.com/partdetail/WCH_Jiangsu_Qin_Heng-CH213B/C48393289)

This is an interesting proposition thank you, I'll have a deeper look into it. Seems like the chip is actually able to do 1A, and roughly at this stage the circuit is estimated to draw around 0.5A

For max 6.5V in on the CH213B, isn't the PD on the USB-C already preselected to be 5V with the 5k1 pull down resistors on the CC pins? I think there is no voltage on the USB-C PD when is not connected, then when connected the pull down resistors tell the power supply how much to provide, 5V in this case... i think
 

Offline unikeyname

  • Contributor
  • Posts: 46
  • Country: th
  • fill in here.
Re: USB-C power supply protection
« Reply #14 on: May 18, 2026, 02:50:23 am »
For max 6.5V in on the CH213B, isn't the PD on the USB-C already preselected to be 5V with the 5k1 pull down resistors on the CC pins? I think there is no voltage on the USB-C PD when is not connected, then when connected the pull down resistors tell the power supply how much to provide, 5V in this case...

Well in your use case it's sufficient. I'm just thinking you may want to adjust that voltage with USB PD at some point.
EE guy.
 

Offline schotkkyTopic starter

  • Contributor
  • Posts: 20
  • Country: au
Re: USB-C power supply protection
« Reply #15 on: May 18, 2026, 03:09:40 am »
For max 6.5V in on the CH213B, isn't the PD on the USB-C already preselected to be 5V with the 5k1 pull down resistors on the CC pins? I think there is no voltage on the USB-C PD when is not connected, then when connected the pull down resistors tell the power supply how much to provide, 5V in this case...

Well in your use case it's sufficient. I'm just thinking you may want to adjust that voltage with USB PD at some point.

Yeah that's what i am saying, the 5.1k resistors are adjusting the voltage to 5V, so the CH213B should be safe, i have never used it before but it seems like there shouldn't be any issues
 

Offline schotkkyTopic starter

  • Contributor
  • Posts: 20
  • Country: au
Re: USB-C power supply protection
« Reply #16 on: May 18, 2026, 03:12:24 am »
BTW, I retraced what this guy did in the power section for easier readability, having a look at them this way.... both seem pretty wrong to me.

Which baffles me so much, how is someone able to design a circuit with ESP32, DAC, ADC etc but make such basic and obvious mistakes.... I'm not sure what's going on
« Last Edit: May 18, 2026, 03:18:43 am by schotkky »
 

Offline unikeyname

  • Contributor
  • Posts: 46
  • Country: th
  • fill in here.
Re: USB-C power supply protection
« Reply #17 on: May 18, 2026, 08:16:35 am »
BTW, I retraced what this guy did in the power section for easier readability, having a look at them this way.... both seem pretty wrong to me.

Which baffles me so much, how is someone able to design a circuit with ESP32, DAC, ADC etc but make such basic and obvious mistakes.... I'm not sure what's going on

XD what is going on, sorry for not reading your post thoroughly.

I thought you are the person design this one so I have a stroke comprehend why you phrase it like that.
tbf if you are not the original designer of this one, I should not introduce another component.
« Last Edit: May 18, 2026, 08:18:06 am by unikeyname »
EE guy.
 

Offline PGPG

  • Super Contributor
  • ***
  • Posts: 1295
  • Country: pl
Re: USB-C power supply protection
« Reply #18 on: May 18, 2026, 09:27:09 am »
I thought you are the person design this one

From OPs first post: "The person that designed the circuit for me..."
 

Offline schotkkyTopic starter

  • Contributor
  • Posts: 20
  • Country: au
Re: USB-C power supply protection
« Reply #19 on: May 18, 2026, 10:27:07 am »
BTW, I retraced what this guy did in the power section for easier readability, having a look at them this way.... both seem pretty wrong to me.

Which baffles me so much, how is someone able to design a circuit with ESP32, DAC, ADC etc but make such basic and obvious mistakes.... I'm not sure what's going on

XD what is going on, sorry for not reading your post thoroughly.

I thought you are the person design this one so I have a stroke comprehend why you phrase it like that.
tbf if you are not the original designer of this one, I should not introduce another component.

You're all good, but yeah someone else designed it for me. Actually i am thinking of using your suggestion, i read about the component and it seems to be a pretty decent part, it's cheap and available. It has few different protections, a fuse etc... it replaces a few components already.

I also decided to eliminate the barrel jack power supply, it simplifies the circuit and can make the PCB a bit smaller. Everyone today has USB-C power supply lying around, whether a fixed 5V or PD, both should work. So i redid the circuit to something like this.
Any feedback, modification or a fix is more than welcome, i hope i didn't do it wrong
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 2414
  • Country: pl
Re: USB-C power supply protection
« Reply #20 on: May 18, 2026, 01:19:05 pm »
If there is only a single power source, there is no need to have a diode — normal, schottky, MOSFET “ideal diode,” or any other.

With CH213K (U6) present, SMAJ5.0A (D4) should be directly on VBUS. Its purpose is to short high voltage transients. So it goes before other components it has to protect. In the diagram I showed earlier it was after behind SS32 diodes, because the diodes would never see these high voltage pulses (they are not referenced to GND). But that CH213K is. And at the same time this allowed me to use one SMAJ5.0A instead of two (for each side). Both diodes would still see higher current, but the pulse would be too short to hurt them.

CH213K doesn’t include a fuse. It offers overcurrent protection. That’s not the same.
Why 📎 | We live in times when half of people have IQ below 100.
 

Offline schotkkyTopic starter

  • Contributor
  • Posts: 20
  • Country: au
Re: USB-C power supply protection
« Reply #21 on: May 18, 2026, 02:07:49 pm »
If there is only a single power source, there is no need to have a diode — normal, schottky, MOSFET “ideal diode,” or any other.

With CH213K (U6) present, SMAJ5.0A (D4) should be directly on VBUS. Its purpose is to short high voltage transients. So it goes before other components it has to protect. In the diagram I showed earlier it was after behind SS32 diodes, because the diodes would never see these high voltage pulses (they are not referenced to GND). But that CH213K is. And at the same time this allowed me to use one SMAJ5.0A instead of two (for each side). Both diodes would still see higher current, but the pulse would be too short to hurt them.

CH213K doesn’t include a fuse. It offers overcurrent protection. That’s not the same.

I'm adding the CH213K in case a bad power adapter comes across or something cause for around $0.07.... I think it is worth it. That's my thought. But I'll remove it if it's REALLY unnecessary.

For the SMAJ0.5A I think yeah it makes more sense as you say, to be in front of everything. I read about how to place the CH213K and the SMAJ0.5A together and the suggestion was the diode to come after it, that's why I went that way.

In the CH213K datasheet it says that is equivalent to a schottky barrier diode plus a self recovery fuse, so I took that as it has a fuse...?
 

Offline xvr

  • Frequent Contributor
  • **
  • Posts: 904
  • Country: ie
    • LinkedIn
Re: USB-C power supply protection
« Reply #22 on: May 18, 2026, 08:54:26 pm »
Just FYI: CH213K is out of stock on LCSC and not available at all on digikey and mouser
 

Offline Unixon

  • Frequent Contributor
  • **
  • Posts: 759
Re: USB-C power supply protection
« Reply #23 on: May 18, 2026, 09:01:32 pm »
Hi all
I am new to the forum
Are you an AI agent?
 

Offline Unixon

  • Frequent Contributor
  • **
  • Posts: 759
Re: USB-C power supply protection
« Reply #24 on: May 18, 2026, 09:09:00 pm »
SMAJ5.0A is for reverse polarity protection which seems fine
Using a TVS without a fuse it can blow is not exactly pointless but it's dangerous, and using a same or greater contact area Schottky diode as a fuse vs TVS diode in SMA package does not instill confidence to say the least (it's a fire starting trap).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf