4

I'm using 7-segment 8-digits MAX7219 eBuy module in my battery-supplied ATMega168P project to output some readings. MAX7219 in powerdown mode draws ~150uA (as stated in the datasheet) which is too much for me, because the rest of the circuit draws less than 1uA is sleep mode. So I decided to power off Vcc line for MAX7219 before entering sleep, and power it on just after wakeup.

Current draw for the software-dimmed display module is only 15..19 mA in my case, which is far less than 40mA pin maximum for ATMega168P, so I connect display Vcc line to one of digital pins and power it on at setup():

void setup()
{
  pinMode(4, OUTPUT);
  digitalWrite(4, HIGH);
}

schematic

However, display module works only 1..3 seconds after starting, then switches off. I checked display Vcc — 4.9V, but the display is off. (I turned off enterng to sleep mode for a while)

This display module doesn't have capacitors C3 and C4 between Vcc and GND (but there's a placeholder for it), recommended in some sources. I solder two capacitors of 100nF and 4,7uF in parallel. It helps only a little: after 1..2 seconds of normal working display shows only digit #0 and in much higher brightness than I set (see the photo).

enter image description here I may only suggest my cheap multimeter is wrong and the display draws much more, but I dont know how to check it. Rset is 10k on this module, btw.

  1. Why does it happen?
  2. Is there a way to solve the issue without using a transistor / MOSFET / relay (I suppose it should obviously help).

EDIT: If the display is powered directly by controller Vcc it works correctly as expected. It's current draw is 15..20mA.

2
  • 1
    Well, the average current might be about 20mA. But peaks will be much higher. Simple mosfet for switching power will be much better.
    – KIIV
    Jul 23 '17 at 11:28
  • Thanks, @KIIV ! This is obvious solution and I'm going to try some 2N3904 as a power switch here. But I'd like to understand the reason of issue: high current draw or some noise from ATMega168 pin or smth else...
    – finnan
    Jul 24 '17 at 0:58
3

After some research I eventually solved my problem, so here's the answer.

  1. Why does it happen?

This LED display draws much more current than I measured on Vcc line between Arduino and display because of ghost powering via signal lines (DIN, LOAD, CLK). The display (although slightly dimmed) can even run without Vcc line connected! Real current draw was about 30-40 mA with peaks up to 100 mA.

  1. Is there a way to solve the issue without using a transistor / MOSFET / relay (I suppose it should obviously help).

Yes, by limiting display current draw.

For an unknown reason these cheap MAX7219-driven LED boards has very small current control resistor RSet of 10 kOhm, resulting in huge Iseg ~= 40 mA. Replacing it by something like 62k will limit per-segment current to ~10 mA.

This is what the datasheet says: typical application circuit

And this is how it can be done: enter image description here

Works perfectly! Now I can power off LED display completely, so it consumes no current when the device is sleeping.

NOTE: it's important to properly re-initialize MAX7219 after power on!

In the colorized table above one could find display current draw for different software-set intensity settings in case of using RSet = 62k. GND line values (blue column) seems to be correct as they well correspond with overall device's current draw (the most correct measurement, I suppose).

0

Using a led display in a low current application is an oxymoron. An LCD display is more appropriate.

With that said, you can switch the the 7219 from the high side and turn the pins into input mode to avoid ghost powering.

Od mode works but pull up has to be switched as well.

1
  • 1
    Thanks for replay! Sorry, what is "od mode" and what kind of pull up you mean here? I do digitalWrite(LOW) for display data pins now to avoid ghost-powering. Is it enough or I'd better change pin mode to INPUT?
    – finnan
    Jul 25 '17 at 16:02

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.