Driving Higher Current with MAX7219/7221

Discussion in 'The Projects Forum' started by OldSkoolEffects, May 2, 2014.

  1. OldSkoolEffects

    Thread Starter Member

    Nov 18, 2009
    68
    1
    I have a project that involves driving a bar graph that is broken into blocks of segments, so essentially an LED matrix. I have a design that currently works with shift registers and transistors, but the bar graph in that design is 10bit (10 segments per block), and while it works, it doesn't have the performance I'd like.

    The same bar graph is also available in 8bit (51 segments total, so 8x7) and given the perks of the MAX7219/7221, I started to dig into the design. The issue I'm running into is that the chip is only designed to source/sink 40mA, which is fine for regular LEDs, but the bar graph in question runs at 2V forward (5V reverse) and 80mA typical. There's an article from MAXIM here: http://www.maximintegrated.com/app-notes/index.mvp/id/1196 on using transistors to allow the use of higher current LEDs that I read and think I have the gist of.

    Given I would need 8 transistors, I'm hoping to use a ULN2803 to reduce part count. I have 1.5k resistors per the diagram on that article (though in the text, they say 150k) to help switching speed and a 47k resistor to set the current on the MAX7219/7221 (per the datasheet). My current limiting resistors after the transistor array are 39 Ohm (5V supply, 2V LED, 80mA).

    I think I have this designed correctly so far in EAGLE, but a fresh set of eyes always helps. I realize there's a TL5490 (or something like that) that is like the MAX chip that has higher source/sink, but I have some MAX chips on my desk already.

    Attached is my schematic as it pertains to my inquiry, as well as the internal schematic for the bar graph in question. "C" on the bar graph would correspond to the MAX "DIG", and "L" would match to "SEG"
     
    Last edited by a moderator: May 2, 2014
  2. kgstewar

    Member

    Apr 5, 2012
    151
    6
    I don't think that is going to work because you have a common anode bargraph (correct?) and the digit drivers on the MAX7219 go low when activated (common cathode). The Maxim note you cited shows that you have to invert both the segment drivers and the digit drivers and then you can use a common anode display. You are correctly sinking the segments to ground when the segment drivers go high, but now you need the common anodes to go high when the digit drivers go low. You can do this with an inverter followed by a source driver, like the UDN2981.
     
    Last edited: May 2, 2014
  3. OldSkoolEffects

    Thread Starter Member

    Nov 18, 2009
    68
    1
    I see what you're saying. The simplest solution would to just use the common cathode version of this bar graph, if I'm thinking through this correctly.

    I'm assuming I wouldn't be able to just swap the rows/columns of the matrix so that I'm driving the common anodes from "SEG" and the cathodes from "DIG" given the way the MAX7219 is designed?
     
  4. kgstewar

    Member

    Apr 5, 2012
    151
    6
    Check out this thread (especially the first post and the last post) and you will see I just went through similar issues (although mine was high voltage, not high current). The thread shows how to drive either common anode or common cathode.

    http://forum.allaboutcircuits.com/showthread.php?t=95545
     
  5. OldSkoolEffects

    Thread Starter Member

    Nov 18, 2009
    68
    1
    So in re-reading http://www.maximintegrated.com/app-notes/index.mvp/id/1196 I noticed the note above "digit drivers" where it states that "the display must be the common anode (CA) type to interface the drivers described here; the MAX7219/7221 directly drive common cathode (CC) displays, but these external drivers invert the digit/segment drive polarity."

    So even though a MAX7219/7221 is meant for driving common cathode, my requirement for higher voltage and thus transistors seem to show that I should be using common anode, which is what I was hoping to use. I'm just confused about this now, though. I understand the transistors inverting the signal part, but I'm not sure how that then interacts with the DIG pins, which are the common anodes.

    Is it correct to leave the COM on the ULN2803 disconnected?
     
    Last edited: May 11, 2014
  6. OldSkoolEffects

    Thread Starter Member

    Nov 18, 2009
    68
    1
    Quick update:

    I contacted Maxim and they were pretty helpful. They told me that you only need one of the four options in that article to drive higher current/voltage devices, provided you are still respecting the limits of the chip. I pulled apart my breadboard and carefully rebuilt my circuit, and reloaded my LEDControl library in Arduino. I tried out the included example in that library, and the bar graph animated. The only wierd thing is that instead of DIG0-DIG7 going to C1-C7 respectively, I had to go from C7-C1. I'm not sure why this is happening and haven't thought too much about it; it doesn't really affect what I'm trying to accomplish.
     
    Last edited: Jun 4, 2014
  7. OldSkoolEffects

    Thread Starter Member

    Nov 18, 2009
    68
    1
    Upon further examination, I'm still having an issue with this circuit. As far as I can tell, it's an issue with the DIG pins from the MAX7219, and not the SEG, which are what the transistor array is connected to.

    Here's an example of what I'm currently dealing with. In these animations, the columns are my DIG and the rows are my SEG. This particular display I'm driving doesn't have a full 8th column; just 3 elements. This example assumes the following:

    Segments 1-5 are turned on, 6-8 are off.
    Digits 1-8 are switched and kept on on in order (1, 1-2, 1-3,....1-8)

    Here's what SHOULD be happening:

    [​IMG]

    And here's what is actually happening:

    [​IMG]

    It is behaving as though all the DIG are constantly on, but the current supplied to each is being increased in 1/8 increments.

    I'm using the LEDControl library for via an Arduino for my coding.
     
  8. OldSkoolEffects

    Thread Starter Member

    Nov 18, 2009
    68
    1
    I obtained a new MAX7219 direct from Maxim, and the problem persists. I'm wondering if the issue is inside the LEDControl library for Arduino, since Maxim says that there is no need to invert the DIG signals if the SEG signals have tranisistor on them.

    Is there a readily available 8-bit inverter I could get in an attempt to invert the DIG? or is there a way to use the extra ULN2803 I have here?
     
Loading...