# Using a voltage reference as input voltage protection

**URL:** <https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602>\
**Category:** Factual Questions\
**Created:** [August 12, 2024, 9:24am UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602 "2024-08-12T09:24:52Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Marvin\_the\_Martian](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/marvin_the_martian/32/2898_2.png) [@Marvin\_the\_Martian](https://boards.straightdope.com/u/Marvin_the_Martian)\
**Post date:** [August 13, 2024, 4:14pm UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/21 "2024-08-13T16:14:15Z")

</div>

> [@Dr.Strangelove](#):
>
> The fab has an [RB751V40](https://assets.nexperia.com/documents/data-sheet/RB751V40.pdf) for 2.6 cents. Looks like a good fit.

Awesome price (that’s around the 10k unit price break). Who are you using as a fab?

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [August 13, 2024, 6:25pm UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/22 "2024-08-13T18:25:05Z")

</div>

JLCPCB. First time I’ve used them, or really anyone for assembly.

They have, as I understand it (their docs kinda suck) three different classes for parts: basic, extended preferred, and extended. There are a few hundred basic parts that are always in the assembly machine. Mostly passives. And a few thousand preferred parts which I suspect are kept close by. Finally, there are hundreds of thousands of extended parts which must be fetched from a warehouse or something. They charge a $3/run fee for the extended parts, which isn’t too bad (so I could use them for stuff I really can’t work around), but the basic and preferred parts have no extra charge. So I’m sticking with those when possible.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [August 14, 2024, 9:20am UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/23 "2024-08-14T09:20:43Z")

</div>

While I have people’s ear…  
Another feature I wanted was a switched 5V source. But of course the microcontroller pins only output 3.3v.

I figured I could use a BJT with the collector at 5V, the base pulled to 5V with a pull-up resistor, and the emitter as the output. Then, a MOSFET that can pull the base low, with the gate connected to the microcontroller.

The only trouble, as I understand it, is that I’ll have about an 0.6v drop due to the need for a base-emitter difference. A bit less at low currents, maybe.

My understanding is that MOSFETs are even worse in this respect, and often need a gate-source difference of \>2 V for decently low resistance.

Is my understanding correct? And if so, is there a better way to do this? (no electromechanical relays, please)

Incidentally, I will also have a simple current sink with a MOSFET source at ground. I realize that’s usually the preferred way to switch a load since it maximizes gate-source voltage. But not all the things I interface with will support this mode of operation.

---

<div class="post-metadata">

**Author:** ![xtenkfarpl](https://avatars.discourse-cdn.com/v4/letter/x/c2a13f/32.png) [@xtenkfarpl](https://boards.straightdope.com/u/xtenkfarpl)\
**Post date:** [August 14, 2024, 10:29am UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/24 "2024-08-14T10:29:36Z")

</div>

> [@Dr.Strangelove](#):
>
> My understanding is that MOSFETs are even worse in this respect, and often need a gate-source difference of \>2 V for decently low resistance.

Couldn’t you use a p-channel MOSFET?  
No problem getting enough gate-source voltage drive, and I think (admittedly I haven’t been doing any hardware design for quite a while) that the ‘on’ resistance can be as low as a few tens of milliohms.

---

<div class="post-metadata">

**Author:** ![Marvin\_the\_Martian](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/marvin_the_martian/32/2898_2.png) [@Marvin\_the\_Martian](https://boards.straightdope.com/u/Marvin_the_Martian)\
**Post date:** [August 14, 2024, 2:12pm UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/25 "2024-08-14T14:12:16Z")

</div>

How much current from the 5V source? What power supply voltages do you have? How close to 5V do you need to go?

---

<div class="post-metadata">

**Author:** ![beowulff](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/beowulff/32/542_2.png) [@beowulff](https://boards.straightdope.com/u/beowulff)\
**Post date:** [August 14, 2024, 2:16pm UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/26 "2024-08-14T14:16:56Z")

</div>

Search “Logic level FET”.  
Plenty with Vgs under 1.8v

---

<div class="post-metadata">

**Author:** ![Crafter\_Man](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/crafter_man/32/458_2.png) [@Crafter\_Man](https://boards.straightdope.com/u/Crafter_Man)\
**Post date:** [August 14, 2024, 2:34pm UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/27 "2024-08-14T14:34:04Z")

</div>

High-side switching is best done using a PNP BJT transistor. This transistor is controlled by an NPN transistor, which is controlled by the microcontroller. Two or three resistors are also required.

Google

**high side switching pnp**

(then select **Images** )

to get circuit ideas.

---

<div class="post-metadata">

**Author:** ![Marvin\_the\_Martian](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/marvin_the_martian/32/2898_2.png) [@Marvin\_the\_Martian](https://boards.straightdope.com/u/Marvin_the_Martian)\
**Post date:** [August 14, 2024, 5:07pm UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/28 "2024-08-14T17:07:57Z")

</div>

> [@Dr.Strangelove](#):
>
> I figured I could use a BJT with the collector at 5V, the base pulled to 5V with a pull-up resistor, and the emitter as the output. Then, a MOSFET that can pull the base low, with the gate connected to the microcontroller.

As @Crafter_Man mentions you want to use a PNP for high-side switching - emitter at 5V, collector to load, base driven from the level shifter (NMOS + pullup). You will need a series resistor to the base to limit base current when you turn on. Voltage drop will be the Vce(sat) at your load current.

A little simpler using a PMOS as the high side switch (source at 5V, drain to load, gate to level shifter) since you don’t need the base current limiting resistor. You will have -5V Vgs when the output is on so plenty of drive. Voltage drop of Vds(sat) at your load current and gate voltage.

---

<div class="post-metadata">

**Author:** ![xtenkfarpl](https://avatars.discourse-cdn.com/v4/letter/x/c2a13f/32.png) [@xtenkfarpl](https://boards.straightdope.com/u/xtenkfarpl)\
**Post date:** [August 14, 2024, 5:18pm UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/29 "2024-08-14T17:18:21Z")

</div>

> [@Crafter\_Man](#):
>
> High-side switching is best done using a PNP BJT transistor. This transistor is controlled by an NPN transistor, which is controlled by the microcontroller. Two or three resistors are also required.

It depends on how close to 5v you want the output voltage to be, and of course how much current you want to be able to supply.

A junction transistor is always going to have that 600-700 mv junction drop. Whereas a P-channel MOSFET when biased ‘full on’ acts as a low value resistor with no intrinsic built-in source-to-drain voltage drop, at least as I recall from my hardware engineer days and a few brief scans of data sheets…?

---

<div class="post-metadata">

**Author:** ![beowulff](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/beowulff/32/542_2.png) [@beowulff](https://boards.straightdope.com/u/beowulff)\
**Post date:** [August 14, 2024, 5:33pm UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/30 "2024-08-14T17:33:58Z")

</div>

Correct. You can get microvolt drops at low current.

---

<div class="post-metadata">

**Author:** ![Marvin\_the\_Martian](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/marvin_the_martian/32/2898_2.png) [@Marvin\_the\_Martian](https://boards.straightdope.com/u/Marvin_the_Martian)\
**Post date:** [August 14, 2024, 6:17pm UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/31 "2024-08-14T18:17:45Z")

</div>

> [@xtenkfarpl](#):
>
> A junction transistor is always going to have that 600-700 mv junction drop.

This is not correct. That is the base voltage (Vbe), which does not appear in series with the load. The voltage drop when used as a switch is determined by Vce(sat), which can be in the tens of millivolts depending on current and transistor characteristics. Vce(sat) is a key parameter for switching transistors, since lower Vce(sat) =\> less power dissipated in the transistor =\> higher efficiency.

---

<div class="post-metadata">

**Author:** ![Crafter\_Man](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/crafter_man/32/458_2.png) [@Crafter\_Man](https://boards.straightdope.com/u/Crafter_Man)\
**Post date:** [August 14, 2024, 6:21pm UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/32 "2024-08-14T18:21:27Z")

</div>

> [@xtenkfarpl](#):
>
> A junction transistor is always going to have that 600-700 mv junction drop.

It depends on the VCE saturation voltage for the given current. In many cases it is around 0.2 V to 0.3 V.

Contrary to popular opinion, a MOSFET is not “always” better than a BJT, and vice-versa. For some designs, a BJT will give a lower voltage drop vs. a MOSFET. In other designs, a MOSFET will give a lower voltage drop vs. a BJT. It depends on a number of variables (current, voltage, temperature, size, etc.), with the main one being current.

---

<div class="post-metadata">

**Author:** ![Marvin\_the\_Martian](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/marvin_the_martian/32/2898_2.png) [@Marvin\_the\_Martian](https://boards.straightdope.com/u/Marvin_the_Martian)\
**Post date:** [August 14, 2024, 6:23pm UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/33 "2024-08-14T18:23:59Z")

</div>

Here is a relevent application note (sorry, pdf):

[Low VCEsat transistors in medium power load switch applications](https://www.farnell.com/datasheets/1760773.pdf)

---

<div class="post-metadata">

**Author:** ![xtenkfarpl](https://avatars.discourse-cdn.com/v4/letter/x/c2a13f/32.png) [@xtenkfarpl](https://boards.straightdope.com/u/xtenkfarpl)\
**Post date:** [August 14, 2024, 6:40pm UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/34 "2024-08-14T18:40:20Z")

</div>

> [@Marvin\_the\_Martian](#):
>
> That is the base voltage (Vbe), which does not appear in series with the load.

You’re right, but I think we’re in danger of going down a technical rathole here.  
Yes of course the Vbe is not in the load path.

A fully on bipolar transistor may indeed have a Vce drop less than 700 mv: maybe as low as 200 mv?

But I think an enhancement mode MOSFET behaves more like a resistor than a junction transistor: once it’s fully ‘on’, I don’t think there is a threshold voltage before it conducts?

---

<div class="post-metadata">

**Author:** ![Marvin\_the\_Martian](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/marvin_the_martian/32/2898_2.png) [@Marvin\_the\_Martian](https://boards.straightdope.com/u/Marvin_the_Martian)\
**Post date:** [August 14, 2024, 7:35pm UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/35 "2024-08-14T19:35:17Z")

</div>

> [@xtenkfarpl](#):
>
> I don’t think there is a threshold voltage before it conducts?

A BJT does not have a threshold before it conducts either. Vce(sat) is not a threshold, it is the transition point between the saturation and the active region for a given base current. Above Vce(sat) the collector current is (to first order, ignoring Early voltage etc.) independent of Vce. Below Vce(sat) the collector current is highly dependent on Vce, and decreases to zero as Vce decreases to zero.

Essentially Vce(sat) defines the voltage drop (Vce) where the transistor becomes a constant current source and therefore useless as a switch.

---

<div class="post-metadata">

**Author:** ![Crafter\_Man](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/crafter_man/32/458_2.png) [@Crafter\_Man](https://boards.straightdope.com/u/Crafter_Man)\
**Post date:** [August 14, 2024, 7:35pm UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/36 "2024-08-14T19:35:35Z")

</div>

> [@xtenkfarpl](#):
>
> A fully on bipolar transistor may indeed have a Vce drop less than 700 mv: maybe as low as 200 mv?

Again, it depends on a number of variables. But I’ve seen it as low as 0.15 V.

> [@xtenkfarpl](#):
>
> But I think an enhancement mode MOSFET behaves more like a resistor than a junction transistor: once it’s fully ‘on’, I don’t think there is a threshold voltage before it conducts?

Right… whereas a BJT has a (more-or-less) constant _voltage drop_ when the transistor is fully on, a MOSFET has a (more-or-less) constant _resistance_ when the transistor is fully on. (This also means the voltage drop for a MOSFET, unlike a BJT, is not constant when it is fully on; it varies with the current.)

For a given current in a switching application, you might find the voltage drop across a MOSFET (due to its resistance and the current) is less than the “constant” voltage drop across a BJT. On the other hand, for a given current, you might find the voltage drop across a MOSFET (due to its resistance and the current) is _more_ than the “constant” voltage drop across a BJT. There are a _lot_ of variables at play, and I am glossing over a bunch of things, but that’s the essence in a nutshell.

Another thing to keep in mind is that a “low” on resistance for a MOSFET comes at a “price.” And that price is a relatively high gate-to-source voltage. I have found that so-called “logic level” MOSFETs leave a lot to be desired in switching applications, and will usually resort to BJTs for logic-level stuff.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [August 14, 2024, 7:51pm UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/37 "2024-08-14T19:51:57Z")

</div>

> [@Marvin\_the\_Martian](#):
>
> How much current from the 5V source? What power supply voltages do you have? How close to 5V do you need to go?

Let’s say around 500 mA. Maybe 1 A if it can be done compactly. It’s all powered by USB, so only 5v is available (and a small 3.3v supply from the microcontroller). I guess somewhere around 4.8v would be nice. Most stuff rated for 5v will work at 4.8v. 4.4v is getting dicey.

> [@Crafter\_Man](#):
>
> Google
> 
> **high side switching pnp**

Ahh! See, this is the problem with having a totally amateur level of electronics understanding. I understand plenty of the basics. But there are entire holes in my knowledge base, like this one. That looks like what I want. And now I have a new topology to keep in mind.

---

<div class="post-metadata">

**Author:** ![Marvin\_the\_Martian](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/marvin_the_martian/32/2898_2.png) [@Marvin\_the\_Martian](https://boards.straightdope.com/u/Marvin_the_Martian)\
**Post date:** [August 14, 2024, 8:55pm UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/38 "2024-08-14T20:55:41Z")

</div>

I would go with a PMOS for the high side switch. You have 5V of Vgs, it should be pretty easy to find a FET with on resistance less than 100mohm (0.1V drop @1A) that can handle 1A current.

NMOS and pull-up specs are not going to be critical since I am guessing you don’t care about switching speed.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [August 14, 2024, 9:52pm UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/39 "2024-08-14T21:52:10Z")

</div>

Yeah, 5 cents for the [AO3401A](https://wmsc.lcsc.com/wmsc/upload/file/pdf/v2/lcsc/1810171817_Alpha---Omega-Semicon-AO3401A_C15127.pdf). Also nice–for the purposes of JLCPCB specifically–is that it’s a “basic part”, not an “extended preferred part”. Neither type incurs a handling fee, but from additional investigation, it looks like the preferred parts rotate in and out over time, so there’s not a huge guarantee that they’ll be there when I need them. They’re also sometimes in low/no stock. The AO3401A above has almost half a million in stock.

I may end up putting in a boost converter, in any case. They have a cheap 350 mA IC that can go up to 28 V (a TPS61040). And another 1.5A model (MC34063) that’s slightly less cheap, but still not bad. Need to figure out the component selection, though.

I can (and have, in the past) use external DC-DC converters when the need arises, but having a local adjustable supply could prove very handy.

---

<div class="post-metadata">

**Author:** ![Marvin\_the\_Martian](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/marvin_the_martian/32/2898_2.png) [@Marvin\_the\_Martian](https://boards.straightdope.com/u/Marvin_the_Martian)\
**Post date:** [August 14, 2024, 11:15pm UTC](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602/40 "2024-08-14T23:15:26Z")

</div>

> [@Dr.Strangelove](#):
>
> re’s not a huge guarantee that they’ll be there when I need them. They’re also sometimes in low/

For something like a switching regulator, follow the recommended components as closely as possible (capacitor voltage rating, physical size, and dielectric) and the layout to the letter. Very experienced people are making thos reference designs.

[Previous page](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602.md?page=1)

[Next page](https://boards.straightdope.com/t/using-a-voltage-reference-as-input-voltage-protection/1005602.md?page=3)
