Automatic Bed Lighting

by ardutronic123 in Circuits > Sensors

3250 Views, 29 Favorites, 0 Comments

Automatic Bed Lighting

Kopia coolphone (1).png

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.

Prototyping

DSC_0415.JPG
pir.png
DSC_0419.JPG
bed_light1.png
bed_light2.png

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.

PCB

pcb.png

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.

Testing

done2.png
done.png

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.

Housing

shot_201001_004046.png

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.

The Last Thing to Do

cp00002_01.jpg
cp00002.jpg
cp00002_02.jpg

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")