DIY

Creating bedroom night lights

AliExpress
TL;DR: This DIY project creates automated bedroom night lights using a PIR sensor and ESPHome, triggered by motion to illuminate the floor when you get out of bed.

Frequently Asked Questions

What components are needed for these DIY bedroom night lights?

You’ll need a 5V LED strip, a 5V LED Circle Ring board, a D1 mini board, a PIR sensor (AM312 recommended), wires, a USB cable, a 5V power supply, and a 3D printed case.

How does the PIR sensor trigger the lights?

The PIR sensor detects motion. When movement is detected, it sends a signal to the D1 mini board, which is programmed via ESPHome to turn on the LED lights.

Can I integrate these lights with my existing smart home system?

Yes, the D1 mini board is connected to your smart home setup via ESPHome, allowing for integration and automation with systems like Home Assistant.

What is the benefit of using a PIR sensor for night lights?

A PIR sensor ensures the lights only turn on when motion is detected, preventing them from staying on unnecessarily. This conserves energy and avoids disturbing others, especially in a shared bedroom.




So my wife keeps complaining that she’s finding herself in the dark all the time when she wants to wake up before me or get in bed after I’m already snoring away.

Had a few spare hours, so I had to make this little project –

I decided to have an automated PIR sensor connected to a short 5v LED light under the bed, which will not interrupt me shooting Zzzz.
Also, recently my Ikea Zigbee bulb decided to crap the bed, it’s only turning on but won’t connect to the network anymore.
That wouldn’t bother me as much, but it’s set to the brightest setting and there is no way to control it.
I have a circular led board that I’ve wanted to attach to my 3d printer printing head, but it’s too big. So here is my chance to make it useful.

So I’ve been sketching out and also had the idea to power this baby from a single source of power, as all the consumers will be 5V and the LEDs won’t be on for long on the same time anyway.
A spare board of D1 mini, PIR sensor and off we go.

Of course, everything will be connected to my smart home setup via ESP Home.

Stuff I’ve been using:

Here is the scheme:

Basically, I’ve connected the 5V USB output to the LEDs and the D1 mini board.
Connected all grounds. PIR sensor didn’t work on 3.3V, it did on 5V.
I’m using AM312 as it prevents most false-positives and cheap.

After printing a flimsy case, got some Velcro male sides and fixed those wires to my bed, as its outsides made out of fabric thick enough to be “sticky” with Velcro.

Time to handle the Ikea lamp. I’ve just took the lamp and the cap off, wiggle it around, and it fits like magic! Some cable management and we are done!

And here is the YAML for the ESP home:

Of course, I’ve used an automation to turn on and off the LED under the bed, after validating everything is working. I’ve used this blueprint as it was just what I need, though it’s simple enough writing this kind of automation, I’m a supper lazy ass.

I hope it will help someone that is trying to make a similar setup.

Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.