2

I'm an art student and absolute beginner to electronics/code - my broader goal is to learn how to control individual LEDs when there are many of them (like 64 or more even, so am learning about shift registers, multiplexing etc. also).

I have been working with a 4x4 matrix example by Jon Fox. I have breadboarded it as below and checked it multiple times.

enter image description here

For the most part it's successful; the code runs and I get the LED animations in his code. I am also able to anticipate which parts of the code refer to which LEDs when I test by commenting out parts of the code - for example r1c1() refers to the top row, right-most LED.

enter image description here

However, the top row, second from the left LED does not turn on.

I have tested the individual LEDs before starting, tested the connections of the wires in case they don't make good connection in the breadboard, and tried adding 330 Ω resistors to the rows (instead of the orange connection wire in the image), and tried with 1 kΩ resistors instead of 220 Ω. The reason I tried those values was that I have been successful when I've used another set up I have, image below.

enter image description here

The blue and the white LEDs draw similar voltage so as far as I understand this wouldn't affect anything. The code runs great on this also.

I understand I could still be making some human error, especially as I've been going crazy with this. However, because I really want to understand the factors involved in controlling LEDs, I'd love to know if at all there are other variables at play.

For one, I was looking into 'floating inputs' hence tried adding the other set of resistors, and tried colour LEDs (more bulbs were either off or dim) as well as 3 mm white LEDs (same result as 5mm). The most difficult thing in this process is wondering what I don't know, so if anyone can direct me towards things I should consider for my purpose, or help me solve my current problem, I'd be really grateful.

1 Answer 1

0

It is very difficult to be certain. You state that the second from the left LED in to top row is not turning on as expected. In the bread-board diagram this LED is plugged into holes D7 and D8. However, in the image it appears this LED is plugged into holes D8 and E8.

The exact letter/number may not matter if you are not following your bread-board diagram precisely. However all pins in a row (i.e. A8, B8, C8, ... , E8) are shorted together. So plugging in an LED into holes D8 and E8 would prevent it from lighting up.

Also, you have added resistors to your matrix which are not in the bread-board diagram. The column resistors appear correct but the row resistors are questionable. In practice, if you are going to light only 1 LED in a column at a time, then you might get by with only column resistors. For such a configuration (only column resistors) you may see the LEDs dim if you light more than 1 per column. If you do want to light more then one LED per column, the trick is to let the software switch LEDs on and off such that there is only one lit per column at a time. But fast enough so that a human eye can not see it. So a bit faster than 100ms.

5
  • Thanks for your reply. Just to confirm, the LED second from the left in the top row is plugged into D7 (cathode -) and D8 (anode +). Commented Aug 8, 2022 at 18:05
  • Then check if it is reversed bias (put in backwards). LEDs are diodes that happen to give off light. And diodes can only be inserted forward biased (in the correct direction). Commented Aug 8, 2022 at 18:12
  • Let me know if the "only use column or row resistors but consider not using both & use software to mitigate dimming from lighting too many LEDs at once" is not clear. Even in your second "free-standing" display I imagine the more LEDs you light in a given column or a given row the dimmer the individual LEDs will become. If you don't want to mess with the software (i.e. you just want to be able to light any combination of LED w/o dimming problems) then you will need to add a resistor to each and every individual LED. Commented Aug 8, 2022 at 18:19
  • It is put in the correct direction. I can remove the row resistors, I tried them in the breadboard since they worked in the free standing version, and I wondered about needing a pull-up(down?) resistor because of this idea of the floating input? Maybe that's totally irrelevant. At the moment I'm not experiencing dimming, in either version. There is no current or voltage on this LED and I just wonder why. Commented Aug 8, 2022 at 19:17
  • 1
    I just figured out my mistake - misconnected one of the cathode wires - the 2nd LED is on. But your feedback was useful and much appreciated. Commented Aug 8, 2022 at 19:29

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.