Vin is input only @jim-p

@jim-p

I see this statement a lot from you. But I have a hard time understanding electrically what the problem is. Here is the schematic for the UNO R3.

It looks to me like there is a diode after the barrel jack and then the VIN net. Can you explain what bad might happen if power is taken from the VIN net?

I started a separate thread because I know you don't want to answer on the same thread. But I really want to know and I don't understand and I've seen a LOT of people refute you. So can you explain what the problem would be to someone who isn't an engineer?

I can imagine that a topic like this could be considered inappropriate by some, so please keep the replies super polite and not antagonistic.

I thank you.

2 Likes

I don't see any problem with sharing a power supply connected to Vin, and have used that technique successfully for at least 30 years, on rather large number of microcontroller projects (predating Arduino, of course).

Of course, standard engineering design principles need to be applied. For example, Vin must reasonably "clean", and at all times be within range of the limits imposed by the Arduino in question.

Thanks Perry.

I started this because I actually want to understand the position because I don't know enough to say if it is wrong or right. Please know that I'm coming from a good place here.

And I know that if you ask Jim after he says it that he will just blow you off with some terse comment about how he isn't going to discuss on someone else's thread. So I thought I would start one to alleviate that concern.

Let's see.

  1. if you use Vin as an output, you put additional current through the onboard protection diode. That's not part of the Uno design parameters. "Gee, why did my Uno die?"

  2. if you inadvertently short Vin, the diode is unprotected, and will fail very quickly. "Gee, why did my Uno die?"

  3. Any load aberration presented to the additional circuit you wire to Vin, such as back EMF from an unprotected relay coil, is delivered to the input of the regulation circuit, and is very likely to damage the regulator of your Uno. "Gee, why did...

you get it.

Now, most of this would fall into, "well that was to be expected, so so what? Do dumb stuff, expect disaster." But when you're coaching a newbie, (who generally haven't yet got the common sense to even turn off the circuit before modifying it), it would seem like a very good idea to keep other circuitry away from Vin.

Just my two cents. I'm sure "jim" will come along eventually, and give you a dollar's worth of better advice.
YMMV, as usual.

1 Like

Thanks. That's exactly what I was looking for.

I was trying to understand the difference between tapping Vin or just tapping off the same power source at some other point before the barrel jack.

From what you describe it matters what side of that protection diode you're on

What is your theory?

Vin is a pin, which in any useful application is connected to a power source. Sharing that power source is not a problem, subject to restrictions mentioned in post #4.

"Theory" - not so much. Statement of fact. You put more current through the diode if you use Vin to route power out, from the power jack, to additional circuitry. If you know what you're doing, that's likely fine. When ohm's law is a mystery, not so much. Who's the audience here, you, me, or a whole lot of new learners?
Look, you love to pick fights, but I'm not interested. I'm out. Have a nice day.

For the Arduino Uno, I think the confusion here is whether the barrel jack is used as power input versus Vin.

Either can be connected a power source and either can be shared by the Arduino and something else.

If the barrel jack is powered, then yes, drawing excessive current from Vin could overload the input protection diode. That is obvious from the Uno R3 schematic diagram. However, as stated in post #4 above, it is fine to power the Arduino and something else, with a connection to Vin.

2 Likes

This diode (D1) (M7) supports a maximum of 1A according to datasheet:
" https://mm.digikey.com/Volume0/opasdata/d220001/medias/docus/4845/DS_3372_M7F.pdf

The Arduino without any device or LEDs connected, consumes a few milliamps. (+- 40mA).

This means that you can use Vin as a "source" and consume about 900 mA or less.

But there is also the security factor.

Any excess current above 1 A can damage this diode.

I really agree that recommending "new designers" use Vin as a way out is a risk.

After all, they still have no experience with smoke coming out of components.

1 Like

Another danger is when you have a load connected to V-in and an external power supply to V-in or the DC socket, and then decide to unplug that supply to upload a new sketch.
USB power now back-flows through the NCP1117 to the load connected to V-in.
I doubt if the 5volt regulator will survive that.
Leo..

1 Like

It's not uncommon protect outputs with fusing. Would not adding something like this alleviate some worry?

Taking supply from VIN is very tempting if your wall-wart has only the one barrel plug. And in case of a small project it need not be a problem. A problem might be: explain to a newbee that his dream project is NOT small.

Diode D1 can handle 1A DC. That’s obviously a limit. Concerning back-current through the NCP1117: the datasheet is silent, but the LM1117 (different manufacturer, carbon copy chip) can handle 1A DC and more than that as peak back current. Moreover: the supply from the PC is probably limited to 500mA, and the UNO R3 has a polyfuse of 500mA on board. All in all: running the project from USB alone is relatively safe, and if that works it’s likely to be safe to run from the wall-wart.

WARNING: not all boards are that forgiving: multiple Nano Every’s have died from back-current.

Supplying circuitry from the 5V pin gets you another set of limitations.

Some absolutely forbid to use your Arduino board for supplying anything. I think that’s unnecessarily restrictive, if you know what you’re doing quite a lot is possible. But: you need to know what you’re doing.

Indeed.

I also think there should be a distinction between a supply and an output. If I want to use Vin as an output for the voltage reference to an ADC then that should be just fine. It sounds like I should be able to output to something high impedance with no problem. It sounds like it's only if I try to source current that it becomes an issue.

All these pins can be used as inputs or outputs. The distinction is in the circuitry you hook ‘m up with. I can’t say something like a voltage reference is okay, because I can’t see the rest of the circuitry, that’s your job as the circuit designer. Yes, a voltage reference pulls less current so the likelihood of causing problems is less, but never say never.

By the way, if you intend to use a TL431 for a reference, feeding it from the 3.3V pin (twice stabilized) makes more sense (use 180Ω, sourcing 5mA).

If something changes in one corner of a circuit and weird things happen in another corner, that’s the life of an electronics engineer.

Don’t worry, you WILL overlook something sooner or later (I know I did), just hope it’s not smoke that alerts you to it. Good luck!

I think the question behind this topic has been answered sufficiently. Given the nature of the original question and the risk of it descending into something unpleasant I've closed it. If anyone has a clearly technical and helpful response they want post then send me a PM and I'll unlock it.

@jim-p obviously does not want to respond, that's his prerogative, please respect it.

1 Like