Feedback on my first PCB design?

Thanks - based on that datasheet and this:

8.1.2 Raising the Output Voltage Above the Input Voltage
Because the output of the device does not sink current, forcing the output high can cause damage to internal low
current paths in a manner similar to that just described in Shorting the Regulator Input.

Seems like the diode to protect output would be needed?

(as an aside the capacitor information in this datasheet was much better than what I previously had, thanks.

No worries. That diode would be in order in your case.

So D2 is all wrong. It should go from Vout to Vin of the regulator. That being a common practice anyhow in case there are big enough caps at the VReg’s output.
In this case, it actually is necessary.
Voltage-regs often enough are robust enough to withstand a supply on their output. But I don’t suggest this abuse.

Nick

Can you explain why? What it does?

EDIT: I hope we are on the same page. I was talking about possible implementation of the module. As a black box it would just have +5V in the VIN pin when the the module is connected to a power source though the USB connector. I don’t see why D2 would be wrong. It would stop current going to the regulator.

Yes, it does. But it also prevents the voltage regulator to output the desired voltage.

Nick

OK, I understand. The internal regulator may need at least 4.6V (with max 1.3V dropout and 3.3V output). If the external regulator gives 5V and the diode takes 0.7V it’s not enough.

Trying to make sure I follow - D2 is wrong because the regulator outputs 5V, and the diode D2 as designed will take 0.7V from that, and 4.3V is not enough to pass to VIN - I think that’s the problem?

If so, I don’t understand what connecting D2 from VOut to VIn of the regulator will do. Wouldn’t that mean that when the NodeMCU is connected to USB power, 5V would still flow from VIn of the NodeMCU to VOut of the regulator? A diode between Regulator VOut and Regulator VIn wouldn’t stop that, would it?

Till we don’t have NodeMCU schematic it is divining from coffee grounds.
Name VIN suggests it is to input power supply. It is possible that circuit inside works at 3V3. If I were designing such module to be powered from two sources I would connect two diodes (one from VIN, and second from USB) to protect one power source from another. If diodes are there then when it is powered from USB then no power can go out through VIN.

The diode across regulator protects it against damaging it by high current flowing through it if its output is powered and there are big capacitors at its input (for example capacitors in jack connected power supply). After capacitors are loaded the current stops to flow. If the big electrolitic capacitor has ESR of for example 0.2 Ω then if ‘strong’ 5V is applied to regulator output and its reverse drop-out is for example 2V (I don’t know the real values) then there can be short current pulse of (5-2)/0.2=15A.

Yes, any voltage from the NodeMCU will flow to Vout of the regulator. And from the regulator’s Vout, the diode will supply the regulator’s input Vin with 0.7 V less. And nothing at all will happen. The regulator won’t see a negative difference (beside the 0.7 V) and won’t go up in smoke. If that diode is missing, there will be -5V (or whatever) difference from Vout to Vin. And the regulator might not like that.
This is a very common pattern, I guess you will even see it in the data sheets of regulators. Or the manufacturer states what voltage doesn’t hurt (usually in the section “Absolute maximum ratings” at one of the first pages).

Solving that “problem” with a MOSFET is like shooting at ants (not aunts! :grin: ) with cannons.

Nick

The original project:

Docs with circuit diagram

1 Like

If VIN is J1 PIN 15 then when USB power is connected at VIN there is about 4.6V.

Thanks so much! So I need a diode pointing from VOut of regulator to VIn - this allows current from the NodeMCU to flow to both in and out of the regulator and prevents a voltage difference.

I understand - now the learning question - I think figure 15 in the datasheet (here is the comprehensive one provided by someone very helpful above) is what I could’ve recognized as addressing this?

What I don’t understand enough theory for is in the figure 15 configuration the input capacitor is shown polarized (vs. the common non polarized small caps on the standard config on page 1). So my two questions would be:

  1. Per Piotr’s message - what is “reverse drop out”? Is that the metric delta of out and in voltages under which I’ve successfully protected the regulator? Or is that called a different metric?
  2. In figure 15, why would the diode connect to regulator VIn after the big cap vs flowing into the big cap?
  3. What theory / mechanic do I need to understand to calculate the values of the caps needed?

The nodemcu project (linked above by holger) seems to solve the dropout from USB 5V with a schottky diode which has smaller drop. That would be possible here, too, by replacing D2 in the schematic with a schottky. But your solution should work, too, as far as I can see after reading the docs of nodemcu and 78xx linked to by jos (which indeed has your solution documented).

I was writing about drop-out at 7805 regulator when it is powered in reverse order than normally (not from left (Vin) to right (Vout) but from right to left). I don’t know what about is that drop-out as I was never interested in it, but it is bigger then 0.7V.
When you put diode connecting Vout with Vin then diode begins to conduct current when drop-out is about 0.7V so the current will not flow through IC.

The big (electrolitic) caps happens when you have standard power supply with trafo at the beginning. Depending where you live after the trafo and Graetz bridge you have 120Hz or 100Hz pulses loading the capacitor, and between pulses the capacitor gives the power for output. I[A] * t[s] = C[F] * U[V]. If you consume 1A and allow for 1V drop at capacitor between pulses you need 1A*10ms/1V = 10mF = 10000uF capacitor.

There is NCP1117 inside.


Figure 5 shows dropout about 1.1V max at typical temperature.
So to get 3V3 at output it would be good to have at least 4V4 at input.
So I think Shottky diode after 7805 would be better then standard diode.

If you want to know more about capacitors, I gathered some links for another thread, starting here:

Those are mostly about bypass capacitors for more complex ICs. You should always read the datasheet of your component and follow it, but they don’t always tell you the basics.

You probably shouldn’t use electrolytic cap for smaller values. They are good only as “bulk” capacitors.

For such a basic circuit I’ve found this discussion useful and interesting. I’d certain thank those folk who took the time to reply with circuits, several of which are now scribbled into my Lab Book for future reference.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.