FETs, or something, for pulldown resistor switching - Page 1
Forum section: electronics / beginners

author: Thumper_LV
author_rank: Contributor
timestamp: February 15, 2024, 07:18:49 am
content: I'm developing a board that is powered via an external DC power supply. Previously I was going to use USB for data only purposes but I just realized being able to power the board via USB opens some interesting possibilities. USB power would only be used for programming/testing - external power is still required for full functionality.So...looking at my USB C connector spec I see if I leave the CC1/CC2 pins floating no power is provided (which is what I originally planned on). But connecting 5.1k pulldown resistors to each pin will tell the host to provide power. So...I'm thinking I need to switch that pair of pulldown resistors via...something. Now comes the part I continue to flounder with - initial product choice.The primary power supply will provide 3.3VDC so that's what I *think* I want to use to activate the switches. I'm still an idiot when it comes to understanding datasheets and usage for these parts. Would a simple pair of 2N7002 be appropriate?Wait - I just realized, I think, that this won't work. I need switches that will open when powered and close/short/conduct when not powered. I understand relays - I'm still not comfortable with transistor concepts.Would a P-channel like a BSS84 be the right choice? Or do I need something like an LTV-817?I'm so lost.

author: selcuk
author_rank: Frequent Contributor
timestamp: February 15, 2024, 08:27:42 am
content: Let's assume the power delivering device samples the resistors at the beginning and starts to deliver power, then your device turn on and disconnect the resistors. There is no guarantee that the power deliverer stops the supply at that point since it may not sample the resistors frequently.I recommend you to implement a circuit to operate when there is USB 5V and 3.3V DC supply at the same time. Or you may disconnect USB 5V input when 3.3V supply is available. If there is a regulator for 5V to 3.3V, you may use its enable pin to disable for example.

author: Jwillis
author_rank: Super Contributor
timestamp: February 15, 2024, 08:32:34 am
content: As I understand it, you want to be able to "switch" the resistors on and off? Place a N type MOSFETs between the source you want to pull down and resistors. Activating the MOSFETs creates a connection to the resistor pulling down the pins. A 2n7002 should be fine since the current is very low anyway.A P type MOSFET will be conduct until a positive voltage is applied to the gate,

author: magic
author_rank: Super Contributor
timestamp: February 15, 2024, 09:03:07 am
content: Ordinary P-ch MOSFET requires negative gate voltage to keep it turned on, because the source will be at ground potential.Special depletion mode N-ch MOSFETs are conductive with zero gate voltage, but they need negative gate voltage to turn them off.I'm not very familiar with USB C, but isn't it the case that you need these resistors for data connection to work at all?

author: tszaboo
author_rank: Super Contributor
timestamp: February 15, 2024, 09:13:03 am
content: CC1/CC2 only works if you are using a Type C to Type C cable. Any other cable will automatically power it. I recommend not relying on this feature.

author: Peabody
author_rank: Super Contributor
timestamp: February 15, 2024, 03:49:02 pm
content: If you want USB to always supply power when it is plugged in, and 3.3V to supply power otherwise, then something like the circuit below might work. And you would just install the pulldown resistors on CC1/CC2 permanently.Edit: The SB220 is a 2-amp diode. Do you have an idea of how much current your circuit will draw?Edit2: If you need to regulate the 5V supply down to 3.3V, then you could add a regulator right after the diode.