Introduction: The Perfect Bedside Lamp and Phone Dock
I built this lamp for my girlfriend. She has quite a big bedroom, which is located right underneath the roof. It has lots of slanted walls that make it hard to mount stuff. Her solution for a bedside lamp so far was to carry her desk lamp over to the bed to have a small bedside lamp. This causes a lot of wiring mess and is super impractical. However, right in front of the bed is a huge wooden pillar: the ideal mounting place for a small lamp.
This inspired me to head out and build the perfect bedside lamp for her room. I originally meant to give it to her for her birthday, but a couple of drawbacks and limited time on my hands kept me from delivering on time. After some more intensive hours in the shop I was finally able to finish it today ( just a week to late).
I put a lot of thought into it (aka. did a lot of overengineering) and found two interesting uses for my 3D printer (see Step 3 and Step 7) on the way. I also incorporated a little Arduino magic to make it truly custom and "techkie". I would like to use this Instructable to share my process and my ideas with you.
What does the perfect bedside lamp have to offer?
Lets Talk about bedside lamps for a second and what all of them should be able to do. This is of course my personal opinion. Here is a little list of features, that my perfect bedside lamp offers.
- emits nice warm light
- is dimable (with a very cool touch dimmer)
- can store different custom brightness settings
- offers a dock for smartphones
- can charge two smartphones
- prevents dangling charging cables ( by hiding them behind a magnetic front cover )
- can be controlled using my foot (as it is located at the bottom of the bed)
Here is a list of the stuff that I used to build this lamp and that you will need, if you also want to build one.
- 2 m of wooden strip 30 mm*5 mm
- 0.5 m of wooden strip 10 mm* 10 mm
- approximateley 0.5 m * 1 m of 4 mm MDF board (preferably with one white side)
- small power strip with integrated USB charger (Amazon)
- 12 V 15 W LED power supply (Amazon)
- 230 V wall switch (Amazon)
- 1 m of warm white LED strip (120LED's/m) (Amazon)
- custom Arduino dimmer (more on that in Step 5)
- 64x small 4mm*1mm magnets (Aliexpress)
- vinyl wrap for furniture (wood and glossy white)
- wood saw
- cutting jig
- coping saw
- cutting knife
- soldering ion
- crimping pliers
- access to a 3D printer
Step 1: Planning and 3D Modelling
I started out by modelling the room in Fusion 360. I proceeded to model the lamp on the pillar and got more and more detailed by adding the components, such as the switch, the power strip and the phone dock. I also exported the STL models for the phone dock and the magnetic holders (Step 3) from this big model.
A nice perk of having a complete 3D model of the room is that it enabled me to do some light renderings (image 3). Though only in low resolution, as I didn't want to wait for multiple hours with my laptop's fans on overdrive.
I attached the Fusion 360 file, if anybody is interested in viewing it in its full beauty. I might also be helpful to get all of the measurements for the following steps.
Step 2: Building a Wooden Box
The backbone of the lamp is a wooden box. It is made from 30 mm by 5 mm wooden strips and 4 mm MDF-Board. You can see a picture from the 3D model in the first image, that names the different pieces.
Here is a little list of them the different pieces
name material size [mm] front and LED frame 4 mm MDF 400*200 back 4 mm MDF 380 * 180 top and bottom side 30 mm * 5 mm strip 180 left and right side 30 mm * 5 mm strip 370
The strips were cut to the right length using a handsaw and a cutting jig. The back, the LED frame and the front plate were cut from the MDF using a cutting knife.
For the assembly I started with the the sides and the back. They were glued together using wood glue and held in place with multiple clamps. Once the glue had dried, I used a bunch of tiny nails to add some extra stability. Then I put the wooden box on top of the LED frame and marked a hole, which I cut out using my cutting knife and a coping saw. The LED frame was glued to the front of the box and the inner edges were cleaned off using a cutting knife and sand paper. The front cover, which will be finished later, has the same size as the LED frame. I put them on top of each other and used sandpaper to get them to exactly the same size.
Throughout the whole process I spend most of my time sanding the pieces to fit as perfectly as possible. Once the box was assembled I used some more sanding to get even edges.
Step 3: Printing Magnetic Holders for the Front Cover
The front cover is supposed to be removable without any tools. This makes it easy to replace the charging cables, if the phone changes or the cable goes bad. I thought about mounting it with velcro but this might require to much force to remove. After some more thinking, I came up with the idea of magnetic holders.
I designed little holders into the main model and 3D printed them ( see image 1 ). They are rectangular and have a lot of side surface area. This will cause some friction and help stopping the panel from falling out, once it is in place. The magnets add a little bit of extra holding force.
After printing all 4 holders I used superglue to put the magnets in (two into each hole). I first glued the bottom piece into the wooden box (image 2). I then placed the top piece on the bottom piece with a piece of paper in between (image 3), put a lot of super glue onto each of the 4 edge pieces and pressed the wooden front onto them. The last image shows the magnet holder on the back of the front piece.
If you want to print them, i attached the files. Place them upside down on the build plate and print them without support.
Step 4: Mounting the Electronics
I did not want to just hot glue the power strip in place, so I constructed a frame out of 10*10 mm wooden strips around it (images 1). The second image shows how i surrounded the bottom of the power strip with some foam window seal. I later cut out a little piece of MDF, to press the power strip down (seen in later steps).
The light switch is mounted inside a flat (<30 mm) electronics enclosure. I did not have such a flat enclosure. That's why i cut down a bigger one and covered it with a 4 mm thick piece of acrylic and a little bit of vinyl wrap ( image 4 ). This enclosure will contain all of the AC wiring and connections. That is why I did not just 3D print my own enclosure, but modified a conventional electronics enclosure. In contrary to 3D printed parts, those enclosures are well tested, fire retardant and can isolate high voltages. This adds an important extra level of safety, in case anything goes wrong with the wiring.
The power strip frame and the switch box are secured to the back by multiple small screws ( image 5 ). I also drilled holes into the sides of the magnetic holders in the wooden box and secured them with two screws each. This made the whole box even more stable.
The last two images show the LED strips. They were cut to the length of the 4 sides and soldered together into a rectangular shape. I then used the strip's adhesive to put them onto the LED frame and secured the edges with hot glue.
Step 5: Making a Custom Dimmer
For the dimmer I wanted something very special and custom. It should allow the user to save multiple custom brightness levels and change between them using a simple swiping action. For this I came up with a 3 button design (plus, save and minus). I used little capacitive touch buttons that can be hidden behind the lamps enclosure and covered with vinyl wrap (nice and stealthy).
The dimmer allows for the following user interactions:
- right swipe over all 3 buttons => next preset brightness level
- left swipe over all 3 buttons => previous preset brightness level
any preset level can be changed to a custom value through the following actions
- holding down the plus button ( > 2 seconds ) => increase the brightness
- holding down the minus button ( > 2 seconds ) => decrease the brightness
- holding down the save button => store the new value to the current level.
The current firmware allows for 4 individual brightness levels to be set and stored. The lamp also stores which level was last selected and jumps back to it the next time it is turned on.
The Arduino based circuit can be seen in image 2. I used an Arduino Nano that outputs a PWM signal to control an NRFZ44 N-Channel MOSFET. I put a MOSFET driver in between the two components, to reduce the MOSFETs heat dissipation and increase the dimmers efficiency. Unfortunately the Arduino Nano has a PWM frequency in the audible range, which causes most transformers to act as a tiny and annoying speaker. This issue can be solved by using a faster microcontroller or reduced by adding a capacitance to the input. I went with a 200uF input capacitor.
Here is the parts list for the dimmer:
- Arduino Nano
- 10 KOhm resistor
- IRFZ44 N-Channel MOSFET
- TC4426 MOSFET driver
- 200uF Capacitor
- 3x 3*1 female header
The firmware was written in the Arduino IDE. It uses two of my own libraries (Button and Timer). I attached all of the necessary files. If you download them and put all of them in a folder named "firmware" you will be able to compile it.
I turned the circuit diagram into a breadboard circuit for testing. A very important step for any electronics prototype (that I skip far to often). I later proceeded to solder it onto a PCB (image 4,5). The PCB layout can be seen in the third image. Last but not least I designed and printed a little enclosure (STL files attached).
Step 6: Wiring It All Up
I wanted the lamp to have a single plug and a single wire, while combining a power strip and a lamp. Therefore i needed to do some mains voltage wiring. If you plan on doing something similar, always remember that mains power can kill you. It also has the potential to cause a fire, if the wiring is done improperly. If you don't feel comfortable with high voltages and don't have any experience, don't do it like me. Use a switch, that has cord already attached to it and a second power strip to plug the USB power strip and the LED lights into.
If you think you know what you are doing, remember to insulate your joints properly. Ensure best conductivity by measuring wire resistances with a multimeter and use wire end terminals.
I wired everything up according to the little wiring diagram in image 4. I basically spliced my led power supply into the power strip wire. Images 2 and 3 show the wiring mess with the enclosures open and the neat view when everything is closed. Btw. the dimmer and the transformer were simply hot glued in place.
Step 7: Printing and Assembling a Phone Dock
The phone dock is the centerpiece of the lamp. It holds the phones in place and serves the secondary function of being the dimmers touch interface. I designed it inside my 3D model and printed it in purple PETG, because I was out of my nice white PLA (first print failed). The STL file is attached. I printed it without support and with my parts cooling fan cranked up to 100%. The dock has slots for the touch button modules and features subtle indents for the buttons on the front so the user can feel them.
One special design feature of the phone dock is that it also has slots on the bottom for routing the wires that I soldered to the buttons beforehand. I used hot glue and some clear packaging tape to secure the wires in those slots (image 2). This gave me quite a nice, if not completely even, bottom surface. Before and after gluing the buttons in, I made sure that they were working properly using my breadboard circuit (image 3).
Back to the purple PETG. It does not really fit the look of the lamp. That is why I sanded the print, cleaned it with alcohol and covered the visible parts in vinyl. Im was surprised with how well this actually worked. A little tip that I learned is to use a plastic card to get into all of the edges without scratching the wrap. I also used a hair drier to heat up the vinyl wrap for the front. This made it easier to cover the button relief ( see image 6 ).
I was very pleased with how well this worked out and I'm sure that I will be covering a couple of other 3D prints in vinyl wrap in the future. Once the wrapping was done I hot glued the dock into the wooden box.
Step 8: Finishing the Front Cover
The front panel was the final step. I carefully measured the positions of the phone dock, the light switch and the power strip and drew them onto the front cover. I also incorporated two holes next to the USB sockets and two long holes underneath the dock to put the charging cables through.
After some more work with my drill, a coping saw and surprisingly little sanding, I had a front cover that fit nicely. I then proceeded to cover it in vinyl wrap as well. The last image shows everything tugged together and ready to be gifted.
Step 9: Installing the Lamp
After the "gift giving process" it was time to mount the lamp at its destination.
The magnet holders serve the extra purpose of being great drill guides, that made it easy to drill 4 holes into the wooden pillar and put in 4 screws. After the lamp was securely attached to the wall, I routed the two charging cables through the lamp and attached the front cover.
Now tripping over the desk lamps wire is finally a thing of the past.Oh, and my girlfriend was also very happy with the gift :).
I hope you enjoyed this Instructable as much as I enjoy looking at this lamp. And I hope that I could spread a little inspiration for your next project. If anyone decides to build a similar lamp, I would love to see your version.
I really rushed writing this documentation to publish it in time for the 3D printing contest. If you think this project deserves it, maybe consider voting for me.
Thanks for reading through all this and I which you good luck with your upcoming projects :).
Participated in the
3D Printed Contest