Nightlamp & Phone Home
Estee Teo
Estee Teo
Final Image
Side view of the lamp, with power on. The slot on the corrugated plastic body is for the phone.
Brief Explanation
This project was made to help combat my habit of doom scrolling on my phone before bed. It automatically turns on and starts to dim at a set wind-down time, notifying me that it's almost time to sleep. Once the light is fully dimmed, I need to slot my phone in its "home," or else it'll flash annoyingly until I do so.
Detail Images
Lamp with brightness at max
Wooden side panels
Interior Comoponents
Detail shot
Final Videos
In this video, I demonstrate the nightlamp's functionality by manually dimming the lamp. Once the lamp is off, it starts flashing rapidly until I slot my phone inside.
Video of the nightlamp functioning-- internal view, without coroplast body covering.
Process
Prototyping with chipboard and coroplast
Using a mill to make pockets for components to sit in
Arranging the components on the base
Final arrangement before assembling the cover
One of the most important thing I wanted my lamp to have was to be a visually aesthetic object. Thus, my prototype was mostly an exploration of the form and materiality that the final lamp would have. I was interested in a house-like shape because it served as a cute "home" for my phone, even though it's technically a phone jail. I wanted to hand-cut (as opposed to laser cutting) everything because I felt that it was the best way to experiment with the lamp's shape & size.
Once I finalized the form and size, I went to woodshop and milled out pockets for all my components so that I could move the lamp around without having my electronics get shaken up. Since I was handcrafting everything, it was important that I mark & cut everything exactly so that the assembly would go smoothly. There were a couple mishaps where I sometimes sanded/cut too much wood off, and had to change other parts to account for it.
For the lampshade/cover, I used corrugated plastic, as I found that it was the best material to diffuse light and create the smooth corner of the house shape. While exploring materials, I also considered frosted acrylic, but I decided against it due to the corner issue (the edges of the acrylic would feel janky).
Two main critiques that I received were: 1. I should implement a feature to adjust the bedtime, and 2. that the flashing light feels counterintuitive to the idea that this is a nightlamp that should help me sleep better. I felt that both of these critiques are well justified, and were both oversights that I didn't previously consider. However, the flashing "strobe" effect was also something I felt that would make me really want to put my phone in, even before the light fully dims, so maybe it's not a bad thing either. Maybe the best way to navigate all the crit would be to have an on/off switch just in case I need to extend my bedtime, and change the flashing light effect to more of a pulsing effect. Regardless, I'm happy with my project, as it fulfilled my original ideas and worked how I imagined it to. The fact that I handcrafted everything makes it feel more personal to me, and I'm excited to see how it'll last (and whether or not it'll get me to stop doom-scrolling before bed!). I felt that the electronic components to this were relatively easy, and I didn't have a lot of problems getting the code to work either, so the main challenge was the physical fabrication of the object itself. I spent a lot of time in the woodshop just cutting (and recutting if I messed up) my pieces and sanding away imperfections. If I to make another lamp like this, I think it would go a lot faster, since I'm a lot more familiar with the machines and working out tolerances when cutting. Perhaps in the future, I'll make more of such lamps for my friends and family so that everyone can stop scrolling before bed. I also want to make a smaller one for myself without the phone jail, since the idea of a house-shaped lamp is really adorable!
Code
//Nightlamp & Phone Home by Estee Teo
//This code uses an RTC module, High power LED controlled by an LED driver, potentiometer, and IR sensor.
//The RTC module enables automatic turning on/off of the LED at a set bedtime.
//LED driver controls the brightness of the LED, but can also be controlled manually with a potentiometer
//The IR Sensor detects whether a phone is placed in the lamp when the LED is fully dimmed.
#include "Arduino.h"
#include "uRTCLib.h"
uRTCLib rtc(0x68);
const int PWM_PIN = 11;
const int POT_PIN = A0;
const int IR_PIN = A1;
// Dimming schedule
const int dimHour = 22; // 10 PM
const int dimMinute = 0;
// Brightness control
int manualBrightness = 0;
int targetBrightness = 255;
bool dimmingActive = false;
bool lampFullyDimmed = false;
void setup() {
Serial.begin(9600);
URTCLIB_WIRE.begin();
pinMode(PWM_PIN, OUTPUT);
pinMode(IR_PIN, INPUT);
}
void loop() {
rtc.refresh();
int currentHour = rtc.hour();
int currentMinute = rtc.minute();
// Check if it's time to start dimming
if (currentHour > dimHour || (currentHour == dimHour && currentMinute >= dimMinute)) {
dimmingActive = true;
}
// Read potentiometer and IR sensor
manualBrightness = map(analogRead(POT_PIN), 0, 1023, 0, 255);
bool phoneDocked = analogRead(IR_PIN) > 185;
// Dimming logic
if (dimmingActive) {
if (targetBrightness > 0) {
targetBrightness--;
analogWrite(PWM_PIN, targetBrightness);
delay(100); // Smooth fade
} else {
lampFullyDimmed = true;
}
} else {
analogWrite(PWM_PIN, manualBrightness);
lampFullyDimmed = (manualBrightness == 0); // Treat manual off as full dim
}
// Enforce phone docking
if (lampFullyDimmed && !phoneDocked) {
strobeEffect();
}
}
void strobeEffect() {
for (int i = 0; i < 5; i++) {
analogWrite(PWM_PIN, 255);
delay(100);
analogWrite(PWM_PIN, 0);
delay(100);
}
}