Alexa Controlled Bookshelf Lighting

25,914

341

39

Introduction: Alexa Controlled Bookshelf Lighting

About: I'm programmer and an electronics hobbyist. I try to find that point where software meets hardware meets art. "Necessity is the mother of all creation, but laziness is the father." "The best way…

- This is a Bookshelf with a unique staggered shelf design.

- It also has inbuilt soothing warm-white LED diffused lighting.

- With wireless On/Off and brightness control through Amazon Alexa voice commands!

This is a great looking and eye-catching conversation-starter type of Bookshelf, but then totally blows away everyone's mind when I order Alexa to 'Turn On Bookshelf'.

Besides being good for showing off my book collection, it also acts like a mood lighting and lifts the ambiance of the room. Best of all, it is located near my bed, so I can use it to read book in bed(it gives enough light at full brightness) and command it to turn off when I feel sleepy. No more getting out of bed to turn off the light!

Step 1: Materials Needed

  • A plank of wood. I got 1.5" thick 10 feet long pine wood plank. It needs to be thick enough to cut a groove and insert LED strips
  • L-angles
  • Wall anchors
  • Wall screws 1.5"
  • Wood screws 0.5"
  • LED strip
  • NodeMCU ESP32
  • IRLZ44N Logic Level N-Channel Mosfet

Step 2: Some Background

We bought a new house. My room had this tall empty cavity in a wall for some unfathomable reason. I used it to pile all my books but trying to get a book at the bottom of the pile was a pain. So it was obvious I needed to put a few shelves and convert this space into a bookshelf.

I didn't have any experience with woodworking and was eager to learn. So I went and got a 1.5 inch thick 10 foot long pine plank, which I squarely placed in the middle of our lobby without much of an plan of what to do or how to proceed.

This was 2.5 years ago and the project has progressed bit by bit all this time:

  1. First I cut and put up the shelves and used it like that for a few months.
  2. Then decided to stain and varnish it to match rest of the furniture and used that for a few months.
  3. Then finally I cut grooves into them, add LED strips and electronics to control it all by Amazon Alexa.

I can say that it finally matches what I imagined in my head, and can call it a completed project.

Step 3: Cutting Plank to Make Shelves

I had this huge 10 foot long plank in my lobby and and a hand saw to cut it down to shelf slabs. To get straight cuts with a hand saw, I first marked the cut line and then clamped a 2x4 to the left and another to the right of the cut line, keeping the saw blade's thickness in consideration. This acted as a guide for the saw blade to get straight cuts, which worked good enough for my use case. It wasn't perfect and at times there was a bit of error but it was fixed with some sanding. I learned this trick from this seejanedrill video.

But the biggest problem was that I had seriously underestimated the hard work requited in cutting a 1.5" plank multiple times. After managing to cut a few shelf slabs, I had blisters on my hand. This was the most strenuous and time-taking part of the whole project and since the house lobby was the only place large enough to hold the long plank, it was filled with sawdust and sawing sounds for a few weeks.

Step 4: Install L-Angles

This is the simple but repetitive part:

  1. Mark shelf position. Measure twice, drill once.
  2. Make sure the shelf will be level using a spirit level.
  3. Drill holes for L-angles
  4. Hammer in the wall anchors
  5. Screw in L-angle with the long wall screws
  6. Repeat for all shelves

For the 2 full length shelves at the bottom, I went with inverted L-angles on the sides since they aren't visible and to give maximum load carrying capacity.

For the half-shelves, I went with upright L-angles so most of the vertical part is covered by the thickness of the shelf. I also needed to add a single L-angle on the back wall to provide support to the side wall L-angles and prevent the shelf from sagging/tilting under weight.

While the wood screws I purchased were black, the wall screws and the L-angles were in chrome finish. So for aesthetics, I spray painted them black. The paint will chip from the screw heads when screwing them in but a dab of paint later on can easily remedy that.

Step 5: Add Shelves

Mark on the bottom of shelves where the holes for L-angles will go. Then drill the marked location and use short wood screws to attach shelves to L-angles.

For the shorter half shelves, I had to cut grooves on the back side to accommodate the L-angle so the shelf would sit flush with the front of the wall. The L-angles on the sides do not need the groove as a shelf extending a few mm over the middle of the cavity isn't noticeable.

Step 6: Stain and Varnish

I experimented with a few permutation and combinations of stain and varnish to get a good look with the shelves. The shelves were stained to match the color of the rest of the furniture in the room. I was facing challenges with getting a uniform color so got help with this. After staining, a coat of varnish was added to protect the wood.

Step 7: Cut Grooves for Light Bar

To put the light tubes, a 15mm wide and 15mm deep groove was cut in all the shelves. It was cut 15mm away from the edge. It is preferable to use a table saw for this but I used a circular saw since I only had that, which I bought AFTER having spent ages cutting the plank with a hand saw. Sigh.

First the left and right edges were cut using perfectly measured guide lines. Then multiple passes of the circular saw were made to create thin strips of wood to be broken away easily. Then the bottom of the groove is sanded smooth.

Repeat for all the shelves.

Step 8: 3D Print Light Bars

Light-bars are just 3D printed cuboids with bottom side open to difuse the LEDs. These were 3D printed using white PLA filament.

Light-bars for the half-shelves were 3D printed of size 200mm x 15mm x 15mm.

The light-bars for the 2 bottom full-shelves are 400mm long which just barely fits diagonally on the 300x300mm bed of my CR-10S.

The design took a few iterations as the side edge would be darker than the rest of the tube. So had to thin out the walls in the side edge.

The attached Fusion360 file is parametric so any value can be edited to suit your requirement.

Step 9: Setup LED Bar

Cut out 2 LED strips of 20 mm each. Solder a triple-joint of 2 LED strips along with a pair of wire. Ensure that the positives of both the LED strips go together and the negative together.

Stick LED strips on the inner sides of the light-bar as far away from the top as possible to better diffuse the light. I stuck them slightly offset so that the LED of one is directly opposite the gap between the LEDs of the other. This way we can get a more uniform lighting instead of getting bands of alternating bright and dark. Take out the wire from the holes provided on the side of the light-bar.

Insert the LED bar in groove and use some glue on its sides to stick it to the groove. Repeat for all shelves.

Note that since all light-bars are throwing light upwards, the bottom-most shelf area would not have any light as it does not have any shelf at the bottom, only solid floor. So to light it up, I cut a very shallow groove in the bottom side of the bottom-most full width shelf, added a LED strip and diffused it by gluing a white sheet of paper or thin white plastic over it.

Supply 12V power and test. The image captures my first test with a spare shelf block which looked magical!

Step 10: Wiring the Shelves

The 12V power supply is placed at the bottom-most area and wires carrying power go upwards from it at both left and right sides. The wires follow the corners to be least visible and prefer a color of cable that blends in with the wall color, which is white in my case.They will mostly be covered by books when the bookshelf gets populated.

The power carrying wire is spliced at each shelf position and connected to the light-bar's wires so all light-bars are connected in parallel. Some hot glue or double-sided tape keeps the wire stuck to the side edge of the shelf. This will come between the side wall and shelf side edge, so won't be visible. For this, the shelf should be a few mm away from the wall, else a groove will be required on the side edge of slab to route wire.

Step 11: Making PCB

The MOSFET is wired to act as a switch. The D1 pin on ESP32 is connected to the GATE pin of the MOSFET which turns the LED strip on and off. Using PWM, we can also set brightness.

The 12V supply for LED strips is also connected to the VIN of the ESP32 which allows us to power it using its on-board regulator.

The circuit is simple enough to not require a custom PCB fabricated for it so I made it on a perfboard.

Step 12: Making PCB Enclosure

3D Print the top and bottom part of enclosure for electronics.

Insert the PCB into the bottom enclosure with wires for the 12V power input coming out on one side and PWM controlled 12V power supply for the LED strips coming out on the other side. The top lid should snap fit the bottom part.

The USB port is easily accessible for quick upload of code changes. Two screw holes are provided for easy mounting.

Step 13: Attaching PCB and Wiring Cleanup

A perfect out-of-view spot for the electronics and power supply is on the bottom side of the lower-most shelf. This area is not visible for anyone standing or sitting.

The PCB enclosure has 2 mounting holes which can be used to screw to the bottom of shelf. Same with the power supply. I designed and 3D printed wire clamps to prevent wires from falling all over the place.

A power strip can be placed on the bottom, smartly hidden behind a stack of books. This provides power to the power supply and Amazon Echo.

Step 14: Software

Download the Arduino Sketch for ESP32. You will need to download and install library for ESP32 to upload it using Arduino IDE. Replace the SSID and Password in code with your own WiFi credentials in credentials.h file. I used fauxmoESP library for connecting ESP32 to Alexa.

The on-board LED on ESP32 should blink to denote it is attempting to connect to WiFi. Once it connects, it turns on continuously.

Also, connecting Alexa app to Bookshelf is trivial:

  1. Make sure your phone, Echo and ESP32 are all connected to the same WiFi network.
  2. Open the mobile app for Alexa.
  3. Open the hamburger menu on top-left.
  4. Select Add Device.
  5. Set Type Of Device as 'Other'.
  6. It will ask you to discover devices.
  7. It should show 1 found device. Click on 'Setup Device'.
  8. Then it should show 'bookshelf' device should be setup and ready to use.
  9. Say "Alexa, turn on bookshelf". If you have an LED strip connected to ESP32, it should light up.
  10. You can also set the brightness by saying "Alexa, set bookshelf to 50 percent".

Sometimes, Alexa will say that the device 'bookshelf' is not found when you ask it to turn it on, but the ESP32 has a constant light on which means it is connected to WiFi. In that case, instead ask Alexa to set brightness of bookshelf instead and that always does the trick and Alexa can find it again. Not sure why.

Step 15: All Done!

That is all is needed to make your own Alexa controlled Bookshelf lighting!

It was a labor of love of 2.5 years. I kept learning new things and adding them to the bookshelf till I felt it to be perfect. The electronics part was easy for me but I fumbled around a lot with the woodworking part as it was a new field for me.

If you do recreate the project, please click the 'I Made It' button and share an image.

Woodworking Contest

Participated in the
Woodworking Contest

Be the First to Share

    Recommendations

    • Maps Challenge

      Maps Challenge
    • First Time Author Contest

      First Time Author Contest
    • Make it Fly Challenge

      Make it Fly Challenge

    39 Comments

    0
    Jaytattoo74
    Jaytattoo74

    1 year ago

    Looks really nice! Would have been even cooler if you used RGB LEDs!!!

    1
    halciber
    halciber

    1 year ago

    Well done instructable. Thank you for sharing this with us. I'm looking forward to using ideas in this instructable for my own projects.

    1
    DARKHOURS
    DARKHOURS

    1 year ago

    My dad just turned 100 and living in a condo on his own in England. For his birthday I got him a Alexa and he loves it. Now i also have some ideas, like this project that I could build for him with the few ESP32s i have kicking around. Thanks

    0
    Antzy Carmasaic
    Antzy Carmasaic

    Reply 1 year ago

    That would be nice. I think home automation really helps the elderly, especially those living alone.

    2
    Penolopy Bulnick
    Penolopy Bulnick

    1 year ago

    I love how you put the lights flush into the shelves :D

    0
    Antzy Carmasaic
    Antzy Carmasaic

    Reply 1 year ago

    Thank you Penolopy! The grooves in shelves had a bit variance(1-2mm) so had to do quite a bit of sanding and custom 3D printed light-bar sizing to make them fit well enough.

    0
    boocat
    boocat

    Reply 1 year ago

    Isn't that chic?! It all just seems very expensive. I love this solution to that hideous wall crevice.

    Now you need to paint the wall the bookshelf is in. Something sophisticated and masculine, such as Farrow and Ball's "Card Room Green" (I don't work for them; this is not a plug. I just painted the wall in my husband's "man cave" that color. He hangs his Geoff Hunt ship paintings on that wall. The mellow neutral green really sets them off and makes them "pop" in their gold frames.)

    1
    ColdLandCNC
    ColdLandCNC

    Question 1 year ago

    I was unable to get the download to provide a viable ZIP for Staggered_Bookshelf+v1.0 sketch/code ... it downloads as 2.28 KB ZIP with nothing in Folder. The other downloads worked great :-)

    Code for ESP.jpg
    0
    rruggiero
    rruggiero

    Answer 1 year ago

    Use a different program to extract the files. On my Mac I had to use "The Unarchiver" and not "UnRarX"

    Cheers, Rick

    0
    Antzy Carmasaic
    Antzy Carmasaic

    Answer 1 year ago

    This is a RAR file and will not open in WinZip. You will have to use WinRar to open this. I tried uploading a zip but not allowed on instructables.

    0
    boocat
    boocat

    1 year ago

    You are brilliant!

    Are any L-brackets in studs?

    0
    Antzy Carmasaic
    Antzy Carmasaic

    Reply 1 year ago

    My house has brick walls so no fussing around with studs. If you have to, then you could start by covering all sides of the cavity in wall with sheets of support material(plywood or aluminium sheets) which are attached to studs and then screw L-angles anywhere on those sheets.

    0
    AndersJ3
    AndersJ3

    1 year ago

    Next step, make Alexa light up the shelf with the books you want.

    (And of course, IKEA Trådfri can also control led strips with Alexa or Google, but not as much fun)

    1
    wesmaffett
    wesmaffett

    1 year ago on Step 15

    Antzy, nifty shelving and light integration. I too have been working on shelf lighting design. I did a prototype lighting system for kitchen shelving. The focal point in my kitchen shelf is no wires which I've worked out and can share directly (working design complete). Beyond the sheer pain of working out the details to integrate lighting and power so only the results are visible, the "lit" outcome is cool.
    I have no idea why my pics rotated 90 degrees out...
    Thanks for your post.

    IMG_0252.jpgIMG_0251.jpgIMG_0258.jpg
    0
    Antzy Carmasaic
    Antzy Carmasaic

    Reply 1 year ago

    Wow, that looks great. Since I was building everything from ground up, it was much easier for me to hide up the wiring than to hide in pre-existing shelves. You should totally make an instructable for your project. All the best for it.

    1
    willmothclan
    willmothclan

    Question 1 year ago

    Fantastic tutorial and brilliant idea, thank you so much. Please excuse my ignorance but I have no clue about any of the electronic work you did for this project. Do you by any chance know if one could purchase a complete electronic set up for the lighting you did on your bookshelf? Or, could you simplify the electronic tutorial for those, like me, who might end up blowing themselves up trying to recreate the lighting on your excellent bookshelf? Thanks once again.

    0
    Antzy Carmasaic
    Antzy Carmasaic

    Answer 1 year ago

    In Step-11(Making PCB), I have very simplified diagrams of the circuit on a perfboard showing which component connect to which. That is the simplest way to represent electronic circuit in my opinion.
    There are a few solutions out there for LED strips that can be controlled with Alexa or Google Home. A bit costly as compared to making it yourself, but if you are unsure with electronics, that is a straightforward route.

    0
    willmothclan
    willmothclan

    Reply 1 year ago

    Thanks my good friend. Stay safe.

    0
    Feelunike
    Feelunike

    1 year ago

    Fantastic. Thanks. It made me happy.