Rock-A-Bye Baby, On The Mechatronic Crib Shaker

While an engineering mindset is a valuable tool most of the time, there are some situations where it just seems to be a bad fit. Solving problems within the family unit would seem to be one such area, but then again, this self-rocking mechatronic crib seems to be just the cure for sleepytime woes.

From the look of [Peter]’s creation, this has less of a rocking motion and more of a gentle back-and-forth swaying. Its purpose is plainly evident to anyone who has ever had to rock a child to sleep: putting a little gentle motion into the mix can help settle down a restless infant pretty quickly. Keeping the right rhythm can be a problem, though, as can endurance when a particularly truculent toddler is fighting the urge to sleep. [Peter]’s solution is a frame of aluminum extrusion with some nice linear bearings oriented across the short axis of the crib, which sits atop the whole thing.

A recirculating ball lead screw — nothing but the best for [Junior] — and a stepper drive the crib back and forth. [Peter] took care to mechanically isolate the drivetrain from the bed, and with the selection of the drive electronics and power supply, to make sure that noise would be minimal. Although thinking about it, we’ve been lulled to sleep by the whining steppers of our 3D printer more than once. Or perhaps it was the fumes.

Hats off to [Peter] for a setup that’s sure to win back a little of the new parent’s most precious and elusive commodity: sleep.

This Bunny Reminds Toddlers That It’s Night Time

It’s easy to spot recent parents, they are the people who look as though they haven’t slept in months. Sometimes the little bundle of joy responsible isn’t even a babe in arms but a toddler; old enough to wake up and find their parents for some solace but not old enough to understand that not everyone is up for being woken at 3 am. [Eyal] approached this problem in some style, by modifying a rabbit night light to indicate the time by changing colour, reminding the youngster when it’s a bit early to be rousing the grown-ups.

The bunny in question is a plastic moulding, sold with a white LED providing illumination, This was removed, and replaced with a rather nice custom PCB sporting a ring of addressable LEDs surrounding a Wemos ESP8266 board. In the darkest hours of the night, it is lit as a soft red to indicate sleep time. When an appropriate wake-up point is reached it bursts into a vibrant light show of many colours. Thus the recalcitrant early-riser can be taught to give Mum & Dad a little rest through the medium of light and colour.

This isn’t the first kids night light we’ve seen, indeed some of them have been rather elegant.

DodowDIY Is A Homebrew Sleep Aid

The Dodow is a consumer device that aims to help users sleep, through biofeedback. The idea is to synchronise one’s breathing with the gentle rhythm of the device’s blue LEDs, which helps slow the heartrate and enables the user to more easily drift off to sleep. Noting that the device is essentially a breathing LED and little more, [Daniel Shiffman] set about building his own from scratch.

An ATTiny85 runs the show; no high-powered microcontrollers are necessary here. It’s hooked up to three 5mm blue LEDs, which are slowly ramped up and down to create a smooth, attractive breathing animation. The LEDs are directed upward so that their glow can be seen on the ceiling, allowing the user to lay on their back when getting ready for sleep. It’s all wrapped up in a 3D printed enclosure that is easily modifiable to suit a variety of battery solutions; [Daniel] chose the DL123A for its convenient voltage and battery life in this case. The design is available on Thingiverse for those looking to spin their own.

It’s a neat example of where DIY can really shine – reproducing a somewhat-expensive gadget that is overpriced for its fundamental simplicity. Now when it comes to waking up again, consider building yourself a nifty smart alarm clock.

Counting Is For Sheep: Use A Light To Fall Asleep

How do you get to sleep at night? For some of us, it can be the most difficult thing we do all day. Worrying about falling asleep and letting other intrusive thoughts in night after night only compounds the problem, as less sleep leads to depression which (for us) leads to even less sleep. We lay there, trapped inside a vortex of churning thoughts, imprisoned in a mind that feels like it’s malfunctioning and half-wishing for a future where instructor-led meditation videos can be beamed to the insides of our eyelids. In the meantime, there is FADing, the Fall Asleep Device.

FADing takes its cues from a relaxation technique that uses light to focus your attention and control your breathing. The light’s intensity waxes and wanes on a schedule designed to get you down from the average eleven breaths per minute to a zen-like six breaths per minute. You surrender to the light, breathing in as it intensifies and breathing out as it fades. There are commercial products that bring this technique to the bedroom, but they aren’t cheap and don’t offer much control. Fail to fall asleep in the prescribed window and you’re back to square one with one more thing to think about: buyer’s remorse.

[Youz] was inspired by these devices but dissatisfied with the price tag and lack of options, so he created his own version with a flexible window of operation that appeals to both back- and side-sleepers. It uses an Arduino Nano and two momentaries to control two LEDs, a relay to hold the power after startup, a 9V, and a diode to protect the Nano. One LED projects on the ceiling, and the other radiates through a slice of acrylic which has been shaded blue. One button is for power, and the other lets you add time by two-minute increments. You can see the build video after the break and then tell us how you’d do it with a 555, a coin cell, and a chunk of uranium glass in the comments.

Once you can focus on your breathing without a light, reuse that Nano to measure the quality of all that sleep you’re getting.

Continue reading “Counting Is For Sheep: Use A Light To Fall Asleep”

Final Project For Better Sleep

It’s that time of year again, and students around the world are scrambling (or have already scrambled) to finish their final projects for the semester. And, while studying for finals prevents many from sleeping an adequate amount, [Julia] and [Nick] are seeking to maximize “what little sleep the [Electrical and Computer Engineering] major allows” them by using their final project to measure sleep quality.

To produce a metric for sleep quality, [Julia] and [Nick] set out to measure various sleep-related activities, specifically heart rate, motion and breath frequency. During the night, an Arduino Nano mounted to a glove collects data from the various sensors mounted to the user, all the while beaming the data to a stationary PIC for analysis and storage. When the user awakes, they can view their sleep report on a TFT display at the PIC base station. Ideally, users would use this data to test different habits in order to get the best nights sleep possible.

Interestingly, the group chose to implement their own heart rate sensor. With an IR transmitter, IR phototransistor and an OP amp, the group illuminates user’s fingers and measure reflection to detect heartbeats. This works because the amount of IR reflected from the user’s finger changes with blood pressure and blood oxygen level, which also happen to change when the heart is beating. There were some bumps along the road when it came to the heartbeat sensor (the need to use a finger instead of the wrist forced them to use a glove instead of a wristband), but we think it’s super cool and totally worth it. In addition to heart rate, motion is measured by an accelerometer and breath is measured by a flex sensor wrapped around the user’s chest.

With all of their data beamed back by a pair of nRF24L01s, the PIC computes the sleep “chaos” which is exactly what it sounds like: it describes just how chaotic the user slept by looking for acyclic and sudden movement. Using this metric, combined with information from breathing and heart rate, the PIC computes a percentage for good sleep where 100% is a great night and 0% means you might have been just as well off pulling an all-nighter. And, to top it all off, the PIC saves your data to an SD card for easy after-the-fact review.

The commented code that powers the project can be found here along with a parts list in their project write-up.

This device assumes that sleeping is the issue, but if waking up if your problem, we’ve already got you covered, aggressive alarm clock style. For those already on top of their sleep, you might want some help with lucid dreaming.

Video of the project explained by [Julia] and [Nick] after the break.

Continue reading “Final Project For Better Sleep”

AI Watches You Sleep; Knows When You Dream

If you’ve never been a patient at a sleep laboratory, monitoring a person as they sleep is an involved process of wires, sensors, and discomfort. Seeking a better method, MIT researchers — led by [Dina Katabi] and in collaboration with Massachusetts General Hospital — have developed a device that can non-invasively identify the stages of sleep in a patient.

Approximately the size of a laptop and mounted on a wall near the patient, the device measures the minuscule changes in reflected low-power RF signals. The wireless signals are analyzed by a deep neural-network AI and predicts the various sleep stages — light, deep, and REM sleep — of the patient, negating the task of manually combing through the data. Despite the sensitivity of the device, it is able to filter out irrelevant motions and interference, focusing on the breathing and pulse of the patient.

What’s novel here isn’t so much the hardware as it is the processing methodology. The researchers use both convolutional and recurrent neural networks along with what they call an adversarial training regime:

Our training regime involves 3 players: the feature encoder (CNN-RNN), the sleep stage predictor, and the source discriminator. The encoder plays a cooperative game with the predictor to predict sleep stages, and a minimax game against the source discriminator. Our source discriminator deviates from the standard domain-adversarial discriminator in that it takes as input also the predicted distribution of sleep stages in addition to the encoded features. This dependence facilitates accounting for inherent correlations between stages and individuals, which cannot be removed without degrading the performance of the predictive task.

Anyone out there want to give this one a try at home? We’d love to see a HackRF and GNU Radio used to record RF data. The researchers compare the RF to WiFi so repurposing a 2.4 GHz radio to send out repeating uniformed transmissions is a good place to start. Dump it into TensorFlow and report back.

Continue reading “AI Watches You Sleep; Knows When You Dream”

“The Alarm Clock Ate My Duvet Cover, That’s Why I’m Late!”

Some people just won’t wake up. Alarm clocks don’t cut it, flashing lights won’t work, loud music just becomes the soundtrack of an impenetrable dream. Maybe an alarm clock that rudely yanks the covers off the bed will do the trick.

Or not, but [1up Living] decided to give it a go. His mechanism is brutally simple — a large barrel under the foot of the bed around which the warm, cozy bedclothes can wind. An alarm clock is rigged with a switch on the bell to tell an Arduino to wind the drum and expose your sleeping form to the harsh, cold world. To be honest, the fact that this is powered by a 2000-lb winch that would have little trouble dismembering anyone who got caught up in the works is a bit scary. But we understand that the project is not meant to be a practical solution to oversleeping; if it were, [1up Living] might be better off using the winch to pull the bottom sheet to disgorge the sleeper from the bed entirely.

Something gentler to suit your oversleeping needs might be this Neopixel sunrise clock to coax you out of bed naturally.

Continue reading ““The Alarm Clock Ate My Duvet Cover, That’s Why I’m Late!””