1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

I2C Constant Current LED Driver - 16 or more Bits

Discussion in 'Microcontrollers' started by JonSea, Feb 5, 2017.

  1. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,118
    Likes:
    90
    Location:
    Seattle, WA
    I'm striking out in my searching, so let me ask here.

    I'm looking for a 16 or 32 bit constant current driver with an I2C interface...in an SOIC package. The drivers I have found are in fine-pitched packages, like TSSOP and others with similar pitches. Yes, I can solder those packages... I just don't want to!
     
  2. Gayan Soyza

    Gayan Soyza Active Member

    Joined:
    Oct 23, 2006
    Messages:
    1,821
    Likes:
    19
    Location:
    Colombo
    Many display drivers comes with SPI. Such as MB15024.
     
  3. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,118
    Likes:
    90
    Location:
    Seattle, WA
    Like I said, I'm looking for an I2C interface. Thanks though.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. granddad

    granddad Active Member

    Joined:
    Jan 18, 2015
    Messages:
    750
    Likes:
    75
    Location:
    Worcestershire UK

    The PCA9532 from NXP has an alternative package but uk distributors only have TSSOP,
     
    • Like Like x 1
  6. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,118
    Likes:
    90
    Location:
    Seattle, WA
    Thank you! I had missed that one in my search. Digikey and Mouser both have good stock in the SO24 package.
     
  7. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,118
    Likes:
    90
    Location:
    Seattle, WA
    Actually, I remember now I had looked at the PCA9532. It's not constant current, so each LED needs a series resistor.

    My choice is between constant current shift registers and I2C with the addition of resistors. Everything else is I2C so it's kind of a toss up at this point which way I'll go.
     
  8. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,015
    Likes:
    317
    Location:
    Brisbane Australia
    ONLINE
    Have you considered using a μC to convert I2C to serial and use a Max7219 to control 64 LEDs? The 16F18323 has 2 serial modules and is only 14 pin.

    Edit, you could program the pic to appear as an 8 byte ram and use the additional pins as address pins to enable multiple devices to be used.

    Mike.
     
    Last edited: Feb 8, 2017
  9. spec

    spec Well-Known Member Most Helpful Member

    Joined:
    Oct 27, 2015
    Messages:
    5,828
    Likes:
    709
    Location:
    Somerset UK GMT
  10. spec

    spec Well-Known Member Most Helpful Member

    Joined:
    Oct 27, 2015
    Messages:
    5,828
    Likes:
    709
    Location:
    Somerset UK GMT
  11. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,118
    Likes:
    90
    Location:
    Seattle, WA
    Spec, the first one is exactly what I need! Right up to the point where the data sheet says there's a single, fixed I2C address. I have 32 LEDs to control so I'd need two of them. I could add an I2C switch to the mix but that's getting complicated.

    Mike, the MAX7219 has crossed my mind, and it actually plays nicely on an I2C bus. The I2C devices will ignore the data sent to the MAX, and with its enable pin not asserted, it will ignore I2C traffic.
     
  12. spec

    spec Well-Known Member Most Helpful Member

    Joined:
    Oct 27, 2015
    Messages:
    5,828
    Likes:
    709
    Location:
    Somerset UK GMT
    Damn, and I was feeling so pleased to have discovered what I thought was a solution.:)

    spec
     
  13. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,118
    Likes:
    90
    Location:
    Seattle, WA
    I was pretty excited when I loaded up the data sheet!
     
  14. granddad

    granddad Active Member

    Joined:
    Jan 18, 2015
    Messages:
    750
    Likes:
    75
    Location:
    Worcestershire UK
    Now that is clever , Have used Max quite a bit, not sure how you would mux the Max data and clock... perhaps just join them together , perhaps you have no spare IO... and will just disable I2C , would a I2C expander MCP23017 do the job
     
  15. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,118
    Likes:
    90
    Location:
    Seattle, WA
    My desire for the constant current approach is to eliminate the need for current limiting resistors. These take up a lot of area and add to the assembly time.
     
  16. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,118
    Likes:
    90
    Location:
    Seattle, WA
    I decided to use the IS31FL3218 that Spec suggested, along with an I2C multiplxer. It adds some steps in the software to address which bank of LEDs to use but that won't add much complexity. Compared to the PCA9532 that Granddad recommended or even just an MCP23017, this saves 16 LED current-limiting resistors. This panel is used as an indicator panel in rack that will rarely be looked at, so the flashing/dimming features of the PCA9532 really don't add much to the design.

    The picture shows the nearly completed board layout, designed for a 1U rack enclosure. The board lays out pretty nicely with these components.

    Thanks for the suggestions!

    I2C V2.jpg
     
    • Like Like x 1
  17. spec

    spec Well-Known Member Most Helpful Member

    Joined:
    Oct 27, 2015
    Messages:
    5,828
    Likes:
    709
    Location:
    Somerset UK GMT
    No probs from me JonSea.:)

    I learnt something about I2C and constant current chips because of your post.

    The PCB looks pretty neat

    spec
     
  18. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    What's the cost for that IS31FL3218, Jon?
     
  19. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,118
    Likes:
    90
    Location:
    Seattle, WA
    Around a buck and a half. Good stock available too.

    Here's what Octopart says:

    Screenshot_2017-02-10-23-38-04.jpg
     
  20. Mike - K8LH

    Mike - K8LH Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    3,637
    Likes:
    109
    Location:
    Michigan, USA
    Hey, Jon.

    Are you still open to suggestions or have you finalized your design?

    Mike, K8LH

    Timstock Charlie SMD.png
    Timstock Charlie smd 2.png
     
  21. JonSea

    JonSea Well-Known Member

    Joined:
    Oct 1, 2012
    Messages:
    1,118
    Likes:
    90
    Location:
    Seattle, WA
    Mike, I'm happy with my design now. It does the job with a minimal number of components of a size that are easy to work with. Thanks all for the comments.
     

Share This Page