Shop OBEX P1 Docs P2 Docs Learn Events
Electronics I/O (outputs to common anode RGB LED matrix) question — Parallax Forums

Electronics I/O (outputs to common anode RGB LED matrix) question

T&E EngineerT&E Engineer Posts: 1,396
edited 2010-12-31 12:29 in General Discussion
I am designing an RGB LED matrix version of Sure Electronics 2416: http://www.sureelectronics.net/goods.php?id=979

I got the PCBs made and HT1632C ICs and found that if I solder 2 HT1632C ICs onto the PCB, the LEDs display nothing and the chips get pretty hot. 1 by itself works but 2 or more does nothing.

After troubleshooting all day and going through 2 PCBs and 9 HT1632 chips, I think I know the reason why it is not working and would like some confirmation to that please.

Each HT1632 has 24 cathode outputs. I am using 3 HT1632C ICs for red, green and blue LEDs and 6 RGB LED matrixes (common anode).
Each HT1632 has 16 common anode outputs. Theses 16 common anode outputs are shared by each of the 3 HT1632C ICs 16 common anode outputs.

If they are shared that means they are putting +5vdc on any of these 16 common anode outputs when an LED is turned on. This means that since the 3 HT1632C ICs have their 16 common anode outputs tied together going to the 16 common anode RGB LED matrixes, then that same +5vdc output from one HT1632C chip is actually INPUTing +5vdc onto the other 2 HT1632C ICs 16 common anode outputs.

Does this sound right?

I supose my fix would be to have 16 * 3 diodes (IN914?) on each of the 16 common anode outputs so that the +5vdc does not get fed back into the other 2 HT1632C 16 common anode outputs.

Is there another solution? I spent $200-$300 already on this project for a design flaw. Doh! The HT1632C ICs are fairly small and surface mount so I can't test on a solderless breadboard.
«13

Comments

  • kwinnkwinn Posts: 8,697
    edited 2009-11-08 04:10
    I suspect your conclusion as to why it is not working is correct but I would need to see the schematic to be sure. From looking at the data sheet I am fairly sure that the RGB cathodes and common anode need to be connected to the same driver chip to give 16 x 8 x 3(RGB) led drivers. I do not think adding diodes will help since this is probably an issue with the relative timing between the chips. Sorry to be the bearer of bad news. I hope I am wrong in this case but I do not think so.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-08 12:50
    Kwinn,

    Thank you for your help. However, the chips will be independant of eachother and timing should not be an issue. I just want to "share" the common anodes of the RGB LED matrixes between the 3 chips.

    Comments? Also hear from others.

    How can multiple devices (HT1632C) drive the same outputs (common anode LEDs)?
  • kwinnkwinn Posts: 8,697
    edited 2009-11-08 15:39
    Re: "I just want to "share" the common anodes of the RGB LED matrixes between the 3 chips."

    I don't understand why you want to connect the anode outputs together and I think the sharing of the anode connection between chips is causing your problem. What are you trying to accomplish by connecting them?

    The HT1632 has a built in RC oscillator that enables each of the 16 anodes in turn and each of the 24 cathode outputs provide the desired current to the led they are attached to. The problem is that the 3 chips will not be enabling the same anode at the same time since they are not synchronized. Each chip is designed to run its own array of 16 x 24 leds. There is a way to synchronize multiple chips (see p 16 of HT1632 data sheet), but each chip still runs its own array of leds. There is no connection between the anode outputs of the individual chips.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-08 16:34
    Im sorry. Perhaps im not explaining this well.

    Each RGB Led matrix module has 3 leds for each of the 8 rows and 8 columns. In a single color Led matrix this means there are 64 Leds total. However, in an RGB Led matrix there are 3 times more Leds or 192 Leds for each Led matrix module. In my case I want to control each of the 3 sets of 64 Leds in each Led matrix module. This means I need to have an HT1632c Led driver for each of the 3 sets of RGB leds.

    The Led matrix modules have all of the anodes of the 3 sets of RGB Leds (192 total) tied together. So if I just want to control just 1 color then there is no problem. But to add another HT1632 to control the next color there is only 1 set of comon anodes to use so I originally just tied together all of the 3 HT1632c 16 outputs into the 1 set of 16 RGB Led common anodes.

    I hope you now understand what I am trying to do now. Keep in mind my description above was just for 1 RGB Led matrix module BUT each of the HT1632c Led drivers can drive 6 Led matrix modules so using 3 HT1632c should work on an just 6 RGB Led matrix modules (except for issue I sm having with tieing all the common anodes together).
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-08 19:11
    I see the RGB backpack design from Sparkfun uses ULN2803 drivers with diodes in their RGB design.

    www.sparkfun.com/datasheets/Components/RGB_matrix_v25.pdf

    This is making me believe that I do need some sort of one way directional flow from the outputs of the 3 HT1632C chips.

    Comment?
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-08 21:32
    The strange thing here is that Sure Electronics is using common anode LED matrix in there 2416 manual (schematic) (like I did but in RGB) and I looked at the HT1632C and they use common cathode for the 16 comm outputs (not common anode).

    I don't know if I should go with adding ULN2803 or if diodes will be sufficient as the HT1632C has enough driving power and all I need is buffering to keep the other HT1632C outputs from feeding back into eachothers 16 comm outputs.

    Using the ULN2803 will also invert the outputs requiring me to use as many as 15 of them when diodes will be simpler if they will do the job.

    Comments?

    Post Edited (T&E Engineer) : 11/8/2009 9:59:24 PM GMT
  • kwinnkwinn Posts: 8,697
    edited 2009-11-09 03:53
    If I understand what you are trying to do, you want to control all the red leds with one chip, all the greens with another, and all the blues with a third. Is that correct?

    I don't think that is possible if I am interpreting the data sheet correctly, but I may be wrong. If it is possible the chips would have to be synchronized as shown on page 16 of the data sheet.

    The data sheet shows an array of 16rows x 8columns of 3 leds (RGB) or 16x24 leds being controlled by each chip. The data sheet also shows all the led matrix's as common anode, but by inverting the row and com signals it can also drive common cathode leds.

    I tried to look at the Sure Electronics schematic but I could not access it. If you could post or PM the schematic to me perhaps I could be more help.
  • dMajodMajo Posts: 855
    edited 2009-11-09 10:31
    @T&E

    By reading the datasheet you provide in the first post it can be done. You need 3 HT1632C chips (one for each color) wired in master slave mode like shown on pages 15 (32x8) and 17 (24x16). Each IC controls the rows of one color while the master is controlling the led's common pin through a transistor buffer.

    Perhaps some rework to the PCB will be needed (I haven't looked that file nor you have provided the schematics)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
  • kwinnkwinn Posts: 8,697
    edited 2009-11-09 15:02
    dMajo, I agree that the chips can be wired in master/slave mode to have one chip per color, but none of the application circuits from pages 11-17 show the row or column connections from different chips being connected together. I believe this is because slight differences between chips would create an imbalance in the current through them and possibly damage the chips.

    As you point out the master chip on pages 15 and 17 controls the leds common pin through a buffer while each IC controls the rows. This is due to the OSC and SYNC signals from the master forcing the slaves to output data for the same row/column as the master.

    This synchronizing does not mean the common pins from the 3 chips can be connected together. It may be possible to do so if you add a resistor (or other circuit) to each common pin to limit and balance the currents. It would add unnecessary complexity to the circuit with no advantage gained.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-09 15:23
    I wasn't sure if everyone was exactly picturing what I wanted to do so I came up with a picture. This shows the diode approach instead of the transistor buffer (2 parts of transistor and resistor vs 1 part of diode only).

    I just wanted to know if you think this would work. Currently I did not have the diodes in place and it caused the 2nd and 3rd HT1632C chips to overheat.

    Comments?
    4240 x 3340 - 1M
  • dMajodMajo Posts: 855
    edited 2009-11-09 16:33
    @Kwinn: you are right 100% but this is the way it works. No need to wire all 3 chips common pins toghether. The transistor buffer is used to not overload the common pin having 3 leds on at the same time (so 3 times the nominal current). The sync is used to sync the output signal on the slave row pins with the master common ones.

    @T&E: this is the way it works. Doing your way will not guaranty that the current will be equally divided on the common pins thus overloading them (diodes will not change this situation). Moreover if the chips are not synced then when you have eg. com1/row1 on one chip and com2/row2 on the second you will have com1&2/row1 ON on the first chip and com1&2/row2 ON on the second so 4 leds ON instead of 2. I think you don't want this.
    So: you need just one set of common pins (master) and 3 sets of row pins!!! Diagram to follow is on page 15/17 !!! Put your soul in peace, if you need some PCB rework you have to do it!!!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-09 18:12
    I just saw what you all mean't about page 17 of the 1632cv100.pdf (attached). You are right about it only using 1 set of 16 comm drivers from the master HT1632c. Wow, I did not look that closely and would not have imagined that was possible.

    I don't know why I would need to use the transistor buffer circuits vs just direct drive.

    If I don't need to use the transistor buffer circuits then perhaps I can use the same current PCB with just cutting the 16 comm driver lines from the 2nd and 3rd HT1632c chips. I am also not sure how to enable this master mode and slave mode in software since it needs a way to direct the coding to either the master or one of the two slave chips then.

    Currently my code is just uses an initialization routine that calls out a master only.
  • dMajodMajo Posts: 855
    edited 2009-11-09 19:57
    IOL3 COM Sink Current 5V VOL=0.5V 250   mA 
    IOH3 COM Source Current 5V VOH=4.5V 40   mA
    

    Datasheet states this: if you have common cathode leds (com sink) 250mA if you have common anode (com source) 40mA

    On one COM you can have up to 32/24 LEDs on at the same time so it depends on the leds current (eg typ. 20mA *32 = 640mA so you need transistor). This consideration is for single IC. On 3 IC set (RGB) on the master COM pin you can have up to 96(32*3) LEDs on at the same time (20mA*96=2A so one time more you need a good transistor perhaps with heatsink). A saturated transistor have 1.2V drop by 2A of corrent equal to 2.4W going in heat. While the current is always the same the average power dissipated in the form of heat depends on the pwm duty cycle.

    The above apply also for ROW pins.

    If you go with 2mA LEDs then you can direct drive them

    Regarding the master/slave selection you do this through software config: you can program individually each IC by selecting it's CS while RD, WR and DATA are common to all ICs

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-10 00:58
    Sounds like I do need to add some buffering. How about using some P channel FETs on the 16 anodes and 9 ULN2803 on the 24*3 cathodes like my previous design:

    http://forums.parallax.com/attachment.php?attachmentid=47424

    I think this should do it but I will have to add this into my design after I get confirmation to go ahead.

    Comments?

    Post Edited (T&E Engineer) : 11/10/2009 1:33:36 AM GMT
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-10 03:33
    Adding the additional components will really be difficult to add in and severe redesigning is needed.

    I understand that asserting LOW signals on the 16 P channel FETs between the 16 comm outputs on the HT1632c master and the 16 common anodes (producing HIGH signals) of the RGB LED matrixes will then sink the current to 250 mA (or really much more because of the FETs).

    I do have some SO-8 P dual channel MOSFETs that I could use 8 of them. They are the FDS4953 type. See data sheet (attached).

    However, this also means I will need to assert HIGH signals on the 3 * 3 ULN2803A (between the 24 outputs of EACH of the 3 HT1632c chips and the 24*3 RGB cathodes) to produce LOW signals it needs on those cathodes.


    Is there any other way to do this without adding so many more components for my Common Anode RGB LED matrixes?

    Post Edited (T&E Engineer) : 11/10/2009 3:40:45 AM GMT
  • kwinnkwinn Posts: 8,697
    edited 2009-11-10 05:16
    First point - If you connected HT1632 1 to led matrix 1 , HT1632 2 to led matrix 2, and HT1632 3 to led matrix 3, you could run the displays without buffers. You have already shown this by the fact that having only one chip in the circuit works. The catch is that each chip must control the R, G, and B leds in one array.

    Second point - In order to control all the leds of one color in the 3 led arrays you MUST connect and program one chip as the master and the other 2 as slaves, and you MUST drive the com lines from one chip only. You CAN NOT connect them in parallel between chips. The plus is that buffers are only required for the com lines of one chip.

    Third point - If you are in master/slave mode with 3 chips and you are driving 72 leds at 20mA that means each com line wold have to handle 1.44A peak or 90mA average current, and the chip would have to handle the total 1.44A. This is well beyond the rating of the chip so drivers would be required for the 16 com lines.

    Fourth point - The reason the com lines from the 3 chips can not be connected in parallel even when they are synchronized by being connected in master/slave mode is that small variations in the chip fabrication process will give the drive transistors slightly different characteristics. This means that one chip will conduct more of the current than the others and fail, resulting in a cascade failure of the other chips. It may be possible to connect the lines in parallel by putting a series resistor on each line, but that would also reduce the current available from each line.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-10 11:25
    Kwin,

    I like what you are saying but have some follow on questions:
    Kwin said...
    First point - If you connected HT1632 1 to led matrix 1 , HT1632 2 to led matrix 2, and HT1632 3 to led matrix 3, you could run the displays without buffers. You have already shown this by the fact that having only one chip in the circuit works. The catch is that each chip must control the R, G, and B leds in one array.
    This is probably doable with some coding modifications but if I understand you right, you would only be able to use 8 of the 16 comm lines (e.g. 1 8x8 RGB LED matrix per HT1632c using 8 red, 8 green and 8 blue cathode lines into the 24 remaining ROW lines on an HT1632c. Each HT1632c would be a "master" then. And no buffer circuits (FETs nor ULN2803A) are needed on the anodes and cathodes of the matrix. If so then by using only 8 of the 16 comm lines then I would need 6·HT1632 not just 3 to control the same 6 RGB LED matrixes. I actually have 12 LED RGB matrixes so this would be interesting to try. Is this correct?
    Kwin said...
    Second point - In order to control all the leds of one color in the 3 led arrays you MUST connect and program one chip as the master and the other 2 as slaves, and you MUST drive the com lines from one chip only. You CAN NOT connect them in parallel between chips. The plus is that buffers are only required for the com lines of one chip.
    I think the buffers are required for both the comm lines and the 24 row lines because the HT1632c is going to need to see positive and negative assertions on both of them (e.g. negative from the 16 comm lines gives a positive on the common RGB LED anodes while a positive from the 24 row lines gives a negative on the 24 cathodes on the RGB LED matrix). This means adding 9 ULN2803A on the cathodes·AND 16 FETs on the 16 anodes. Is this correct?


    Kwin said...
    Third point - If you are in master/slave mode with 3 chips and you are driving 72 leds at 20mA that means each com line wold have to handle 1.44A peak or 90mA average current, and the chip would have to handle the total 1.44A. This is well beyond the rating of the chip so drivers would be required for the 16 com lines.
    See what I wrote above about needing both FETs AND ULN2803A buffers.


    Kwin said...
    Fourth point - The reason the com lines from the 3 chips can not be connected in parallel even when they are synchronized by being connected in master/slave mode is that small variations in the chip fabrication process will give the drive transistors slightly different characteristics. This means that one chip will conduct more of the current than the others and fail, resulting in a cascade failure of the other chips. It may be possible to connect the lines in parallel by putting a series resistor on each line, but that would also reduce the current available from each line.
    Understood. I will not connect the anodes of each HT1632c in parallel (just use the master anodes).



    Thank you all so much for helping me understand this. I want to get it right before I re-design this again.
  • kwinnkwinn Posts: 8,697
    edited 2009-11-10 16:08
    Re: first point. My mistake. With 16 COM lines you can run 2 led arrays with each chip but they are really treated as a single array of 24 rows by 16 commons.

    One thing I did not notice until now is that your led array is common anode. All the schematics that show the individual LEDs show a common cathode array. I am assuming the ones that just show a block labelled “LED Matrix” are the same. This limits the currents available to 10mA per row (sink) and 40mA per com (source). Is this adequate for your application?

    Re: second point. I agree. Driving common anode displays directly only gives you a COM sink current of 40mA which is not enough. The 10mA source current on the 24 rows may also be too low to provide adequate brightness.

    If you PM the revised schematic to me I will double check it for you.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-10 16:21
    Kwin,

    Thanks for your analysis!

    It sounds like since I am using common anode RGB LED matrix modules, that I·must add in the extra buffering on both the common anodes and RGB cathodes. I did not want to have to go there but since I have already invested a fair amount into theses displays, I will need to invest more into the FETs and ULN2803 drivers and PCB real estate. I will certainly PM you or just post a copy of the new design when ready but it will take a few days depending on my availability to work on it.

    Since I need to add in the buffering, what approach do you recommend (e.g. your points previously stated). Any other buffering ideas also?

    Thanks again.
  • kwinnkwinn Posts: 8,697
    edited 2009-11-10 16:50
    The plus of buffering the common anode displays is that you can now drive them as if they were common cathode displays. Two ULN2803's takes care of the COM lines, Allegro Microsystems has an octal PNP array similar to the ULN which could be used for the row lines.

    Part number is UDN2891/2 for the dip version. Data sheet attached

    Post Edited (kwinn) : 11/10/2009 5:00:39 PM GMT
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-10 17:45
    Kwin,

    I have used the UDN2981A before and may have a couple of DIP versions here. As well as the ULN2803's.

    So if I understand you correctly I can get the 250mA Comm Sink current if I do the following (for a 24x16 RGB LED matrix configuration):

    1. Add 2 ULN2803 to the 16 comm lines. I would assert the normal·negative signal out of the HT1632 16 comm lines into the ULN2803's. This then·changes into a positive signal that the·RGB common anodes can use.

    2. Add 3 * 3 UDN2981A to the 24 rows·* 3. I would·assert the normal positive signal out of the HT1632 24·row lines directly into·39 ohm current limiting resistors and then into the UDN2981A's. This then·keeps the negative signal the the RGB cathodes can use.

    Are these ULN2803's and UDN2981's going to allow enough current flow? I think they will. I just hate the idea of adding 11 extra chips because I did not use common cathode RGB LED matrixes.·Ugh!

    Is this correct then?

    Comments?
  • dMajodMajo Posts: 855
    edited 2009-11-10 19:19
    @Kwinn: the Allegro 2981/2 is the one I want to suggest but they have max 500mA non continuous current drive capability. Beside this this is an 8 channel hi-side non-inverting driver so is OK for common anode (sourcing) but you still need a common anode configuration since it is NON-INVERTING (logical 1, 5V, on the input will power the output)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-10 19:25
    Now I am a bit more confused. It does not sound like I can use the ULN2803A with the UDN2981 now.

    Is this right? If so what are my options to keep my Common anode RGB matrix working with the HT1632?

    Thanks for everyone's help in sticking with me on this.
  • dMajodMajo Posts: 855
    edited 2009-11-10 19:43
    kwinn said...
    Re: first point. My mistake. With 16 COM lines you can run 2 led arrays with each chip but they are really treated as a single array of 24 rows by 16 commons.
    Nice solution ... but ... you have also to think how will you drive data to the matrices (software side)

    If you have one master with 2 slaves (in this case all the leds on the master commons) you have a bigger matrix (24x16) and one IC for each color component so 3 IC per matrix. In this way after the initial IC setup you can write in parallel output (LED) data to the three ICs and just by selecting the CS1 or CS2 or CS3 or CS1+CS2 or any combination of them you will choose the color and have the data written to the 3 IC (or less) with one write cycle and have a more usual character map(font) in your MPU ram/program.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search

    Post Edited (dMajo) : 11/10/2009 7:48:11 PM GMT
  • LeonLeon Posts: 7,620
    edited 2009-11-10 19:44
    As I suggested on the SFE forum, you will probably find the Macroblock MBI5026 much easier to use than that Holtek chip. I think that it's actually designed for common anode LEDs.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
  • dMajodMajo Posts: 855
    edited 2009-11-10 19:51
    @Leon: I think the two chips are not comparable. The MBI5026 can be used only for one (row or column) depending on the LED kind (CA or CC). The Holtek one is a full matrix driver rows AND columns and handle internally the pwm cycle

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-10 19:56
    Yes the Holtek HT1632c also is ram addressable. I have used the Macroblock MBIxxx chips before in an outdoor
    RGB led display and they are nice but as dMajo stated they have no PWM either.

    So...on another note...what is the conclusion here?

    We know that I will need to use the·common Anode RGB LED matrix and would like to use the HT1632c LED drivers but I don't know what buffers to use with them nor in what configuration (e.g. master·slaves, etc.)
    What makes sense here?

    Thank you.·
  • LeonLeon Posts: 7,620
    edited 2009-11-10 22:06
    The MBI5030 has PWM; XMOS uses them in their RGB LED display kits. They get up to 16-bits PWM resolution with 16,000 pixels per XMOS chip. Each tile uses lots of the Macroblock chips, of course. They can also do software PWM with the non-PWM Macroblock chip.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-11 02:01
    Leon - You are right about the MBI5030 with PWM . I have a couple of china modules that are RGB at 16x8 using I think the MBI5024 which had no PWM. This is what led me into discovering what PWM was. Thanks for setting me straight on this.


    On another note with my HT1632c design, I think I can use P ch FETs on the 16 common anode RGB Leds instead of the less current powerful UDN2982.

    On the 24 row lines going to the 8 red, 8 green and 8 blue Led cathodes, I believe using 3 ULN2803A per 2 up/down RGM Led modules (using the 16 common anodes) should be enough current. Since there will be 3 * 2 up/down RGB Leds (8x16) sets, there will be 9 total (3 * 3) ULN2803A used.

    Sound right? Comments,
  • kwinnkwinn Posts: 8,697
    edited 2009-11-11 05:38
    I have been back and forth between the posts and various data sheets so often I am getting confused so I will try to unconfused things.

    I have attached a block diagram of the electrical connections between the HT1632’s, the buffers, and the LED arrays. The physical layout and type of buffers is not important at this stage.Is this how you want them connected electrically?

    The other concern is how much current you need to provide the LEDs to get adequate brightness. What voltage and current limiting resistor value were you using for your test with one chip only? Was the brightness ok?
Sign In or Register to comment.