0
\$\begingroup\$

I'm trying to control an LED-strip with an Arduino like an 8x8 matrix with a common anode (pic 1).

I put 2 NPN-transistors in the circuit and a LED-strip between them. The first transistors in pic 2 are 2N3904s, each one connected to an Arduino digital pin; the second one is a TIP120. The maximum current in the circuit is 0.4 A; 0.08 A for each strip.

I use simple Arduino code for it, like digitalWrite(4, HIGH) (for any of the 2N3904s) and digitalWrite(5, HIGH) (for the TIP120) to turn it ON, but after digitalWrite(4, LOW) and digitalWrite(5, LOW) the LEDs are still on. So I need to fix my circuit, but I don't know how.

enter image description here

enter image description here

\$\endgroup\$
7
  • \$\begingroup\$ A very warm welcome to the site. This circuit for this is pretty commonplace and straightforward to look for. Have you searched the internet and this site for example circuits? If so, what did you find? \$\endgroup\$
    – TonyM
    Nov 8, 2022 at 14:31
  • \$\begingroup\$ Thank you. Yeap, i tryed to find solution, but all I found - circuit with one NPN transistor after LED-strip and it doesn't fit for me. Maybe I'm just bad at "googling", because english is not even my second language. If you have some URLs for same solution for questions like mine, please, send it. \$\endgroup\$
    – Kirill111
    Nov 8, 2022 at 14:42
  • \$\begingroup\$ These LEDs "large" matrix 8x8 have a "driver" board ... choose the FC-16 model lastminuteengineers.com/max7219-dot-matrix-arduino-tutorial \$\endgroup\$
    – Antonio51
    Nov 8, 2022 at 15:02
  • \$\begingroup\$ Yeah, I know about driver for matrix, but this matrix can also works only with arduino. But then it use 16 pins on arduino. Look at the scheme of the matrix, I try to use same principle in for my LED-strips, but they more powerfull then driver like MAX7219 and adruino can give. So I need use anduino as logic driver, and transostors as swithes, but this is my question... \$\endgroup\$
    – Kirill111
    Nov 8, 2022 at 15:25
  • \$\begingroup\$ Ok, just to say that there was a solution that can be "expanded" to more matrices ... For your schematic, you need 8 TIP120, one for each Column Cx, and 8 2N3904 for each Row Ry ... but there are other solutions with IC. Note also that you can drive 8 pins with a port (would be faster). \$\endgroup\$
    – Antonio51
    Nov 8, 2022 at 15:38

1 Answer 1

1
\$\begingroup\$

Rows are connected to anodes, and columns are connected to cathodes. Since you are using only NPN transistors, any transistor on the anode side of a diode is "high-side" and will have to be an emitter follower. Emitter followers should not have a base resistor.

On the low side, at diode cathodes, all transistors are operating in common emitter configuration, and will require base resistors to limit base current.

The diodes all sit between high-side emitters and low-side collectors. For 3 columns and rows, the circuit will resemble this:

schematic

simulate this circuit – Schematic created using CircuitLab

Extending this for all 8 rows and 8 columns will require 16 transistors.

Don't forget the LED current limiting resistors Ra1, Rb1 etc.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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