Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

No Doze EEG Sleep Detector - Lecture Notes | ECE 445, Study Guides, Projects, Research of Electrical and Electronics Engineering

Material Type: Project; Class: Senior Design Project Lab; Subject: Electrical and Computer Engr; University: University of Illinois - Urbana-Champaign; Term: Fall 2006;

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 03/16/2009

koofers-user-l5j-1
koofers-user-l5j-1 🇺🇸

10 documents

1 / 25

Toggle sidebar

Related documents


Partial preview of the text

Download No Doze EEG Sleep Detector - Lecture Notes | ECE 445 and more Study Guides, Projects, Research Electrical and Electronics Engineering in PDF only on Docsity! No Doze EEG Sleep Detector Created by: Benjamin Schneider David Mahr Kuang Tan ECE 445, SENIOR DESIGN PROJECT FALL 2006 TA: Hyesun Park December 5, 2006 Project No. 9 ABSTRACT An appreciable difference exists between brainwaves of a person that is awake and a person that is on the verge of sleep. As a person transitions from alertness to sleep, the alpha rhythms of his/her brainwaves decrease in frequency, diminish in amplitude, and become more irregular in frequency. These brainwave changes can be sensed using an electroencephalogram (EEG). We developed a device that will recognize the shift from wakefulness to sleep, via recognition of the frequency of the EEG signal, and then relay that information wirelessly to an alarm system. The alarm system will visually display the awareness level of the user and provide audio alerts when the user is drowsy or has falling asleep. ii 1. INTRODUCTION An EEG collects brainwaves by measuring the voltage differentials across the scalp. These brainwaves vary in frequency and amplitude and fall into four main categories: alpha, beta, delta, and theta. The type of brainwave, which is based mainly on frequency, is indicative of a person’s level of awareness (see Table G.1). We created a device that monitors the frequency of a user’s brainwaves, and alarms the user (and using both visual and audio alerts) when the user’s brainwaves decrease in frequency to a point that is indicative of drowsiness or sleep. This process is accomplished through the use of an EEG, a signal processing module, a wireless transmission unit, and alarm circuits. The EEG provides the signal processing PIC with the brainwave signal. The PIC then calculates the EEG signal’s frequency, determines the user’s awareness level, and outputs accordingly. The PIC outputs are then relayed wirelessly to the audio and visual alarm units. 1.1 Purpose Our goal in creating this product was to develop a life saving device that will alert drivers that are drowsy or have fallen asleep. Fatigue exists as the direct cause of approximately hundred thousand crashes in the United States each year. Additionally, drowsiness is a major contributor to driver inattention: the cause of one million crashes annually, or one-sixth of all crashes. These automobile accidents result in fifteen hundred fatalities, seventy-one thousand injuries, and twelve and one half billion dollars in monetary losses [1]. Even with this magnitude of loss, no effective sleep detector for drivers is currently available on the market. We chose this project because a device that could prevent these tragic physical damages and financial losses associated with fatigue related automobile accidents would be very beneficial to the welfare of our society. 1.2 Specifications The main specification of our device is that the user must be alerted within one second of the occurrence of sleep. To accomplish this feat, several specifications were set for each module. The EEG module must amplify the microvolt brainwave signal to provide the signal processing PIC with an input signal of at least 1V peak-to-peak and a maximum of 10V peak-to-peak (0.5V – 5 V in amplitude). The EEG module must also eliminate any DC bias in the brainwave signal, and filter out any signal with a frequency outside the range of 1 to 40 Hz. Also, the EEG module must be supplied by +5V and -6V. The signal processing, buzzer, wireless, LED awareness indicator, and audio modules must be supplied by +5V. The PIC microcontrollers in the signal processing and audio modules must not source or sink more than 25mA. The buzzer circuit must have three distinct volume levels in which the module progresses through (separated by 1.5s). The RSSI signal of the wireless module has to be at least 3.85 V (for the LED circuit to function). Also, the communication between the transmitter and receiver in the wireless module must have a range of at least 6 ft. 1.3 Subprojects Our project is divided into several subprojects which each perform specific task (see Figure A.1): 1.3.1 EEG Module The EEG module amplifies brainwaves via the differential voltage measured on the scalp by electrodes on the forehead. The EEG circuit should amplify the brainwave signal to at least 1 V peak-to-peak and sufficiently filter out frequencies 2.38 to 39.38 Hz. A favorable SNR ratio also needs to be maintained throughout the amplification process. v 1.3.2 Signal Processing Module The signal processing module is used to calculate the frequency of the analog EEG signal. The determined frequency is then used to classify the level of awareness of the user. This module outputs four different signals: Transmitter_Power, Sleep_Indicator, Buzzer0, and Buzzer1. The Transmitter_Power output serves to power up the wireless transmitter. The Sleep_Indicator output serves as the data bit sent by the transmitter. Shift in the value of these outputs reflect a change in the awareness level of the user, and thus, changes in the values of these two signals will only occur at 8 Hz and 12 Hz – the threshold frequencies between high alertness and low awareness and between low awareness and sleep, respectively. Buzzer0 and Buzzer1 outputs are used to select the volume level of the buzzer alarm. 1.3.3 Buzzer Module The buzzer module is used to alert a sleeping user. This module receives two input signals from the signal processing unit. These inputs select the volume of the buzzer by selecting one of four different voltage levels that are available to the piezo-buzzer. When the user is not asleep, the buzzer will be silent. However, when the user falls asleep, the buzzer proceeds through a progression of three alarm volumes from lowest intensity to highest intensity. The transitions in the alarm volume are separated by 1.5 seconds. The alarm will remain at the highest intensity until the user is no longer asleep. 1.3.4 Wireless Module The wireless module receives two signals from the signal processing module which are used as the control inputs for the LED logic module (after proper conversion). Transmission range of this module is about 10 to 15 feet. 1.3.5 LED Awareness Bar Module The LED logic module receives two digital inputs from the wireless module, and uses them inputs, which are based on the awareness status of the user, to select the color of the LED. This module also controls the output of the audio module. 1.3.6 Audio Module This module receives input from the LED logic module. By using a PIC, this module generates melodies based on the input from the LED logic module (reflects status of the user). Audio is transmitted via a speaker as an output. 1.3.7 Power Supply Module The power supply module converts input voltages from 6V to 24V unregulated DC source into +5V and -6V with respect to ground. Batteries that can be used in this module are 12V batteries, 9V batteries, or AA/AAA batteries. vi 2. DESIGN PROCEDURE 2.1 EEG Module Design The function of the EEG module was to successfully acquire brainwaves signals, sufficiently amplify the signal and filter out extraneous noise. This is an essential component of the project as this signal will be used to determine the awareness of the subject. Disposable Ag/AgCl electrodes were used on the scalp and placed on the right and left side of the forehead (E.3). An additional electrode was placed on the neck to act as a ground. 5.1kΩ resistors were also placed in series with the electrodes in order to protect the user from the circuit [6]. To initially amplify the signal, instrumentation amplifiers were used. An instrumentation amplifier is a specific type of differential amplifier used to measure small voltage differentials of the inputs while attenuating common inputs [7]. Instrumentation amplifiers are more advantageous to use over operational amplifiers as they are specifically designed to have low DC offset, low drift, low noise, and high common-mode rejection ratio. The AD620BNZ instrumentation amplifier from Analog Devices was chosen because it was rated high in these areas. High-pass and low-pass filters were used to attenuate undesirable noise. Noise that was of most concern was DC offsets and 60 Hz noise. DC offsets can occur due to shifting of the electrode wires or the dipole present in the eye [6]. 60 Hz noise is due primarily to power lines. Both active and passive high- pass filters were used to filter out DC offsets. The advantages we found to using active filters were that they have sharper cut-offs, are less subject to feedback, act as a buffer to the circuit and also proved to respond quicker to spontaneous DC offsets. Passive high-pass filters were made using only resistors and capacitors, while active high-filters were made using operational amplifiers in addition to resistors and capacitors. For the low-pass filter, we used the MF6CN-50, which is an active 6th order low-pass filter designed by National Semiconductor. 2.2 Signal Processing Module Design The main objectives of the signal processing module are to determine the frequency of the EEG signal, classify that frequency as a specific awareness level, and then output based on the user’s awareness state. The module has one input and four outputs. The single input is an analog AC voltage signal supplied by the EEG circuit. This input signal should have an amplitude between 0 and 5V, zero DC offset, and be properly filtered to only include frequencies between 1 and 40 Hz. Upon reaching the signal processing module, the input signal will pass through a half-wave rectifier to eliminate negative voltages in the signal. This module has two digital output signals to the wireless module, Transmitter_Power and Sleep_Indicator, and another two digital output signals to the buzzer circuit, Buzzer0 and Buzzer1. These outputs depend on the current and previous awareness states of the user. The user’s awareness level is based on the frequency of the EEG signal. If the frequency is greater than 12 Hz, the user is highly alert. If the frequency is between 8 Hz and 12 Hz, the user has a low awareness. And finally, if the frequency is less than 8 Hz, the user is sleeping. Using the above mentioned frequency based awareness divisions, the signal processing module determines the frequency of the input signal, and then assigns an awareness level based on that frequency. Subsequently, the user’s previous and current awareness levels are compared, and the module outputs based on that comparison. That is, if the previous awareness level is higher than the current awareness level, a decrease in awareness level has occurred, and the module will output a high Transmitter_Power output (to power up the transmitter) and a low Sleep_Indicator output (to signal a downward transition). Conversely, if the previous awareness level is lower than the current awareness level, an increase in awareness takes place, and the module will output a high signals for both the Transmitter_Power and vii 2.6 Audio Module The audio module was initially not included in the first design. It was added on because our further research showed that audio stimuli plays an important role in alerting a user from sleep. The audio cues implemented in our design include a start up melody, a warning melody, and a danger siren. Inspired by the workings of the Theremin, the design was implemented by using a variable frequency oscillator. This variable oscillator was implemented through the use of a microcontroller with various delays between “high” and “low” outputs. The microcontroller output is then amplified (gain of 200) to produce audio via a speaker. This design was implemented using a PIC16F877A from MICROCHIP, a 5MHz oscillator, and an LM386N, a low voltage audio power amplifier. It receives input from the LED logic module, and outputs a 0.1KHz and 2KHz variable frequency melody on cue. 2.7 Power Supply Module The main functionality of the power supply design was to produce stable voltage regulation from portable power supply sources like AA or AAA batteries or from 9volt batteries. This module provides +5V and -6V to the head set unit, and +5V to the base alarm unit. By using the LM 317T 3-Terminal Adjustable Regulator from National Semiconductor, many of our requirements were fulfilled easily. LM317T has a guaranteed output of 1.5A, current limit constant with temperature, and the output is protected from short circuit. By using two LM317T +5V power supplies were created on the headset and base alarm unit. Later on, since the op-amps require a -6V lead relative to ground, the LM7905 3-Terminal Negative Regulator from National Semiconductor was added to regulate -6V to the headset unit. This device also has the same safety features as the LM317T. x 3. DESIGN DETAILS 3.1 EEG Module The purpose of the EEG was to amplify the brainwave signal within 1 Vpp in order to be processed by the PIC. Because brainwaves measured on the scalp are on the order of 10 uV, we chose to amplify by a gain of approximately 122,000 [6]. Each instrumentation amplifier has a max gain of 10,000, thus we chose to operate two instrumentation amplifiers in series. The gain on each instrumentation amplifier is determined by adjusting the value of a resister across pins 1 and 8 on the chip as can be seen in Figure B.2. Equations 3.1.1 and 3.1.2 show how the gain is calculated via the resistor value. Because the two instrumentation amplifiers are placed in series, the total gain is the calculated by the product of each individual amplifier gain. Equation 3.1.3 shows the total gain. 49.4 1 [ ]g k G R     (3.1.1) 49.4[ ] [ ] 1 g k R G     (3.1.2) 1 49.4 1 4941 10 k G      2 49.4 1 24.656 3.3 || 5.1 k G k k       1 2 (4941)(24.656) 121,825totalG G G   (3.1.3) Passive high-pass filters were placed directly before the input into the first instrumentation amplifier. These passive high-pass filters were built using resistors and capacitors and had a cutoff frequency of 0.34 Hz (Fig B.1). The purpose of these filters was to eliminate any DC offset before amplification. The equation used to determine the resistor and capacitance values is shown in Equation 3.1.4. Two active 2nd order high-pass filters were used directly after the output of each instrumentation amplifier. These active high-pass filters were built using operational amplifiers in addition to resistors and capacitors and had a cutoff of 2.34 Hz (Fig B.1). The purpose of these filters was to eliminate DC offset that had been improperly amplified by the instrumentation amplifier. The equation used to determine the resistor and capacitor values for this filter is shown in Equation 3.1.5. 1 [ ] 2 [ ] [ ] f Hz R C F   (3.1.4) 1 .48 2 (3.3 )(0.1 ) Hz M F    1 2 1 2 1 [ ] 2 f Hz R R C C  (3.1.5) 1 2.43 2 (680 )(680 )(0.1 )(0.1 ) Hz k k F F      xi An active 6th order low-pass filter was placed directly before input into the PIC A/D. This low-pass filter was an MF6CN-50, an IC built by National Semiconductor. The cutoff frequency was determined by adjusting an internal clock via the value of a resistor and capacitor across pins 11 to 9 and 9 to ground, respectively (Fig B.2). The purpose of this filter was to attenuate any high frequency noise within the signal, specifically noise due to 60 Hz power line interference. The cutoff frequency of the low-pass filter was 39.44 Hz. Equation 3.1.6 shows how the cutoff frequency was calculated. 1 [ ] (50)(1.69)( [ ] [ ]) f Hz R C F   (3.1.6) 1 39.44 (50)(1.69)(30 )(.01 ) Hz k F   At the end of conditioning, the signal should be an amplified signal of gain 121,825 with a frequency range of approximately 2.34 to 39.44 Hz. This is acceptable as we are looking for the transitions of a signal at 8 Hz and 12 Hz. 3.2 Signal Processing Module The signal processing module consists of a FOX F1100E oscillator, a Microchip 40-pin DIP PIC16F877A, and various resistors and rectifiers providing current and voltage protection, respectively, for the PIC. The complete schematic for the module can be viewed in Figure B.3. A +5V input through a 1KΩ resistor is provided to pin 1. This high input voltage (with current limited by the resistor) prevents the memory of the PIC from being cleared. The analog EEG signal is provided as an input to pin 2. The PIC outputs – Buzzer1, and Buzzer0, Transmitter_Power, and Sleep_Indicator – are assigned to pins 34, 35, 37, and 38, respectively. The oscillator has a 20 MHz frequency of oscillation. 1N5822 Schottky diodes are used for the two Vdd inputs and EEG signal input (pins 11, 32, and 2, respectively) in order to protect the PIC from negative voltage. The 220Ω resistors in series with the PIC inputs and outputs are used to guarantee the PIC does not source or sink more than 25 mA. The resistor value is based on the following calculation: Vmax = Imax*R (3.2.1) 5V = (25mA)*R R = 200Ω where the 200Ω result exists as the minimum resistance value. The main detail involved in the design of the signal processing module exists as the programming of the PIC. The flow chart showing the logic behind the PIC program can be seen in Figure C.1. The code used to program the PIC can be view in Appendix H. The PIC has an internal A/D converter that we used to convert the analog EEG signal into a digital signal for frequency analysis. The ADC converts the analog input into a 10-bit digital sample. We set the ADC to sample at a rate of 500 samples per second. We chose the rate to be 500 samples per second because it was a convenient choice for the PIC code and because such a rate would be more than adequate to satisfy the Nyquist criterion. That is, since the EEG signal of interest has a bandwidth of 40 Hz, the Nyquist criterion dictates that the sampling rate should be 80 Hz or higher to avoid aliasing. Since the accuracy of the frequency analysis of the PIC is a significant factor in the functionality of our device, we decided making the sampling rate significantly higher than the minimum rate (to increase accuracy) would be the best plan. xii The LED leads require a voltage of 1.7V to be turned high (and brightness improves as voltage increases) and below 1.7V is considered low (off state). The brightness of the LED generated overall is quite good and very visible. 3.6 Audio Module The audio Module design uses frequency changes and delays with the generated square waveforms from the PIC to generate sounds of the 0.1KHz to 2KHz range. By manipulating these values, pitch, length of tone and quality of tone can be changed to create simple melodies. The components used in this module include the PIC16F877A, a 5MHz oscillator, and a LM386N low voltage audio power amplifier. The schematics can be seen in figure B.7. in appendix B along with other components. By generating square waveforms using the PIC, 3 melodies were produced. This included a start up melody which displayed a continuous increase in frequency followed by a continuous decrease, a warning melody which featured various beeps at different frequencies separated by predetermined delays, and a danger siren created by using a looped frequency change comprised of 3 frequencies with no delays. Frequency (kHz) Time (ms) Delay (us) Delay/2 (us) 0.2 5.000 5000.000 2500.000 0.3 3.333 3333.333 1666.667 0.4 2.500 2500.000 1250.000 0.5 2.000 2000.000 1000.000 0.6 1.667 1666.667 833.333 0.7 1.429 1428.571 714.286 0.8 1.250 1250.000 625.000 0.9 1.111 1111.111 555.556 1 1.000 1000.000 500.000 1.1 0.909 909.091 454.545 1.2 0.833 833.333 416.667 1.3 0.769 769.231 384.615 1.4 0.714 714.286 357.143 1.5 0.667 666.667 333.333 1.6 0.625 625.000 312.500 1.7 0.588 588.235 294.118 1.8 0.556 555.556 277.778 1.9 0.526 526.316 263.158 2.0 0.500 500.000 250.000 Table 3.6.1: Translation of frequency into delay which is used to generate waveforms using the PIC 3.7 Power Supply Module The power supply module uses 2 LM317T and an LM7905 as its primary component. These are TO-220 package linear adjustable voltage regulators. LM317T is connected to two resistors as shown in Figure B.8 in Appendix B. The overall functionality of our power supply design is to regulate voltage from 7V to 12V which can be found in a car to power up our device. The equation that governs the output voltage in terms of the control resistors and acquiescent current draw is shown in Equation 3.1.1. Vout = 1.25(1 + R2 / R1) + Iadj(R2) (3.7.1a) xv As seen in Figure B.8, the divider resistor is actually the combination of R1 and R2. This allows us to adjust the output voltage to exactly 5.00 volts above ground. As such, the resistor values of 300 Ω and 900Ω was used. The power supply took an unregulated 9-volt DC signal from a battery as input. It used this signal to power the voltage regulators that took the voltage from 7 volts to 5.00 volts. Due to this voltage drop across the regulator, the power not sent to the output terminals was dissipated as heat through the regulator. If the voltage to power up these components is marginally higher, heat sinks will have to be attached to the metal pins behind these components to dissipate heat. The application design is obtained courtesy of National Semiconductor. The LM7905 component circuit is straightforward in design and required little external components as shown in figure B.9. It is packaged in a T0-220 power package. The power supply to the component is a 9V DC signal from a battery flipped in polarity. The total power supply used by the base alarm unit and the headset unit is about 2W. (Table G.2 in appendix) This translates to roughly about 2 hours running on a 280mAH 9V battery or 10-15 hours running on 4 AAA batteries rated at 2000mAH in the worst case scenario (danger siren on). 4. DESIGN VERIFICATION xvi We went through a series of tests to ensure our device was working properly. Since low awareness and sleep of a user cannot be instantaneously achieved, we needed to find an alternate method of testing our device. We decided the best testing method would be to supply a sinusoidal waveform from a function generator to the input of the EEG circuit. However, the lowest amplitude output of the function generator is 1mV and we required a signal in the range of tens of microvolts to properly simulate brainwaves. To solve this problem, we added an amplifier with a gain of 1/100 to the beginning of the EEG circuit. With the additional amplifier in place, we inputted the function generator output to the EEG circuit, and monitored the amplified output of the EEG circuit on an oscilloscope. We then fed the EEG output into the single processing circuit. Varying the frequency of the function generator signal, we observed the outputs of the buzzer, audio, and LED awareness indicator modules to determine the level of functionality of the device. 4.1 Testing Each of the modules making up our project were first tested individually to ensure correct functionality. That is, each module was tested to verify design specifications were met. Then, modules were integrated together and the resulting product was tested for functionality. The tests performed on each module are detailed below. 4.1.1 EEG Module Features tested in the EEG module include the gain and CMRR of the instrumentation amplifiers, frequency responses of filters, and overall functionality of the EEG to acquire brainwave signals. To examine the actual gain of the circuit, the actual gain of each instrumentation amplifier was determined by taking the ratio of output voltage to input voltage (Eq. 4.1.1.1). Using a 1 mVpp sine wave as an input into the first instrumentation amplifier with theoretical gain of 4941, a 4.93 Vpp sine wave was output (Fig D.1). This results in an actual gain of 4930 which is slightly less than the theoretical value. For the second instrumentation amplifier with theoretical gain of 24.656, a 0.1 Vpp sine wave was input and a 2.75 Vpp sine wave was output (Fig D.2). This results in an actual gain of 27.5 which is slightly higher than the theoretical value. These deviations from the theoretical value could be a result of inconsistencies in the actual resistor values or possible fluctuations in the output of the function generator. At any rate, the actual gain of the entire circuit can be calculated as 135,575, which is still sufficient for its purpose. in out actual V V G  (4.1.1.1) The Common-mode rejection ratio (CMRR) of an instrumentation amplifier measures the tendency of the device to reject input signals common to both input leads [8]. A high CMRR determines the effectiveness of an instrumentation amplifier and is especially important when measuring very small voltage differentials. The CMRR can be calculated by Equation 4.1.1.2. 1020 log d s ACMRR A           (4.1.1.2) Ad=Differential Gain, As=Common-mode Gain To test this, the inputs are shorted and the output is determines the common-mode gain. The differential gain is the actual gain of each amplifier. For the first amplifier with actual gain of 4930, the common- mode gain was determined as 0.2. Thus, the calculated CMRR was 87.83dB which is a very good value xvii with a frequency below 8 Hz. As dictated in the design specifications the buzzer module went through a progression of low, medium, and high volume alarms separated by 1.5 seconds. As expected, the buzzer module continued with the highest volume alarm until the frequency of the input was increased to a value greater than 8 Hz. Finally, the buzzer circuit was tested by providing a .004Vpp AC sinusoidal signal with a frequency below 8 Hz to the EEG circuit. The buzzer circuit performed as expected going through the progression of volumes and remaining at the highest volume until the input frequency was increased to greater than 8 Hz. 4.1.4 Wireless Module The main concern with testing of the wireless module was the range as well as the correct LED color change. Testing was done in phases to ensure proper integration with the signal processing module and LED awareness indicator module. The oscilloscope was valuable to see the correct voltages and delays were being generated in the RSSI and DATA lines from the receiver. The function generator was used to power up the RSSI in simulating continuous on-off of the transmitter. Frequency was set at 1Hz (1 action per second) Phase Setup Results 1 Wireless Pair on same protoboard sharing power supply with MAX232 chip connected. Transmitter power line and data line was controlled via DIP switches. Correct power transmission, noisy data line. Oscilloscope showed expected voltages. 2 Connection with LM555 timer and LED module was added. RC values on LM555 was adjusted until proper delay of 10ms was achieved/ LED changed colors correctly when DIP switches were changed accordingly. 3 Transmitter was transferred to another protoboard. Accuracy and range was tested by having protoboard as far as the laboratory allowed (10-20 feet) Glitches can sometimes be seen because DIP switches were no debounced. However, overall the results were satisfactory. Oscilloscope snapshots can be seen of the phases in Appendix D from figure D.19 to D.24 4.1.5 LED Awareness Indicator Module The LED awareness Indicator Module was easy to test. All we had to do was input the correct change using DIP switches. The circuit was later integrated with the wireless module and the Audio module. Integration was simple and flawless. The hardest part was debugging when some wires came out loose. This was done by carefully following the logic diagram and tracing input and output values. Overall, there was little problem in implementing this module. 4.1.6 Audio Module The amplifier circuit worked flawlessly from the application notes. Although we tested around with changes in resistor values and other components, not many changes can be discerned from the audio quality from the speaker. Volume was satisfactory. The hardest part of testing the audio module was predicting the output of the waveform generated. This was done by trial and error by reprogramming the PIC multiple times until a satisfied melody was produced. 4.1.7 Power Supply Module xx We tested the power supply module with the EEG circuit. Initial attempts were foiled because the correct DC offset cannot be obtained with our initial design of having 12V, 6V and 0V as the +5, 0 and - 5 power supply differential. We decided to change and have a true +5V, ground and -5V produced using two separate power supplies. This worked for our needs. We further tested the regulation of the voltage regulators by increasing the power supply to the voltage regulators. Voltage regulation remained at 5V but the components (LM317T) got very hot. Other components remained in working order. Without the voltage regulators these components would have been completely destroyed especially the PIC due to high current. Power for each individual component was found by connecting related components to the power supply and reading off the voltage and current values and by using the following equation: Power = Voltage x Current. (4.1.7.1) 4.2 Conclusions Overall, the test results of project were very successful. The brainwave signals were sufficiently amplified and filtered to be read correctly by the PIC. The buzzer circuit and base alarm unit also indicated when both thresholds were crossed accurately via buzzers, melodies, and the LED awareness bar. There were some discrepancies with frequencies near the thresholds, however if there is a false positive at the threshold, that can also be advantageous to alert the user he or she is just starting to get drowsy. These discrepancies were due to the lack of ability of the algorithm to deal with noise in the EEG signal. To make our product more marketable, the EEG signal or the algorithm for the PIC could be improved. 5. COST xxi The total cost of our product is based on the price of the parts used and the labor put into constructing the device. A detailed breakdown of the cost related to the parts and labor can be found below. 5.1 Parts Table F.1 shows the cost associated with each of the parts used in our device. The module in which each part is utilized is also reflected in the table. The price of the parts used in the EEG module sums to $15.77. The cost of the signal processing unit is $8.95. The cheapest module, the buzzer circuit, has a parts cost of only $6.33. The wireless module is by far the most expensive module has a price total of $301.91. The majority of that sizable cost is from the wireless receiver/transmitter which has a price of $300. The prices of the LED awareness indicator module and the audio module are $9.97 and $13.53, respectively. And finally, the total cost of the power supply module is $7.90. There were also miscellaneous costs associated with circuit boards and project enclosures totaling to $33.94. The total cost of all the parts used in our device sums to $399.78. 5.2 Labor We estimate each member of our group worked on average about 10 hours per week over the 10 weeks spent on the project. This time spent conducting research and designing the device in both individual and group settings. In total, 300 hours of work were completed during the creation of our product. We also project a salary of $30 per hour ($60,000 per year) for each group member. Using the above mentioned estimations, the resulting total cost of labor is $22,500. Labor Cost = 2.5 x Hourly Salary x Total Working Hours (5.1) Total Cost = Parts Cost + Labor Cost (5.2) The total cost of our project is $22,899.78 according to Equation 5.2. xxii
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved