How to connect multiple leds

Discussion in 'General Electronics Chat' started by rondavel85, Mar 21, 2019.

  1. rondavel85

    Thread Starter New Member

    Jul 17, 2015
    2
    0
    I am trying to make a boardgame (Catan) with lots of RGB leds (168). and still puzzeling how to connect those leds.
    Need to have 19 Tiles with 6 leds for each Tile.
    All the leds needs to have a kind of logic, need to know what led is burning and which color.

    Was thinking to connect the LEDS in a matrix but I think that will be messy and if I also want to have logic in those LEDS it will be a pain in the ass to program it.

    Other option I look was to use Led drivers like the LP5018 Texas Instrument, for each tile one for 6 leds. The problem I have with that is that I can only connect 4 of those with I2C because can only specifiy the slave address using 2 pins to put HIGH or LOW.

    Does someone have a better solution or can someone give me a hint to use the 2 options I have described.
     
  2. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    4,569
    1,696
    What are you using to light all those LEDs?Like maybe a computer or discrete circuitry? Without knowing that, it’s really difficult to answer. I assume that you’re using a microprocessor due to the reference to “2 pins”. Are you coding this yourself? Are you using an SPI library?

    Without additional info, I only have one suggestion of two words. “Shift Register”. Your address can be much larger than two pins.
     
  3. dl324

    AAC Fanatic!

    Mar 30, 2015
    8,208
    1,977
    Welcome to AAC!
    For those of us who don't know what Catan is, explain how you want to use the LEDs.

    Wiring as a matrix would allow you directly address any LED. If you drive them serially, you're going to need a lot of latches and/or shift registers.

    Personally, I'd probably use a multi-dimensional array to store the states of each LED (all three colors). Could drive all LEDs in a row or column at the same time, or banks of rows or columns (corresponding to your tiles of 6); whatever simplifies the hardware (i.e. wiring) more.
     
    Last edited: Mar 21, 2019
  4. Yaakov

    Well-Known Member

    Jan 27, 2019
    1,379
    678
    Given the very low cost of 8-pin MCUs, my first pass design would be an MCU per tile with a power bus and let the local MCU mind its 6 LEDs with all MCUs on some bus and control from the main processor.
     
    nsaspook likes this.
  5. rondavel85

    Thread Starter New Member

    Jul 17, 2015
    2
    0
    In the end I want to use a discrete circuitry to power everything.
    I want to use a mircochip microcontroller to program, not sure yet which one. Want first to begin with 3 tiles and so on.

    Already know how to use I2C, UART and SPI with all my other project. This is the only project with so many LEDS and also need to know which led is buring and what color.

    The way I read this next alinea from the datasheet I can only use 4 LP5018 to use as slave.

    8.5.1.4 I 2C Slave Addressing The device slave address is defined by connecting GND or VCC to the ADDR0 and ADDR1 pins. A total of four independent slave addresses can be realized by combinations when GND or VCC is connected to the ADDR0 and ADDR1 pins (see Table 2 and Table 3).
     
  6. Yaakov

    Well-Known Member

    Jan 27, 2019
    1,379
    678
    If you use addressable LEDs it will simplify things.
     
    djsfantasi likes this.
  7. pmd34

    Active Member

    Feb 22, 2014
    353
    149
    @Yaakov has the best plan! With that number of LEDs, it will be hard (and messy) to multiplex them easily. The new addressable LEDs like this:
    https://www.aliexpress.com/item/50-...850.html?spm=a2g0s.9042311.0.0.27424c4dxrAYnZ

    would make it easy, you daisy chain them all together, then send out a series of data packets, 1 for each LED (though you could connect multiple data lines in parallel where you want the LEDs all doing the same thing). You don't actually need a capacitor next to each LED like they show in the data sheet, but you need to be a little careful of the timing to get them working, and also be careful soldering them, the internal "cats whisker" connection has a tendency to come off if they get too hot!
     
  8. Wendy

    Moderator

    Mar 24, 2008
    21,602
    2,978
Loading...