I'm working on a PCB (Christmas Present) to take in A/C to a string of LEDs and control them (with transistors? and a microcontroller). This is a bit out of my league, but it is making me learn quickly. As far as I can tell this should work, but that is a weak statement at best, I'd appreciate any guidance.
My first crack at this, which I have successfully built and it runs stably is just lighting the LEDs. It looks like:
Now I'm trying to add another (far more complex) layer to this, by making the LEDs controllable. The design I've come up with is:
But I have a ton of uncertainty about this. These are my concerns / questions:
The voltage will be entirely difference for every connection on the microcontroller -> Transistor (base).
Is there additional protection needed for the microcontroller's GPIO. I think they would only be in output mode, I just need to pull to ground to switch off the transistor. I've seen suggestions of putting a resistor and/or Zener Diode inline, but that was only in the context of using the pins for input.
Am I even close to having a working design?