Jump to content

New LED based stock management system

Hi All,

 

Really hoping you may be able to give me some ideas on how I can achieve what I am aiming for.

 

I have a stock room with several shelves and then boxes on each shelf. I would like to add a system where an LED above each box would indicate where a part is that you are looking for. 

 

I was planning on potentially using a raspberry pi for this but with around 50 boxes thats a lot of LEDs to power. Also I would need to be able to individually light each one.

 

Not really sure how this can be achieved. Any thoughts/suggestions on this plan

 

Thanks

 

SirBacon

Link to comment
Share on other sites

Link to post
Share on other sites

You can use led driver ICs or serial-to-parallel shift register ICs to control multiple leds with few wires (2 wires for I2C or 2-3 wires for SPI - you send a series of bits to the chip through those wires and the chip turns on or off individual leds according to which bit is on or off, 1 or 0).

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

You would need to use a demultiplexer to reduce the number of outputs needed on the Raspberry Pi or whatever else you want to use. This reduces the number of outputs needed to log_2(n). So if you need 8 outputs, a demuxer reduces this to 3. If you need 16 outputs, it reduces it to 4. You just feed in the binary equivalent and it'll spit out a single output. You may need to daisy chain demuxers though, since I don't think anything beyond 16 outputs is common or available.

 

And since LEDs are low on power requirements, the output of the demuxer should be enough to power it. Though the problem at that point is distance.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, mariushm said:

You can use led driver ICs or serial-to-parallel shift register ICs to control multiple leds with few wires (2 wires for I2C or 2-3 wires for SPI - you send a series of bits to the chip through those wires and the chip turns on or off individual leds according to which bit is on or off, 1 or 0).

 

 

 

 

Okay sounds like an interesting idea, can you link me to one of these parts so I can take a further look

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, M.Yurizaki said:

You would need to use a demultiplexer to reduce the number of outputs needed on the Raspberry Pi or whatever else you want to use. This reduces the number of outputs needed to log_2(n). So if you need 8 outputs, a demuxer reduces this to 3. If you need 16 outputs, it reduces it to 4. You just feed in the binary equivalent and it'll spit out a single output. You may need to daisy chain demuxers though, since I don't think anything beyond 16 outputs is common or available.

 

And since LEDs are low on power requirements, the output of the demuxer should be enough to power it. Though the problem at that point is distance.

So the distance will vary but could be up to say 10-15 meters which is quite a lot

Link to comment
Share on other sites

Link to post
Share on other sites

18 hours ago, SirBacon said:

Okay sounds like an interesting idea, can you link me to one of these parts so I can take a further look

 

18 hours ago, SirBacon said:

So the distance will vary but could be up to say 10-15 meters which is quite a lot

As @mariushm said, shift registers are the best bet. Something like the ol' 4094 would be a cheap,solid and readily available solution: https://assets.nexperia.com/documents/data-sheet/HEF4094B.pdf

 

Since it's just a 40-series logic chip, you can clock it nice and slow, which will help with the long distance. Using some bus-protocol like I2C will be problematic over such long distances given protocol timing requirements and the large parasitic capacitance and inductance of such a long wire. Most such buses aren't meant as a fieldbus.

 

Each 4094 can drive up to 8 outputs, 10mA per output or 50mA total. So 8 LED's at 5mA per led should work fine.

4094's can also be cascaded.

Link to comment
Share on other sites

Link to post
Share on other sites

I was thinking of standard 595 shift registers, but I suppose that could work as well.

 

As for LED driver ICs, here's a simple chip that can control at least 8 LEDs and can be configured and controlled using I2C : https://www.nxp.com/docs/en/data-sheet/PCA9531.pdf

 

So with this particular driver, you can see you only need two wires to connect it to a microcontroller or the pi , and then you have the leds powered from some voltage... the led driver turns each led on or off by connecting its negative side to ground inside the chip. It also controls the brightness of each led by turning on or off that led thousands of times a second, without you having to constantly send commands to the chip to turn the led on or off.

 

This led driver has 8 "channels", to which you can connect 8 leds.  But, if you want to, you can control more leds with just one led driver, by relying on the fact that human eyes have problems perceiving flicker in a led... if you turn the led on or off often, you will see just a less bright led, you won't notice that it turns on or off.

 

So for example you could do this :

 

driver_multi.png.01696ff9a60ac943d8246c8672defd80.png

 

 

But where you see 5v in the picture, you don't connect the leds directly to 5v but to a transistor or mosfet or something that you can control.

So you do this:

Send the commands to turn on or off the first 8 leds into the led driver.

Send 5v to the first set of 8 leds and you turn off power to the second set of leds

Wait a few milliseconds

Turn off voltage to both sets of leds

Send commands to the led driver to turn on or off the led channels

Send power to the second set of leds

Wait a few milliseconds

Go back and repeat the process.

 

Because each set of leds is turned on for a few milliseconds and then turned off and then turned on again after a few milliseconds, your eyes won't notice the interruption because a few milliseconds is not enough for your eyes to tell the brain the led is off, at best you'll see the led fading out a bit.

 

You can also connect multiple such led drivers on the i2c bus by simply giving each chip a unique address, using those A0, A1 and A2 pins. Connected to ground means 0, connect to some voltage means 1, so you have 3 bits, which means you can put up to 7 or 8 such chips on a i2c bus by giving the first chip address 0 (  0 0 0 = 0), the second chip address 1 ( 0 0 1 = 1 ) and so on, so using just those 2 or 3 wires, you can send commands to multiple such drivers.

 

So for example, to shorten the length of wires, you could have one driver per row of 8 boxes, and then have 7 or 8 rows of boxes (for a total of 56-64 boxes) and at the bottom or behind of the whole unit, you would have the pi or arduino or whatever sending commands to the 7-8 drivers . The i2c bus is good for maybe around 1-2 meters, so the whole container with tiny boxes must be sized accordingly if you want to go this route.

 

There's cheaper led drivers that work like a basic shift register when it comes to control and configuration, you just push a number of bits in them and then send a signal on another pin and the chip does what the bits tell it to do.

Link to comment
Share on other sites

Link to post
Share on other sites

On 7/29/2018 at 4:57 AM, Pangea2017 said:

ws2801

first reply is what you want

Search for these on ebay.

Basically each led is controllable by its own address. No conflicting pins. You only need 2 pins for as many leds as you want as you connect the first to the second and they repeat the signal. 

You could even connect them to something like an esp8266 so you can have different sections without having to connect them together. 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×