Close
0%
0%

recordShelf

recordShelf is an LED based organization system for any type of flat media you store on a shelf.

Similar projects worth following
I wanted to create a system to help me find specific records in my collection and an interesting visualization of information about the records in my collection. There's a webserver running on a raspberry pi that hosts a database of my record collection. You can search the database via a webpage in a browser on your computer or phone. When you select the desired record, the entire corresponding cubby/box lights up followed by the individual LED closest to your selected record's physical location. Using a raspberry pi, fadecandy and neopixels from adafruit.

recordShelf is a light-based tool to visualize information about vinyl record collections. The system is meant for you to browse a digital list of records, select one, and have an indicator LED nearest the desired record blink to help you find it's location.


October 2017 Update
  • Switched over from using Apache/Mysql based webserver/database to using Python based Flask set-up. 
  • Discogs.com integration started - Collection data pulled directly from Discogs.com via JSON. 
  • Upgraded to 5x5 shelf from (2) seperate 2x4 shelves. 
  • Flush-mounted LED's inside shelving
  • Designed new selection animation

Upcoming features:

  • Either RFID or Barcode system for re-shelving.
  • Wireless transmission of necessary audio data from turntable+stereo setup on other side of room for audio visualization purpouses.
  • Decide whether a 'physical width' parameter for each record is necessary or not. (Gatefold and Double/Triple LP's are thicker than Single LP's and throw off the accuracy of the LED locator system by a tiny degree)
  • Possible Discogs.com integration (Discogs collection database vs my personal mysql database on RPi)?
  • Routing out shelving and adding lenses to recess led strip for a cleaner look. (https://www.1000bulbs.com/product/100395/KLUS-B5390.html) (ikeahackers.net/2015/03/light-kallax.html)

twelve_in.sql

my current record database. Exported from phpmyadmin. the 'twelve_in' table is in database 'recordShelf_db'.

x-sql - 64.83 kB - 10/28/2016 at 21:07

Download

recordShelf.js

the backbone of the entire system.

javascript - 15.34 kB - 10/26/2016 at 05:34

Download

  • 1 × Raspberry Pi Zero W Microcontroller
  • 1 × USB WiFi Dongle
  • 4 × 300-500ohm resistor Resistor
  • 2 × Fadecandy by Adafruit / Scanlime Dithering USB-Controlled Driver for NeoPixels
  • 10 × Male DC Power adapter - 2.1mm to screw terminal Connectors and Accessories / D-Subminiature Connectors

View all 14 components

  • recordShelf rebuild / upgrade

    blinkingthing09/22/2017 at 19:36 0 comments

    I recently moved house and wanted to upgrade my recordShelf as part of the transition. This update will focusly mainly on hardware and IKEA furniture modification. 

    In my previous google searches looking for IKEA Expedit or Kallax shelves with lighting set-ups I found this page with a beautifully modified shelf with recessed LED strips in each shelf. It looked so much cleaner than my set up and I wanted to emulate it the best I could. The woodworking challenges presented to me were the pretty difficult for me as I've never used a router and I needed to do a lot of routing for this project. 

    3 weekends back, IKEA had a sale on the particular shelf I was after and I decided it was time to begin this project. I got the shelf, brought it home, opened up the packaging and started to get a plan together.


    Routing

    To decide on where to put the channel for the LED strip I looked at my old lighting setup and measured how far back I had mounted them. The distance ended up landing between the two holes that receive pegs as part of the shelfs assembly. I covered the line I'd be routing out with blue painters tape to help reduce the amount of chipping of the laminate/veneer. 

    I then needed to drill holes at an angle from the inside of the LED channel towards the back of the shelf where the wires would run. There were three locations on each shelf/LED strip where wires would attach and run back so I needed three of these holes on each shelf. I only punched through the wrong side by drilling too far on one of the fifteen holes I had to make.


    To keep a clean look, I wanted to also route out channels for the wires to run back towards the back of the shelf. This channel would require two passes with the router as I wanted to create a little shoulder or ledge that I could attach a finishing piece to, to hide the wiring. This turned out quite well with the inner channel being just wide enough to accept the 3-wire cable I'm using. 



    Prepping LED Strips

    The LED's I chose are the same that I've been using in past versions of the shelf. WS2812b's with a resolution of 60 pixels per meter. This breaks down to 20 pixels fitting nicely in each individual box of the shelf. I could've just left the strip as one long continuous piece for each shelf but I opted to space out strips of 20 evenly with small jumpers inbetween so that the LED's would fall perfectly between the vertical supports on each horizontal shelf. 


    Another caveat with the wiring and prepping of the LED strips was that I had to consider the data limitations of the Fadecandy board that I was planning on using. The fadecandy can power up to 512 pixels, 64 per output, 8 outputs. This meant that while one single fadecandy could run all 500 pixels on my shelf, it would cause some really odd runs and daisy chaning together of led strip in order to get the data topology seperated into 8 sections that were less than 64 each. Instead, I opted to add a 2nd fadecandy, and to use 10 seperate data runs that each handled 50 pixels. This meant a more simple wiring scheme with one data line running to the first pixel on each shelf as well as the 51st pixel, exactly in the middle each shelf. To insert a data line into the center of each strip, I cut the full assembled strip in half, and then remade the + and - power connections but didn't bridge the data, instead running a new data line to be inserted at that point.


    At this point I needed to test the LED strips using the hidden wiring running through each shelf before moving too much further with assembly. Keep in mind I tested the fresh rolls when they were shipped and they all checked out then, but I checked the strips at many points throughout this build to ensure that all the soldering/wiring I was doing was good. 


    Silicon Adhesive

    With the LED's all checked out, the next step was to permanently adhere the LED strips to the aluminum channel, the aluminum channel to the shelf and all wiring to the shelf. The LED strip...

    Read more »

  • Time and Temperature Dashboard

    blinkingthing10/27/2016 at 20:59 0 comments

    Adding some practicality. Dashboard Mode.


    A few weeks ago I started looking into other ways I could use this large array of LED's in my living room. I settled on trying to make a dashboard of sorts that displays the current time and temperature.

    Time is displayed on the top 12 boxes, 1 full box is equivalent to an hour, each single pixel is equal to 3 minutes.

    The color of the completed full hour boxes should be a gradient spread evenly throughout. Every 3 minutes are represented by an orange pixel.

    Temperature is displayed in the bottom left hand corner of the shelf. There is a gradient spread out across two boxes that is revealed or hidden as the temperature rises and falls. I have it set to read between 50º-90º Fahrenheit as that seems relevant to my interest in Southern California. 1 pixel = 1º.

    All this is handled by a python script that runs on the raspberry pi on boot. Weather is pulled from the openweathermap.org API.

    If I want to go back into record selection mode, all I have to do is open the web browser and select a record as per usual. The dashboard script runs once a minute so it will pick back up and start doing it's thing again once you're done picking out a record.

    python script below:

    #!/usr/bin/env python
    
    # Open Pixel Control client: Every other light to solid white, others dark.
    
    import opc, time, datetime, sched, json, requests
    
    #scheduler for clock
    s = sched.scheduler(time.time, time.sleep)
    
    #opc / LED related setup
    totalPixels = 320
    selectedNo = 0
    boxes = [0] * 16
    numPixels = 20
    client = opc.Client('localhost:7890')
    
    darkFrame = (0,0,0)
    white = (255,255,255)
    red = (255,0,0)
    green = (0,255,0)
    blue = (0,0,255)
    yuck_green = (115, 147, 126)
    steel_blue = (160, 185, 198)
    orange = (245, 166, 91)
    blankFrame = [ (0,0,0) ] * totalPixels
    newFrame = blankFrame
    
    #reset neopixels to black
    client.put_pixels(blankFrame)
    client.put_pixels(blankFrame)
    time.sleep(0.2)
    
    #openweathermaps api setup
    # replace **OPENWEATHERMAPSAPI_KEY** with your own key..
    key = '**OPENWEATHERMAPSAPI_KEY**'
    #units = 'metric'
    units = 'imperial'
    cityid = '5368361'
     
    def hex_to_RGB(hex):
      ''' "#FFFFFF" -> [255,255,255] '''
      # Pass 16 to the integer function for change of base
      return [int(hex[i:i+2], 16) for i in range(1,6,2)]
    
    
    def RGB_to_hex(RGB):
      ''' [255,255,255] -> "#FFFFFF" '''
      # Components need to be integers for hex to make sense
      RGB = [int(x) for x in RGB]
      return "#"+"".join(["0{0:x}".format(v) if v < 16 else
                "{0:x}".format(v) for v in RGB])
    
    def color_dict(gradient):
      ''' Takes in a list of RGB sub-lists and returns dictionary of
        colors in RGB and hex form for use in a graphing function
        defined later on '''
      return {"hex":[RGB_to_hex(RGB) for RGB in gradient],
          "r":[RGB[0] for RGB in gradient],
          "g":[RGB[1] for RGB in gradient],
          "b":[RGB[2] for RGB in gradient]}
    
    
    def linear_gradient(start_hex, finish_hex, n):
      ''' returns a gradient list of (n) colors between
        two hex colors. start_hex and finish_hex
        should be the full six-digit color string,
        inlcuding the number sign ("#FFFFFF") '''
      # Starting and ending colors in RGB form
      s = hex_to_RGB(start_hex)
      f = hex_to_RGB(finish_hex)
      # Initilize a list of the output colors with the starting color
      RGB_list = [s]
      # Calcuate a color at each evenly spaced value of t from 1 to n
      for t in range(1, n):
        # Interpolate RGB vector for color at the current value of t
        curr_vector = [
          int(s[j] + (float(t)/(n-1))*(f[j]-s[j]))
          for j in range(3)
        ]
        # Add it to our list of output colors
        RGB_list.append(curr_vector)
    
      return color_dict(RGB_list)
    
    
    
    print "Waiting one minute for first result...."
    
    def everyMinute(sc):
    	currentTime = datetime.datetime.now()
    	currentHour = currentTime.hour
    	currentMinute = currentTime.minute
    	thirdMinute = round(currentMinute/3)
    	#openweathermap
    	url = requests.get('http://api.openweathermap.org/data/2.5/weather?id='+cityid+'&units='+units+'&APPID='+key)
    	weather = json.loads(url.text)
    	currentTemp = weather['main']['temp']
    	currentCondition = weather[...
    Read more »

  • June 1, 2016

    blinkingthing10/26/2016 at 21:06 0 comments

    RFID!

    I got an RFID reader and hooked it up and got it mostly functioning with the system but I don't use it regularly for a few reasons:

    • It runs on a seperate python script from the web interface for record selection and you have to SSH via terminal to start the script. Not elegant by any means.
    • It's not 100% accurate or reliable. It may be hard to tell in the video but the 3rd record I scan (At the Drive In) doesn't produce any new blinking LED, but then when I scan a 4th record, the LED for the 3rd record's location shows up. Haven't really looked into why it's not funcitoning correctly.
    • I only have 4 sample tags and I'd need to come up with a solution for getting ~1,000 uniquely addressed RFID tags and I haven't done the research into that.
    • The whole RFID thing was put into question when a Hackaday user suggested using barcodes instead. That may be more reliable, even if it's less technical and wizard-like.

    RFID gear added to system with breadboard and line level shifter :

  • May 14, 2016

    blinkingthing10/26/2016 at 05:04 0 comments

    A major update to the web interface with some minor performance improvements.

    Most thorough demonstration of system to date.

  • December 15, 2015

    blinkingthing10/26/2016 at 05:02 0 comments

    My most advanced version of the system to date is up and running. Now I have a webserver hosting a web interface on the Raspberry Pi that allows a user to connect wirelessly with a device and in a browser, browse through my record collection and select a record. I also started to play with the TouchOSC app and making an interface on an iPad more for busking along to music or making pretty light shows.

    These new features were demonstrated in the first video I uploaded about my shelf. This is the first time I'd shared this much about the project with the public.

  • August 19, 2015

    blinkingthing10/26/2016 at 04:57 0 comments

    I move houses. Again.

    This time I'm looking to really spruce up the recordShelf setup. I learn about Raspberry Pi's and the Fadecandy board thanks to this lovely tutorial and decide to give those a go. With the previous setup on the Arduino came challenges that I didn't have the patience to tackle. The Fadecandy seemed to help relieve a lot of that stress by providing an easy and reliable control method for the Neopixels.

    In addition to changing the shelf configuration I add more LEDs to fully light each of my 16 cubbies bringing the total number of blinking things on my record shelf to 320!

    My data and power plans for this step of the project are available for viewing in the instructions section of this project page.

    I did a slapdash job of knolling to show off all the new hardware I'd be installing.

    Dry run :

    Post Install :

  • July 11, 2014

    blinkingthing10/26/2016 at 04:31 0 comments

    Here's a video of the initialization sequence the LED's would go through at power up to see that all three colors of each LED were working correctly.

  • March 16, 2014

    blinkingthing10/26/2016 at 04:29 0 comments

    Small upgrades happening here and there. I upgraded to an LCD keypad that had both the LCD screen and multiple buttons integrated on one board that seated nicely. It was a much cleaner set up vs the breadboard situation I had before. I also started toying around with different selection animations.

  • Febuary 16, 2014

    blinkingthing10/26/2016 at 04:26 0 comments

    I've made real progress here. I have a basic understanding of how the Neopixels work and I'm forming a solid vision of how my system should work.

    Initially the system was set up on an Arduino with an LCD screen and two push buttons. When the system was turned on, the first record's Artist and Title were displayed on the LCD and the first LED would light up. The two buttons allowed you to scroll through a list of my record collection changing the info that was displayed on the LCD as well as what LED was currently lit.

  • December 9, 2013

    blinkingthing10/26/2016 at 04:18 0 comments

    I'm not sure how, but I discover WS2811 LED's and am struck by idea of a record shelf organization/catalog system that utilizes the ability of these newly (to me) discovered individually addressable LED strips.

    The first order from Adafruit arrives.

    Testing the strip and my deep dive into blinking things begins.

View all 12 project logs

  • 1
    Step 1

    Power / Data Plan

    I drew heavily on the advice of others for these as I was walking into this project having never worked with neopixels before. I found lots of helpful info in the Neopixel Uberguide and from this Neopixel Curtain project documentation.

    Here's my napkin plans for both power and data and info about how many extra strips I needed to make up during a upgrade/reconfiguration of my setup.

    This data plan shows the flow from the Fadecandy to the mounted LED strips. Line A serviced boxes 1+2, line B went to boxes 3+4 and so on until line H at boxes 15 and 16.

    The power plan shows two lines coming from 2 seperate 10A power supplies that each then split and service 2 full rows of the shelf. Each 10A power supply is handling half the total LED's.

  • 2
    Step 2

    Install necessary software on Raspberry Pi

    If you haven't already, get yourself the latest version of Raspbian and get that installed and running on your Pi. Instructions here.

    Setup for Raspberry Pi : here

    Setup for Fadecandy : here

  • 3
    Step 3

    Prep LEDs and Wiring Harness

    Reference your power plan and prepare all necessary wiring. I pre cut all my LED strips, soldered necessary connections and made all my long data cable runs before plugging anything in or turning anything on.

View all 8 instructions

Enjoy this project?

Share

Discussions

Nick wrote 01/08/2019 at 20:43 point

Very awesome project, I'd love to try to replicate this. I noticed the last update showed starting integration with Discogs, I was wondering how that was going.

  Are you sure? yes | no

James Avery wrote 11/01/2016 at 15:00 point

Amazing work! I always wanted to do something like this. Have you considered doing something with a PiCamera and google image search for identifying the records? 

  Are you sure? yes | no

blinkingthing wrote 11/01/2016 at 17:57 point

The thought crossed my mind but I dismissed it pretty quickly only because I didn't know enough about computer vision to know if it was viable or not. Really cool idea.

  Are you sure? yes | no

James Avery wrote 12/07/2016 at 18:04 point

If I ever get around to it I will let you know!

  Are you sure? yes | no

ChristianN. wrote 10/24/2016 at 21:59 point

I was looking to do something similar with my book collection.

  Are you sure? yes | no

AnnieC wrote 10/24/2016 at 20:37 point

I just found this great project on the Raspberry Pi site. I have the same type of shelves and I plan to do similar LED lighting for them with some kind of music visualization effect. I just have to find the time to do it. Good to see that it looks just as good as I have imagined it would.

  Are you sure? yes | no

blinkingthing wrote 10/26/2016 at 23:02 point

Thanks! Definitely check out this ikeahackers article about a much cleaner LED installation on similair shelves. I'm considering getting the solid wood Nornäs shelves from Ikea. If I do, I'll be routing out the wood and recessing the LED's for a super-clean look. http://www.ikeahackers.net/2015/03/light-kallax.html

  Are you sure? yes | no

dilettant wrote 10/24/2016 at 10:10 point

Cool project! This would be even more awesome with a discogs integration.

  Are you sure? yes | no

Mark wrote 10/08/2016 at 18:39 point

Excellent idea with real practical use! RFID is nice but why not use the barcode that most records already have? Barcodes are cool, cheap to produce and easy to scan.

  Are you sure? yes | no

blinkingthing wrote 10/08/2016 at 18:56 point

I'm ashamed to say I didn't think of using the barcodes what-so-ever. I do have a significant number of LP's without barcodes so it wouldn't cover everything on my shelf. I love that idea though. Especially since I could get it at least partially up and running with the records that do have barcodes.

  Are you sure? yes | no

Mark wrote 10/09/2016 at 00:05 point

I've got a Dymo label printer and lots of cheap no-brand removable label stickers to make my own barcodes. Use it all the time for various collections. Dymo provides an excellent Javascript library to generate and print labels from your own pages / applications. 

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates