Intelligent workshop organiser - WS2812B - illuminated drawers with database

I will present here the design of "smart" workshop drawers integrated with a parts database accessible from a computer or phone. These drawers make it easy to search for parts - when a part name is entered, the cells containing it are highlighted in colour. This allows you to quickly and efficiently find the part you are looking for
The project shown here was made by me together with @DeDaMrAz . A colleague from Serbia soldered a lot of these drawers, with four racks, I made one prototype. In my case everything is controlled by BK7231N, in my colleague's case initially it was ESP8266 (NodeMCU) and then NodeMCU with BK . The project idea and basic scripts (which we later improved) came from https://www.stupid-projects.com/posts/component-database-with-led-indicators/
What will you need for the project?
- a rack of drawers, e.g. the Patrol that is popular with us
- a WS2812B strip (it will need to be cut)
- wires for connection
- soldering equipment (we will solder each diode separately....)
- some controller for WS2812B, preferably ESP, but on BK7231 we also managed to run it
- some PHP hosting, you can also use for this Raspberry, or normally an old laptop (from my tests it seems that even up to 20W you can go down with such a laptop)
- a lot of patience while soldering!
Building drawers You will need some sort of drawer rack to which it is easy to attach the diodes. Attach one diode per drawer. The order in which the diodes are attached matters, because somehow you have to count the index of a given X/Y position on the PHP side, but this can always be changed later in the code. The bigger problem is how much work is involved in attaching the diodes themselves....
Here are some photos of the work, both from a colleague and myself.
Fitting:

Preparing the connections:

Fitting can be soldered on the drawers or separately:

Right off:

Testing with NodeMCU:

In the testing stage it is also worth measuring the current consumption. This will verify our earlier estimate of what kind of power supply we need:

I also made one segment myself. I had a WS2812B protected from moisture on hand, so I had to free them first:



I built my patrol drawers with them :


Findings:

Soldering outside the drawers - this has the downside that minor imprecisions accumulate....


I have bad memories of this soldering, you have to be patient. It's not that it's difficult, as the solder came out the first time, but it was time consuming.


Fixed, hopefully it won't need servicing. The two loops of longer wires are sort of like "buffers" to be able to match the alignment of the other LEDs:

Interface WS2812B controller
The interface is the same for the BK7231 and ESP8266. The control with LEDs is done via REST requests, which is simply via HTTP. The following requests are supported:
enable a given LED for a configured time:
http://192.168.0.123/led_index?params=4
http://192.168.0.123/led_index?params=4
http://192.168.0.123/led_index?params=4
set the colour of the enabled LEDs:
http://192.168.0.123/led_on_color?params=0xFF00FF
Setting the LED off colour:
http://192.168.0.123/led_off_color?params=0x00FF00
Setting the LED on time when the LED is on:
http://192.168.0.123/led_on_timeout?params=5000
setting the ambient colour (for all LEDs) on or off:
http://192.168.0.123/enable_ambient?params=1
setting the ambient colour (for all LEDs):
http://192.168.0.123/led_ambient?params=0xFFFFFF
The above queries run in the browser, they can be tested without putting up a database.
The empty query returns the current settings (this is not implemented for the version on BK7231):

This is what these queries look like in practice - suspect in Wireshark:


Firmware on ESP8266
The basic version of the ESP8266 batch that we modified does not have WiFi settings management. To help a colleague, I added WiFiManager to it, so that it could be easily paired with our WiFi.
In a nutshell, the firmware on the ESP includes:
- simple writing and reading of settings from the "EEPROM" (i.e. Flash - on the ESP this is how access to Flash is called)
- WS2812 support via the NeoPixelBus library
- REST interface support via the aRest library
- copied and simplified WiFiManager library so that we could easily "pair" the controls
Code also defines the pins e.g. the pushbutton from pairing, but everything can be seen on the page.
The code also defines the pins e.g. of the pairing button, but you will see everything in the code.
I do not use this version at all, but if you have any questions I will help.
This firmware is in the form of a project for PlatformIO.
. Firmware on BK7231
Firmware on BK7231 is basically a driver for OpenBeken . It should be included in obk_config.h:

Compilation can be done online, nothing needs to be installed, there are instructions .
OBK controls the WS-type LEDs via the hardware SPI port, so you will need P16: How to access the hardware SPI port on the CB2S? P16 (MOSI) we solder to the QFN
On the OBK we should put autoexec.bat:
startDriver SM16703P
SM16703P_Init 196 GRB
stopDriver Drawers
// All arguments are optional
// startDriver Drawers [NumLEDs] [TimeoutMS] [OnColor] [OffColor] [AmbientColor]
startDriver Drawers 196 5000 0xFFFFFF 0x000000
Documentation for OBK: https://github.com/openshwprojects/OpenBK7231T_App
Tests WS2812B
We also fired up some animation on the LEDs. We used OBK and the PixelAnim driver for this:




Updating:

Addition (in progress, convert to pop-up):

Fun ambient colour:

This page calls functions on the NodeMCU/BK7231 from within Javascript:

List of page files:

From the more interesting files are parts.db - database, and ESP8266IP.txt - IP address of our LED controller.
Final presentation Here's the final presentation. The video shows successively:
- OpenBeken panel of the driver
- setting the ambient colour
- browsing the database and highlighting the search drawers
Everything works and is responsive.
It is difficult to estimate the cost estimate because it depends on many factors, on whether we already have drawers or whether we have some module with ESP8266, but let's try, so roughly, to calculate the price for one segment. Let's assume 60 drawers, thus:
- 60 Patrol drawers - 150 zł
- strip with 60 WS2812B LEDs (1 metre, 60 LEDs per metre) - 20 zł
- NodeMCU - 25 zł
- power supply 5V 5A (with spare) - 40 zł
- soldering binder, hardware, flux - I assume we have
- some computer for the server (at least ours) - I assume, that we have
- wires for connectors - I assume that we have (at least from electro-junk)
The power supply can be much weaker if we are not going to use the drawers as workshop lighting. Assuming that we have some power supply (e.g. from electro-waste) and that we have the drawers (we have already bought them), then the cost of the project drops to about £50....
Summary
A striking and seemingly simple project, but in practice I advise you to be patient. This diode soldering requires some time.
Particularly to get it working at your place will require appropriate modification of the function separating and mapping the chamber indexes to the drawers, but this I leave to the reader. At a colleague from Serbia it looks like this:

Finally, please ask, then we will try to help together.
I attach the project files, both PlatformIO projects in two versions for ESP (I don't know specifically what the differences are, but I recommend using the newer one) and a page in PHP:
Comments
This is in general a great idea for all shops or wholesalers or warehouses that have a lot of drawers. Thanks. [Read more]
Yes, of course, only you have to spend some time tidying up and then take care of it. Only then, when using the workshop, does the time invested pay off. I wonder if it wouldn't be possible to hook... [Read more]
What would currently need to be done is for the device to listen all the time, on a password it starts a transcription, then the language model parses and extracts the name of the electronic element. It... [Read more]
It also depends to what extent we want the effect to be "like in the movies" (i.e. an LLM that understands speech), or whether a completely simplified version will suffice instead, i.e. speech recognition... [Read more]
Interesting idea, makes sense with lots of drawers/shelves. Another layer is solutions with strain gauges under each position. Bossard has such solutions for fasteners for this example. The system itself... [Read more]
It looks cool, but does it make sense with 60 drawers? I have several different drawer racks at work, the biggest one has about 750 drawers, and when I need an item I go and pull it out and it's faster... [Read more]
I was just about to write: how I would like someone to catalogue and tidy it for me. I can already make the bookcase myself :) I will tell you this much - in simplicity all the charm. A super so... [Read more]
The page I take :D I never know what I have ordered and where the rubbish data is! [Read more]
@cms if it wasn't for the large amount of fun of soldering and assembly I would defend this idea more, but still, for example I personally need to look in my Excel as I am looking for most things and also... [Read more]
It looks impressive, but this solution has a major drawback: the mapping of elements to a specific "cell" in the bookcase and not to a drawer. It is enough to remove two drawers in the fervour of working... [Read more]
The drawers are numbered, so such a mistake is difficult (I think). [Read more]
Where did you get this info? In the video you can see some labels but not on all drawers. But even if there is some "analogue" drawer-drawer assignment in the bookcase, which the user has to watch over,... [Read more]
You are right. You have rubbed my eyes a little ;) [Read more]
But is this an objection specifically to the database combined with the highlighted drawers? Rather not. This is an objection to a database based on drawer positions in general. I myself have had drawer... [Read more]
How about adding QR codes to the database, scan the code to confirm that the drawer is correct (and not substituted), by the way, you can add the option to assign the item to the database by the code,... [Read more]
Without going into detail, an item database linked to containers or drawers contains a one-to-many relationship: drawer-item. Adding the bookcase compartment adds another relation and we have: bookcase-drawer,... [Read more]
Without going into detail as to whether the base illuminates the drawer compartment or "only" gives the parts drawer number, the result is the same - there is identification of the container. So, from... [Read more]
As for confusing the drawers, you could stick NFC tags on the back of the drawers, at a cost of a few/something zloty for the tags, as for the reader I don't know. This would even enable dynamic tagging... [Read more]
I've long had this idea of the drawers having a single LED, and here a striking coloured illumination. As one person has his elements, it's not a problem to find them, but in a company where several people... [Read more]