Gang:
I'm using an Arduino Nano 33 IoT as the "brains" of my
reflow oven conversion project and just ran into something surprising. I have it working now, but I don't understand exactly what was happening.
Here's the situation:
I built a trivial little 5V power supply as part of the project. It takes a 12VAC input from a transformer, uses a bridge rectifier to get DC, and then uses an LM7805 to down-regulate it to 5V. OK, that part is fine and working. The Nano is connected to a single transistor used for level shifting for the SSR control, an LCD display, a keypad encoder, and a thermocouple amplifier. Laid out on the bench all of this works perfectly fine, with the Nano connected to my PC with a USB cable for programmming.
Fast forward: I package everything up into the enclosure, connect the 5V power supply to the Nano by bodging up a USB cable that connects to the power supply, wire it all up, turn it on and... crickets. Nothing displayed on the LCD. And I notice a faint burning odor when I open the enclosure.
Measure voltage going to the LCD and it's way low. Suspect that my power supply has fried, I pull things apart, measure the 5V rail of the power supply in isolation... and it works fine. Huh?
Notice that it's the LM7805 that's getting hot, and no LED on the Nano. I figure something is pulling too much current and over-working the 7805. But there's nothing there but an Arduino Nano. All the info I can find online shows that these things use about 100 mA at most. WUT?
OK, to confirm what I think I'm seeing I wire in the multimeter, and check the current draw of the Nano. It's flashing up to 2A. Yes, 2 entire amps. Double "WUT"?
Anyway, some reading online suggests that the behavior of the Nano is different when you power it through a USB port vs when you power it via the Vin pin. So I rewire things to use the Vin pin instead, and now the Nano draws about 37 mA when idle, the LCD works fine, and all is hunky dory. OK, to be fair, I do still need to add a heat sink to my 7805, as powering the LCD does work it just hard enough to where it gets a little warmer than I would prefer. But that's not the big question I have.
What I'm wondering, is what's going on with my Nano drawing 2A when connected via USB, but only 37 mA when connected using Vin? Surely it isn't using 2A all the time when USB connected, right? Can (non USB 3, USB C) USB even deliver 2A? Something about this seems very mysterious to me.
If anybody groks what is happening here and could explain it to me, it would be much appreciated.