Giant Interactive LED Board

Thread Starter

Czexican1329

Joined Apr 23, 2018
57
Hello. I'm working on a 6ft-by-4ft interactive LED board. The board will have 300 DotStar LEDs, each with its own IR infrared sensor to control it, and we plan to use a Raspberry Pi 3 - Model B+ to control the LEDs. There will be a semi-transparent screen (plastic or acrylic) over the LEDs and infrared sensors. How we want it to work is that when someone touches the "screen", wherever the person touches will activate an infrared sensor that turns on its corresponding LED. In essence, we want to be able to turn on each LED individually so that a person can make an image or message on the board. So far, I have determined that the inputs (the infrared sensors) will have to be multiplexed and possibly the outputs (the LEDs) for the Raspberry Pi 3 to be able to control the inputs and outputs in the desired way. However, this is where I'm lost; I have very little experience with multiplexing and no experience with the Raspberry Pi. I would really appreciate any advice and/or suggestions. The components I'm wanting to use are:
Also, once we have the LED control figured out, we want to be able to change the color of each LED individually with additional "presses", enabling the user to make images using multiple colors. Each LED would have several colors it could output, and the user should be able to turn an LED off once all the colors have been cycled through. Any help with this part would also be greatly appreciated.
 

dl324

Joined Mar 30, 2015
14,670
Off hand, I'd wire the LED array as a 2D matrix and create arrays of the same size for each color. For simplicity, I'd be inclined to drive all of the rows at the same time and step through columns.

I don't know about RPi, but the ARM based microcontroller I'm using has 3 ways to access the I/O's: shell, sysfs, and bit banding. The sysfs interface on my MCU tops out at around 150kHz. But I can get about 5MHz using the register interface. Writing multiple bits in the same byte/word/long word has the same overhead as writing a single bit. To avoid flicker, you need to refresh at a minimum of 100Hz.

Will the LEDs be spaced far enough apart that the IR sensors will be able to indicate which LED is being touched?
 

dl324

Joined Mar 30, 2015
14,670
Just looked at the LED you want to use. It uses a serial interface, so you can't use direct addressing. I've never used these LEDs, but it seems that you need to control timing fairly accurately to get the desired color.
 

djsfantasi

Joined Apr 11, 2010
8,389
Off hand, I'd wire the LED array as a 2D matrix and create arrays of the same size for each color. For simplicity, I'd be inclined to drive all of the rows at the same time and step through columns.

I don't know about RPi, but the ARM based microcontroller I'm using has 3 ways to access the I/O's: shell, sysfs, and bit banding. The sysfs interface on my MCU tops out at around 150kHz. But I can get about 5MHz using the register interface. Writing multiple bits in the same byte/word/long word has the same overhead as writing a single bit. To avoid flicker, you need to refresh at a minimum of 100Hz.

Will the LEDs be spaced far enough apart that the IR sensors will be able to indicate which LED is being touched?
The LEDs won’t have to be in an array. They are individually addressable through SPI, requiring only two pins.

As far as the rest, I’m working on a post.
 

djsfantasi

Joined Apr 11, 2010
8,389
What is the size of the board, in horizontal LEDs by vertical LEDs? This information is necessary to any design.

Since individual LEDs are addressable, you’ll only need two pins to turn them on. No array needed.

However, your IR sensors are not. You’ll have to develop a scheme to poll them from the Pi. Depending on their output, you may be able to connect the output to a bus. Otherwise, you’ll need additional circuitry to OR the outputs. An array scheme, identifying the outputs by row and column will have to be devised.

You’ll have to poll all the IR inputs, but since the LEDs are addressable, you’ll only have to modify changed LEDs.

I don’t see the need for a separate array for each color. One color array that contains an integer representing the LEDs current color would be stored in this array. I.e., 0 for off, 1 for red, 2 for green or 3 for blue. That’s all the information you need to set or change any LEDs color. Each IR detection would increment the LED color and send the LED a command to change color. You can calculate the address from the row/column of the IR detector and set the color from the array.

Does any of this make sense?

I see the addressing and reading the IR sensors as the most complex problem you face.
 

BobTPH

Joined Jun 5, 2013
5,205
Let’s do some math. A dot matrix for a low quality display is 5 x 8 or 40 LEDs. With 300 LEDs wou have enough for only 7.5 characters.

Bob
 

BobTPH

Joined Jun 5, 2013
5,205
And some more math. 300 LEDs in a rectangular matrix of 6 x 4 feet will be 21 columns and 14 rows. The LEDs will be spaced 3.4 inches apart. Is this what you are envisioning?

Bob
 

dl324

Joined Mar 30, 2015
14,670
The spacing of the specified LED is about 1.3". Spacing them at any other distance defeats the purpose of using them.
 

BobTPH

Joined Jun 5, 2013
5,205
Wait, are you talking about 300 individual LEDs or 300 stirips of LEDs?

If you are talking about 300 individual LEDs spaced at 2 in, the board will be only 42 x 28 inches.

To cover your 6 ft by 4 ft board you need 864 LEDs.

Bob
 

djsfantasi

Joined Apr 11, 2010
8,389
Wait, are you talking about 300 individual LEDs or 300 stirips of LEDs?

If you are talking about 300 individual LEDs spaced at 2 in, the board will be only 42 x 28 inches.

To cover your 6 ft by 4 ft board you need 864 LEDs.

Bob
From his recent comment, he’s talking about cutting the DotStar strips into individual LEDs. Depending on where the edge LEDs are placed, he could also need 925 LEDs. By this I mean is the first LED on the edge, or offset in one inch. In your example, the matrix is 36x24. If they’re placed on the edge, it comes out to 37x25. In either case, lots more than 300!
 

BobTPH

Joined Jun 5, 2013
5,205
And even the higher figures would not give the resolution needed to do what he wamts. I would say 1/2 inch spacing would be the minimum, and that results in 13,824 LEDs.

Bob
 

Thread Starter

Czexican1329

Joined Apr 23, 2018
57
I'm sorry for the confusion. I'm the person tasked with figuring out how to control the LEDs, not how they will be laid out. When I said 300 DotStar LEDs, I meant that we would use 300 individual LEDs, not strips. I appreciate the concern for LED spacing and layout and will relay what you have mentioned to the person in charge of that. However, I need help with inputting the infrared sensors to the Raspberry Pi via multiplexing, using the information inputted via the infrared sensors to control the LEDs, and how to change the color of the LEDs based on how many times an individual sensor has gone off. By this I mean a person will "touch" an LED, the LED turns on, and "touching" it again will change the color; eventually, the LED can be turned off again by "touching" it enough times.
 

djsfantasi

Joined Apr 11, 2010
8,389
Ok, we’ve gone a bit astray from your requirements. To address the IR inputs, you can use 16:1 demux chips. Each IR will connect to its own port on a demux chip. You’d need 19 chips for 300 IR sensors (4 ports will remain unused. Five bits can address each of these chips using the enable input. Four additional bits will address the specific IR receiver attached to each chip. Now you have 19 outputs to demux. This will take two more chips. You will have thirteen unused outputs, but it’s simpler to use the same demux chips. The original five + four bits are decided to select which 16:1 demux and which port is needed. Finally, you are down to two outputs. A simple 2:1 demux can pick which output to pass on.

Or, you can build an address decoder for each sensor. A hex inverter IC, a hex buffer and 6 And gates per sensor. The inverters and five AND gates are wired to decode the address, one AND gate is used to pass the output and the buffers pass the address to the next decoder. Since only one sensors data is available at any given time, you can pass the output back via a wired diode OR.

Are either of these options something that can solve your issue?
 

Sensacell

Joined Jun 19, 2012
3,011
The LED display part is relatively simple- nothing too scary there.

The sensor part is where you are going to have problems.

The sensor unit you have selected is crude, ambient light will cause mayhem, the multiplexing scheme will need to ensure that adjacent sensors will never be on at the same time. (in fact, nowhere nearby) Are you going to climb around this thing with a tiny screwdriver, tweaking 300 little pots?

You need a sensor designed for this, with digitally adjustable sensitivity and a way to communicate via a simple networked wiring scheme, not some point-to-point nightmare of individual wires.

This sensor is not going to be available as an off the shelf unit, you will meed to design and manufacture some custom hardware to solve this problem.
 
Top