0
\$\begingroup\$

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:

Current Circuit Design

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:

Design Idea #1

But I have a ton of uncertainty about this. These are my concerns / questions:

  1. The voltage will be entirely difference for every connection on the microcontroller -> Transistor (base).

  2. 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?

\$\endgroup\$
  • 2
    \$\begingroup\$ 1) no, you're not close to having a working design. 2) if you have little experience with electronics, you should absolutely not be working with anything connected to mains power \$\endgroup\$ – Hearth Oct 27 '19 at 22:04
  • \$\begingroup\$ referring to the second schematic ... the voltage between the group #1 transistor base and the group #65 transistor base can be in the neighborhood of 170 Vdc \$\endgroup\$ – jsotola Oct 27 '19 at 22:18
  • 1
    \$\begingroup\$ Your circuit is a disaster. But forget that... You show a transistor on each LED, does that means you want to control each one individually ie. 64 x 3 = 192 LEDs each with a separate control? \$\endgroup\$ – Bruce Abbott Oct 27 '19 at 22:19
  • 1
    \$\begingroup\$ So that's 64 strings of 3 LEDs each? \$\endgroup\$ – Bruce Abbott Oct 27 '19 at 22:41
  • 1
    \$\begingroup\$ Do NOT build that circuit! On the other hand, you can buy a reasonable 5V DC power supply, a microcontroller (or an Arduino, probably the Nano could be closest to your needs), and a WS2812B-based LED strip. You connect the power supply to AC, the 5V part to the LEDs and the Arduino, connect a digital pin to the 1st LED's input, and you're done. The software side just import the Neopixel library, come up with a pattern to show, program it, and you're done. \$\endgroup\$ – Nyos Oct 27 '19 at 22:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.