Comfort and Fun: The Sentient Night Light
Inspired by a post-horror-movie scare, the Smart Night Lamp is more than just a standard light; it is a bedroom companion that understands its environment. By combining automatic dark-sensing with a multi-mode RGB interface, this project ensures you never have to fumble for a switch in the dark while adding a splash of personality with "Party" and "Dreamy" modes—all controllable from the comfort of your bed using a standard IR Remote.
Intelligent Dark-Sensing Logic
The core automation relies on a Light Dependent Resistor (LDR) arranged in a voltage divider circuit:
- Intensity Mapping: The Arduino monitors the analog voltage on pin A0. When the room's light intensity drops below a specific "Fear Threshold" (e.g., when the main lights are turned off), the night lamp triggers automatically.
- Hysteresis Prevention: To prevent the lamp from "Flickering" when the room is in partial shadow, the code implements small delays or threshold gaps, ensuring a stable, constant glow.
The Trio of Glow: Preset Light Modes
Once active, the lamp provides three distinct "Moods" which can be toggled via the IR remote using the IRremote.h library:
- Party Mode (Disco): Cycles through the RGB spectrum at high speed, turning your room into a mini-dance floor.
- Study Mode: Sets the RGB LED to a steady, high-intensity white or soft yellow, providing just enough task lighting to read or take notes without waking others.
- Dreamy Mode: A slow, breathing fade between deep blues and purples, designed to promote relaxation and deep sleep.
Remote Control and Expansion
The use of an IR Receiver makes the system truly "Sit and Forget." By decoding the HEX values of a standard remote, the user can manually override the LDR, change colors, or adjust brightness. The project is also designed for future expansion: by swapping the IR receiver for an HC-05 Bluetooth module, the lamp can be integrated with smartphone voice commands or custom mobile apps, making it a fully-fledged member of your Smart Home ecosystem.
Generally, my room situated in a closed place becomes so dark when lights off, so one that day I just watched a horror movie which scared me a lot and I decided I should have a night lamp! But, I hate switching it on while sleeping so I want it to be automated. I also got crazy things in mind that it couldn't be a replaced for everything that I have to use when I need! So, I added all of these in it along with a controller which I can control sitting on my bed itself!
About the Project
I used an LDR (light dependent resistor) for switching on/off using my room's intensity. For the disco system, I used an RGB LED (or you can use any 3 different colored LEDs).
And to control them or to change the mode required, I used an IR remote. We can also use a smartphone for controlling with voice or with an app too. I will be describing these later on.
How It Works
When the light is off, the LDR regains its original resistance which results in the decrease in voltage at input pin, so the night lamp glows. We can still can change its mode to party mode, study mode, and dreamy mode—these modes are prefixed in an IR remote which we can change through it.