0
\$\begingroup\$

I want to run an 8x8 led matrix by using a darlington transistor arduino and decoder. for some reference I was looking at this previous question(Darlington Transistor Array). Each of my Leds draws 100mA, I know that the objective of using a darlington transistor is to supply a high current to the pins but how is this doing so if the darlington is being turned on to ground the Led and the decoder to give the Led voltage. Am I going to draw too much current from the arduino pin? How is the darlington working in this case to prevent from drawing too much current from the arduino?

\$\endgroup\$
  • \$\begingroup\$ huh? what decoder? \$\endgroup\$ – Jasen Feb 21 '18 at 4:14
0
\$\begingroup\$

Save some money and buy ULN2003 Darlington arrays as a SOIC or a dip package. They have base resistors and clamp diodes built in. At 7 per array you will need 3 of them, but they save much space anyways. They also have in-line pin outs so board layout is easy.

I created a schematic the best I could. I cannot find one that shows all 7 in one package, but I hope this helps you with assembly. The upper section drives the positive voltage to the LED, while the lower section grounds the LED cathode. 8 x 8 = 64 LED's. Note that R2 may have to be reduced to 22 ohms if LED current is 100 mA. Also R3 may get hot at 100 mA but that is ok.

NOTE: You can skip the Darlington if V+ is the same as the MPU V+, but it maybe difficult to push 100 mA through and LED if V+ is only 3.3 volts. In which case you will need to keep the Darlington in place and make V+ 5 volts or more (Keep the Arduino at 3.3 volts). The LED turn-on voltage is about 2.95 volts, and the transistor will cause a 1.5 volt drop, so V+ may have to be 5 volts.

Here is a link to the ULN2000 series: http://www.st.com/content/st_com/en/products/interfaces-and-transceivers/darlington-arrays/uln2003.html

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • \$\begingroup\$ sorry need some terminology clarifications. what is a SOIC or a dip package? also I bought some ULN2003APG but the output is inverted so they are grounded. Why would I only need 3 of the darlington? How would I just used the darlingtons as appose to including the decoder? How would i be getting a voltage coming in if they go to ground when a current is sent to them? \$\endgroup\$ – Brit Feb 21 '18 at 4:23
  • \$\begingroup\$ should have got ULN2803 as they have 8 channels instead of 7, but if they were cheap and you have room to fit the extra parts it's not that bad. \$\endgroup\$ – Jasen Feb 21 '18 at 4:27
  • \$\begingroup\$ There are only 7 to a package, so if you need 16 open-collector outputs you will need 3 of these ULN2003's. You will have surplus, but that's how it goes. A positive input turns on the transistor, so its output is grounded. \$\endgroup\$ – Sparky256 Feb 21 '18 at 4:28
  • \$\begingroup\$ see wikipedia for SOIC and DIP \$\endgroup\$ – Jasen Feb 21 '18 at 4:28
  • \$\begingroup\$ NOTE: Pin #8 is ground for all 7 transistors. \$\endgroup\$ – Sparky256 Feb 21 '18 at 4:30
0
\$\begingroup\$

Arduinos can only supply about 20mA per pin, so yes 100mA is too much, and you need 8 of therm (each row) so 800mA total.

So the ULN2803 to power the columns and need to also use darlingtons to power the columns, this will need to be a source type like M54564

\$\endgroup\$
  • \$\begingroup\$ does that transistor output as a ground or as a positive? I just bought a bunch of ULN2003APG transistors. \$\endgroup\$ – Brit Feb 21 '18 at 4:19
  • \$\begingroup\$ it's a positive output when on. \$\endgroup\$ – Jasen Feb 21 '18 at 4:20
  • \$\begingroup\$ @Jasen. The ULN2003 output is open collector, so when ON it grounds the collector. Also known as active-low outputs. \$\endgroup\$ – Sparky256 Feb 21 '18 at 4:23
  • \$\begingroup\$ wait so are they positive output or grounded? \$\endgroup\$ – Brit Feb 21 '18 at 4:24
  • \$\begingroup\$ ULN2x03 is grounded when on M54564 is positive when on \$\endgroup\$ – Jasen Feb 21 '18 at 4:25
0
\$\begingroup\$

If you can use one of your Arduino's SPI ports, or generate SPI in software by manipulating its GPIO ('bit banging'), then you could use the ONSemi NCV7608.

Its logic inputs are high impedance so you're only drawing tiny signal and switching currents from your Arduino SPI/GPIO pins.

Note that the NCV7608 load voltage (VS) range is 5.5 V to 28 V, so this device is only viable if your LED supply voltage rail can be in that range.

The NCV7608 gives you 8 configurable 350 mA drivers, each of which can be a low-side or high-side driver. You can use low-side drivers with an external clamp diode across each of your relays. Driver 'on' resistance is 1.2 ohms, giving a low driver power dissipation than the Darlington ULN2003A etc.

The device has a logic supply and a load power supply. The logic supply range is 3.15 V to 5.25 V, so it'll interface directly to your 3.3 V logic.

It also has over-current protection and some error-detection functions thrown in that you can access over the SPI interface.

enter image description here

You can then use 2 x NCV7608 devices and 8 x LED resistor to drive your 8x8 LED matrix.

schematic

simulate this circuit – Schematic created using CircuitLab

U1 provides the 8 high-side drivers for the LED array that connect each column of LED anodes to the LED supply voltage via a current-limiting series resistor. U2 provides the 8 low-side drivers that connect each row of LED cathodes to GND.

LED series resistors R1..R8 are all the same value. Each NCV7608 driver adds 1.2 R to the LED series resistance, making this resistance 2.4 R plus the resistor value. The series resistance, the Vled supply voltage, LED voltage drop at your drive current and Ohm's Law all determine the LED current when lit. For example, a Vled supply of 6 V and an LED drop of 1.6 V @ 100 mA lead to a 39 R series resistors

(from R= V/I = (6-1.6)/0.1 = 44 R, minus 2.4 R is 41.6 R, use standard 39 R)

U1 and U2 use one SPI port with two chip selects to select the target SPI device. This SPI port is either a hardware one in your Arduino or one implemented by a software routine controlling GPIO ports.

Your Arduino software can then implement a scanning routine, writing to the SPI ports for U1 and U2. This routine would repeatedly select one new column only then drive each of the rows, one at a time, with their display data and wait for an LED lighting period. There is plenty of text driving on multiplexed LED displays on the internet.

\$\endgroup\$

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.