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”
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!””
Despite what my wife says, I have absolutely no evidence that I snore. After all, I’ve never actually heard me snoring. But I’ll take her word for it that I do, and that it bothers her, so perhaps I should be a sport and build this snore-detecting vibrating sleep mask so she can get a few winks more.
Part wearable tech and part life hack, [mopluschen]’s project requires a little of the threadworker’s skill. The textile part of the project is actually pretty simple, and although [mopluschen] went with a custom mask made from fabric and foam shoulder pads, it should be possible to round up a ready-made mask that could be easily modified. The electronics are equally simple – an Arduino with a sound sensor module and a couple of Lilypad Vibe boards. The mic rides just above the snore resonating chamber and the vibrators are right over the eyes. When your snore volume exceeds a preset threshold, the motors wake you up.
Whether this fixes the underlying problem or just evens the score with your sleep partner is debatable, but either way there’s some potential here. And not just for snore-correction – a similar system could detect a smoke alarm and help rouse the hearing impaired. But if the sewing part of this project puts you off, you should probably check out [Jenny List]’s persuasive argument that sewing is not just for cosplayers anymore.
The ESP8266 is certainly a versatile device. It does, however, draw a bit of power. That isn’t really surprising, though, since you would expect beaming out WiFi signals to take a little juice. The trick is to not keep the device on all the time and spend the rest of the time in deep sleep mode. [Marco Schwartz] has a good tutorial about how to use this mode to run for “years” on a battery.
[Marco] notes that even using a 2500 mAh LiPo battery, he only gets about 30 hours of operation without sleep. By putting the chip in sleep mode, the current consumption drops from about 88 mA to just over 8 mA. That’s still high, though, because the board has a power LED! By removing a jumper or cutting a trace (depending on the board), you can drop the current draw to about 0.08 mA (80 uA) when it’s not doing anything.
Continue reading “ESP8266 Lullaby”
Some of us need a bit of help to get up in the mornings. This can come in the form of a sunrise lamp, which simulates the light of the sunrise to fool our poor sleep-deprived brains into waking up in the depths of winter. [Lincoln Johnson] found the ones he tried were not bright enough to wake him, so he decided to build his own: a 10,000-lumen monster that can wake him up from across the room.
It uses a lot of LEDS: 5 meters of 5630 LED strip, which pulls a circuit bending 72 watts when running at full blast. This monstrosity is powered by an Arduino Pro, which is programmed to slowly increase the brightness over a period of 30 minutes, thus simulating the sunrise. It uses PWM control to fade the LEDs, and also includes a dot matrix display to show the time. Honestly, if you are able to sleep through this thing blasting your eyes, you are probably dead.
Knocking a microcontroller into sleep mode and waking it up on demand or in intervals is common practice in many low power applications, enabling devices to stay in operation for years on a single coin cell battery. Since there are tons of applications where you might want to do similar things with a Raspberry Pi, [Patrick Van Oosterwijck] created the LiFePO4wered/Pi. The module that snaps on to eight GPIO pins of a Pi, extending it by a long life LiFePO4 battery, a charging regulator, and a proper power management. Obviously, it also makes a great UPS.
[Patrick] realized this project by expanding his already available and equally useful LiFePO4wered/USB charging regulator module by a low power MSP430G2131 microcontroller and a load switch. A daemon on the Raspberry Pi speaks to the module over I2C, allowing you to schedule a wake-up timer, let your Pi autoboot after a power outage or just read out the current battery voltage through a command line tool. Once the Pi is safely shut down, the microcontroller will also go to sleep, resulting in a standby current of 8 uA for the whole system. Together with the 500 mAh LiFePo4 cell, that’s theoretically low enough to send your Pi-ncess into a seven-year-long sleep.
LiFePO4wered/Pi is not only good for sleeping, though. [Patrick’s] runtime tests show, that the 500 mAh cell will power a Raspberry Pi Zero and a WiFi dongle for about two hours. Because the Raspberry Pi and many USB peripherals won’t complain when only 3.2 V are present on the VBUS, [Patrick] was able to squeeze out even more runtime by dismissing the boost converter from the design and driving the Pi directly from the battery voltage. If that worries you, you can either read a detailed explanation on why that works so well or just have a look at the more compliant 5 V version.
Eventually, [Patrick] used his module to create a Raspberry Pi time-lapse camera. A little script lets the Pi take a picture on boot up, set a wake-up timer and go back to sleep again. Safely enclosed in a waterproof electric box and deployed into the wild, the camera took 120 pictures on a single charge.
We’re sure the module will find it’s way into many cool projects and we’re counting the hours until we can get one in [Patrick’s] tindie store. Until then, enjoy the time-lapse video:
We can commiserate with [HardwareCoder] who would rather not leave his PC speakers on all the time. The Creative T20 set that he uses turn off when you turn the volume knob all the way down until it clicks. So shutting them off means repositioning the volume each time they’re switched on again. This hack kills two birds with one stone by turning on and off automatically without touching that knob.
The system is based around an ATtiny45 and a few other simple components. It uses two ADCs to monitor the rear input channels of the PC speakers. If no sound is detected for more than one minute, the shutdown pin of the speakers’ amp chip is triggered. That’s not quite where the hack ends. We mentioned it monitors the rear input of the speakers, but it doesn’t monitor the front AUX input. An additional push button is used to disable the auto-sleep when using this front input. There is also a fancy PWM-based heartbeat on an LED when the speakers are sleeping.
[HardwareCoder] was worried that we wouldn’t be interested in this since it’s quite similar to a hack we ran a few years ago. We hope you’ll agree it’s worth another look. He also warned us that the demo video was boring. We watched it all anyway and can confirm that there’s not much action there but we embedded it below anyway.
Continue reading “Auto-sleep Hacked in PC Speakers”