Whether you prefer to unwind the evening with a good book, play games on your phone, or wanna have some cozy time with your partner, the right bedside lighting can make a lot of difference.
In this project, I am going to make a touchless multipurpose bedside lamp, which will also include a digital clock, two power-ports and a USB charger.
This video is sponsored by PCBWay.
PCBway: only $5 for 10 pcbs from https://www.pcbway.com/?from=CZcouple
PCBWay specialize in manufacturing of very high quality, low-volume, colored PCBs at a very budgetary price. In addition to the standard PCBs, you can also order Advanced PCBs, Aluminum PCBs, FPC/Rigid-flex PCBs. They also provide PCB assembly and other related service which can meet your needs to the greatest extent.
The ordering process from PCBWay is very easy. Once I had my design ready, I just had to upload the gerber file to the PCBWay's website and select the type, color and any other customization that I want and then just send it for fabrication.
For my project, I choose the black color. PCBWay ships from china to most of the countries of the world within 3 to 7 business days. Talking about the quality, its absolutely mind-blowing.
Lets start the project by sanding a pallet planks to give it a nice and smooth texture.
Then, lets drill 3 holes for the top and the 2 sides of the night lamp.
After drilling the holes lets extract the sides from the plank using a chop-saw or a hand-saw.
My pallet plank is 9.5cm wide and the lamp will be square in shape. So, rest of the measurements are based on that.
Once all the sides were ready its was time for me to join them all together.
First of all I am getting the 2 x sides ready by gluing the power sockets into the holes.
Next, I drilled 2x more holes for the IR sensor.
If you want to know more about IR sensors please check out my "Tutorial No 21 : DIY - IR Module : https://www.youtube.com/watch?v=_M8FQIPi1qk"
Next, one by one using wood glue I am joining the 2 x sides to the top of the lamp. At first I thought of using nails to join the sides, but soon I realized that by all means it was a very bad idea. Before gluing the 2nd side I connected the two power ports together using a copper wire.
Alright now, Lets look at the electronics bit.
For the electronics bit we need:
- 1 x IR Sensor
- 5 x Colored LEDs
- 5 x 220Ω Resistors
- 1 x 10uf Capacitor
- 5 x 2N2222 NPN Transistor
- 1 x 4017 IC
4017 is a Decade Counter IC, it can count from 0 to 10. When a clock signal is received on Pin-14 the output turns to high one by one in a sequence.
The signal from the IR-Sensor clocks the 4017 decade counter. Whenever a pulse is received at the clock input of IC, the counter increments the count and activates the corresponding output PIN. In our project we only need to count upto 5 so the 6th output from Pin-5 will be given to the Reset Pin-15. Sending a high signal to Pin-15 will reset the counter and it will skip counting the rest of the numbers and will start from the beginning. A capacitor is added to filter out too frequent detection of object by the IR sensor.
To add a cluster of LEDs to the circuit, we just need to feed the output from the IC to a transistor and the cluster can then be connect to the transistor. Similar to this setup.
Top - Soldering Components
So, now lets start putting the components together. Lets solder the IC base followed by the 5 x NPN Transistors. Then, lets solder the 220Ω Resistors and the 10uf Capacitor to the board. I also added few pin headers to the board, 3 for the IR Sensor and 2 for the 5v power supply. The transistors are connected to the ribbon of wire which then connects to the cluster of LEDs that will slide under the top section.
Before putting the circuit into production lets do a quick test. Bang, nailed it..
Front - Clock
For the front bit I am using a...Read more »