PWM multiple 7-segment LEDs


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: HW-179 8-Digit 7-Segment LED Display (MAX7219 Driver)

    i see a lot of smoke in your future

    apart from the upside down mosfet

    pic1f946 max chip current 95mA although each pin can sink or source 25mA equally well
    @ 42 leds [or 48] if you use dp's thats 2.2mA per led 2 Full bright , the 270 ohm seg resistors are not going to do that for you

    pic1f1947 max chip current 120mA [the industrial ver can sink more] although each pin can sink or source 50mA equally well
    @ 42 leds [or 48] if you use dp's thats 2.8mA per led 2 Full bright , the 270 ohm seg resistors are not going to do that for you

    Name:  946.jpg
Views: 1352
Size:  176.2 KB
    Name:  1947.jpg
Views: 1322
Size:  204.8 KB
    Warning I'm not a teacher

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default Re: HW-179 8-Digit 7-Segment LED Display (MAX7219 Driver)

    The sink is always better choice than sourcing.

    Then N-channel MosFets along with NPN transistors are much better than P equivalent ones and more choices available.

    And finally, even if a PIC can source or sink 20, 30 or 50mA per pin, there is a maximum TOTAL dissipation for the whole chip, so that you cannot source at the same time on all pins a max of 50mA on each pin!

    You will melt the chip!

    So, yes. I am for the sink topology too.

    Ioannis

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default Re: HW-179 8-Digit 7-Segment LED Display (MAX7219 Driver)

    Now, if you look at datasheet, p236, for the 946 chip.

    Output Low is 0.6 Volt at only 8.5mA but,

    Output High Vdd-0.7 Volt at 3.0mA

    So, yes. It is better to sink than source.

    Ioannis

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: HW-179 8-Digit 7-Segment LED Display (MAX7219 Driver)

    for my money i would do it the traditional way or if multiplexed display is not bright enough use a bunch of tpic6b595's

    Name:  multi.jpg
Views: 1309
Size:  261.6 KB

    note schema is not complete but you get the idea, i was going to try it in proteus then i remembered how crap proteus is at simulating multiplexing
    so i gave up
    Last edited by richard; - 16th February 2024 at 11:32.
    Warning I'm not a teacher

  5. #5
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: HW-179 8-Digit 7-Segment LED Display (MAX7219 Driver)

    With that many displays I assumed they would be multiplexed as in richard's post #17.
    Surely a lot less supply current, and you wouldn't need nearly as many pic's to drive them... maybe get away with one or two 44-pin packages.

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,170


    Did you find this post helpful? Yes | No

    Default Re: HW-179 8-Digit 7-Segment LED Display (MAX7219 Driver)

    Quote Originally Posted by richard View Post
    for my money i would do it the traditional way or if multiplexed display is not bright enough use a bunch of tpic6b595's...
    Thanks, I'm off to google that chip (no idea what it is). I've also seen talk about using a 74HC595 (never met that creature either).


    EDIT: Google says TPIC6B595 can sink up to 150mA at 50V. JLCPCB carries them at $1.54.

    Google says 74HC595 has a 70mA total limit, so there goes that chip. JLCPCB has them at $0.11 too.
    Last edited by Demon; - 16th February 2024 at 20:44.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,133


    Did you find this post helpful? Yes | No

    Default Re: PWM multiple 7-segment LEDs

    The 74HC595 is a shift register. How can this help on 7-seg LED's ?

    Dedicated chips like Maxims or the TPIC6B595 I think is the way to go.

    Ioannis

  8. #8
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,170


    Did you find this post helpful? Yes | No

    Default Re: PWM multiple 7-segment LEDs

    Quote Originally Posted by Ioannis View Post
    The 74HC595 is a shift register. How can this help on 7-seg LED's ? ...

    Some people use them to drive 7-segment LEDs. They don't have digit control, only segment control, so you need one per digit.




    It turns out my supplier for 7-segment LEDs also print and assembles PCBs. It wouldn't be cost effective to ship my LEDs back, so I might very well do the jump to the MAX7219 if I have to buy more LEDs.

    I'm keeping all my options open for the time being, but the MAX7219 does offer one really neat feature; an intensity control. That TPIC6B595 is a close 2nd for common anode LEDs.
    Last edited by Demon; - 17th February 2024 at 01:06.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  9. #9
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,170


    Did you find this post helpful? Yes | No

    Default Re: HW-179 8-Digit 7-Segment LED Display (MAX7219 Driver)

    (I'll move the PWM LED posts to an off-topic thread in a few minutes to keep this about Chuck's code example. I just want to put down some comments first.)

    Quote Originally Posted by richard View Post
    ... apart from the upside down mosfet ...
    I was hoping you wouldn't see that. It was late and I went to bed.


    Quote Originally Posted by richard View Post
    i see a lot of smoke in your future ...
    Usually I'd agree with you, and yes I'm aware of the current limitations on PICs and pins.

    But ... LEDs are special. You can get different performance out of them via PWM. This is identical LEDs:

    - left, 5V rail with 270ohm resistor.
    - right, PWM without resistor.




    I can get identical brightness with 2.5mA less. If I add a 270 ohm resistor to PWM, I get 1/2 the current.

    Name:  2 LEDs both with 270R - PWM on right.jpg
Views: 1363
Size:  146.8 KB


    Yeah, I thought I could improve this even further down to 2mA but that isn't gonna happen. The LED won't be bright enough.

    And yes, I've been playing with using transistors/MOSFETs and I'll be going back that way again.

    Name:  PWM 7-segment LEDs.jpg
Views: 1376
Size:  117.0 KB


    I had dropped that idea cause HPWM has lower limits on Frequencies and I didn't like not have total control (64 MHz is 3905Hz).

    But I just realized I could pulse the devices using a timer interrupt; switching between different ON-time and OFF-time.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

Similar Threads

  1. Re: RGB Fading Using 3 LEDs and PWM
    By Fernandoangel in forum Off Topic
    Replies: 0
    Last Post: - 8th April 2012, 05:59
  2. LEDs, current and PWM
    By Demon in forum Off Topic
    Replies: 10
    Last Post: - 2nd April 2012, 04:41
  3. Multiple LEDs and Time Coount
    By LexManos in forum General
    Replies: 4
    Last Post: - 24th July 2009, 06:36
  4. How to drive 7 segment using multiple ports?
    By guess79 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th December 2006, 19:43
  5. Multiple IR LEDs from 1 port using transistor
    By belpe123 in forum General
    Replies: 3
    Last Post: - 20th May 2005, 22:07

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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