Apologies for the "newb" question. My test project has consisted of only a couple of LEDs, wired to an Uno, and fade up when tapping a capacitive touch switch. At scale I expect to have close to 50 of these LEDs, and realize I need to re-engineer this test setup to take power from an external 5V supply, and not from the Arduino in order to migrate this to the larger setup.
Unfortunately I'm a bit stumped. The circuit right now uses Arduino GND and receives the 5V+ from PWM~9 (when the switch detects a touch event).
Where I mess up the circuit is if I move my +5V from PWM 9 and connect to the power supplies +5V then does my LED's ground side go into the PWM? I'm suspecting "no", because from what I've learned so far ground is typically shared across all the components, and we don't want to connect that to a PWM.
So, if this is the case, I would now have LED's ground connected to the Arduino's GND and have basically removed any "switching" from the equation... hence, my need for someone to point me in the right direction.
For the NeoPixels it was much more straight forward, because you always feed +/- right into the strip, and they only light up because of the data received. Basically, I don't have that 3rd wire here... these are just normal 2 wire LEDs.
Hey guys - here's the circuit as it works right now virtually...had to order some parts. The two main resistors are 10k, the one going into the LED is 470ohm. The external power will be 5V, but the 9V was what was available.
If a person wants to damage an Arduino by following some uninformed hobbyist's recommendation to leave out the MOSFET gate resistor (150 Ohm minimum), there is no need for debate.
There's debate about it even on this forum, among folk who seem to know what they're talking about.
(I might add I have no way of knowing which is the correct view, and I always err on the side of safety and use a gate resistor. That's not because I believe it's needed, but because it does no harm, and there's a view that not using it might cause harm.)