DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: DeusM on May 30, 2021, 05:03:20 PM

Title: Reverse polarity protection
Post by: DeusM on May 30, 2021, 05:03:20 PM
Hi guys. I have this circuit which is power supply. I though that it was protected against reverse polarity but two exploded caps tell me otherwise. It works woks 12V 2A, so I think 1N4001 or 07 won't work. Also, I have some 1N5817 and 19, but the data sheet say it can only hold up to 1 to 10 mA. Can you guys help me?

(https://i.postimg.cc/BLVzbph2/1.png) (https://postimg.cc/BLVzbph2)
Title: Re: Reverse polarity protection
Post by: GGBB on May 30, 2021, 05:34:55 PM
1N581x is 1A same as 1N400x.

(https://i.postimg.cc/HV7zKYst/image.png) (https://postimg.cc/HV7zKYst)
Title: Re: Reverse polarity protection
Post by: antonis on May 30, 2021, 05:42:10 PM
Quote from: DeusM on May 30, 2021, 05:03:20 PM
It works woks 12V 2A,

You mean 12V/2A input..
('cause LM317 current rating is 1.5A maximum..)

D2 is reverse polarity protection from OUTPUT..!!
(like a  reverse connected charging battery..)

D3 helps C2 discharging in (the rare) case of VIN<VOUT..
(like shorting input supply..)

AS it is, there isn't any INPUT reverse polarity protection.. :icon_wink:
Title: Re: Reverse polarity protection
Post by: imJonWain on May 30, 2021, 05:43:42 PM
Is that reference actually -12V or is it GND?

The standard polarity protection diode setup is "designed" to conduct then fail before other parts.  There's also a much better but more complex mosfet based reverse polarity protection floating around on here you could try.   
Title: Re: Reverse polarity protection
Post by: DeusM on May 30, 2021, 05:50:52 PM
Quote from: GGBB on May 30, 2021, 05:34:55 PM
1N581x is 1A same as 1N400x.

(https://i.postimg.cc/HV7zKYst/image.png) (https://postimg.cc/HV7zKYst)

How do you find out the maximun reverse current? I'm not good at reading datasheets and what it says about 1n5829 is "max reverse current (Ir) 2.0mA"
(https://i.postimg.cc/k28Q0s3B/2.png) (https://postimg.cc/k28Q0s3B)
Title: Re: Reverse polarity protection
Post by: GibsonGM on May 30, 2021, 05:56:49 PM
Yes, max reverse current is 2.0mA, you are reading that correctly...
Title: Re: Reverse polarity protection
Post by: ElectricDruid on May 30, 2021, 05:58:52 PM
Separate issue, but what's the point of R1 and R2 in parallel? Sometimes that would be done to get a very specific value (although in series is much easier to work out!), but that seems a bit unlikely when there's a 2K variable pot underneath them. You could just tweak that instead, right?
Title: Re: Reverse polarity protection
Post by: DeusM on May 30, 2021, 06:05:43 PM
Quote from: GibsonGM on May 30, 2021, 05:56:49 PM
Yes, max reverse current is 2.0mA, you are reading that correctly...

Yes. And the input has 2A, so I need a diode with 2A of max. reverse current. Right? Or am I missing something?

Quote from: ElectricDruid on May 30, 2021, 05:58:52 PM
Separate issue, but what's the point of R1 and R2 in parallel? Sometimes that would be done to get a very specific value (although in series is much easier to work out!), but that seems a bit unlikely when there's a 2K variable pot underneath them. You could just tweak that instead, right?


Yeah. I though the same. I just grabbed some circuit and tweaked it. I'ts not necessarily finished.
Title: Re: Reverse polarity protection
Post by: imJonWain on May 30, 2021, 06:18:12 PM
No, the reverse current doesn't really matter based on the second schematic you show.  That diode will only conduct nA in "reverse" until you exceed it's reverse breakdown voltage (20V). 
Title: Re: Reverse polarity protection
Post by: PRR on May 30, 2021, 06:19:55 PM
Quote from: DeusM on May 30, 2021, 05:03:20 PM...I though that it was protected against reverse polarity but two exploded caps tell me otherwise.

It protects the *regulator* against a specific but odd event: short on the input while the output cap is charged.

It never was an all-purpose reverse protector.

You can use a series diode and suffer 0.2V-0.8V of voltage drop.

Or a shunt diode to blow-up a cheap part instead of an expensive part.

I doubt "diode reverse current" is a spec you need here.
Title: Re: Reverse polarity protection
Post by: DeusM on May 30, 2021, 06:30:36 PM
Quote from: imJonWain on May 30, 2021, 06:18:12 PM
No, the reverse current doesn't really matter based on the second schematic you show.  That diode will only conduct nA in "reverse" until you exceed it's reverse breakdown voltage (20V).
I'm not sure I understand. Max reverse current is the current that will flow if the diode "backwards" Or is is the maximun current the diode can block?

Title: Re: Reverse polarity protection
Post by: DeusM on May 30, 2021, 06:41:07 PM
Quote from: antonis on May 30, 2021, 05:42:10 PM
Quote from: DeusM on May 30, 2021, 05:03:20 PM
It works woks 12V 2A,

You mean 12V/2A input..
('cause LM317 current rating is 1.5A maximum..)

D2 is reverse polarity protection from OUTPUT..!!
(like a  reverse connected charging battery..)

D3 helps C2 discharging in (the rare) case of VIN<VOUT..
(like shorting input supply..)


Quote from: PRR on May 30, 2021, 06:19:55 PM
Quote from: DeusM on May 30, 2021, 05:03:20 PM...I though that it was protected against reverse polarity but two exploded caps tell me otherwise.

It protects the *regulator* against a specific but odd event: short on the input while the output cap is charged.


For What I read D2 is for protection from discharging capacitors in pedals that are connected to the power supply.
D3 is in the case of capacitance between C1 and ground.
Interesting stuff
Title: Re: Reverse polarity protection
Post by: imJonWain on May 30, 2021, 07:37:41 PM
Quote from: DeusM on May 30, 2021, 06:30:36 PM
Quote from: imJonWain on May 30, 2021, 06:18:12 PM
No, the reverse current doesn't really matter based on the second schematic you show.  That diode will only conduct nA in "reverse" until you exceed it's reverse breakdown voltage (20V).
I'm not sure I understand. Max reverse current is the current that will flow if the diode "backwards" Or is is the maximun current the diode can block?

Max reverse current is how much current the diode can handle flowing "backwards" through it.  However a diode will only conduct significant current "backwards" when you exceed it's reverse breakdown voltage (Cathode is more positive then the Anode).  See the graph and link below.  Zener diodes exploit this quality.

(https://www.electronics-tutorials.ws/wp-content/uploads/2020/08/diode5.gif)

https://www.electronics-tutorials.ws/diode/diode_3.html
Title: Re: Reverse polarity protection
Post by: GGBB on May 30, 2021, 07:52:31 PM
Quote from: ElectricDruid on May 30, 2021, 05:58:52 PM
Separate issue, but what's the point of R1 and R2 in parallel? Sometimes that would be done to get a very specific value (although in series is much easier to work out!), but that seems a bit unlikely when there's a 2K variable pot underneath them. You could just tweak that instead, right?

The reference implementation in the datasheet calls for 240 ohms - which is 270 || 2200 - more readily available values - in order to achieve the required voltage drop of 1.25V between the output and adjust terminals. See page 11 figure 9 https://www.ti.com/lit/ds/symlink/lm317.pdf. The posted circuit is a straight copy of that with increased output capacitance.
Title: Re: Reverse polarity protection
Post by: Rob Strand on May 30, 2021, 07:58:06 PM
QuoteIt protects the *regulator* against a specific but odd event: short on the input while the output cap is charged.

It never was an all-purpose reverse protector.

You can use a series diode and suffer 0.2V-0.8V of voltage drop.

Or a shunt diode to blow-up a cheap part instead of an expensive part.

I doubt "diode reverse current" is a spec you need here.
Yes the intent of that diode is *very* different to the true reverse polarity fix in GGBB's schematic.
Title: Re: Reverse polarity protection
Post by: PRR on May 31, 2021, 01:49:24 AM
Quote from: imJonWain on May 30, 2021, 07:37:41 PM....Max reverse current is how much current the diode can handle flowing "backwards" through it........

https://www.vishay.com/docs/88526/1n5820.pdf

Maximum average reverse current IR specifies that the reverse current will not be higher than these numbers at these voltages and temperatures.

The way it rises 10X from 25c to 100c strongly suggests it is a measured leakage, not a "how much it can handle" rating.

If you turn to Fig 4 you see it "typically" changes slowly with reverse voltage (not a breakdown phenomena) but more rapidly with temperature than implied by specs (however the leakage is typically much-much lower than spec) (however if it isn't you can't complain). There's a lot of CYA in this because leakage is unpredictable.
Title: Re: Reverse polarity protection
Post by: merlinb on May 31, 2021, 03:10:08 AM
Quote from: DeusM on May 30, 2021, 05:03:20 PM
I think 1N4001 or 07 won't work.
So buy a bigger diode? (3A)...
Title: Re: Reverse polarity protection
Post by: Rob Strand on May 31, 2021, 04:12:30 AM
QuoteYes. And the input has 2A, so I need a diode with 2A of max. reverse current. Right? Or am I missing something?
No.   For GGBB's circuit, with a protection diode series diode, under normal conditions the diode is forward biased and the diode current is the same is the circuit current.     For a pedal that's going to be a small current, say less than 100mA.   The forward diode current need to be at least that big to handle the current.

When the circuit is under reverse polarity the diode protects the circuit by blocking the current.    The whole idea of a series protection diode is very little current flows in the fault condition of reverse polarity.
Title: Re: Reverse polarity protection
Post by: duck_arse on May 31, 2021, 11:24:16 AM
Quote from: DeusM on May 30, 2021, 05:03:20 PM
Hi guys. I have this circuit which is power supply. I though that it was protected against reverse polarity but two exploded caps tell me otherwise.


Quote from: imJonWain on May 30, 2021, 05:43:42 PM
Is that reference actually -12V or is it GND?

we need an answer to this, still. are you putting rectified DC in, or AC from a transformer?
Title: Re: Reverse polarity protection
Post by: Ice-9 on May 31, 2021, 01:31:26 PM
I don't know if it has been said in a post above but D2 is not there for reverse polarity protection of the circuit, D2 is there to protect the regulator from a higher voltage on the regulated side when the power is disconnected. When power is disconnected C3 470uf can hold the voltage higher on the output of the regulator than the voltage is at the input of the regulator which can damage the reg.
Title: Re: Reverse polarity protection
Post by: ElectricDruid on May 31, 2021, 06:11:11 PM
Quote from: GGBB on May 30, 2021, 07:52:31 PM
Quote from: ElectricDruid on May 30, 2021, 05:58:52 PM
Separate issue, but what's the point of R1 and R2 in parallel? Sometimes that would be done to get a very specific value (although in series is much easier to work out!), but that seems a bit unlikely when there's a 2K variable pot underneath them. You could just tweak that instead, right?

The reference implementation in the datasheet calls for 240 ohms - which is 270 || 2200 - more readily available values - in order to achieve the required voltage drop of 1.25V between the output and adjust terminals. See page 11 figure 9 https://www.ti.com/lit/ds/symlink/lm317.pdf. The posted circuit is a straight copy of that with increased output capacitance.

Thanks for the explanation.

240R is an E24 value - hardly difficult to find at 1% accuracy. Trying to make an exact value by sticking two 10% tolerance resistors in parallel in this day and age is a bit retro even for TI?!? ;)

I suppose it made sense once, and no-one has updated the datasheet since then...


Title: Re: Reverse polarity protection
Post by: DeusM on May 31, 2021, 06:11:32 PM
Quote from: duck_arse on May 31, 2021, 11:24:16 AM
Quote from: DeusM on May 30, 2021, 05:03:20 PM
Hi guys. I have this circuit which is power supply. I though that it was protected against reverse polarity but two exploded caps tell me otherwise.


Quote from: imJonWain on May 30, 2021, 05:43:42 PM
Is that reference actually -12V or is it GND?

we need an answer to this, still. are you putting rectified DC in, or AC from a transformer?


It's Ok. I used a 1n5822 and tried it with reverse polarity and it works fine.

The -12V is ground. I use It as a reference for the PCB. It's the ground of the DC Input Jack.
Title: Re: Reverse polarity protection
Post by: DeusM on May 31, 2021, 06:13:52 PM
Quote from: ElectricDruid on May 31, 2021, 06:11:11 PM
Quote from: GGBB on May 30, 2021, 07:52:31 PM
Quote from: ElectricDruid on May 30, 2021, 05:58:52 PM
Separate issue, but what's the point of R1 and R2 in parallel? Sometimes that would be done to get a very specific value (although in series is much easier to work out!), but that seems a bit unlikely when there's a 2K variable pot underneath them. You could just tweak that instead, right?

The reference implementation in the datasheet calls for 240 ohms - which is 270 || 2200 - more readily available values - in order to achieve the required voltage drop of 1.25V between the output and adjust terminals. See page 11 figure 9 https://www.ti.com/lit/ds/symlink/lm317.pdf. The posted circuit is a straight copy of that with increased output capacitance.

Thanks for the explanation.

240R is an E24 value - hardly difficult to find at 1% accuracy. Trying to make an exact value by sticking two 10% tolerance resistors in parallel in this day and age is a bit retro even for TI?!? ;)

I suppose it made sense once, and no-one has updated the datasheet since then...
}

Good point. I removed one of the resistors and added it again thinking that the person who made the circuit has more knowledge than me and decided to trust them.
Title: Re: Reverse polarity protection
Post by: GGBB on May 31, 2021, 06:30:24 PM
Quote from: ElectricDruid on May 31, 2021, 06:11:11 PM
Thanks for the explanation.

240R is an E24 value - hardly difficult to find at 1% accuracy. Trying to make an exact value by sticking two 10% tolerance resistors in parallel in this day and age is a bit retro even for TI?!? ;)

I suppose it made sense once, and no-one has updated the datasheet since then...

I take it you didn't look at the data sheet. And I didn't explain clearly. ;) TI calls for 240. Whoever did the posted circuit decided on 270||2200 as their implementation of 240 - not TI.

Most hobbyists probably would not have 240 on hand (I don't) but 270 and 2k2 - yes (and I do). But I agree with your point - and 120+120 would have been more precise than 270||2k2 and just as likely to be found on hand.
Title: Re: Reverse polarity protection
Post by: PRR on May 31, 2021, 09:10:24 PM
Quote from: ElectricDruid on May 31, 2021, 06:11:11 PM.....I suppose it made sense once, and no-one has updated the datasheet since then...

It makes sense today. And there is no reason to hit the exact number.

Two constraints:

The /ratio/ of the two resistors gives the desired output.

The chip needs enough bleeder current to swamp the internal current flowing at the ADJ pin. I(adj) may be as much as 0.1mA. The sheet suggests you swamp this 52 times with 5.2mA in the divider. So the maximum "good" value of the upper resistor is 240 Ohms. A perfectly standard value, especially when these chips cost $3 each.

No 240 in your drawers? Use 220 and fudge the bottom resistor by 22/24.  Or use 100 Ohms and 0.4166 the bottom resistor, if you can afford the 13mA idle current.
Title: Re: Reverse polarity protection
Post by: Rob Strand on May 31, 2021, 09:15:27 PM
QuoteThe /ratio/ of the two resistors gives the desired output.

The chip needs enough bleeder current to swamp the internal current flowing at the ADJ pin. I(adj) may be as much as 0.1mA. The sheet suggests you swamp this 52 times with 5.2mA in the divider. So the maximum "good" value of the upper resistor is 240 Ohms. A perfectly standard value, especially when these chips cost $3 each.

No 240 in your drawers? Use 220 and fudge the bottom resistor by 22/24.  Or use 100 Ohms and 0.4166 the bottom resistor, if you can afford the 13mA idle current.
Agreed, unless you a designing the regulator to meet a spec you can use lower or higher resistor values no problem.  (Of course to  have to adjust the resistor to ground to match so the output voltage is what you want.)
Title: Re: Reverse polarity protection
Post by: antonis on June 01, 2021, 06:35:02 AM
Never had E24 series resistor values other than 5.1 and 7.5, so I used many times 220R for Vref current without absolutely on issue..
(difference is less than 500μA..)