Automatic Bed Lighting

2,490

24

4

Introduction: Automatic Bed Lighting

About: My name is Wojciech and I am 19 years old student of electronic high school. I am passionate about electronics as well as recording and editing movies. I follow the rule: "Do not delay, do it today".

Do you sleep at night too?

Do you also see nothing in the dark?

Do you also have dark in the room at night?

If so, this device is for you!

I think most of us like to stay a little longer in the evenings. The reasons may be different - Netflix, YouTube, maybe a nap. The worst thing is when it is dark in the room, and we will have to suddenly leave it or, for example, disconnect the charger from the other side of the room. Bed lighting may come in handy, turning it on automatically. Now let me show you how to make it.

Step 1: Prototyping

I will start by making a prototype on a breadboard. I connected the led, resistor, PIR detector, DC Jack socket and connected the whole thing according to the first diagram. The potentiometer on the right on the motion detector is responsible for the sensitivity of motion detection, and the one on the left is responsible for the time the LED will be on after motion detection and its minimum value is approx. 3 seconds.

Then I slightly modified this prototype by removing the diode and adding a relay with a led strip. I connected these elements according to the second diagram. A gentle twist increased the value of the time during which the detector output is high to approx. 35 seconds. As you can see on the video, everything works as it should.

Step 2: PCB

Based on the second prototype, I created a circuit diagram in Eagle and a PCB that will look like this on the screenshot. I exaggerated a bit with the resistor housing :) I exported this file to Gerber files and ordered them from PCBWay (10 PCBs for only $5). I ordered a PCB with a yellow solder mask for the first time and to be honest I did not like this colour. I unpacked the bubble wrap plates and put one of them in the holders to facilitate the soldering process. I put flux on all the solder pads and then a little tin on one of a diode and transistor pads. After placing these elements in their places, I soldered the rest of the pads. Then I soldered two resistors, DC Jack socket, relay and goldpins. I put heat-shrinkable tubes on the led strip cables and soldered them to the female goldpins, and then welded the tubes. That's it for soldering.

Step 3: Testing

Before I design the housing and enclose the PCB in it, I have to test this device. I connected the signal from the PIR detector and the power supply to the board. I connected a LED strip to the two goldpins in the middle, and the goldpins on the left side can be used to power other intelligent devices that I plan to make. I have no objections to the operation of this device, I can start designing the housing.

Step 4: Housing

I started by creating a new project and saving it as "Bed Light". Then I added a new sketch and, taking into account the size of the board and the relay, I determined the dimensions of the housing. I added a hole for the DC Jack socket, handles to attach the housing to the bed and holes for wires. Another part that I had to design was the PIR detector housing, which I made in the same way as the previous one. The last stage of the projecting stage was to saves the project and export it, to later put it into Creality Slicer and print it.

Step 5: The Last Thing to Do

The only thing left was to mount the device and the led strip to the bed. Thanks to the mounts, you can easily attach this device to the bed, be it with screws or hot glue, I chose the second option. I attached the device first, then the detector and aimed it at the area where it is most likely to be found, and finally attached the led strip. After connecting the power supply, I was able to enjoy the next completed project.


My Youtube: YouTube

My Facebook: Facebook

My Instagram: Instagram

Get 10 PCBs for only $5: PCBWay

Shop with 3D printing accessories: Solid 3d (-10% on all products with the code "ARTR2020")

Be the First to Share

    Recommendations

    • DIY Summer Camp Contest

      DIY Summer Camp Contest
    • Fandom Contest

      Fandom Contest
    • Maps Challenge

      Maps Challenge

    4 Comments

    0
    burkmurray
    burkmurray

    9 months ago

    Nice project!
    Why did you choose a relay rather than a transistor?

    0
    ardutronic123
    ardutronic123

    Reply 9 months ago

    There is a relay and a transistor :D

    0
    JemChalweDoPorzygu
    JemChalweDoPorzygu

    9 months ago

    Awesome project Wojtek.
    I love your project. Might build one in the future. It's so easy and it doesn't involve programming a micro-controller :)

    0
    ardutronic123
    ardutronic123

    Reply 9 months ago

    Thanks, dzięki :D