[Will Dana] is engineering his way to better sleep hygiene. Not satisfied with a simple bedtime reminder notification — such things are easily dismissed, after all — [Will] is offloading self-control onto a robot which will take his phone away at bedtime.
Scrolling in bed is allowed up to a prescribed time. At that time, a rack and pinion-mounted arm rises up from behind his mattress, presenting an open hand, ready to accept the object of his addiction. At this point, a countdown begins. If he does not hand over the device in a matter of seconds, the robot escalates by flashing obnoxiously bright lights in his face.
The nocturnal technology detox is not absolute, however. A button allows [Will] to temporarily retrieve his phone after it has been confiscated. This safety override accounts for the Inevitable situation where he will need to send a last-minute text before nodding off. The flashing light disincentive countdown is restarted upon retrieval, ensuring that [Will] does not cheat his own system for additional scroll time.
As a brief sidebar, [Will] does a nice job explaining how pulse-width modulation works for the purpose of controlling the speed of the rack and pinion mechanism.
For more of [Will’s] projects see this iPad suspension system a Lamp that tracks the location of the ISS and a drum that uses the piezoelectric effect to charge mobile devices.

I don’t like it. Its inefficient. I do understand it was made not to be used but to be presented on youtube but there are more clever solutions that are easier as well.
I have assigned a few simple automations on my homeassistant (its a software that can set schedules, automate your “smart” IoT devices). It makes the lights in my room go yellow, after sunset, starts f.lux on my PC, and by bedtime, it dims the light gradually to completely off.
Much easier, no hassle
Here’s the real problem. Bed is for sleeping and doing the horizontal bop. That’s all.
No TV in bed, no phones in bed, no books in bed.
Do all that stuff in the living room. Bedtime = devices off, lights out, eyes closed.
This. I already dislike it that I have my clothing closets in my bedroom. The doors are closed. There is a bed in there and alarm clocks. I put my phone on the charger on the other side of the room so it’s not near my bed. I got a google home mini just to use as an alarm clock and for white noise and a fan on the ceilig. Everyhthing is designed to sleep. The rest of the room is clean. White walls, empty walls, no paintings, nothing.
I already have a difficult time sleeping and waking, so everything in my bedroom is designed to sleep. The less junk, the easier it is.
I went to a school run by a monastery. One of the monks had difficulty getting up in the morning. But he was ingenious. He connected the rotating key on his alarm clock to a wedge which released a weight. That was connected to a bigger wedge which released a bigger weight. And that was connected to the bedclothes via two pulleys in the ceiling.
The first morning it worked fine.
But, later that morning, his housekeeper was in tears because she could not get his bedclothes down from the ceiling.
Whaaat??? Monks with housekeepers?