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

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

2

Comments

  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-11 11:07
    Kwinn,

    The drawing looks good except the lines going up/down between the 3 HT1632c chips. Was that representing power or something? Just unclear on what those are.

    The Sure Electronics 2416 board used 33 ohm resistors as well as their 0832 boards. I used 39 ohm resistors on the 3 sets of 8 row lines to the cathodes in my last design (when it was sort of working with a single HT1632c). The common anode RGB Led matrix modules were purchased from www.seeedstudio.com and were listed as "super bright" displays even though their MCD ratings were in the hundreds not thousands. They were very well lit using 39 ohm resistors and I also pretested them with 220 ohm resistors and still well lit with good brightness. I want them to be bright because of there 16 levels of PWM shading to show up adequetely.

    Keep in mind the software I had for my 2416 was ran on my original bad design ( single HT1632c only) and the Leds were inverted which is what I later suspected was due to using common anode RGB Leds vs the expected common cathode RGB Leds.

    I also had 120 ohm resistors in series from each HT1632c OSC as well as each SYNC line to the next HT1632c's OSC and SYNC respectively. This was also done on the Sure Electronics 2416 design and I think their 0832 board too. I suspect this was to protect the lines even though it is not shown in the HT1632c datasheet. I also connected all of the Vdd together (HT1632c Vdd and Vdd for the Leds on the HT1632c). The same was done for the Vss and Led Vss lines on the HT1632c. I also used 0.1 uF caps on each HT1632c.

    Hope this helps.

    Let me know what else you need.

    Post Edited (T&E Engineer) : 11/11/2009 11:34:30 AM GMT
  • dMajodMajo Posts: 855
    edited 2009-11-11 15:31
    So to reassume: you application will be 24x16(x3:RGB) matrix using 3 IC (one per color) as per kwinn block schematic.

    The schematic to follow is a merge between HT1632 datasheet's pages 13 (bottom half: common anode mode buffers) and 17 (24x16 master slave application)

    For the row NPN buffers this FFB2222A, FMB2222A, MMPQ2222A·(one every 4 rows) should do the job while the com PNP buffers can be this ZDT749TC·(one every 2 coms)

    For the led series resistor I suggest you E24/E48 series to keep the difference in brightness below the eye noticiable one. For the R/G/B you will need different series resistor because of the different forward voltage of each color.

    Keep Vdd/Vss separate from the LED_Vdd/LED_Vss till the power source, decouple each HT1632 with 100n capacitor and keep a 4u7 capacitor per matrix (board) between led_vdd/led_vss. Of course buffer's Vdd/Vss are connected to LED_Vdd/LED_Vss

    And yes you need a resistor series to each OSC/SYNC (and I suggest also DATA) pin because until the IC are configured in master/slave mode they are all masters so having all the pins in output state. For the OSC pin the resistor is not needed if you take care to program first the mode register than enable the oscilator (default disabled)
    ·


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

    Post Edited (dMajo) : 11/11/2009 3:45:38 PM GMT
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-11 17:47
    dMajo,

    Everything you state is great!

    I will order the parts·in the next couple of days·(once I test out the RGB leds to get similar brightness levels between them). I'm glad I can keep everything in surface mount too!

    I have been using 0805 sized resistor's and 0.1uf caps (100n) in 0805. I'm assuming this is ok for the RGB current limiting series resistors especially.

    I should use a higher current 5vdc separate power supply to go to LED_Vdd and LED_Vss and run a ground wire between LED_Vss and Vss at the external micro-controller.

    I will use the 5 vdc from the micro-controller power supply to supply power to Vdd and Vss.

    Can't I just connect LED_Vdd to Vdd and LED_Vss to Vss and just use the higher current 5vdc power supply (I have a 20 amp one)? Why should these be separated?

    Thanks so much for setting this up for me and answering my questions!
  • dMajodMajo Posts: 855
    edited 2009-11-11 18:17
    I have never said you have to use two power supplies just wire the two power lines separately till the power supply

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
    643 x 206 - 13K
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-11 18:22
    dMajo,

    OK thanks for the clarification. I was just trying to follow the Sure Electronics design in which they connect all of them together on the 2416·PCB. I can run them out as 4 separate wires with no problem.

    Thanks again.
  • dMajodMajo Posts: 855
    edited 2009-11-11 18:26
    I don't think so (but really I don't know) I have seen the picture of the item you have referenced to me and they have power supply connection on the ribbon header and also on screw terminals. I think they are separate: one for the logic and the other for the power stage but I may be wrong.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · Propeller Object Exchange (last Publications / Updates);·· Vaati's custom search
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-11 18:37
    I have always just run power to the IDC connector and not the terminals so I know they are conected but probably also available via the terminals. The schematic in the manual shows them connected.

    I guess you want to be sure not to have 2 power supplies run on the 2416 with 1 going to the IDC connector and the other going to the terminals to not have a conflict.

    Good catch!
  • kwinnkwinn Posts: 8,697
    edited 2009-11-12 15:32
    Tim, sorry for not answering sooner. Had an emergency that tied me up all day yesterday.

    The lines going up and down between the 3 HT1632's are for the OSC and SYNC signals required for master/slave operation. All the normal chip select, data, and power connections are not shown.

    From reading the rest of the posts it sounds like you have worked out the rest of the changes with dMajo. His suggestion regarding the power connection is excellent. The LED's turning on/off could create voltage fluctuations large enough to affect the logic circuits if they were all connected over a single wire.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-12 16:21
    Kwinn,

    Thanks again for your and also dMajo's help! I made a mistake before and it is great to get support and have others review it. When I redesign the PCB again, I will send out a JPG for everyone to view.

    I have 12 more HT1632c chips comming. Kind of expensive from their California sales office:

    The total charge is $52.56;

    $28.68 ($2.38ea) for HT1632C, $10.00 for handling, $12.00 for shipping fee, $2.02 for 4%credit card charge.

    The discount will be $2.25ea with 100+pcs order.

    I need to still order the buffer chips / transistors from Digikey that jMajo recommended. I may also need to get some more surface mount resistor replacements too.

    Do I need to have current limiting resistors (series resistors) going to both transistor bases from both the HT1632c 16 comm lines and from the 24 row lines? The picture in the HT1632c datasheet on page 13 shows resistors on both ends but I thought I only needed them on the 24 row lines.

    Comments?
  • kwinnkwinn Posts: 8,697
    edited 2009-11-12 17:34
    Yes, the MMPQ2222A and ZDT749TC are both bipolar transistors so you need resistors to limit the current in to the bases. The resistor values should be just low enough in value to drive the transistors into saturation to minimize power dissipation.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-12 18:05
    Kwinn,

    I was hoping to just use some 20-50 ohm resistors to keep the brightness levels up in the RGB displays but since these parts are surface mount it will be difficult to test to until I actually get the final PCBs made. Is there any rule of thumb or easy way to figure this out without having to make another PCB to test this too?

    Thanks.
  • kwinnkwinn Posts: 8,697
    edited 2009-11-12 23:19
    Just to be clear, there are 3 groups of resistors needed.

    The first group are the current limiting resistors that go between the NPN transistors and the cathodes of the LED matrix. These are required to limit the LED current and may be of different values for the R, G, and B LED's.

    The second group will go between the row pins on the HT1632 to the base of the NPN transistors to limit the current to the transistor base.

    The third group will go between the COM pins and the base of the PNP transistors to limit the current to the transistor base.

    Exact values will depend on the voltage you are using and the max currents for the rows/coms.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-13 00:56
    Got it. Thanks! I'm redesigning the PCB now. Lots more parts to fit in.

    Thanks so much to everyone!
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-13 14:11
    Kwinn,

    I just looked at the drawing at the bottom of page 13 again and there is actually 4 sets of resistors not 3 as you stated before.

    What was missed was the resistors going from the PNP transistors base to the PNP transistors emitter.

    Is this correct or am I missing something here?


    I just read online that these resistors·are not needed but placed there for stability and is generally 10 times the value of base resistors


    From what I can tell with the NPN transistors, I should use a 1K resistor between the rows and the bases of the NPN transistors. At the collectors of the NPN transistors can be a low resistor like 50 ohms.

    I have not figured out anything for the PNP transistors yet because I saw the 4th set of resistors.

    I did order from Digikey the PNP an NPN transistor types as listed by dMajo:



    25 MMPQ2222ACT-ND .88000 22.00 T
    TRANSISTOR NPN 40V 500MA 16-SOIC

    20 ZDT749CT-ND 1.53900 30.78 T
    TRANS PNP DUAL 25V 6A SOT223-8
    TOTAL INVOICED 52.78
    SHIPPING CHARGES APPLIED 2.24 T
    ** CHARGES SUBTOTAL ** 55.02
    SALES TAX 3.30
    (T INDICATES TAXABLE AMOUNTS)
    TOTAL CHARGED TO CREDIT CARD 58.32

    U.S. $$


    Post Edited (T&E Engineer) : 11/13/2009 2:34:54 PM GMT
  • kwinnkwinn Posts: 8,697
    edited 2009-11-13 16:15
    I missed that when I was looking at the data sheet. Probably because I was concentrating on p17. That resistor is required when the Vdd for the LED matrix is higher than the HT1632 supply, and a good idea to include any time. They make sure the transistor is turned off when the HT1632 pin is not pulled low.

    I wish they had included a schematic of the typical driver circuit on the ROW and COM pins. The data sheet states:

    "It can be configured in a 32x8 or 24x16 pattern and common pad N-MOS open drain output or P-MOS open drain output LED driver using the S/W configuration. This feature makes the HT1632C suitable for multiple LED applications"

    I take that to mean the COM lines can be pulled either high or low depending on the software configuration. This is one place where a picture truly would have been worth a thousand words.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-13 16:20
    I will go back to Holtek and with the question of any information they can provide on a "typical" values for the transistors/resistors and any other pertinent data. I don't know if they will answer since their forum is pretty much dead in responses (unlike the great forum we have here!).

    More to come...
  • kwinnkwinn Posts: 8,697
    edited 2009-11-13 16:46
    BTW, if I selected a base resistor for the PNP transistors I would calculate the value based on the voltage to the LED array, the worst case current of the transistor (all LED's in the column max intensity), and the minimum transistor Hfe (70).

    Lets assume the maximum current is 1.44A (72 LED's x 20mA), and the voltage to the LED array is 5V

    The current to the base would need to be 1.44/70 = 20.6mA

    The base emitter forward voltage of the transistor is ~0.7V so the resistor would be 4.3/0.021 = 204 ohms. The nearest values to that would be 200 ohms. That would mean the base/emitter resistors would be 2K based on your previous post. Max power dissipation for the 200 ohm resistor would be 0.09W/16 so no problem there.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-13 17:10
    Kwinn,

    Great! So to test I will use values of 200 ohms, 2K on the PNP transistor circuits and 20-50 ohms for the current limiting resistors on the NPN.

    Should the base resistor for the NPN transistor circuits also be 200 ohms?
  • kwinnkwinn Posts: 8,697
    edited 2009-11-13 21:31
    First, and very important is to make sure the assumptions I made for calculating the resistor values are how you plan to build it. In other words are you going to have 3 HT1632's driving 6 LED arrays like in the block diagram I posted earlier, and are you going to use 5V to power the LED's?

    The base resistor value on the NPN is determined by the peak LED current desired, the gain of the MMPQ2222 transistors, and the voltage you run the HT1632 at. Assuming you want a peak current of 50mA and the gain of the transistors being 50 or greater (as per data sheet) then a base current of 0.050/50 or 1mA:

    If the HT1632 runs off 5V the resistor should be 4.3/.001 = 4.3K If the HT1632 runs off 3.3V the resistor should be 2.6/.001 = 2.6K

    A little more current through the base of the transistor will not make any difference in this case so I would suggest using a 2K resistor regardless of the voltage to the HT1632.

    Keep in mind that the resistor controlling the current are the ones between the collector of these transistors and the cathode of the LED's.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-15 14:11
    I was finishing up the new re-design (has 185 resistors now - big and expensive) when I thought about the master and slave addressing through the CS (chip select) pins. Before I was going to treat the entire board (all 3 HT1632c) as 1 CS line and then use an output port (IDC connector) to expand to 2 other boards. However with the new master and slave configuration I will need to use all 3 CS pins for a single board.

    This means that to expand this to more boards, I will need to rethink how this can be done effectively.
  • kwinnkwinn Posts: 8,697
    edited 2009-11-15 16:37
    Most of the resistors are a result of using simple transistor arrays. That is why I try to use drivers like the ULN2803 that have the resistors on chip whenever possible. Unfortunately chips for the high side are not so easy to find. They also tend to require higher currents as well.

    For expanding to two more boards you could add 6 more CS lines or 3 Board Select lines and put a tristate buffer on each board.

    Perhaps if you posted a schematic or block diagram of the complete system you are aiming for the forum members might have some suggestions. There are a lot of smart and creative people here.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-15 19:17
    I used Cute PDF to "print" a PDF of the ExpressPCB file (attached). Looks the the latest version only allows for a DXF drawing to be made. You will need to zoom in to the PDF drawing to see all the detail. The yellow silkscreen is a bit anoying on the white background too. I don't really want to make a schematic at this point in the game but perhaps later if there is interest in this board from readers.

    Please look this over as I have checked and re-checked the connections a hundred times over.

    As you will see, I am using an individual CS line for each of the (3) HT1632. As far as expansion goes, perhaps in another revision as it would be a continuing nightmare to keep squeezing stuff in as it is. I can always just bring 2nd and maybe 3rd or more boards IDC connectors directly to the SX48 proto board if need be also. Removing the boards 2nd IDC connector freed up some space on the other side of the board too. The costs for 2 boards from ExpressPCB is $155.21 total including 2nd day shipping. Last time they gave me a 3rd board so maybe I'll get lucky again.

    I am supposed to get in the driver chips tomorrow ($53 for only enough for a single board - yikes! expensive) and 12 more HT1632c chips ($55 I think). I hope to have enough surface mount resistors that I bought from Sure Electronics last time. Prices are great but shipping is high.

    I now have serial resistors on all of the CS lines, DATA, and SYNC (and removed it from OSC) as per jMajo's posting. The OSC and SYNC lines are tied together and at the IDC connector. Individual DATA, /WR and /RD lines are also sent out from each of the (3) HT1632 chips to the IDC connector (which all of this goes to the micro-controller being an SX48). All the traces are wider with most of the via's being the next size up too. The LED power lines are even more wider with a separate connector being something similar to this: www.futurlec.com/Connectors/PCBT2.shtml

    Once I get an OK from Kwinn and/or dMajo or any others.... I will send the board order out to get made.

    I suppose the first thing I should do when the boards arrive is to take a single set of drivers (PNP and NPN) and solder them on (with resistors) and test it against 1 RGB display to make sure it works.

    Thanks again for the excellent support !
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2009-11-15 22:12
    It might be easier to mount your same value resisters and might look neater· this just an idea.gif


    ·http://onlinecatalog.digikey.com/WebProject.asp?BookCode=dik08flx&SectionIndex=0&PageIndex=1911#
    How To Order
    41 14 R - 1 - 152 __ __
    Model
    (41 = Molded DIP)
    Number of Pins
    Physical Configuration
    (R = Thick Film Low Profile)
    Electrical Configuration
    • 1 = Isolated
    • 2 = Bussed
    • 3 = Dual Terminator
    Resistance Code
    • First 2 digits are significant
    • Third digit represents the
    number of zeros to follow.
    Resistance Tolerance
    • Blank = ±2 % (see “Resistance Tolerance” on
    next page for resistance range)
    • F = ±1 % (100
    Ω - 1 MΩ)
    • D = ±0.5 % (100
    Ω - 1 MΩ)
    Terminations
    • LF = Tin-plated (RoHS compliant version)
    • Blank = Tin/Lead-plated

    Consult factory for other available options.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them smile.gif

    ·
    ·
    ·
    ·
    Sam

    Post Edited (sam_sam_sam) : 11/15/2009 10:22:29 PM GMT
    640 x 640 - 63K
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-16 13:23
    Thanks Sam but I'm trying to keep everything surface mountable as I already am crunching for space. I will certainly keep this in mind for the future. Good idea.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-16 23:23
    I received the Digikey PNP and NPN driver chips today and the 12 HT1632c LED drivers from Holtek also. I placed the online order with ExpressPCB. OK...Let's try this again. Hopefully no issues this time.

    I'll keep everyone posted of the progress when the boards come back to start soldering (probably by the end of the week).

    Thanks again to all!
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-17 23:49
    I did some testing tonight and soldered 30 guage wires to a single NPN and PNP driver B, E and C. I found good results for resistor values below:

    NPN: Base resistor = 2K, current limiting resistor = 33 ohms, +5v in base resistor gave 6mV out (~0v). Good!

    PNP: Base resistor = 1K (had to raise it up from original 200 ohms), B-E resistor = 2K, current limiting resistor 33 ohms, Gnd in base resistor gave 4.9vdc out. Good! (Note: Using 200 ohm on base only gave out 4.73vdc)

    Measurements made with test LED removed.

    Wait for the boards to arrive Friday and retest over the weekend and write the master/slave code on an SX48 too.
  • kwinnkwinn Posts: 8,697
    edited 2009-11-18 17:46
    It sounds like things are progressing well. I hope the 1K resistors to the PNP bases will be low enough to drive the transistors into saturation and provide enough current. Probably should be ok since all the leds will not usually be on at the same time.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-18 19:16
    I just received some application support on resistor picks / calculations (see attachment) from Holtek.

    Comments?
  • kwinnkwinn Posts: 8,697
    edited 2009-11-18 22:54
    That is pretty much how I calculated the resistor values I suggested. I calculated Ib (base current) by dividing the worst case transistor collector current by the gain of the transistor. The worst case value I used was the total current required if every LED was on at maximum intensity.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2009-11-22 23:51
    I had to do alot of testing and troubleshooting yesterday to get the LEDs at a decent "similar" brightness. It seemed that the RED leds was the dimmest of them all and green was the brightest. Overall they have been tested at bright levels with current limiting resistors of Blue = 10 ohms, Red = 47 ohms and Green = 100 ohms. It didn't seem to follow the specs on the RGB displays at all as far as mcd levels and current/voltage. But for now it is good.

    I rewrote some code I had for Sure Electronics 0832 display and then modified it for what should work on a 2416 display. Both the 0832 and 2416 displays have their outputs command coded for P-MOS open drain output with either 8 or 16 common option. However, since I used the PNP and NPN driver chips on the front end of my display I had to use the command setting for "N-MOS open drain output and 16 common option". This at least allowed "something" to display on my RGB matrix.

    I currently only have 2 RGB displays connected (2 8x8) so that I can test out the 16 common lines with at least 8 rows. I also only have the 1 master HT1632C chip soldered in (which gives me access to blue LEDs on the 8x16 array). I did not want to install all the chips and displays yet until I get it working on a single chip first. Taking it carefully and slow here. I spent too much troubleshooting yesterday on each line to make sure connections were properly made to the NPN and PNP driver chips and resistors. All is good now...

    I also noticed that the LED_VDD is connected at the chip to VDD and that LED_VSS is connected at the chip to VSS. So basically, you can apply power at either the IDC connector or at the terminal block. If this is the case then why go through the trouble of all the separate traces and wiring with caps?

    Currently the code scrolls a pattern top to bottom on the 16x8 display in blue. However, the scrolling is quick but slow enough to see it scroll. My similar code for the 0832 does not have this problem. Could the extra NPN and PNP drivers be slowing this down? I tried to connect a 4 MHz (and code for it) resonator and it works but a 20 MHz resonator left the display blank. Too many oddities happening. Also sometimes (using the internal 4 MHz clock), the display stops scrolling quickly and just stops. A reset to the SX48 proto board gets it going again. Here again, another oddity.

    I only have CS1, DATA1 and WR1 going from the SX48 protoboard to the RGB display board. I have attached some pics too.
    1536 x 2048 - 1M
    1536 x 2048 - 1M
    1536 x 2048 - 1M
    2048 x 1536 - 1M
Sign In or Register to comment.