0
\$\begingroup\$

I have built an LED matrix (9x9) and want to run it with Arduino. I am using technique of scanning, lighting up 1 LED at 1 time.

The more I am reading about power requirements of a matrix the more I am getting confused. As per my understanding, there will only be 1 LED lit at any given time (and it will remain lit for a delay of 300ms). Therefore, I need to calculate voltage and current limiting resistor according to just 1 LED. 1 resistor will be attached with each row. Some articles are suggesting that it needs to be calculated for 1 whole row...WHY? I cant digest the logic.

Please note that I do not intend to use any shift registers or current sink devices. Arduino alone. As also depicted in Arduino CookBook and certain other resources.

\$\endgroup\$
6
  • \$\begingroup\$ Could you please post an schematic of your setup and links to the resources you mentioned? \$\endgroup\$
    – Ricardo
    Feb 4 '15 at 17:25
  • \$\begingroup\$ linkPage 262 - PDF can be viewed online. And there were certain other googled links which I haven't saved and closed all windows in frustration :-( I queried "Power Requirements of an LED matrix" \$\endgroup\$ Feb 4 '15 at 17:27
  • \$\begingroup\$ Did you read the discussion on page 261? What specific point are you confused about? \$\endgroup\$
    – Dave Tweed
    Feb 4 '15 at 20:48
  • \$\begingroup\$ Build the project, then measure the current flowing through it. \$\endgroup\$
    – Triak
    Feb 4 '15 at 21:14
  • \$\begingroup\$ @DaveTweed The book did not raise any ambiguity. It was some forums and articles at internet who said otherwise. Like when I posted the question at Arduino forum, people said I must be using external power source to drive the matrix because 1 row or column will need 20*9 mA of current which Arduino can't provide. I just wanna make sure when I plug in the matrix, my Arduino never fries up. Thought to take multiple opinions for a better understanding. link Thread on Arduino Forums. \$\endgroup\$ Feb 5 '15 at 10:51
1
\$\begingroup\$

If you're selecting one row/column at a time and then scanning the columns/rows, one at a time, there's no reason why you should need more than one ballast resistor per row/column since there's no way for more than one LED to be ON at any given time.

\$\endgroup\$
0
\$\begingroup\$

Ok thanks everyone for valuable inputs. But i have figured out the answer to my question. It lies in the algorithm used for scanning.

The algorithm which I was using (as i have quoted above too) lights up ONLY & ONLY 1 LED at a time (for some microseconds), then turns it off and turns on the next one. so in this case I need to calculate the resistance according to just 1 led. in my case, using 5V supply from Arduino Pins, 2V drop across LED, 20mA current rating, R comes out to be exactly 150 ohms.

The disadvantage might be somewhat dimmer LEDs as compared to the other method, but it is compensated by the fact that we can provide 20mA of current to the LED instead of X ( X= 40mA / No. of LEDs per row ).

The other method off course comprises lighting up all LEDs in a single row or column at a time, delay of some microseconds, then turning them all off and moving to the next row/column. So we have to limit the current to X as Arduino cannot provide greater than 40mA per pin. I believe in case of a 8x8 or 9x9 matrix, I will have even dimmer LEDs using this technique as compared to the 1st one.

Similarly, there can be a case where multiple rows/columns can also be turned on at same time. (depends on the type of image you want to display.) In that case one has to consider not only 40mA per pin constraint but also the 200mA constraint for all pins considered collectively.

The 1st algo is the best one for my needs. As it can display ANY image with good brightness levels.

Experts can rectify if there is anything wrong in my theory.

\$\endgroup\$
2
  • \$\begingroup\$ You should accept the answer that's most usefull, so that others with the same question can find the answer easily. \$\endgroup\$
    – Paul
    May 11 '15 at 14:02
  • \$\begingroup\$ i have found my own answer to be the most useful :-) \$\endgroup\$ May 16 '15 at 17:44
0
\$\begingroup\$

Arsalan, it depends on how many LEDs are being switched on/off via a single transistor. In your case its just 1 LED. So the resitor (series) with that LED is Rseries = (Vcc-Vled)/Iled. Imaging you have a Red LED that conumes 30mAmps and needs 3V and you have a dc rail of 5V. The series resistor is (5-3)/30mAmps.

The wattage of the resistor can be calculated by the Ohms law of ixixR.

You have cause to worry if you have multiple LEDs being sourced current via a single resistor.

\$\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.