The objective of this project was to create a circuit capable of monitoring an individual's sleep activity and ultimately providing feedback on that activity to the user. The aim was to facilitate lucid dreaming in the subject. During sleep, individuals typically cycle through different stages, which are often categorized into REM (Rapid Eye Movement) cycles and non-REM cycles. While brain activity during non-REM cycles exhibits distinctive features, brain activity during REM cycles closely resembles that of an awake state. In addition to brain activity, several physiological indicators of REM activity can be observed, with the most prominent being eye movement. Since most dreams occur during REM cycles and brain activity during this phase is similar to that of a conscious mind, achieving awareness during a dream is possible. The challenge lies in recognizing that dreams are not reality, as they often feel real. One method to achieve this awareness is to identify unusual signs in dreams, such as flying elephants or malfunctioning devices like light switches. Another approach involves utilizing a device that monitors the individual and provides a signal when REM sleep is detected. This signal can be a visual or auditory cue, strong enough to be noticed but gentle enough to prevent waking the individual. Given that eye movements can be detected through the eyelids during REM sleep, a device can be constructed to monitor these movements and deliver visual or auditory cues to the user. This can be accomplished by directing light at the eye and measuring the amount of reflected light; any change in this amount indicates eye movement. To avoid disturbing the user during monitoring, infrared light and an infrared detector can be employed. As in previous projects, a PIC microcontroller was chosen as the core of the device. The PIC16F676 microcontroller was selected due to its increased input/output capabilities, offering 12 general-purpose I/O ports, as well as a comparator and analog-to-digital converter. The concept for detecting eye movement is straightforward: shine infrared light on the eye and measure the reflected light. The initial approach involved using the microcontroller's onboard comparator to detect changes in reflected light. By placing a resistor in series with the infrared transistor, the voltage could be compared with a fixed voltage set by a potentiometer, which required tuning. A primary issue encountered was oscillation; when the two voltages were nearly equal, the comparator output fluctuated rapidly between LOW and HIGH, making it impossible to determine whether movement was occurring. To address this oscillation, hysteresis was added to the comparator. By feeding back the comparator output to the positive input, a buffer was created: when the comparison output was HIGH, the required voltage for a LOW comparison was lowered, and vice versa. This resolved the oscillation issue but introduced a new challenge. Although the comparator could detect voltage changes, the voltage needed to remain around a calibrated value. If the device was moved slightly, the amount of reflected infrared light would change, preventing the comparator from detecting any variations. To overcome this, the microcontroller's digital-to-analog converter was utilized instead of the comparator. Although this increased software complexity, it allowed for greater accuracy and flexibility. The voltage would be sampled multiple times by the analog-to-digital converter and compared to the previous readings to ensure consistent monitoring of eye movements.
The schematic for this sleep monitoring circuit incorporates several key components to facilitate its functions. At the core, the PIC16F676 microcontroller manages input and output operations, processing signals from the infrared light source and detector. The infrared LED emits light directed towards the subject's eyes, while the phototransistor or photodiode detects the reflected infrared light. The output from the infrared detector is fed into the microcontroller's analog-to-digital converter, allowing for precise measurement of the intensity of the reflected light.
To implement hysteresis in the detection circuit, feedback is introduced from the output of the microcontroller to the positive input of the comparator circuit. This configuration stabilizes the output and reduces oscillation, ensuring reliable detection of eye movements. The microcontroller is programmed to establish a threshold voltage based on calibrated values, allowing it to determine when eye movement occurs.
Additionally, the circuit includes a potentiometer for fine-tuning the sensitivity of the infrared detection system, enabling adjustments based on individual user characteristics or environmental conditions. An output stage is incorporated to generate the visual or auditory cues when REM sleep is detected; this may consist of a small speaker for sound alerts or an LED for visual signals.
Power management is also a critical consideration, and the circuit may incorporate a low-power design to ensure prolonged operation during sleep without requiring frequent recharging or battery replacement. Overall, this sleep monitoring circuit is designed to provide users with feedback on their sleep patterns, facilitating the practice of lucid dreaming through timely cues during REM sleep.The goal of this project was to build a circuit that would monitor a person`s sleep activity and, eventually, give feedback on that activity to the user. The purpose of this was to induce lucid dreaming in the subject. When sleeping, people generally alternate between different cycles. Those cycles are often described as REM cycles, that is Rapid Eye Movement cycles, and non-REM cycles. While the brain activity during non-REM cycles has distinguishing features, the brain activity during REM cycles is nearly identical to that that occurs when a person is awake. In addition to brain activity, several physiological signs of REM activity can be observed, the most obvious of which is the movement of the eyes.
Since most dreams occur during the REM cycles and since brain activity during REM is close to that of a conscious mind, it is possible to achieve consciousness during a dream. The problem, of course, is that dreams seem real: it is hard to realize that dreams are dreams and not reality.
One way to do this is to learn to recognize signs: in dreams, things that do not usually happen in real life, such as flying elephants or malfunctioning equipment like light switches. Another way is to have a device that would monitor the person and give a signal when REM sleep is detected.
That signal can be a visual or auditory cue, strong enough to be noticed but weak enough to prevent the person from waking. Since the moving eyes can be seen through the eyelids during REM, it should be possible to build a device to detect this movement and give visual/auditory cues to the user.
This can be done by shining a light at the eye and measuring the amount of light that is reflected; when that amount changes, it means that the eye is moving. To avoid awaking the user when probing, an infrared light and infrared detector can be used. As with my previous project, I decided to use a PIC micro controller to be the core of the device. Due to the increased input/output demands, I used the PIC16F676 micro controller, which offers 12 general purpose I/O as well as comparator, analog to digital converter, etc.
The concept of detecting eye movement is simple enough: shine an infrared light on the eye and measure the amount of light that is reflected. The first thing I tried was to use the micro controller`s onboard comparator to detect changes in reflected light.
By putting a resistor in series with the IR transistor, I could compare the voltage measure with a fixed voltage. That fixed voltage would be given by a potentiometer, which would need to be tuned. The main problem I had with this technique was the oscillations: when the two voltages were nearly equal, the result of the comparison rapidly oscillated between LOW and HIGH.
When the comparator was oscillating like this, it was impossible to know if there was movement or not. To solve the oscillation problem, I added a hysteresis to the comparator. By having a feedback from the comparator output to the positive input, a `buffer` was created: when the result of the comparison was HIGH, then the required voltage to get a LOW comparison was lowered.
When the result of the comparison was LOW, the required voltage to get a HIGH comparison was raised. This solved the oscillation problem, but uncovered another. While the comparator worked to detect changes in voltage, that voltage needed to stay around a calibrated value. That means that if the device were to be moved slightly, the amount of reflected IR light would be different and the comparator would not detect any changes.
To solve this, I decided to use the micro controller`s digital to analog converter instead of the comparator. While this would make the software more complex, it would allow greater accuracy and flexibility. The exact voltage would be sampled multiple times by the A/D, and then compared to the previ 🔗 External reference
This project is an excellent choice for anyone interested in creating a traditional tremolo pedal that utilizes the original optical coupling technology found in devices like the Reslytone RT-18. While many tremolo circuits are available online, many either do...
The AVR Basic Infrared Transmitter is a companion project to the Basic Infrared Receiver. This project is termed "basic" because it can be constructed using only 10 discrete components along with a standard AVR microcontroller. Together, these two projects...
A simple portable converter that transforms 12V to 250V can be constructed using this circuit diagram. This converter is intended for portable use with a 12V car battery. A built astable multivibrator, consisting of transistors T1 and T2, generates...
The current Milwaukee Guitar design utilizes an off-board computer (a desktop PC) to control the servomotors. A standard USB number pad is connected to the computer, which provides output signals through a Velleman K8055 USB experiment interface board to...
A simple FM transmitter circuit can be designed using the MC2833 integrated circuit, which is intended for cordless telephone and FM communication applications. This circuit includes a microphone amplifier, a voltage-controlled oscillator, and two auxiliary transistors. The final output...
We use cookies to enhance your experience, analyze traffic, and serve personalized ads.
By clicking "Accept", you agree to our use of cookies.
Learn more