Design review: Is this LED matrix correct?


+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 15 of 42

Thread: Design review: Is this LED matrix correct?4727 days old

  1. #1
    Don Stratton
    Guest

    0 Not allowed!

    Default Design review: Is this LED matrix correct?

    Hi all,

    I copied an LED matrix I found on the web and expanded it to suit my own needs. I have never matrixed LEDs before, so could someone tell me if I did it right? I assume the logic is that any dot is addressable by making the appropriate row and column pins go high. In case anyone is wondering, the reason for the transistors is that the LEDs use 70mA each (NXP Super Flux).

    Also, a specific question for Tim and perhaps others. Tim, in a post you said you found the mux limit of a 7-seg was 5 out of 7. I intend to use this matrix as 14 channels of bargraph, not as a dot driver. Am I right in thinking I need to break up this matrix some more or I will get unacceptable flicker? Since my LEDs are being fed by main power do I even have to worry about brightness? Can the PIC strobe TOO FAST?

    Thanks for any feedback, all!


    --Don

  2. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  3. #2
    david
    Guest

    0 Not allowed!

    Default

    Hi Don,
    What's the little symbol above the right side LEDs? I can't see how you are sourcing the anodes and it looks like the left hand transistors are going to shunt the supply if turned on.
    Would you not use PNP devices sourcing the anode and NPN devices sinking the cathodes via a ballast?
    If you scan the 8 PNP sourcing transistors (or Pch FETs preferably) you can throw 14 bit "words" at the sinking devices. Remember that the sourcing devices will need to provide up to 14x70mA so think about the base drive and VceSAT if you want to stick with transistors.
    Good luck with the project.

    Cheers,
    David

  4. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  5. #3
    Sparky1039
    Guest

    0 Not allowed!

    Default

    I see a few issues.

    First your going to need some kind of current limiting resistance for the LEDs or you're going to smoke 'em.

    Second, the row transistors are directly connected to the v+. Set the any row port high and the transistor will short to ground and you'll smoke 'em.
    Lots of smoking potential here.

    Cardinal rule of electronics "Never let the smoke out of your components"

    To resolve point 2, for each row use a PNP transistor with the emitter tied to V+, the collector tied to the row buss, and of course the base with resistor connected to the PIC port. Setting this transistor base low will energize the row selected.

    Looks like David beat me to it. I would take his suggestion and use P-ch MOSFETS for the row decode, and N-Ch MOSFETS for the column decode. This way you won't have to worry about any base drive issues going with transistors.

  6. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  7. #4
    Don Stratton
    Guest

    0 Not allowed!

    Default

    Eee gawd, here's where I have to show my ignorance...

    My understanding of PNP versus NPN was that it was base-high for NPN, so I chose it because it was easy to keep track of the logic. What would the PNP's be for? I think I do see one of the shorts; I think the column control would work as long as no row control was selected, or I'd short the power supply as mentioned. I am afraid I not only fear the inverse logic of PNP, but I also have no idea why they are needed here! Also, why are FETs preferrable to transistors in this case?

    Just in case I chose a stupid method, I'll go over the design issues.

    -I have a PIC that I will assumedly run at 3v, and the PIC can sink a grand total of 200mA.

    -I have 88 high-power LEDs that suck up 70mA _EACH_. That's 6.16 amps!

    -The system's power supply will need to provide a bit less than 7 amps at 3 volts.

    -The PIC needs to be able to switch that higher power to the LEDs since it cannot sink or source it directly.

    A related note is that I am muxing because I see no other way of driving all the LEDs... Microchip does not have parts with 100+ GPIOs, and other approaches like using a bus expander as an LED driver would get super-costly real quick.

    Am I on the right path at least?


    --Don

  8. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  9. #5
    galaxy
    Guest

    0 Not allowed!

    Smile

    Quote Originally Posted by Don Stratton View Post

    My understanding of PNP versus NPN was that it was base-high for NPN, so I chose it because it was easy to keep track of the logic. What would the PNP's be for? I think I do see one of the shorts; I think the column control would work as long as no row control was selected, or I'd short the power supply as mentioned. I am afraid I not only fear the inverse logic of PNP, but I also have no idea why they are needed here! Also, why are FETs preferrable to transistors in this case?
    Don, You are right about the inverse base functions of NPN vs PNP, but there is another issue :
    NPN is primairly intended to sink currents. (GND to load).
    PNP is primairly intended to source currents. (VDD to load).

    Fets are preferred because they are voltage driven, while transistors are current driven. This means you can skip the base resistors. This eliminates 88 resistors in your design.

    -The system's power supply will need to provide a bit less than 7 amps at 3 volts.
    Very overdimensioned.... Note that only 1 led at a time can be on. So a PSU 3V / 500 mA will suffice...

    A related note is that I am muxing because I see no other way of driving all the LEDs... Microchip does not have parts with 100+ GPIOs, and other approaches like using a bus expander as an LED driver would get super-costly real quick.
    Have a look at the datasheet of the good old MM5450. >30 output channels controlled by only 2 logic input channels. A pic16f628 can do the job....

    Another point : The forward voltage of your led's must match exactly your supply voltage.
    Otherwise; No lit at all...or smoke...

    Theo

  10. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  11. #6
    galaxy
    Guest

    0 Not allowed!

    Default Corrections

    Quote myself : This eliminates 88 resistors in your design.

    Must be 8 + 14 = 22 resistors

    Quote Don: -I have 88 high-power LEDs

    Must be 8 * 14 = 112



    Theo

  12. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  13. #7
    Sparky1039
    Guest

    0 Not allowed!

    Default

    Muxing is the practical way to go.

    I have 88 high-power LEDs that suck up 70mA _EACH_. That's 6.16 amps!
    Actually you need to let nature help you here. You'll never want all LEDs on at the same time because it's inefficient an a plain waste of power. What you want to do is scan the rows (or columns) in sequential fashion for short periods and let the eye persistence do the rest of the work (much like how a TV screen works). By doing this saves power by lowering the average current to a single row of 8 LED's (of 14 LEDs depending which way you scan).

    I suggest scanning the columns. This way all you have to do is sequentially set one port high (on) with a bit shift process for the column you want to light up. Set this up round-robin and presto you have a scanning function. The dwell time on each column will have to be empirically determined for effective brightness, and the scan rate determined to minimize flicker. Now all that's left is to present the data to display with the rows (which I'm assuming is your frequency data yes?) for each column selected.

    I am afraid I not only fear the inverse logic of PNP,
    Nah... that's why we use the nifty command "~" or the NOT function to invert the binary state of a byte ,word ect... Just remember to mask off the unused bits with an AND function (&) before shipping it off to the port.

    For example
    Code:
    Row_Data = %00000001 01101010  ' initial data 
    Row_Data  = (~Row_Data) & %00000001 11111111  ' ($03FF) ' invert and mask data. 
    Row_Data = %00000000 10010101  ' new result is the inverted equivalent data that's ready to send to the P-Ch MOSFETs port.
    Theo covered the reasons for using MOSFETS vs. transistors. Go with FET's, it will make things a lot easier for you. Just be sure to wire the P-Ch SOURCE terminal to V+ so the internal parasitic body diode is reversed biased.
    And don't forget to use current limiting resistors for each LED or you'll be letting the smoke out of them.

    Note: I suggest using seperate resistors for each LED to ensure uniform brightness.

  14. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  15. #8
    Don Stratton
    Guest

    0 Not allowed!

    Default

    Quote Originally Posted by galaxy View Post
    Fets are preferred because they are voltage driven, while transistors are current driven. This means you can skip the base resistors. This eliminates 88 resistors in your design.
    AH! That makes sense! I think I just stopped using transistors forever.

    Quote Originally Posted by galaxy View Post
    Very overdimensioned.... Note that only 1 led at a time can be on. So a PSU 3V / 500 mA will suffice...
    I forgot the muxing! But technically up to 8 LEDs could be on at once, right? Or is that 14?

    Quote Originally Posted by galaxy View Post
    Have a look at the datasheet of the good old MM5450. >30 output channels controlled by only 2 logic input channels. A pic16f628 can do the job....
    Have a look at the datasheet of NXP's PCA9698, a device intended to be a bus expander but very useful as a 40 LED driver. The problem is that while the part costs $3.65 and is quite a bit less than the MM5450 I would need at least two, and I would STILL need the FETs to control the power. So, other than persistance (lack of muxing), I don't see an advantage.

    With this general type of muxing, won't I be able to light either 8 or 14 LEDs at once, thereby helping out a lot with brightness and flicker issues since I won't have to scan the display as fast as I would with only a single LED?


    --Don

  16. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  17. #9
    galaxy
    Guest

    0 Not allowed!

    Default

    Technically you can lite up 8 or 14 leds.
    But thats only usefull for bar-graph applications.
    For changing characters, stick by the 1 led at once philosofy. Otherwise software overhead will become way too complex.

    I recommended MM5450 because i recently opened an old decca-receiver and i saw it was able to mux 2 16 chars x 12 segments VFD displays with only one device.
    It controls both row and column information.

    I was impressed by the design...

    Theo

  18. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  19. #10
    Don Stratton
    Guest

    0 Not allowed!

    Default

    Quote Originally Posted by galaxy View Post
    Technically you can lite up 8 or 14 leds.
    But thats only usefull for bar-graph applications.
    Unfortunately, that is what I am trying to implement. As I noted in the first message, I am trying to implement a 14-column bargraph that is 8 LEDs high. If I can light an entire column at once then it sounds like I am only concerned with strobing the other 13 columns as fast as possible, which is a bit more manageable than treating the whole thing like a single dot-addressable display and trying to build bargraphs that way.


    --Don

  20. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  21. #11
    Sparky1039
    Guest

    0 Not allowed!

    Default

    ... it sounds like I am only concerned with strobing the other 13 columns as fast as possible...
    This is what I was trying to explain in my last post because I know what your application is, and about using those 7-band selective frequency detector chips, remember?

  22. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  23. #12
    Don Stratton
    Guest

    0 Not allowed!

    Default

    Quote Originally Posted by Sparky1039 View Post
    This is what I was trying to explain in my last post because I know what your application is, and about using those 7-band selective frequency detector chips, remember?
    You know, it's funny, but sometimes when I am working with something new to me I don't even fully comprehend the comments people make until more of the issues settle in my brain for a while. I read your post yesterday and thought I understood it completely, but I read it again today and it is like half of it wasn't there yesterday. The correct answer is of course my BRAIN was half there!

    You did indeed call it. Column scanning seems like the way, and since it is a nice even byte it will be simple to manage doing that 14 times in sequence. I take it I still need 8 P-channel and 14 N-channel FETs? And when you say you would use individual resistors to control LED brightness more uniformly, I think that will be necessary in any design; the one other fact I left out (and maybe you guessed at) is that there will be a mix of red, green and amber LEDs. The datasheet claims the red and amber are similar electrically, but they are very different optically, and the green has different power needs, so I figured at the very least I would have to tweak the amount of power delivered to each color row.

    The audio analyzers are here and the LEDs should be in tomorrow. Once I pick some FETs I will almost be ready for trials! w00t!


    --Don

  24. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  25. #13
    Sparky1039
    Guest

    0 Not allowed!

    Default

    and it is like half of it wasn't there yesterday.
    I've had moments like this too. More like hardening of the grey matter arteries.
    My latest brain fart was forgetting the "AT" text when using the LCD PRINT command. Here I go off crying there is a bug in Proteus. uh huh... no there is a bug in the programmer... me! It was truly a "Calgon" moment when I got slapped with the reality of what a stupid goof I had made.

    And when you say you would use individual resistors to control LED brightness more uniformly, I think that will be necessary in any design
    The comment about using separate resistors for each LED was to avoid a potential problem. That is, no two LED's of the same type are alike in terms of the forward voltage drop. Each one differs slightly. Using a common resistor, say for each row to save parts count and provide current limiting for all 14 LED's at once forces that LED with the lowest voltage drop to set the drop for all the other LED's. This then creates uneven light emissions because of uneven current sharing. Using 1 resistor per LED removes this problem. Also note, the forward voltage drop between a red, green, yellow LED is different and will require a different resistor value for each color.

    I take it I still need 8 P-channel and 14 N-channel FETs?
    Yes. But you do understand how to wire up the "row" P-Mosfets? (hint: it's not like you had before).

    Column scanning seems like the way, and since it is a nice even byte it will be simple to manage doing that 14 times in sequence.
    Yes especially when using the "<< 1" bit shifting command.

  26. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  27. #14
    Don Stratton
    Guest

    0 Not allowed!

    Default

    Quote Originally Posted by Sparky1039 View Post
    Using a common resistor, say for each row to save parts count and provide current limiting for all 14 LED's at once forces that LED with the lowest voltage drop to set the drop for all the other LED's.
    Gotcha! Another "duh" moment I had the other day that you just explained; I bought some closeout white LED christmas lights and stripped the LEDs out. I shoved them all in a proto board and fed them enough power to light them all up, but I noticed that they worked better in certain pairings. Duh.

    Quote Originally Posted by Sparky1039 View Post
    Yes. But you do understand how to wire up the "row" P-Mosfets? (hint: it's not like you had before).
    Um... maaaaaaaaaybe. Check the attachment, which I now zip up so it can be large enough to be readable. N's and P's all over, I think power goes through the rows correctly now, and the upper left circled LED reflects where I suspect the LED resistor goes (I didn't want to change the schematic 87 more times and be wrong). BTW, do I need the resistors on the gates? That is left over from the transistor design.

    Quote Originally Posted by Sparky1039 View Post
    Yes especially when using the "<< 1" bit shifting command.
    Heh, now you've stepped in the mess that will be my coding approach. Much like your comments from a couple of days ago I have no idea what you just said, even though I recognize it as English.


    --Don

  28. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  29. #15
    david
    Guest

    0 Not allowed!

    Default

    Hi Don,
    It's looking good.
    You don't need the gate resistors on the FETs as they are voltage controlled unlike the base-emitter junction of a transistor that needs a limited current.

    The circled resistor is correct if you want to repeat it 87 times in order to fine-tune the individual currents through each LED.
    If it were me I would scan the 8 wide Pch FETs and put 14 bit data on the N ch (column) FETs with a single resistor in each drain. I would then try to select red/green/amber LEDs to give a similar apparent brightness based on their datasheet. With a fixed resistance in the N ch drain the green LEDs will get the lowest current due to their higher forward drop but the difference is not massive and pales compared to the device to device spread which may be 3:1 or worse depending on the LED grading. See if the data lists a min to max light ouput for a given current. Many datasheets will only give a typical value. You can get matched LEDs but you will pay more.

    What about a nice O-LED/P-LED graphic display? Easy to drive, good brightness, no polarizers, wide angle viewing, fast, good temperature tracking......
    You could possibly even press an O-LED character display in to service as this will have 8 lines high in each character and 16 to 20 columns wide. There's even a 40 character display if you want to go third octave readout across the audio band!

    Cheers,
    David

  30. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. twin 8 x 8 led Matrix help please
    By Automods in forum Proton Plus Compiler v3
    Replies: 15
    Last Post: 27th November 2010, 17:30
  2. Max characters led matrix
    By basparky in forum Proton Plus Compiler v3
    Replies: 2
    Last Post: 9th July 2010, 21:03
  3. 8*8 LED matrix ?
    By MOSFET in forum Proton Plus Compiler v3
    Replies: 13
    Last Post: 2nd March 2010, 02:44
  4. 8X8 LED matrix
    By imran in forum Proton Plus Compiler v3
    Replies: 7
    Last Post: 25th March 2009, 20:31
  5. [SOLVED !] 8x32 led matrix
    By imran in forum Proton Plus Compiler v3
    Replies: 1
    Last Post: 6th September 2008, 22:51

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts