0

I was following the official tutorial of LED matrix integration and couldn't figure out why there is no resistor.

I assumed there are built-in resistors in the LED matrix, so I did an experiment by connecting pin 9 of the LED matrix to v5 of my Arduino Leonardo board and pin 13 of the LED matrix to GND of the same board. You can refer to the schematic diagram below to know I was trying to lit up the LED at the position [0, 0].

Unfortunately, the LED next to [0, 0] burned immediately and I still couldn't figured out it.

Question

  1. Are resistors necessary for 8x8 LED matrix?
    1. If yes, why the official example doesn't have any resistor?
    2. If no, why my experiment failed?
    3. If no, why are there so many unofficial examples use resistors for each wire?

Source

https://docs.arduino.cc/built-in-examples/display/RowColumnScanning

Circuit

Schematic

2
  • 1
    Since the pins of a microcontroller cannot provide much current, they got away without resistors. However, they might be using the chip out of its maximum limits. But as you connected the LED directly to the power source, it delivered all it can. Commented Feb 20, 2022 at 12:26
  • 1
    as per my comment in your previous question, the LEDs are lit only one at a time ... that means that each led is turned on very briefly ... so briefly, that the LEDs do not heat up enough to burn
    – jsotola
    Commented Feb 20, 2022 at 19:44

1 Answer 1

3

Well done Arduino, you did a great job providing a magic-smoke tutorial [sarkasm off]. IDK how this tutorial could make it into their official docs, it should not be there!

You definitely need series resistors at each column or at each row to protect the LEDs/GPIOs (that's 8 resistors). There may be matrices that integrate resistors, but your one and the one they use in their docs does not.

An alternative is to configure the column GPIOs as inputs with enabled pullups and the row GPIOs as ordinary outputs. This way, current will be limited by the pullup resistors. But as those are quite large (several 10kOhm depending on MCU) the LEDs will be very dim.

2
  • 1
    The issue has already been documented: github.com/arduino/Arduino/issues/8950 Commented Feb 20, 2022 at 18:14
  • @Mikeologist if they know about the issue already I wonder even more why the tutorial is still online! I'd expect them to know how to drive a simple LED...
    – Sim Son
    Commented Feb 20, 2022 at 18:32

Your Answer

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

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