Intelligent Alarm Clock
Design & Experimentation Using EEG Signals
Zubair Ahsan
Simone Park
Jiaqi Wu
Introduction
Conventional alarm clocks indiscriminately awake people during any part of the sleep cycle. However, studies have
shown that if a person is awoken during the deep sleep portion, this can result in side effects such as trouble focusing, lower
productivity, and general irritability throughout the day.
1 In a productivity-based environment, it’s crucial that a person
optimize his or her wakeup time. An electroencephalogram (EEG) is a technique that essentially measures the summed
electric field in the vicinity of a scalp electrode. Sleep EEG signals vary in frequency (from 0Hz-30Hz) and amplitude (<10-
>100
μV) in response to the changes in brain activity throughout the night. Most notably, deep sleep is characterized by the
prevalence of delta waves (0-4Hz, ~100
μV).2 The purpose of our project was to design an EEG-based alarm clock that
triggers at a natural point in the sleep cycle, as opposed to a conventional alarm that triggers at a specific point in time. A
signal conditioning circuit that amplified
μV range signals into V was built, as well as a user-friendly LabVIEW VI that
performed amplitude-based analysis of EEG signals to ultimately wake the person up around deep sleep.
Experimental Setup
The main components of our system were the signal conditioning circuit, and the LabVIEW VI. In order to
read EEG signals, we used three surface electrodes. The two inputs were attached to the head, at a site that minimized
EOG artifacts, and the earlobe, which was used as a reference so that common noises such as ECG pulses could be
subtracted. A third electrode was attached to the forehead as a ground. Prior to attachment, the electrode placement
site was abraded with NuPrep
® Skin Prep gel to remove surface dirt and oils. This helped to remove skin impedance.
Afterwards, Ten20
® conductive paste was used for its adhesive and conductive purposes. Electrode placement can be
seen in the Appendix A.
The inputs were passed into an AD620 differential amplifier with a gain of 610. The signal was then passed
through a unity gain, third order high‐pass filter with a cutoff frequency of 0.5Hz to remove DC offset. This was
followed by a unity gain, third‐order low‐pass filter with a cutoff frequency of 20Hz in order to remove power line and
other higher frequency noise. Following this was second high pass filter to eliminate any remaining DC offset. Overall,
the analog circuitry had a gain of approximately 61,000. This was sufficient to amplify light sleep EEG signals with
typical amplitudes of about 10
μV signals to around 0.61V, and to amplify deep sleep waves with amplitudes of around
75
μV to 4.6V. This gain was appropriate when considering the acceptable inputs into the data acquisition board. A
schematic and a complete circuit diagram are included in the Appendix.
LabVIEW was used to perform further filtering and to do an amplitude‐based analysis of our EEG signals to
determine the proper time to wake our user. Deep sleep was the stage of sleep that most noticeably affected the
quality of a healthy person’ wakeup condition, aside from the hours of sleep the person had. Therefore, amplitudebased
analysis was chosen over frequency analysis because of the clear differences in amplitude between deep sleep
waves, which are prominently delta waves, versus the other stages of sleep. Our LabVIEW VI sampled the signal every
10 seconds and output a chart of RMS amplitudes vs. time. The program calculated the arithmetic mean of the last six
samples (1 minute) and determined if this was a high or low amplitude value according to preset threshold values.
The alarm would sound if the 1 minute average of the RMS of the signal corresponded to light sleep, and the current
time was within a time window set beforehand by the user. The alarm would also sound if the current time was
greater than the set alarm time.
Results:
Figure 1:
Screenshot showing successful Alarm
Trigger: This screenshot shows the moment when
the alarm was set off. We programmed our alarm to
sound no later than 8:30AM, and we see that the
alarm was triggered at 8:03AM because our desired
conditions were met. These conditions were to wake
the user within a 30 minute window of alarm time,
provided that user was in light sleep.
Discussion and Conclusion
Overall, we were able to successfully wake two subjects using the Intelligent Alarm Clock. This success came after
multiple stages of revision and improvements in design, mostly from the signal acquisition and conditioning portion. Initially,
signal acquisition was a major challenge because early plans for circuit design and electrode placement were not refined
enough to cleanly amplify microvolt range signals. Noise from multiple sources including 60Hz powerline noise were orders
of magnitude greater than our designed signal, and saturated our system. Adding higher order filters and multiple filtering
stages improved the frequency response of our signal conditioning circuit. Properly abrading the skin helped to remove skin
impedance and acquire signals acceptable for the aims of this project. The LabVIEW VI further filtered our signal and
successfully implemented our desired goals. Sources of error in the EEG signal come from the instrumentation amplifiers
(AD620 and LM741) that have inherent DC and AC offsets due to the non-ideal characteristics of the op-amp. Errors that
could arise from our assumption for using amplitude-based analysis were accounted. Since factors including motion artifacts
can saturate our signal, our VI discarded signals that were above an adjustable threshold. Our system will drastically be
improved by utlilizing a battery-powered, wireless module that also employs active electrodes. Active electrodes have
amplifiers at the electrode site and amplify EEG signals without the need for skin abrasion prior to electrode placement. This
way, we can produce a completely portable 2-electrode system that will read data back into the rest of the circuit. Overall,
we are pleased with the outcome of our project. Amplitude analysis was a simple and clear way to analyze our signals.
Application
Our current system requires tedious attachment of electrodes to the head using pastes. This is not an acceptable
procedure for a consumer product. In the future, we hope to use active electrodes, which incorporate built in amplifiers, into a
headband that the subject can easily put on and remove.
Using our system, subjects can awaken every morning with minimal discomfort. This will help their attitude and
energy levels throughout the day. To attest the benefit of our system, two test subjects were awaken both after a 2 and 6 hour
period and stated that they felt refreshed and were more productive during the respective days. Also, referencing our college
student survey, our Intelligent Alarm Clock will improve their productivity and overall health. Our 40 student sample has a
willingness to pay of approximately $100. Thus, the next step in product development is to design a wireless interface and a
portable clock/signal receiver unit with cost aligned with our target customers.
The system can be modified to detect and monitor the onset of brain tumors and other diseases that afflict the mind.