I always have trouble finding light switches during the middle of the night in the dark or entering a pitch black room when I get home. That is why I created this customized and programmable night light.
For this custom design night light I want to have the following criteria
- Motion activated
- Light slowly fades on and off
- looks good
- cheap
- programmable
- usb powered
- Sensor sensitivity adjustment
- good night light or motion activated light
For this project you will need
- Hot glue
- Laser Cutter
- Acrylic
- Sand Paper / Sand Blaster
- Motion Sensor / HC-SR501
- Attiny 85 / Adafruit Trinket / or any micro controller
- Mini or Micro USB Female Jack
- LED Strip or USB LEDs (Warm White)
I used 1/4 inch Acrylic for this project. The cut lines in the middle will create 2 pieces for us to interlock, there will be very little waste but does not allow us to friction fit the pieces.
You can download the cut file HERE.
It will take a little while to cut through 1/4 inch acrylic, you might need to do multiple passes to cut through.
After cutting all acrylic pieces, I removed the protective film then sand blast the surface at 60 PSI, you can also use 800 grade sandpaper for this. make sure you do this for both sides.
The motion sensor should fit perfectly to the acrylic piece that has a circle on it. If you are using a smaller motion sensor, you will need to modify the ESP file.
Use the square end pieces to secure the whole structure. You can use acrylic glue, but here I am using hot glue from the inside instead because it’s faster and won’t leave melted acrylic glue mark.
I took a micro usb male to female extension cable and fitted it to one of the end piece that has a rectangular hole. You should resize this hole in the included ESP file before cutting just in case they are different. This port will provide the power and ability to program.
I purchased these cheap and bright LEDs from amazon, but they are touch activated, so I disable them by solder the pins as marked in the attachment.
You can also use 5V LED strip or any 5V LED.
Trinket is programable via USB via the extension cable which leaves the female jack on the exterior.
I wired the LED’s + VCC to pin 4 on Trinket and LED’s GND to Trinket’s GND.
I wired the sensor pin to pin 1 on Trinket.
See code HERE.