Prelude
Many ideas behind the projects of this blog originate from a long time ago, from the late 80ies.Back then, me and a couple of friends were fascinated by exploring and manipulating our still young brains. We practiced meditation, autogenic training and we experimented with lucid dreaming, hypnosis, medical plants and psychoactive substances, with the ultimate goal to reprogram our brains and our realities. Great inspiration came from the books of Timothy Leary, William Burroughs, Paul Watzlawick, Robert A. Wilson and Carlos Castaneda.
Many of this ideas were part of the then emerging neo-psychedelic subculture, that soon merged into the commercial New Age movement and the beginning techno & trance scene. But at this time we found it exciting, when in Heidelberg the "Brain-Tech" shop opened, where we could try out Mind-Machines and biofeedback devices or lie in an float tank for the first time. Even the Spiegel magazine wrote an article about that.
Mind Machines promised to achieve in a couples of minutes the same effect as years of meditation. They were basically ski-glasses with a micro controller and some LEDs, that could play various "programs", accompanied by a 8-bit soundtrack. This costed about 1500 Mark, too much for us students.
Soon our clique dispersed into the world and we studied & worked ourselves into our particular life paradigms. What's left is my interest for psychedelic technologies, that explore, modify and intensify our perception and consciousness.
The phenomenon of sleep
I was always fascinated by the phenomenon of sleep, this daily crack in the continuity of my existence and the every morning Reboot, this moment of re-assembly of the own identity and reality, before everything continues towards it's daily routine. All my life I had problems with my day-night rhythm: I had problems to fall asleep, needed a long time to get awake and clear in the morning and I rarely remembered my dreams.I wanted an alarm clock, that doesn't simply forcibly wake me at a certain time, but helps me to awake naturally when my body is ready. Also, it should involve the whole day-night rhythm, thus the falling asleep, the sleeping and the awakening. Like an external support system for the biological clock.
One problem with alarm clocks is that they don't take into account the current sleep-phase of the sleeper. There are (4) different phases of sleep that occur in cycles during sleep and between them there are almost-awake-moments, that are said to be better suited for waking up. A reliable detection of the sleep phases involves polysomnography, a comprehensive recording and analysis of various parameters, which requires being cabled to expensive equipment and the data analyzed by experts.
Today there exist a variety of sleep-phase alarm clocks as hardware devices or as smartphone apps, that use a simplified approach called actigraphy - the measurement of body movements during sleep - to detect almost-awake-moments.
The reliability of actigraphy in comparison to polysomnography is subject of various studies and rated from very poor to fairly good, depending on who was responsible for the study.
My private Polysomnography
I decided to give it a try and build my own sleep laboratory. It quickly became obvious, that a pillow would be the perfect container for the sensors and would also provide possibilities to embed other useful things like loudspeakers. In most sleep-phase alarms the detection of nightly movements is accomplished by acceleration- or vibration sensors, but in my tests I found, that they also respond to my partners movement lying next to me. They are apparently more oriented towards singles.I decided to additionally use capacitive sensors that measure the proximity of the head to the sensor and that basically consist of a sheet of copper foil. The heart of the pillow is a Teensy 3.2 microcontroller, that is similar to an Arduino, but more powerful, more cheap, much smaller and with build-in capacitive sensing. Additionally I embedded an accelerometer and a piezo vibration sensor to compare and calibrate the capacitive sensor.
I also added two miniature loudspeakers, which sound surprisingly good (with a bit of equalization
to compensate for the damping of the pillow). They behave more like headphones than stereo speakers, so I can enjoy binaural tracks while falling asleep.
Btw.: An amazing source for relaxing soundscapes is the mynoise.net website & app.
First results
Next to the bed and connected to the pillow is a RaspberryPi, that saves the data for later analysis. Here are the visualizations of the first night.The vibration sensor (blue) is not sensible enough to be useful, the three axis accelerometer (red, green and yellow) clearly show phases of rest with moments of movement between:
The three capacitive sensors are very noisy, but they show the same phases and movements like the accelerometer. Additionally they show if the head is on the pillow at all and on which side of the pillow the head is lying. And they don't respond to the partners movement or random vibrations.
After some digital signal processing, it's pretty easy to detect if the sleeper is in the bed and to distinguish the individual sleep phases. Each night shows a slightly different sleeping pattern. The third day, a Sunday, also features two short naps.
All in all it's look promising and I will continue to explore my sleeping patterns & experiment with the different transitions between sleep & awake .