1
\$\begingroup\$

Explanatory image of wiring for LED lighting

I have attached the image.

When power is connected to LED A, 20 mA will flow at 100R. This is not a problem. It shines brightly.

On the other hand, the output of the MAX7219 draws only 4 mA when LED B is lit. I control the MAX7219 with ESP32 and set it to shine the brightest. When I measured the current of the MAX7219's ISET resistor, it was 0.28 mA. Apparently, the MAX7219 allows 100 times more current to flow through the LED than the ISET resistor current. In other words, LED B should be able to flow 28 mA. However, only 4 mA flows and the light is dim.

Why? How can I get 20 mA to flow to LED B?

This is a question about lighting one LED with the MAX7219. It is not an 8 x 8 dot matrix.

The MAX7219 is stated to be able to flow up to 40 mA per segment.

When connected as shown in the attached photo, a maximum of 40 mA should be able to flow through one LED. However, when I measure it, only 4 mA flows. If I use the <MD_MAX72xx.h> library, will only 4 mA flow?

#include <MD_MAX72xx.h> library is used to light only one LED at maximum brightness.

    #include <MD_MAX72xx.h>
    void setup() {
      Serial.begin(9600);
      mx.begin();
      mx.control(0, MD_MAX72XX::INTENSITY, 15);
      mx.setColumn(0, 0, 0b10000000);
    }

This connects pins 9 and 13 of 1088AS to MAX7219, and only the bottom right one of 1088AS lights up. In the photo, LED B is connected to GND and pin 9, and 4 mA flows. Similarly, if LED B is connected to pins 9 and 13, 4 mA will flow.

I measured the pulse.

Even though the maximum brightness is set to 15, the intervals between pulse outputs are wide. In other words, LEDs don't shine brightly. Why are the pulse intervals so wide?

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Welcome to EE.SE. You could improve your chances of an answer by an edit to include a link to the datasheet (not an Amazon ad page) for the PCB, the datasheet for the MAX7219. A schematic diagram shows the "schema" of your circuit much better than words or a photo (useful as they are). There's a CircuitLab button on the editor toolbar and it's very easy to use. Save and Insert when done. \$\endgroup\$
    – Transistor
    Commented Dec 26, 2023 at 12:16
  • \$\begingroup\$ I can't recall for sure, but isn't he max7219 a 8x multiplexing ic? \$\endgroup\$ Commented Dec 26, 2023 at 12:31
  • 1
    \$\begingroup\$ W.r.t. I control the MAX7219 with ESP32 and set it to shine the brightest the issue might be in the code controlling the MAX7219 - the datasheet contains On initial power-up, all control registers are reset, the display is blanked, and the MAX7219/MAX7221 enter shutdown mode. Program the display driver prior to display use. Otherwise, it will initially be set to scan one digit, it will not decode data in the data registers, and the intensity register will be set to its minimum value.. Can you edit the question to include the code running in the controlling ESP32. \$\endgroup\$ Commented Dec 26, 2023 at 12:43
  • 2
    \$\begingroup\$ Please add the code to the question and not in a comment. \$\endgroup\$
    – StarCat
    Commented Dec 26, 2023 at 13:28

1 Answer 1

1
\$\begingroup\$

Even though the maximum brightness is set to 15, the intervals between pulse outputs are wide. In other words, LEDs don't shine brightly. Why are the pulse intervals so wide?

The MAX7219 is designed to drive a matrix of LEDs, with 8 rows and 8 columns. Whereas in the question is being tested with a single LED B connected to the SEG DP output of the MAX7219.

The following code in the question only sets a single LED for row 7 (SEG DP) and column 0:

mx.setColumn(0, 0, 0b10000000);

Which means the SEG DP output is only on for one out of the eight multiplexed columns.

To increase the brightness of LED B try changing the code to the following, which should set the SEG DP output on for all 8 columns:

for (uint8_t col = 0; col < COL_SIZE; col++)
{
    mx.setColumn(0, col, 0b10000000);
}

Note: I haven't got the software or hardware to test the above, found by looking at the MD_MAX72xx.h include file which looks to be the library in use.

\$\endgroup\$
1
  • \$\begingroup\$ Thank you for your reply. The brightness didn't change at all. \$\endgroup\$
    – M MODELER
    Commented Dec 28, 2023 at 15:24

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.