What diode is used in this schematic?

Kenneth Tan

May 22, 2015
58
Joined
May 22, 2015
Messages
58
I've found this Youtube video, where the guy made a new twist on Dave Jone's Soft latched power switch.


I've drawn out the schematic in Diptrace and build a one sided PCB for it.

@ 2:38 in the video he points out the diode used in the circuit.
It's used to isolate the "sense" input for the arduino from the Vin during the time the circuit is latched "ON"

During the time that the button initially is pressed and the arduino is "booted" the current to a circuit that is behind the p-chan Mosfet flows through this diode.

The question is: How do I determine this diode?
Do I need to go safe an does the diode need to match the nominal current used by the circuit, or is there something I overlooked?

Factors are:
  • The time that the arduino takes to get the mosfets enabled. (depending on the bootloader, this might take a few seconds)
  • The current used by the circuit that is using the power behind the mosfet. (Led string etc.)


Soft latch power switch CPU controlled V1 - Schema.jpg Soft latch power switch CPU controlled V1 - PCB.jpg Soft latch power switch CPU controlled V1 - PCB CP.jpg
 

Minder

Apr 24, 2015
3,561
Joined
Apr 24, 2015
Messages
3,561
The popular 1n4148 should be ample as the power requirement is very small for input to Arduino.
M.
 

Kenneth Tan

May 22, 2015
58
Joined
May 22, 2015
Messages
58
That's not correct.
The arduino runs over the 5V rail. That uses only a very small amount of power. But if I want to connect more to the ouput voltage rail things change.
There is a 5V and a seperate Vout.
The 5V is internally connected to the Vout and serves as the Vcc for the arduino.
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Can you estimate how much current your circuit will draw?
Adam
 

Kenneth Tan

May 22, 2015
58
Joined
May 22, 2015
Messages
58
No I can't. That's my problem.
12V/3A should be a good maximum.
Just found this Schottky diode SS34
40V 3A.
That would be great if I would power 34V Led projects.
Have to check if lm1117-5 or LM1117-3.3 can handle 35V input voltage.
Don't know if a Schottky diode can be used.
I know it has a lower voltage drop.
Just checked. lm1117-5 has operating input voltage of 15V. Max 20V. So this schematic with 5V out can't be used for higher input voltage then 19V.
 
Last edited:

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
It's only momentary operation isn't it? So a lower current may be ok. The FET will take all the current when the circuit is powered up. Yes a Schottky diode can be used for this.
Adam
 

AnalogKid

Jun 10, 2015
3,048
Joined
Jun 10, 2015
Messages
3,048
J3 pin 2 is connected to the regulator output, but is labeled GND.

ak
 

Kenneth Tan

May 22, 2015
58
Joined
May 22, 2015
Messages
58
It's only momentary operation isn't it? So a lower current may be ok. The FET will take all the current when the circuit is powered up. Yes a Schottky diode can be used for this.
Adam
Thank you for the reply. I found a nice offer on ebay for SS34 schottky diodes. I'll order them now.
 

Minder

Apr 24, 2015
3,561
Joined
Apr 24, 2015
Messages
3,561
Schottky is a little over kill, unless you can push the button for a couple of μsec!!
M.
 

Kenneth Tan

May 22, 2015
58
Joined
May 22, 2015
Messages
58
Schottky is a little over kill, unless you can push the button for a couple of μsec!!
M.

No, of course the button will be pressed longer.
Within 2 seconds the first line of code will be to turn the PWR_CTRL high.
(I've tested it on my PWM arduino led project and it also shows that the Arduino starts executing PWM after +/- 1.5 seconds boot time)

The reason I selected a Schottky diode is that is was 40V 3A. I'm assuming now that for 2 seconds max a current will flow of 12V 3A.
(Leds are ON @ full capacity)
And 50pcs of them cost just €1. So why buy one if you can get 50. ;)

If there is a normal diode that can handle 3A @ >40V please advise.

The problem of the high current through the diode is, that on initial power-on of the arduino (or esp8266), the bootloader stops for a determined period to check if there is a new program that needs to be uploaded into the arduino. During this period the button needs to be pushed and current will flow through the diode. After this period, the PWR_CTRL goes high and the mosfet takes over.


I could mount a led over PWR_CTRL and GND to signal that the circuit is latched.

The new schematic and PCB is attached.
(diode is now a SMD SS34 schottky mounted on the bottom)
 

Attachments

  • Soft latch power switch CPU controlled V1 - Schema.jpg
    Soft latch power switch CPU controlled V1 - Schema.jpg
    51.9 KB · Views: 420
  • Soft latch power switch CPU controlled V1 - PCB.jpg
    Soft latch power switch CPU controlled V1 - PCB.jpg
    62.3 KB · Views: 160

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Ah yes Kenneth, I forgot about that stupid Arduino delay. So yes go for the higher power versions.
Adam
 

Minder

Apr 24, 2015
3,561
Joined
Apr 24, 2015
Messages
3,561
The diode on the BB in the video looks no larger than a 1n7000 series, also in the opening statement he mentioned both Mosfets are logic level, only the 2n7000 is, the IRF9540 is a little overkill at >20amps.
M.
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Looking at your circuit again, can I make a comment? I am not a great fan of using the input diodes of a micro as a clamp. It could still cause Latchup IMO. It would be better to have a pull down resistor on the sense input so as no more than 5 Volts appears on the input. This will also help with diode reverse leakage current that could cause false triggering.
Adam
 

Kenneth Tan

May 22, 2015
58
Joined
May 22, 2015
Messages
58
Looking at your circuit again, can I make a comment? I am not a great fan of using the input diodes of a micro as a clamp. It could still cause Latchup IMO. It would be better to have a pull down resistor on the sense input so as no more than 5 Volts appears on the input. This will also help with diode reverse leakage current that could cause false triggering.
Adam

I can't understand what you are telling me.
To my understanding (from the video) the 10K resistor limits any current running into the arduino. It's internal zener diode at the input pin would, in combination with this 10K resistor, drop the voltage at the pin to a logic level high.
Could you please describe the change in schematic?
I don't know what you mean with "still cause a latchup"?
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
The input does not have a zener diode. It will have two diodes connected in series and the input goes at the join of the two diodes, one end connect to supply the other to 0 Volts. These diodes are to protect the input from very fast over voltages from an ESD event. The input is not designed to have a voltage greater than the supply for a longer period of time than an ESD event or a fast transient pulse caused by noise. Latchup is when the unintentional SCR inside latches, this SCR is formed when the device is made and we cant do anything about it. Google latchup.
Adam
 

Kenneth Tan

May 22, 2015
58
Joined
May 22, 2015
Messages
58
The input does not have a zener diode. It will have two diodes connected in series and the input goes at the join of the two diodes, one end connect to supply the other to 0 Volts. These diodes are to protect the input from very fast over voltages from an ESD event. The input is not designed to have a voltage greater than the supply for a longer period of time than an ESD event or a fast transient pulse caused by noise. Latchup is when the unintentional SCR inside latches, this SCR is formed when the device is made and we cant do anything about it. Google latchup.
Adam

Ok, that is some impressive reading...
And of course dave Jones had the best explanation and ... possible solutions (@9:00)

Dave mentions the 10K resistor in series with the input voltage (doesn't avoid SCR latchup, but it will save the chip because it current limits)
Also he mentions two clamping diodes.

So what if I would place a 5v zener from the Sense to Gnd. Would that help protecting the arduino? max voltage and current limiting by zener and resistor.

My max voltage in will be 20V (Limits of the LM1117-5) so 20V/10.000 Ohm= 2mA.
Would that be strong enough to cascade into a SCR Latchup?
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
He is right and wrong. SCR latch up is internal and once started it doesnt matter what the input resistor is. It can at worst destroy the device. To avoid this do what I said about the resistor, place a pull down on the input after the input resistor.
Adam
 

Kenneth Tan

May 22, 2015
58
Joined
May 22, 2015
Messages
58
Based on Adam's comment, I placed a 10K pulldown resistor on the sense line.

Also I made V2.0 of the schematic and PCB.
Fused J1 and J3 to one 5-pin input connector, replaced all resistors with smd 0805 versions (they were not handling any current) , the schottky ss34 diode became SMD and the 2n7000 is replaced with an 2n7002 SMD variant. Only the IRF9540 and the caps remain through-hole. (wow the smd version of the irf9540 is expensive)
The PCB became double sided. Still needed 1 jumper (or 2 via's)
I'm getting the hang of it.
Now I wonder if the traces are wide enough to handle the projected 20V/3 amp max. Trace width is 1,6mm
Haven't studied this yet.
 

Attachments

  • Soft latch power switch CPU controlled V2 - SMD - PCB - bottom layer - CP.jpg
    Soft latch power switch CPU controlled V2 - SMD - PCB - bottom layer - CP.jpg
    81 KB · Views: 219
  • Soft latch power switch CPU controlled V2 - SMD - PCB - TOP layer - CP.jpg
    Soft latch power switch CPU controlled V2 - SMD - PCB - TOP layer - CP.jpg
    60.3 KB · Views: 219
  • Soft latch power switch CPU controlled V2 - SMD - PCB - bottom layer.jpg
    Soft latch power switch CPU controlled V2 - SMD - PCB - bottom layer.jpg
    65.8 KB · Views: 249
  • Soft latch power switch CPU controlled V2 - SMD - PCB - TOP layer.jpg
    Soft latch power switch CPU controlled V2 - SMD - PCB - TOP layer.jpg
    46.1 KB · Views: 169
  • Soft latch power switch CPU controlled V2 - Schema - SMD.jpg
    Soft latch power switch CPU controlled V2 - Schema - SMD.jpg
    53.8 KB · Views: 441

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Based on Adam's comment, I placed a 10K pulldown resistor on the sense line.

Also I made V2.0 of the schematic and PCB.
Fused J1 and J3 to one 5-pin input connector, replaced all resistors with smd 0805 versions (they were not handling any current) , the schottky ss34 diode became SMD and the 2n7000 is replaced with an 2n7002 SMD variant. Only the IRF9540 and the caps remain through-hole. (wow the smd version of the irf9540 is expensive)
The PCB became double sided. Still needed 1 jumper (or 2 via's)
I'm getting the hang of it.
Now I wonder if the traces are wide enough to handle the projected 20V/3 amp max. Trace width is 1,6mm
Haven't studied this yet.

Hi Kenneth
Looking good, one comment is the 10K pull down will still give you 6 Volts on the sense input. Try a 5K6, this should give you 4.3 Volts. What track widths are you using?
Adam
 
Top