Modern, Custom Floating Shelves

After Moving into the new apartment and slowly gather pieces of furniture we were finally able to acquire a jerker-style desk that fit very nicely into a ‘nook’ in the living room. With a fresh coat of paint and my trusty iMac positioned where it needed to be it was quickly realized that there was a serious lighting issue if we intended on doing any lengthy work sitting at the desk where it sat. For one thing the apartment was recently remodeled, but is still an old building so the ceilings are a little higher then normal, but add to that the odd placement of the living room light in respect to the location of the desk and it might as well be like working in the dark with the computer screen as the only source of light. Ok I may be exaggerating a tiny bit, but it is an issue that does need to get resolved if I plan on not wearing half inch thick glasses in the future from squinting at everything. At first I considered getting permission to install some recessed LED lights in the ceiling, that would probably work fine however being a recent remodel who knows what would be encountered trying to fish power and switch lines through the walls and ceiling. With the height of the room and the setback of the wall in consideration I decided to go with some box style floating shelves with a white finish similar to cabinets since that would match the grey walls and other furniture. Knowing that the shelves are semi-hollow I would be able to install some kind of lighting on the under side of the bottom shelf at least to provide somewhat of a lamp-lit workspace. 

Step 0: Choice in Light Source

My ‘first step’ suggestion would be to decide what kind of lighting source you want to use, be it incandescent, fluorescent, LED, or oil. For most DIY projects with lighting anymore you are most likely going to go with LED, they are by far the brightest and most energy efficient alternative for lighting in a home. You can get them in a variety of shapes and even get LED tubes for old fluorescent fixtures to really make things bright. At one point LED everything was pretty expensive, I think the first LED bulb I bought that came with a lifetime warranty was $45 but the times have come and gone, sort of. You can still pay about that price for an LED light but you will probably be able to turn it off/on and even select the color from your mobile phone. Nothing that fancy will be in this project… yet, but you never know what crazy dance party I may want to have down the road. What I did find after doing a little predesign research was that ultra thin LED can lights or small pin lights were not going to be what I was looking for in this project, and those were in the range of $20-35 per unit so I was pretty determined to find a different solution.

LED strip light i purchased for project

My decision ended up being based on aesthetics and price practicality as well as ease of application. On Amazon you can buy a 16.4ft reel of LED strip lighting for about $8.00 and get them in whatever light color you want. This worked for me because I planned on three shelves 36 inches long with  30” of LED lights on the top and bottom of each providing enough ambient and functional light for my purpose in one strip. If you don’t already have a power supply for the LED strip you buy, you will need to get one separate or find a complete kit for the LED strip, normally almost doubling the cost.

Step 1: Design

The design of boxed floating shelves is really simple but almost always seriously overthought. You build a frame to support the shelf that is very similar to the framing around windows and doors in homes. Except in this case you attach the outer edge of one long side of the frame to the wall in question. The width of the wall I wanted my shelves on is just over 4 feet and is anything but square, mostly because the entire building is shaped like a parallelogram so I am not holding it against the construction crew. Id like to have a little distance between the end of each shelf and the almost encapsulating walls so I decided to make my shelves 36 inches long overall. The depth of your shelf is really up to you, just remember that the deeper it is, the more static weight has to be supported on the one side connected to the wall, the original purpose of my project isn’t because I needed a crazy amount of shelf space so I chose to make mine only 10 inches deep overall. As for the thickness you need to consider a couple of things to prevent your shelves from crashing down on you or looking like giant bulky boxes on the wall. The construction dictates that the total thickness of the shelf is going to be whatever the frame support is plus two times whatever material thickness you are using to cover them is. I am going to use a 2×4 standard pine board you can probably find at your local hardware store, but I am going to rip the board so that I end up with the nominal measurement of 1.5” x 1.5”. This combined with a 1/2” thick sheet of sanded plywood will give me a total thickness of about 2.5”, perfect for my application of just holding some light items, I really could make it thinner probably but I want the look as well. But if you are going to be using these shelves to hold any substantial weight, make sure you really put thought into how thick you want the shelf to end up vs. how  much that thickness can comfortably hold. The final style and dimensions are shown in the images for further reference.

Step 2: Electronics 

If you want to, you could really skip this step and just wire the LED strip lights up to a power supply with a switch later on so that they are just full brightness all the time. But I both enjoy overcomplicating everything and also reinventing the wheel in everything I do, so when thinking about what I wanted the finaly setup capable of I thought “how cool would it be if they could dim” which then turned into what ould it take to have them dim progressivly which led me to need a switch and it only got worse from there. I did follow through with all my ideas and ended up designing a custom circuit board(which will be available for sale here) that uses an AtTiny85 with a voltage regulator and a handful of MOSFETs in a TT220 package  and some other simple pieces.

Salvaged MOSFET TT220

AtTiny85 SOIC 8

There were things that could have been inluded to make it a little more robust but after 5 different board revisions, changing the processing chip, and dramatically reducing the overall footprint of the board I couldnt validate adding anything into it that seemed supurfluous because of what it does. I ended up with a clean + cool looking board that should last and does its job well. At first I setup a protype with my Arduino Uno with a hand routed and soldered prototyped board to control the lights and once I had that working and the program nailed down I began designing the final board.

Prototype LED Controller Board

Now in the ongoing theme I like to maintain of reusing and salvaging components, aside from the microcontrollers and the prototyping board itself, everything I used for this and my final board were working-salvaged from other electronics that had different issues. You’d be amazed at when you can build from the electronics in all the microwaves, computers, and TVs people want to throw away. If I had had to buy all the electric pieces for these the tariffs would have made the cost of this way to much to be work it, just another reason to save what we can in this world of disposable everything.

Each MOFSET on the prototyping board controls one LED strip/indicator and I have three shelves that need controlled individually because of that progressive fading effect I mentioned earlier. My final board rendition allows the use of 4 different MOSFETs but that’s because I wanted to make sure the ability to take advantage of all 4 PWM pins on the AtTiny85 was available later on and for others. In pair with that board I also made a board with indicator lights and a capacitive touch for a hidden on/fade/off switch in the first shelf.

Capacitive tough with indicators board

Between those two boards and the Arduino Uno the electronics were starting to take up a lot of real estate, so that is why I decided to go the route of making a custom board. There is a LOT of information out there for DIYers to learn and implement board design quickly, I myself have a background in Computer Engineering so I did not need to look that information up, but you are able to if you want to design your own, but again mine are for sale here, all you need to do is supply and solder the components on which is a right of passage for any DIYer really. If you are interested, the program I used to design the board was Fritzing.

Top of custom board

Bottom of custom board

Something really cool about this project that many people may not realize is that I am actually getting to design and use my own circuit board, without having to order 2000 of them. There have been a number of startups in recent years that take your circuit board order (normally a minimum of like 3 boards) and compile a list of people who want them made to get the minimum requirement for a batch to be made. Which is awesome because instead of the ungodly price prototyping cost at one time, you can literally do it for $5 a square inch which is dirt cheap. I chose to go with the guys over at Osh Park because who wants a regular green circuit board when you can have a cool purple one! The real tradeoff with ordering boards this way is that once you have paid and submit your order, you have to wait for the fabrication batch to fill up, but don’t be discouraged about that I put my order in and literally the next day I was being told that it was added to a batch list that was being shipped out in two days. The overall turn around time is about 12 days from the time of the board being sent out for fabrication.

Osh Park render bottom

Osh Park render top

Step 3: Programming Magic

Since I am including a micro controller that mean we have to do a little coding with the Arduino IDE in order to get the lights to do anything at all. You don’t have to use all four connectors but you are able to and if you are doing this DIY, the code is for your reference and can be downloaded here.

Now normally to program an SOIC 8 chip you need to get a programmer or clip to interface with, but one of the cool things you can use the Arduino Uno for is to program other microcontrollers by using the Arduino as an ISP. You will still need to actually make the solid connections from the Arduino pins the the AtTiny pins, but you can do it with some leftover wire like I did instead of buying a clip if you don’t want to spend the money to buy the clip.

To setup the Arduino IDE to be able to program the AtTiny85 we want to:

Open the Arduino preferences and add the link:

in the ‘Additional Board Managers URL’ field then click OK to save those new preferences.

Then go to the Tools>Boards>board manager and scroll all the way to the bottom, you should see the ability to install the AtTiny entry.

Restart the Arduino Development Environment

Now that we have the system setup lets go back to Tools>Boards> and select the proper board to match the one you used, in my case it would be an AtTiny85. Once it is selected lets get the board actually hooked up to the Arduino Uno, to do that we connect the pins to:

ATtiny Pin 2 to Arduino Pin 13

ATtiny Pin 1 to Arduino Pin 12

ATtiny Pin 0 to Arduino Pin 11

ATtiny Reset Pin to Arduino Pin 10

AtTiny interfaced with Arduino Uno for programming

That looks awfully scary, but really it is not to complicated at all. Here is a cleaner animated example of the minimum connections required.

Arduino and AtTiny interfaced

Make sure that you have a 10uF capacitor between GND and RST on the Arduino with the Strip(-) of the capacitor hooked up to the GND pin as pictured, otherwise you risk burning up a chip!

As long as you make those connections solid for the limited time it takes to program the AtTiny85, you will be fine. We can test that by opening the Blink project in the Examples folder and changing the LEDBUILTIN pin to ‘0’ and then  Tools>Programmer>Arduino as ISP and upload the sketch. If when you put an LED between the ATtiny Pin 0 and GND it blinks you have successfully programmed the AtTiny with the Arduino! Now just change the Blink Sketch to your LED controller sketch, upload it and you’ll be good to go. If you have any issues with these steps, make sure all your connections to the AtTiny are solid, if that still doesn’t work you may have a child that was DOA and should seek a replacement.

More Steps Are Coming!!

Follow the Facebook and Instagram for updates or check out the weekly blog to stay up to date with ongoing projects and my weekly shenanigans.

Leave a comment

Your email address will not be published.