1
\$\begingroup\$

enter image description hereI am trying to design a circuit to control a total of 71 RGB LED's (wired basically in parallel for each color channel) using an ATTiny85 to control the on and offs for each color channel. I figure that the current load will be way too much for the ATTiny85 to be directly connected to the LED banks since it max's out at about 40mA per channel.

My thought would be to isolate the LED color banks each on their own transistor. Then I would just connect the bases of the transistors to the ATTiny85's output pins. I figured that this configuration would save me programming for a LED Driver IC.

Does anyone have an input on this evil plan? Also, would a regular 2n2222 appropriate for that?

\$\endgroup\$
  • 4
    \$\begingroup\$ There's a schematic button on the editor toolbar. It's easy to use and saves an editable schematic inline in your question. Start sketching out your evil plan and you will find that your constraints will start to guide you to your solution. We'll chip in with comments and answers. \$\endgroup\$ – Transistor Jun 14 '18 at 21:33
  • 2
    \$\begingroup\$ As a quick note, 71 LED's in series means some will need a minimum of 215 volts to even turn on dim. No, the 2N2222 is rated 40 volts typically. Try a MJE340 300V 500 mA transistor. \$\endgroup\$ – Sparky256 Jun 14 '18 at 22:01
  • \$\begingroup\$ 66 of them seem to light up just fine on 4 AA batteries and a 110 Ohm resistor. \$\endgroup\$ – Muscle Nerd Jun 15 '18 at 17:42
  • \$\begingroup\$ @Transistor I do not see a schematic button anywhere. \$\endgroup\$ – Muscle Nerd Jun 15 '18 at 17:57
  • \$\begingroup\$ If you are lighting 66 LEDs on 4 AA batteries then you have them in parallel, not in series as described in your question. For the schematic click the edit link under your question, position the cursor where you want the schematic and press the little circuit schematic + pencil icon. \$\endgroup\$ – Transistor Jun 15 '18 at 18:41
0
\$\begingroup\$

I figured that this configuration would save me programming for a LED Driver IC. Does anyone have an input on this evil plan? Also, would a regular 2n2222 appropriate for that?

Yes to add a low side switch is a common way to source more current than the pin. One problem with using an NPN is you also have an 0.7V drop there which also uses some energy, what you have should work.

Does anyone have an input on this evil plan? Also, would a regular 2n2222 appropriate for that?

A mosfet with a logic level input would probably be more appropriate if running on a battery to get minimal power dissipation in all parts. In the place of your switch, you can input the GPIO. Mosfets are capacitiavley coupled so they waste no current to switch on. You do however need to make sure your Vgs (voltage between the gate and source) is high enough or it will not turn on. You can see that curve in the datasheet of the mosfet you select. It will also tell you the relationship between the resistance and Vgs.

enter image description here Source: http://blog.solutions-cubed.com/h-bridge-control-of-a-motor-low-side-switch/

\$\endgroup\$
  • \$\begingroup\$ Thanks for the info! The voltage to the ATTiny85 is regulated to 3.3v (I have a 5v version as well) Is there a particular series of MOSFET you would recommend in this circumstance? \$\endgroup\$ – Muscle Nerd Jun 15 '18 at 19:48
  • \$\begingroup\$ I like the 2N7002, it works at 3.3V, If you like the answer be sure to vote and mark, thanks \$\endgroup\$ – Voltage Spike Jun 15 '18 at 20:02
  • \$\begingroup\$ This circuit will work for a single LED, not 71 LEDs. Unless you are using a 3 Amp MOSFET. It is inappropriate to use a current limiting resistor for a battery powered LED. You need a CCR minimum. \$\endgroup\$ – Misunderstood Jun 15 '18 at 20:22

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.