Build an LED Shelf Locator With an ESP32 and a Strip of LEDs

Most of us have a shelf of boxes where things go in and never come out again. The spare fuses, the hex keys, the one cable that fits the old printer. You know it’s in there somewhere, and finding it means taking every box down.
A shelf locator fixes that with light. You tell it what’s in each box, you search for something, and the box it’s in lights up. It’s one of the most satisfying small builds we know, and the hardware is cheap and simple.
How it works
The whole thing runs on one long strip of addressable LEDs along the front of your shelves. “Addressable” means every LED on the strip can be lit on its own, in any colour, by a small computer at one end.
Each box is simply a stretch of that strip. Box 1 might be LEDs 0 to 7, Box 2 LEDs 8 to 15, and so on. When you search for “fuses”, the computer looks up which box they’re in and lights just that stretch.
The small computer is an ESP32, a cheap WiFi board about the size of a stick of gum. Because it’s on your WiFi, you can search from your phone, and even ask a voice assistant.
What you need
- An ESP32 dev board. Any ESP32-WROOM-32 board will do.
- Addressable LED strip. WS2812B, WS2812E or WS2811, enough to run along your shelves. Strips can be cut on the marked lines and joined, so one run can cover several shelves.
- A 5V power supply big enough for all your LEDs at full brightness.
- Hook-up wire and a USB data lead for setting the board up.
Wiring it up
There are only three connections that matter.
- Data: one pin on the board (GPIO16 in the build we use) goes to the DIN pad at the start of the strip.
- Power: 5V and ground from the supply go into the start of the strip, and the board takes its 5V from the same supply. Never put 5V into the board’s 3V3 pin.
- Ground: the supply, the board and the strip must all share a common ground, or the data signal has nothing to measure against and the LEDs flicker.
On a short run that’s it. On a long run with hundreds of LEDs, feed 5V and ground in again at the far end as well, so the colours stay true all the way along. If the first LED flickers or shows the wrong colour, a 74AHCT125 level shifter on the data line usually sorts it, because the ESP32 is a 3.3V board and the strip prefers a slightly higher data signal.
The software side
You can write all of this yourself if you enjoy that sort of thing, but you don’t have to. Our own version is called BoxLo, made here at MagicBoxes, and it does the hard part for you. You flash its free firmware onto the ESP32 straight from your web browser (desktop Chrome or Edge), join the board to your WiFi, pair it to your account, and set your boxes as LED ranges in a dashboard. Then you pack: type or say what goes into each box, and it’s saved.
To find something, search on your phone, or ask Alexa, and the box lights up. The full wiring guide and FAQ are on the LED shelf item locator site, with buying links for the parts.
Tips from the workshop
- Leave a gap between boxes. If two boxes share an LED, it’s harder to tell which one is lit. A spare LED between ranges makes it obvious.
- Use a bright colour that stands out. One lit box in a dim garage is easy to spot from across the room.
- Test with USB, run on the 5V supply. USB is fine for setting the board up, but in the finished build power everything from the supply, and only use one power source at a time.
- Plan for more shelves. It’s easier to start with a longer strip than to join one on later.
If you’ve enjoyed this one, our build guides have more home projects, from mini arcades to LED name lights.
Photo: John McMaster, CC BY 4.0, via Wikimedia Commons.