How to connect multiple leds

Thread Starter

rondavel85

Joined Jul 17, 2015
2
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.
 

djsfantasi

Joined Apr 11, 2010
9,163
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.
 

dl324

Joined Mar 30, 2015
16,935
Welcome to AAC!
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.
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:

Ya’akov

Joined Jan 27, 2019
9,170
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.
 

Thread Starter

rondavel85

Joined Jul 17, 2015
2
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).
 

pmd34

Joined Feb 22, 2014
527
@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!
 
Top