1 00:00:00,000 --> 00:00:05,980 I assume you guys know that my name is Neon Rain, and the speech you're attending is 2 00:00:08,760 --> 00:00:11,500 Hacking Sleep, How to Build Your Own Homebrew Sleep Lab. 3 00:00:12,000 --> 00:00:16,100 So this is my partner in crime, Keith, and we would like to welcome you to the speech. 4 00:00:16,780 --> 00:00:21,300 This is my fourth time speaking here at DEF CON, and I'm actually quite excited about it, 5 00:00:21,360 --> 00:00:26,400 because when I started out talking about the human brain and brain-computer interfaces, 6 00:00:26,400 --> 00:00:29,660 everybody was kind of like, that's nice, brain girl. 7 00:00:30,040 --> 00:00:35,600 But there's really been a lot of excitement lately with the stuff that they're up and coming up with. 8 00:00:36,540 --> 00:00:40,360 So, and also, my team has gotten bigger as well. 9 00:00:41,580 --> 00:00:48,420 Keith and a couple of other people as well, like the projects I did in the beginning were quite tiny, 10 00:00:48,520 --> 00:00:52,340 but when you're building an entire sleep lab, you kind of need a bigger team. 11 00:00:52,460 --> 00:00:55,900 So it's kind of nice to have camaraderie. 12 00:00:57,700 --> 00:01:02,880 So, I guess we might as well just, you know, get this started. 13 00:01:03,200 --> 00:01:09,780 So basically, I've always been quite amused with the concept of hacking a system with a soul. 14 00:01:10,020 --> 00:01:15,860 You know, because I mean, you know, computers are cool and all, but, you know, the egomaniac I am, 15 00:01:15,880 --> 00:01:17,560 I find myself a little bit more interesting. 16 00:01:19,900 --> 00:01:24,760 So, every person in this room has at least a vaguely familiar notion of what sleep is, 17 00:01:24,900 --> 00:01:26,380 since it's something all human beings do. 18 00:01:26,380 --> 00:01:28,420 And we take it for granted. 19 00:01:28,820 --> 00:01:31,700 But even though sleep is something we're all intimately familiar with, 20 00:01:31,860 --> 00:01:35,660 understanding this quietly mysterious part of our lives isn't that simple. 21 00:01:36,000 --> 00:01:42,100 If you really think about it, we approximately spend one-third of our lives, like, really still, 22 00:01:42,320 --> 00:01:47,600 and with our eyes closed, and then you wake up, and normally, you don't remember what happened. 23 00:01:47,780 --> 00:01:49,960 So it's actually kind of a really amazing thing. 24 00:01:50,980 --> 00:01:56,300 Sleep is scientifically defined as a normal state of rest that's characterized by unconsciousness, 25 00:01:56,380 --> 00:01:59,640 reduced activity, and limited sensory responsiveness. 26 00:02:00,340 --> 00:02:04,980 So, a question I get asked a lot is what would be considered the difference between, like, 27 00:02:04,980 --> 00:02:09,300 sleep and drug intoxication, or coma, or hibernation. 28 00:02:09,480 --> 00:02:15,860 So the difference is sleep is considered sleep because it's spontaneous, it's periodic, 29 00:02:16,240 --> 00:02:17,760 and it's easily reversible. 30 00:02:18,000 --> 00:02:19,900 So that would be what the difference is. 31 00:02:20,480 --> 00:02:25,580 So, the way to talk about sleep is usually best to contrast it with wakefulness. 32 00:02:26,380 --> 00:02:29,980 So, of course, the characteristics of wakefulness are the opposite of sleep. 33 00:02:30,300 --> 00:02:35,880 You're conscious, you have sensory responsiveness, and we like to think we're full of purposeful activity. 34 00:02:36,980 --> 00:02:40,300 Sleep is one of the least understood aspects of human and animal behavior. 35 00:02:40,600 --> 00:02:44,460 And for centuries, scientists thought that wakefulness was the brain's natural state, 36 00:02:44,620 --> 00:02:49,700 and that sleep represented a shutting down of brain activity, like if you turned off a light bulb. 37 00:02:50,500 --> 00:02:55,600 But it's now known that sleep and wakefulness are active states controlled by specific groups of brain structures. 38 00:02:56,380 --> 00:03:00,700 So, one good way for us to figure out about sleep, and to learn more about sleep, 39 00:03:00,860 --> 00:03:04,400 is to figure out what happens if you don't sleep. 40 00:03:05,180 --> 00:03:09,920 So, I'm sure none of you at DEF CON have had problems with staying up all night. 41 00:03:10,180 --> 00:03:15,940 And I'm sure right now, seeing it's early on Sunday, none of you are, like, become reacquainted 42 00:03:15,940 --> 00:03:22,980 with either being any of the after effects, like grumpiness, grogginess, irritability, or forgetfulness. 43 00:03:23,900 --> 00:03:25,680 After one night without sleep, 44 00:03:26,380 --> 00:03:29,280 concentration becomes difficult, and attention span shortens considerably. 45 00:03:29,540 --> 00:03:32,600 You have no idea how much is to focus on this, just for me. 46 00:03:33,640 --> 00:03:38,780 With continued lack of sufficient sleep, the part of the brain that controls language, memory, and planning, 47 00:03:38,940 --> 00:03:40,860 and sense of time, is severely affected. 48 00:03:41,280 --> 00:03:47,040 In fact, 17 to 19 hours of sustained wakefulness leads to a significant decrease in performance. 49 00:03:47,880 --> 00:03:52,840 Recent experiments have suggested that impairments produced by moderate sleep deprivation 50 00:03:53,260 --> 00:03:56,120 results in cognitive motor performance equivalent or worse to 51 00:03:56,380 --> 00:04:00,200 that that you'd experience with a blood alcohol level of 0.05. 52 00:04:00,740 --> 00:04:05,380 So, if you're lightweight like me, that's equal to two glasses of wine. 53 00:04:05,720 --> 00:04:09,180 So, then you're kind of like singing, we are the champions, or maybe that's just me. 54 00:04:10,680 --> 00:04:15,100 Wakefulness and sleep both involve complex physiological and psychological mechanisms. 55 00:04:16,120 --> 00:04:20,540 So, there's behavioural changes, such as the typical posture we take when we're sleeping, 56 00:04:20,720 --> 00:04:23,880 that is recognizable, and our lack of response to stimuli. 57 00:04:25,360 --> 00:04:26,360 And, there are features of sleep that we don't recognize. 58 00:04:26,380 --> 00:04:29,660 There are physiological changes, which happens with our heart rate and breathing. 59 00:04:29,960 --> 00:04:34,860 And, finally, there are electrophysiological changes that can all be measured with machines. 60 00:04:35,620 --> 00:04:40,260 So, these changes during sleep are quite profoundly different than we experience when we're awake. 61 00:04:40,420 --> 00:04:45,300 And, it's these changes that define what exactly makes up an occurrence of sleep. 62 00:04:45,900 --> 00:04:48,820 So, we've been talking about sleep in humans. 63 00:04:49,260 --> 00:04:51,240 So, what about animals? 64 00:04:51,660 --> 00:04:53,200 Do you guys think animals sleep? 65 00:04:53,480 --> 00:04:54,880 Do all animals sleep? 66 00:04:54,880 --> 00:05:00,680 Well, a lot of people are quite surprised, because this is a very tricky question, and a very tricky microphone. 67 00:05:01,900 --> 00:05:06,660 You see, the brain sends out electrical signals that can be measured with machines while we sleep. 68 00:05:07,220 --> 00:05:12,620 So, it's these brain signals that we use to define whether or not it's sleep. 69 00:05:12,900 --> 00:05:18,500 So, if we look in a machine, the signals will change if a mammal or a bird falls asleep. 70 00:05:18,960 --> 00:05:24,380 But, we never ever really see the signals change when less highly evolved animals. 71 00:05:25,380 --> 00:05:26,860 Like fish or frogs. 72 00:05:27,700 --> 00:05:35,120 So, these animals kind of look like they're sleeping, because they're not really moving and they're not really paying attention to what's going on around them. 73 00:05:35,300 --> 00:05:37,260 So, it does superficially look like they're sleeping. 74 00:05:37,580 --> 00:05:38,640 I need more hands. 75 00:05:39,920 --> 00:05:43,800 But, scientists really aren't sure what's going on. 76 00:05:43,960 --> 00:05:48,660 They don't know if this is just simply a form of resting, if it's an ancestral form of sleep. 77 00:05:48,900 --> 00:05:52,860 So, they're not really sure, even now. 78 00:05:52,860 --> 00:06:00,400 But, sleep in its most evolved form is thought to have appeared first among birds about 100 million years ago. 79 00:06:00,920 --> 00:06:05,340 But, sleep among birds is still very different than sleep among humans. 80 00:06:06,440 --> 00:06:13,580 But, mammals such as rats, cats, and monkeys do have a form of sleep where the various stages are more familiar to our own. 81 00:06:18,920 --> 00:06:22,840 So, how long animals sleep really depends on the brain. 82 00:06:22,860 --> 00:06:25,460 It depends on something that we call the danger factor. 83 00:06:26,520 --> 00:06:31,100 So, big eating animals, like lions, aren't really in much danger. 84 00:06:31,280 --> 00:06:32,340 So, they'll sleep a lot. 85 00:06:32,500 --> 00:06:34,480 Like, 17 to 19 hours a day. 86 00:06:36,180 --> 00:06:40,380 Animals that sleep in really well protected places, they can clock in a lot of time, too. 87 00:06:40,800 --> 00:06:45,140 Like, bats in caves might snooze for 19 out of every 24 hours. 88 00:06:45,360 --> 00:06:46,300 Oh, God, that must be nice. 89 00:06:48,280 --> 00:06:51,520 But, when it comes to what we consider prey animals, 90 00:06:52,860 --> 00:06:57,400 it becomes critically important to maintain a state of permanent alertness to survive. 91 00:06:57,860 --> 00:07:02,500 So, it makes sense that these types of species, like giraffes, would sleep for only brief intervals. 92 00:07:03,000 --> 00:07:05,300 Giraffes really sleep more than a few hours a day. 93 00:07:06,700 --> 00:07:08,280 Now, when it comes to dolphins, 94 00:07:09,560 --> 00:07:12,600 just like other mammals, in a lot of ways, they're a lot like us. 95 00:07:12,820 --> 00:07:18,000 They're warm-blooded, they bear live young, they breathe air, and they require sleep. 96 00:07:18,760 --> 00:07:20,620 But, land-dwelling animals like us, 97 00:07:20,620 --> 00:07:23,780 we have this really unique thing where we actually breathe involuntarily. 98 00:07:24,540 --> 00:07:28,180 This means you don't need to think about breathing to do it. 99 00:07:28,300 --> 00:07:30,700 Our body will take in air automatically if we need it. 100 00:07:31,140 --> 00:07:34,120 But, if you're living in an undersea environment, like dolphins, 101 00:07:34,640 --> 00:07:39,960 you actively need to decide whether or not to sleep, or you'll drown. 102 00:07:42,160 --> 00:07:48,300 So, the thing is, in order to make a conscious decision about whether or not you're going to breathe, 103 00:07:48,300 --> 00:07:51,200 you have to be conscious. 104 00:07:51,700 --> 00:07:55,580 And, one of the defining characteristics of sleep is unconsciousness. 105 00:07:56,060 --> 00:07:57,740 So, for a tired dolphin, 106 00:07:57,960 --> 00:08:03,100 the problem of both sleeping and breathing becomes a little more problematic than it does with us. 107 00:08:03,740 --> 00:08:05,940 So, dolphins do this amazing thing 108 00:08:05,940 --> 00:08:10,520 where they've adapted one half of their brain to sleep at a time. 109 00:08:10,920 --> 00:08:13,160 When the brain hemisphere actually goes to sleep, 110 00:08:13,220 --> 00:08:16,380 well, the other one typically shows all the signs of being awake. 111 00:08:16,920 --> 00:08:18,280 They'll sleep with one eye open, 112 00:08:18,300 --> 00:08:20,160 and keep the other eye closed 113 00:08:20,160 --> 00:08:22,660 to pay attention to what's going around. 114 00:08:23,560 --> 00:08:29,960 So, even though not all animals exhibit a state that meets the scientific criteria of sleep and wakefulness, 115 00:08:30,240 --> 00:08:31,960 it seems that the ones that don't 116 00:08:31,960 --> 00:08:36,280 do go through some period of inactivity and rest. 117 00:08:36,580 --> 00:08:40,200 But, presence of such a period cannot be assumed to be indisputable proof 118 00:08:40,200 --> 00:08:43,640 that they're experiencing what we think of as sleep. 119 00:08:46,720 --> 00:08:48,060 It's kind of astonishing 120 00:08:48,300 --> 00:08:51,060 to consider that the existence of REM sleep 121 00:08:51,060 --> 00:08:53,660 remained unknown to science 122 00:08:53,660 --> 00:08:55,980 to the second half of the 20th century. 123 00:08:56,420 --> 00:08:59,960 REM sleep was discovered in 1952 124 00:08:59,960 --> 00:09:02,020 by a young graduate student 125 00:09:02,020 --> 00:09:03,220 in the University of Chicago 126 00:09:03,220 --> 00:09:06,380 while he was working on the world's first specialized sleep laboratory. 127 00:09:06,860 --> 00:09:08,320 He was monitoring the sleep 128 00:09:08,320 --> 00:09:09,800 of his own eight-year-old son 129 00:09:09,800 --> 00:09:10,960 when, to his surprise, 130 00:09:11,100 --> 00:09:13,220 he saw dramatic changes in the EEG reading. 131 00:09:13,560 --> 00:09:15,940 At first, the young graduate student just assumed 132 00:09:15,940 --> 00:09:17,040 that the equipment had a malfunction. 133 00:09:18,300 --> 00:09:19,920 Until he investigated the anomaly further 134 00:09:19,920 --> 00:09:22,220 and started to figure out what we were later to understand 135 00:09:22,220 --> 00:09:23,820 as the signatures of the onset 136 00:09:23,820 --> 00:09:24,820 of REM sleep. 137 00:09:25,720 --> 00:09:28,040 Now, convincing his research supervisor 138 00:09:28,040 --> 00:09:30,220 who would become the man that we 139 00:09:30,220 --> 00:09:32,220 considered the founder of modern sleep research 140 00:09:32,220 --> 00:09:33,680 about the series of his findings 141 00:09:33,680 --> 00:09:35,260 would be a really hard sell. 142 00:09:36,360 --> 00:09:37,960 Because his supervisor 143 00:09:38,840 --> 00:09:40,180 was going by 144 00:09:40,180 --> 00:09:41,100 the theory that 145 00:09:41,100 --> 00:09:43,980 sleep was essentially a passive state 146 00:09:43,980 --> 00:09:46,240 which is what everybody believed at that time. 147 00:09:46,460 --> 00:09:47,800 So, his discovery, 148 00:09:48,300 --> 00:09:48,580 actually, 149 00:09:48,620 --> 00:09:50,060 would disprove 150 00:09:51,740 --> 00:09:53,180 his supervisor's theory. 151 00:09:53,420 --> 00:09:55,300 So, there was a lot of infighting 152 00:09:55,300 --> 00:09:56,580 because they didn't want to believe it. 153 00:09:56,840 --> 00:09:58,680 But as the evidence started to mount, 154 00:09:58,980 --> 00:10:00,220 there was no doubting 155 00:10:00,220 --> 00:10:01,740 that this young graduate student 156 00:10:01,740 --> 00:10:02,700 had discovered something 157 00:10:02,700 --> 00:10:04,460 that would turn all our previous ideas 158 00:10:04,460 --> 00:10:05,600 asleep on its head. 159 00:10:08,500 --> 00:10:10,260 Now, the failure of scientists 160 00:10:10,260 --> 00:10:12,580 to notice REM sleep before 1952 161 00:10:12,580 --> 00:10:13,660 is even more peculiar 162 00:10:13,660 --> 00:10:15,460 when you consider that discovery 163 00:10:18,620 --> 00:10:20,480 thanks to the bulging human eyeball, 164 00:10:20,840 --> 00:10:21,660 the rapid movements 165 00:10:21,660 --> 00:10:23,220 that are characteristics of REM sleep 166 00:10:23,220 --> 00:10:25,080 are plainly visible if an observer 167 00:10:25,080 --> 00:10:25,940 had been looking. 168 00:10:26,540 --> 00:10:29,020 So, why hadn't anybody been looking? 169 00:10:29,560 --> 00:10:31,260 Well, the reason that REM sleep 170 00:10:31,260 --> 00:10:33,820 was not seen for so long 171 00:10:33,820 --> 00:10:35,460 is it came down to a combination 172 00:10:35,460 --> 00:10:36,220 of a lot of things. 173 00:10:36,440 --> 00:10:37,760 It came down to the combination 174 00:10:37,760 --> 00:10:39,040 of the fact that 175 00:10:39,840 --> 00:10:41,320 we thought we knew everything 176 00:10:41,320 --> 00:10:42,520 that there was to know about sleep. 177 00:10:42,660 --> 00:10:43,640 We all sleep, right? 178 00:10:48,300 --> 00:10:50,020 So, and also, 179 00:10:50,120 --> 00:10:51,560 there just really wasn't any, 180 00:10:52,100 --> 00:10:54,140 you know, nobody really cared about sleep that time. 181 00:10:54,260 --> 00:10:55,360 They didn't care about researching it 182 00:10:55,360 --> 00:10:56,820 because why would we research a topic 183 00:10:56,820 --> 00:10:58,280 that we already knew everything about? 184 00:10:58,640 --> 00:11:00,160 And then there was also the fact 185 00:11:00,160 --> 00:11:02,140 that technology does not always 186 00:11:02,140 --> 00:11:03,800 keep pace with our ambition. 187 00:11:05,140 --> 00:11:07,020 Before the discovery of REM sleep, 188 00:11:07,340 --> 00:11:08,940 researchers always switched off 189 00:11:08,940 --> 00:11:09,800 their recording devices 190 00:11:10,320 --> 00:11:12,440 after the subject had been asleep for a while 191 00:11:12,440 --> 00:11:13,740 in order to save paper. 192 00:11:14,100 --> 00:11:16,620 Because you guys have to understand that in the early days 193 00:11:18,300 --> 00:11:19,820 we recorded on continuous pen traces 194 00:11:19,820 --> 00:11:22,000 on a roll of rapidly moving paper. 195 00:11:22,200 --> 00:11:23,920 So, a full night recording of 196 00:11:23,920 --> 00:11:25,360 eight hours of sleep could take 197 00:11:25,360 --> 00:11:27,780 half a mile of paper. 198 00:11:28,720 --> 00:11:30,020 So, before the invention 199 00:11:30,020 --> 00:11:31,680 of computers, the ability, 200 00:11:31,880 --> 00:11:33,760 you know, and our ability, we just take advantage 201 00:11:33,760 --> 00:11:35,820 that we can, like, store large amounts 202 00:11:35,820 --> 00:11:37,060 of data, right? 203 00:11:37,200 --> 00:11:38,780 You had to pay for this paper. 204 00:11:38,940 --> 00:11:40,020 You had to pay for the pens. 205 00:11:40,320 --> 00:11:43,760 So, their want to economize made sense. 206 00:11:44,180 --> 00:11:45,840 So, of course, they weren't looking. 207 00:11:46,060 --> 00:11:47,900 But unfortunately, the first episode 208 00:11:48,300 --> 00:11:50,240 of REM sleep really happens after an hour. 209 00:11:50,560 --> 00:11:52,260 So, the machines would have long since 210 00:11:52,260 --> 00:11:53,080 been turned off. 211 00:11:55,080 --> 00:11:56,540 So, this is basically 212 00:11:56,540 --> 00:11:59,100 why they just didn't notice it. 213 00:11:59,200 --> 00:12:00,240 And if you really think about it, 214 00:12:00,240 --> 00:12:00,980 it kind of makes sense. 215 00:12:01,280 --> 00:12:04,020 But also, we had a lot of misconceptions about sleep. 216 00:12:04,200 --> 00:12:06,560 We just discerned that it became largely dormant. 217 00:12:06,680 --> 00:12:08,700 You can tell that it doesn't. 218 00:12:08,880 --> 00:12:10,240 You know, we just assume like 219 00:12:10,240 --> 00:12:11,240 a light bulb. 220 00:12:11,380 --> 00:12:13,620 We just, you know, like a quiet death. 221 00:12:13,900 --> 00:12:16,340 And now we're realizing that there's a whole lot 222 00:12:16,340 --> 00:12:17,640 that we don't know about sleep. 223 00:12:18,300 --> 00:12:19,440 So, I mean, 224 00:12:19,460 --> 00:12:21,600 our short-sightedness really makes sense 225 00:12:21,600 --> 00:12:23,920 that their belief system at the time 226 00:12:23,920 --> 00:12:25,620 just wasn't, 227 00:12:25,620 --> 00:12:27,120 they weren't going to look for it. 228 00:12:27,220 --> 00:12:29,920 But lucky for us, it was a super lucky accident. 229 00:12:30,220 --> 00:12:32,060 Because with the discovery of REM sleep 230 00:12:32,060 --> 00:12:33,700 came the further groundbreaking work 231 00:12:33,700 --> 00:12:35,540 that linked REM sleep to dreaming 232 00:12:35,540 --> 00:12:38,240 and our whole concept of the cylindrical 233 00:12:38,240 --> 00:12:39,120 nature of sleep. 234 00:12:39,300 --> 00:12:41,060 Because this is an entirely new concept 235 00:12:41,060 --> 00:12:42,320 and it's really not that old. 236 00:12:45,220 --> 00:12:45,780 So, 237 00:12:45,780 --> 00:12:48,760 what we think of as sleep 238 00:12:48,760 --> 00:12:50,260 is actually made up of two 239 00:12:50,840 --> 00:12:52,000 wildly different states. 240 00:12:52,420 --> 00:12:53,960 So, we just talked about REM, 241 00:12:54,160 --> 00:12:55,820 and then we have a different 242 00:12:56,900 --> 00:12:57,800 stage as well 243 00:12:57,800 --> 00:12:58,760 called NREM. 244 00:12:59,000 --> 00:13:00,980 So, NREM, 245 00:13:01,520 --> 00:13:03,680 aptly named as just kind of like non-REM, 246 00:13:03,800 --> 00:13:05,740 is actually divided 247 00:13:05,740 --> 00:13:07,360 into four different states 248 00:13:07,360 --> 00:13:08,580 that each have their own characteristic 249 00:13:08,580 --> 00:13:10,640 unique electrical brain pattern. 250 00:13:11,780 --> 00:13:13,140 So, as we know, 251 00:13:13,200 --> 00:13:14,400 I'm sure most people in this room know, 252 00:13:15,780 --> 00:13:16,940 REM sleep is cylindrical, right? 253 00:13:17,080 --> 00:13:17,840 You have like, 254 00:13:18,440 --> 00:13:20,900 it lasts about 90 to 110 minutes 255 00:13:20,900 --> 00:13:22,800 the entire cycle, right? 256 00:13:23,080 --> 00:13:25,260 So, the first stages of sleep 257 00:13:25,760 --> 00:13:27,500 have relatively short REM 258 00:13:27,500 --> 00:13:29,760 and then long periods 259 00:13:29,760 --> 00:13:30,300 of REM sleep. 260 00:13:30,420 --> 00:13:32,420 But later on the night it actually changes 261 00:13:32,420 --> 00:13:34,480 and the REM periods lengthen 262 00:13:34,480 --> 00:13:35,760 and NREM time decreases. 263 00:13:42,720 --> 00:13:44,640 So, now I'm going to bore you 264 00:13:45,780 --> 00:13:46,140 into the sleep stages. 265 00:13:46,540 --> 00:13:46,940 Hooray! 266 00:13:47,460 --> 00:13:51,080 So, sleep one is actually quite light. 267 00:13:51,240 --> 00:13:52,700 You drift in and out of sleep 268 00:13:52,700 --> 00:13:54,080 and still can be awakened easily. 269 00:13:54,360 --> 00:13:56,040 So, basically in the first stage 270 00:13:56,040 --> 00:13:57,360 your muscle activity slows, 271 00:13:57,720 --> 00:13:59,540 your eye movement slows. 272 00:14:00,040 --> 00:14:02,420 Stage two is also a stage of light sleep. 273 00:14:03,500 --> 00:14:05,240 But your eye movements stop, 274 00:14:05,560 --> 00:14:07,340 you know, your muscles start to relax 275 00:14:07,340 --> 00:14:08,860 and your brain waves become slower 276 00:14:08,860 --> 00:14:10,940 with only an occasional burst 277 00:14:10,940 --> 00:14:12,400 of rapid brain waves 278 00:14:12,400 --> 00:14:13,600 that you can see as spikes. 279 00:14:15,780 --> 00:14:16,120 So, this is long-time sleeping 280 00:14:16,120 --> 00:14:17,380 in stage two. 281 00:14:18,000 --> 00:14:20,420 Stage three has extremely slow brain waves 282 00:14:20,420 --> 00:14:22,420 that are interspersed with small, faster waves. 283 00:14:22,660 --> 00:14:24,520 And in stage four the brain now produces 284 00:14:24,520 --> 00:14:26,020 slow brain waves almost exclusively. 285 00:14:26,540 --> 00:14:29,060 Now, when people talk about deep sleep 286 00:14:29,540 --> 00:14:31,860 they're usually talking about stages three and four. 287 00:14:32,080 --> 00:14:33,120 Because this is the time 288 00:14:33,120 --> 00:14:34,740 where it's difficult to awake someone. 289 00:14:35,040 --> 00:14:36,800 And if you wake them up they become disoriented 290 00:14:36,800 --> 00:14:38,860 and tell you to go away 291 00:14:38,860 --> 00:14:39,880 not so nicely. 292 00:14:41,360 --> 00:14:43,540 But an interesting note about deep sleep 293 00:14:43,540 --> 00:14:45,680 is this is when sleepwalking happens. 294 00:14:46,940 --> 00:14:49,760 And it's most likely to occur. 295 00:14:49,980 --> 00:14:51,460 As anything in life 296 00:14:51,460 --> 00:14:53,080 you have to make broad generalizations. 297 00:14:53,660 --> 00:14:55,120 So, sleepwalking behaviors 298 00:14:55,120 --> 00:14:56,560 can range from harmless 299 00:14:56,560 --> 00:14:57,480 to inappropriate 300 00:14:57,480 --> 00:14:59,240 to potentially dangerous 301 00:14:59,240 --> 00:15:00,300 to the sleepwalker 302 00:15:00,300 --> 00:15:02,220 or to people around them. 303 00:15:02,360 --> 00:15:04,460 There's actually been several rare cases 304 00:15:04,460 --> 00:15:06,560 of alleged acts of homicide 305 00:15:06,560 --> 00:15:07,720 that have occurred 306 00:15:07,720 --> 00:15:09,000 while people were sleepwalking. 307 00:15:12,600 --> 00:15:14,360 So, early researchers 308 00:15:14,360 --> 00:15:15,760 actually called REM sleepwalking 309 00:15:15,780 --> 00:15:17,060 paradoxical sleep. 310 00:15:17,540 --> 00:15:20,240 Because it really is paradoxical 311 00:15:20,240 --> 00:15:21,080 when you think about it. 312 00:15:21,240 --> 00:15:23,540 So, the electrical activity in your brain 313 00:15:23,540 --> 00:15:25,280 is similar to that of waking consciousness. 314 00:15:25,700 --> 00:15:26,920 So, if you look on an EEG 315 00:15:26,920 --> 00:15:28,320 they look the same. 316 00:15:28,660 --> 00:15:30,960 But your muscles have stopped moving 317 00:15:30,960 --> 00:15:33,140 and for all intents and purposes 318 00:15:33,540 --> 00:15:34,740 you are paralyzed. 319 00:15:35,320 --> 00:15:37,540 So, your brain is being bombarded 320 00:15:37,540 --> 00:15:38,800 with the stimuli while 321 00:15:38,800 --> 00:15:40,120 you lie there frozen. 322 00:15:40,720 --> 00:15:42,760 So, many areas of your brain 323 00:15:42,760 --> 00:15:45,020 become active, but a lot 324 00:15:45,780 --> 00:15:46,440 of them become less active. 325 00:15:46,620 --> 00:15:48,200 Like your primary visual cortex. 326 00:15:48,720 --> 00:15:51,240 Because REM sleep is associated with dreaming 327 00:15:51,500 --> 00:15:53,020 the areas involved in processing 328 00:15:53,020 --> 00:15:55,180 visual associations actually form 329 00:15:55,180 --> 00:15:56,520 a closed system. 330 00:15:56,860 --> 00:15:58,480 So, they're operating in isolation 331 00:15:58,480 --> 00:15:59,980 of sensory input and output 332 00:15:59,980 --> 00:16:01,460 that normally connects your brain 333 00:16:01,460 --> 00:16:02,420 to the outside world. 334 00:16:02,780 --> 00:16:06,640 So, your eyes move rapidly 335 00:16:06,640 --> 00:16:07,680 in bursts of activity 336 00:16:07,680 --> 00:16:10,040 underneath your closed eyelids 337 00:16:10,040 --> 00:16:11,980 and your heart and your muscle 338 00:16:11,980 --> 00:16:14,740 are also not paralyzed 339 00:16:15,780 --> 00:16:17,400 and that would not be so much fun. 340 00:16:17,560 --> 00:16:18,940 Because they're actually connected 341 00:16:18,940 --> 00:16:21,420 to a separate part, a separate nerve system 342 00:16:21,420 --> 00:16:23,980 that allows them not to be paralyzed. 343 00:16:24,960 --> 00:16:26,060 So, as you can see 344 00:16:26,060 --> 00:16:27,180 REM and NREM sleep 345 00:16:27,180 --> 00:16:29,440 in many ways are as different 346 00:16:29,440 --> 00:16:31,320 from one another as they are 347 00:16:31,320 --> 00:16:33,320 from wakefulness, but yet they're still 348 00:16:33,320 --> 00:16:35,140 grouped together in one category. 349 00:16:39,440 --> 00:16:41,120 So, sleeping and waking. 350 00:16:41,800 --> 00:16:43,920 So, virtually all our bodily functions 351 00:16:43,920 --> 00:16:45,560 exhibit a 24-hour cycle. 352 00:16:45,780 --> 00:16:47,080 That's governed by an internal clock. 353 00:16:47,760 --> 00:16:50,220 And most obvious of all these clocks 354 00:16:50,220 --> 00:16:52,020 of course is our daily cycle 355 00:16:52,020 --> 00:16:52,940 of sleep and activity. 356 00:16:53,620 --> 00:16:55,500 But pretty much like it's not just 357 00:16:55,500 --> 00:16:56,280 sleeping and waking. 358 00:16:57,120 --> 00:16:59,120 Almost every biological process 359 00:16:59,120 --> 00:17:01,080 can be measured by this clock. 360 00:17:01,360 --> 00:17:02,640 Including immune function, 361 00:17:02,880 --> 00:17:04,440 hormone levels, digestion, 362 00:17:04,900 --> 00:17:06,000 even urine production. 363 00:17:06,720 --> 00:17:08,860 So, they all have these daily rhythms 364 00:17:08,860 --> 00:17:10,220 which I'm sure you've all heard of 365 00:17:10,220 --> 00:17:11,580 circadian rhythms. 366 00:17:12,160 --> 00:17:13,620 Right? We've all heard of this. 367 00:17:15,780 --> 00:17:17,180 So, these are found in insects, 368 00:17:17,380 --> 00:17:18,860 plants, and even bacteria. 369 00:17:19,540 --> 00:17:21,780 It's been said that the 24-hour circadian 370 00:17:21,780 --> 00:17:23,720 rhythm evolved because the Earth 371 00:17:24,860 --> 00:17:25,380 revolved. 372 00:17:26,100 --> 00:17:27,960 The biological clocks in humans 373 00:17:27,960 --> 00:17:29,360 and other species are built to run 374 00:17:29,360 --> 00:17:31,500 within a period of approximately 24 hours. 375 00:17:31,780 --> 00:17:33,380 But they're also responsible to 376 00:17:33,380 --> 00:17:34,680 environmental time cues. 377 00:17:35,320 --> 00:17:37,300 And they were set each day by those cues 378 00:17:37,300 --> 00:17:39,240 to ensure that they remain in close synchronicity 379 00:17:39,240 --> 00:17:40,500 with the physical world. 380 00:17:41,040 --> 00:17:43,260 So, there's a good biological reason 381 00:17:43,260 --> 00:17:45,340 why our internal clocks are readjusting 382 00:17:45,780 --> 00:17:47,280 according to environmental time cues. 383 00:17:47,880 --> 00:17:49,780 The duration of daylight varies 384 00:17:49,780 --> 00:17:51,580 with the seasons and animals 385 00:17:51,580 --> 00:17:53,600 therefore must adjust their activity 386 00:17:53,600 --> 00:17:56,040 cycles so that they sleep and wake at the right time. 387 00:17:56,420 --> 00:17:58,220 But there's more to this story 388 00:17:58,220 --> 00:17:59,560 than going to sleep 389 00:17:59,560 --> 00:18:01,380 when it gets dark and waking again 390 00:18:01,380 --> 00:18:02,200 when it gets light. 391 00:18:02,820 --> 00:18:05,060 The sleep cycle stems from an interaction 392 00:18:05,060 --> 00:18:07,300 between two systems, the circadian clock 393 00:18:07,300 --> 00:18:09,900 and a separate sleep-wake homeostatic process. 394 00:18:13,540 --> 00:18:15,220 Sleep occurs because of these two 395 00:18:15,780 --> 00:18:17,720 forces. There's actually a battle 396 00:18:17,720 --> 00:18:19,580 going on in your brain right now 397 00:18:19,580 --> 00:18:21,740 between the need to sleep due to a period 398 00:18:21,740 --> 00:18:23,480 of prior wakefulness of this weekend 399 00:18:23,480 --> 00:18:25,780 and the feeling of alertness that comes 400 00:18:25,780 --> 00:18:26,760 from being apart 401 00:18:26,760 --> 00:18:29,720 that comes from the circadian rhythms. 402 00:18:30,380 --> 00:18:31,760 So, we start to accumulate 403 00:18:31,760 --> 00:18:33,820 something that they call sleep debt. 404 00:18:34,280 --> 00:18:35,720 From the moment we stop 405 00:18:35,720 --> 00:18:37,520 sleeping and that debt increases 406 00:18:37,520 --> 00:18:38,640 the longer we stay awake. 407 00:18:39,040 --> 00:18:41,440 If we don't sleep and reset the brain's balance 408 00:18:41,440 --> 00:18:43,240 our sleep debt will increase in strength 409 00:18:43,240 --> 00:18:45,760 until sleep deprivation all but forces us to sleep. 410 00:18:45,780 --> 00:18:47,700 The two systems 411 00:18:47,700 --> 00:18:49,260 usually counterbalance each other 412 00:18:49,260 --> 00:18:51,400 but however they do operate independently 413 00:18:51,400 --> 00:18:53,440 and you've probably noticed this 414 00:18:53,440 --> 00:18:55,000 that they become misaligned. 415 00:18:55,220 --> 00:18:57,940 If you've done shift work, if you've had jet lag 416 00:18:57,940 --> 00:18:59,720 you'll notice that you're experiencing 417 00:18:59,720 --> 00:19:01,540 a signal to be wake up 418 00:19:01,540 --> 00:19:03,060 when you actually need to be asleep 419 00:19:03,780 --> 00:19:04,620 and vice versa. 420 00:19:06,520 --> 00:19:07,960 So, given the crucial 421 00:19:07,960 --> 00:19:09,180 importance of light cues 422 00:19:09,180 --> 00:19:11,780 it should not come as a surprise that blind people 423 00:19:11,780 --> 00:19:13,100 actually have 424 00:19:14,440 --> 00:19:15,560 experienced larger 425 00:19:15,780 --> 00:19:17,340 problems with sleeping and waking 426 00:19:17,340 --> 00:19:18,540 than people who have sight 427 00:19:18,540 --> 00:19:21,580 because since they don't have the sun 428 00:19:21,580 --> 00:19:23,480 on their retinas, they're unable to really 429 00:19:23,480 --> 00:19:25,220 be able to change their clock 430 00:19:25,780 --> 00:19:27,400 and synchronize with the outside world. 431 00:19:28,080 --> 00:19:29,120 So, but I mean 432 00:19:29,120 --> 00:19:31,060 we have more factors than just this 433 00:19:31,060 --> 00:19:32,160 than these two systems. 434 00:19:32,400 --> 00:19:34,580 We can also be influenced by drugs 435 00:19:35,400 --> 00:19:37,420 willpower, scheduled social activities 436 00:19:38,120 --> 00:19:38,640 stress 437 00:19:38,640 --> 00:19:40,580 but in the end of it all 438 00:19:40,580 --> 00:19:43,940 sleep will always conquer our best intentions 439 00:19:43,940 --> 00:19:45,380 even though we try 440 00:19:45,780 --> 00:19:45,900 to stay awake. 441 00:19:46,260 --> 00:19:48,160 But if you ever did make the decision 442 00:19:48,160 --> 00:19:49,580 to stop sleeping entirely 443 00:19:50,180 --> 00:19:52,720 it's not the sleeping and not sleeping 444 00:19:52,720 --> 00:19:53,820 that would kill you per se 445 00:19:53,820 --> 00:19:56,740 actually it would be the stress on your immune system 446 00:19:56,740 --> 00:19:58,860 and eventually what would happen 447 00:19:58,860 --> 00:20:01,120 is that you'd reach a certain point of sleep deprivation 448 00:20:01,620 --> 00:20:03,220 that it would have so much wear and tear 449 00:20:03,220 --> 00:20:04,080 on your immune system 450 00:20:04,080 --> 00:20:05,600 that it would cause it to collapse 451 00:20:05,600 --> 00:20:07,660 and you would die painfully from widespread 452 00:20:07,660 --> 00:20:08,720 massive infections. 453 00:20:10,140 --> 00:20:12,700 Yay! So just in case you ever decide 454 00:20:12,700 --> 00:20:13,740 to try that little project 455 00:20:16,700 --> 00:20:17,400 I'm going to leave it at that. 456 00:20:18,340 --> 00:20:19,820 So now you've learned about 457 00:20:19,820 --> 00:20:21,360 the internal clocks that regulate sleeping 458 00:20:21,360 --> 00:20:23,320 and waking. It should help you understand 459 00:20:23,320 --> 00:20:25,520 more about when we obtain less sleep than we need 460 00:20:26,120 --> 00:20:27,900 why we have a tendency to fall asleep 461 00:20:28,860 --> 00:20:29,820 and why 462 00:20:29,820 --> 00:20:31,080 when we get extra sleep 463 00:20:31,080 --> 00:20:32,900 why we don't want to sleep so much. 464 00:20:33,100 --> 00:20:35,740 This ensures that we have the same amount 465 00:20:35,740 --> 00:20:37,160 of sleep each day on average 466 00:20:37,160 --> 00:20:38,880 so that you know it kind of makes sense. 467 00:20:39,360 --> 00:20:41,540 But when we stay in a state of wakefulness 468 00:20:41,540 --> 00:20:43,160 for a period of time we experience 469 00:20:43,160 --> 00:20:44,700 what's called a sleep debt. 470 00:20:45,920 --> 00:20:47,500 So as a general rule 471 00:20:47,500 --> 00:20:49,460 and I'm pretty much willing to go out 472 00:20:49,460 --> 00:20:51,800 and be beyond general on this 473 00:20:51,800 --> 00:20:53,820 every single one of us in this room 474 00:20:53,820 --> 00:20:55,220 is carrying a sleep debt. 475 00:21:00,340 --> 00:21:01,880 But the thing is 476 00:21:01,880 --> 00:21:03,500 you need to have a sleep debt 477 00:21:03,500 --> 00:21:05,840 because you need sufficient sleep debt in the day 478 00:21:05,840 --> 00:21:07,040 in order to fall asleep 479 00:21:07,560 --> 00:21:09,800 at night. But the problem 480 00:21:09,800 --> 00:21:11,300 is the larger the debt 481 00:21:11,300 --> 00:21:13,460 the stronger our tendency would be to fall asleep 482 00:21:13,460 --> 00:21:15,260 and the consequences of an 483 00:21:15,780 --> 00:21:16,860 overly large sleep debt 484 00:21:16,860 --> 00:21:19,640 is that we have difficulty responding 485 00:21:19,640 --> 00:21:21,260 to rapidly changing situations 486 00:21:21,260 --> 00:21:23,300 and making rational judgments. 487 00:21:24,300 --> 00:21:25,260 There are also 488 00:21:25,880 --> 00:21:27,060 you'll also eventually 489 00:21:28,040 --> 00:21:29,380 experience the occurrence of 490 00:21:29,380 --> 00:21:30,800 this really neat little thing 491 00:21:30,800 --> 00:21:33,200 that we've just really learned more about 492 00:21:33,200 --> 00:21:35,640 in these last few years called microsleeps. 493 00:21:35,740 --> 00:21:37,880 And a microsleep is a short period of time 494 00:21:37,880 --> 00:21:39,080 that they usually define between 495 00:21:39,080 --> 00:21:40,320 10 seconds and a minute 496 00:21:40,320 --> 00:21:42,660 they like to get a little loose on their definitions 497 00:21:43,560 --> 00:21:45,680 where the brain actually enters a sleep 498 00:21:45,780 --> 00:21:47,780 state regardless of what you 499 00:21:47,780 --> 00:21:49,040 are doing at the time. 500 00:21:49,820 --> 00:21:51,600 Doesn't matter. If you are 501 00:21:51,600 --> 00:21:53,360 tired enough, you will fall asleep. 502 00:21:54,320 --> 00:21:55,820 And so quite often 503 00:21:55,820 --> 00:21:57,860 the affected individual has been asleep 504 00:21:57,860 --> 00:21:59,620 for such a short period of time they don't even 505 00:21:59,620 --> 00:22:01,780 know that a momentary blackout has occurred 506 00:22:01,780 --> 00:22:02,920 because in their memory 507 00:22:04,300 --> 00:22:06,020 it's such a short 508 00:22:06,020 --> 00:22:07,860 period of time that they haven't noticed they've been asleep. 509 00:22:08,540 --> 00:22:09,660 So microsleeps combined 510 00:22:09,660 --> 00:22:11,720 with attention lapse that they cause can become 511 00:22:11,720 --> 00:22:13,520 extremely dangerous when they occur 512 00:22:13,520 --> 00:22:15,700 during a situation where continual 513 00:22:15,780 --> 00:22:16,660 alertness is demanded. 514 00:22:17,880 --> 00:22:19,780 So sleep-debt related problems 515 00:22:19,780 --> 00:22:21,560 are most predictable actually during 516 00:22:21,560 --> 00:22:23,620 certain times of the day because our 517 00:22:23,620 --> 00:22:25,600 physical and mental functions increase and decrease 518 00:22:25,600 --> 00:22:27,800 with the sleep-wake cycle I just told you 519 00:22:27,800 --> 00:22:27,980 about. 520 00:22:31,760 --> 00:22:33,440 There goes my attention span. 521 00:22:38,160 --> 00:22:39,620 So it's no surprise 522 00:22:39,620 --> 00:22:41,140 to you guys that we get tired 523 00:22:41,140 --> 00:22:43,620 from 1am to 4pm 524 00:22:43,620 --> 00:22:45,700 and then 12 hours later you guys have probably 525 00:22:45,780 --> 00:22:47,760 noticed after lunch you'll also become 526 00:22:47,760 --> 00:22:49,560 sleepy again from between 527 00:22:49,560 --> 00:22:50,760 1pm to 4pm. 528 00:22:51,420 --> 00:22:53,580 So a study by the US National 529 00:22:53,580 --> 00:22:55,500 Commission on Sleep Disorders has determined 530 00:22:55,500 --> 00:22:57,680 that the direct cost of accidents resulting 531 00:22:57,680 --> 00:22:59,880 from sleep-debt are 56 billion 532 00:22:59,880 --> 00:23:01,720 a year. As well 533 00:23:01,720 --> 00:23:03,040 in a single year there's approximately 534 00:23:03,040 --> 00:23:06,020 25,000 deaths and 250,000 535 00:23:06,020 --> 00:23:07,280 disabling accidents. 536 00:23:07,840 --> 00:23:09,500 Which really isn't a surprise 537 00:23:09,500 --> 00:23:11,380 that most of these accidents 538 00:23:11,380 --> 00:23:13,420 actually happen from car accidents. 539 00:23:13,780 --> 00:23:15,600 Because when you consider 540 00:23:15,780 --> 00:23:17,440 it only takes a car 541 00:23:17,440 --> 00:23:19,500 at 55 miles per hour 542 00:23:19,500 --> 00:23:21,940 if you fall asleep for 4 seconds 543 00:23:21,940 --> 00:23:23,860 you've crossed the length of a football 544 00:23:23,860 --> 00:23:25,780 field. And you don't know. 545 00:23:25,960 --> 00:23:27,620 And you won't hear the horn until 546 00:23:27,620 --> 00:23:28,260 it's too late. 547 00:23:32,680 --> 00:23:33,840 So this comes 548 00:23:33,840 --> 00:23:35,120 to the part where you can kind of fall asleep. 549 00:23:36,440 --> 00:23:39,440 When I submitted my abstract I was like 550 00:23:39,440 --> 00:23:41,240 oh we'll go through the current theories on sleep 551 00:23:41,240 --> 00:23:43,720 and then I was like wow I totally forgot how boring 552 00:23:43,720 --> 00:23:45,560 they were. Because as I said that 553 00:23:45,780 --> 00:23:47,240 really we still don't know a lot about sleep. 554 00:23:47,400 --> 00:23:49,460 So these theories are kind of common 555 00:23:49,460 --> 00:23:50,940 like they're kind of common knowledge. 556 00:23:51,160 --> 00:23:53,180 They're not going to be any surprise to you. 557 00:23:53,320 --> 00:23:55,700 The third theory is actually a newer 558 00:23:55,700 --> 00:23:57,400 theory and they're actually not 559 00:23:57,400 --> 00:23:59,660 it's kind of in dispute right 560 00:23:59,660 --> 00:24:01,700 now. So it's 561 00:24:01,700 --> 00:24:03,740 so basically I'm not going to tell you 562 00:24:03,740 --> 00:24:04,500 anything you don't really know. 563 00:24:05,400 --> 00:24:07,400 So throughout human history scientists 564 00:24:07,400 --> 00:24:09,660 and scholars have mused on theories about the purpose 565 00:24:09,660 --> 00:24:11,760 of sleep. But it's only recently 566 00:24:11,760 --> 00:24:13,520 researchers have discovered a way to study 567 00:24:13,520 --> 00:24:15,580 sleep in an objective way. 568 00:24:15,780 --> 00:24:17,620 We knew very little about 569 00:24:17,620 --> 00:24:20,120 sleep scientifically before the 1950s 570 00:24:20,120 --> 00:24:21,280 and there wasn't even a standardized 571 00:24:21,280 --> 00:24:23,560 tool for measuring sleepiness 572 00:24:23,560 --> 00:24:25,340 until the 1970s. 573 00:24:25,380 --> 00:24:27,400 But now while we can investigate 574 00:24:27,400 --> 00:24:29,420 sleep with machines to give us a better view 575 00:24:29,420 --> 00:24:31,320 on the sleeping brain we still 576 00:24:31,320 --> 00:24:33,060 are like we don't know. 577 00:24:33,340 --> 00:24:35,440 So everybody has a bunch of theories why 578 00:24:35,440 --> 00:24:36,280 they think we sleep. 579 00:24:36,920 --> 00:24:39,080 So even with all our newest machines 580 00:24:39,080 --> 00:24:40,780 we still have no idea. 581 00:24:41,200 --> 00:24:43,620 So the following are the three major theories 582 00:24:43,620 --> 00:24:45,460 on sleep. So number one 583 00:24:45,780 --> 00:24:47,580 is the repair and restoration theory on sleep. 584 00:24:48,000 --> 00:24:49,800 Which suggests that sleep is essential 585 00:24:49,800 --> 00:24:51,200 for revitalizing and restoring 586 00:24:51,200 --> 00:24:53,800 physical processes that keep the brain 587 00:24:53,800 --> 00:24:55,260 and mind healthy for proper functioning. 588 00:24:55,680 --> 00:24:57,680 This theory suggests that NREM sleep 589 00:24:57,680 --> 00:24:59,280 is important for restoring physical 590 00:24:59,280 --> 00:25:01,420 functions while REM sleep is essential 591 00:25:01,420 --> 00:25:02,840 for restoring mental functions. 592 00:25:03,600 --> 00:25:05,520 Now the support for this theory 593 00:25:05,520 --> 00:25:07,440 is provided by research that shows that 594 00:25:07,440 --> 00:25:09,480 periods of REM sleep increase following periods of 595 00:25:09,480 --> 00:25:11,540 sleep deprivation. And I'm sure you guys have all 596 00:25:11,540 --> 00:25:13,280 noticed if you do a lot of strenuous activity 597 00:25:13,280 --> 00:25:14,840 all you want to do is sleep. 598 00:25:16,480 --> 00:25:17,720 So it also 599 00:25:17,720 --> 00:25:19,680 during sleep the body increases rates of 600 00:25:19,680 --> 00:25:21,300 cell division and protein synthesis. 601 00:25:21,600 --> 00:25:23,560 So this further suggests that 602 00:25:23,560 --> 00:25:25,420 this theory may be valid. 603 00:25:25,880 --> 00:25:27,660 Now the second theory is 604 00:25:27,660 --> 00:25:28,920 the evolutionary theory. 605 00:25:29,200 --> 00:25:31,540 Which they also consider the adaptive theory 606 00:25:31,540 --> 00:25:33,780 of sleep. So we were talking 607 00:25:33,780 --> 00:25:35,660 about this before and it suggests that periods of 608 00:25:35,660 --> 00:25:37,640 activity and activity evolved as 609 00:25:37,640 --> 00:25:38,900 means of conserving energy. 610 00:25:39,320 --> 00:25:41,700 Because according to this theory as we talked about 611 00:25:41,700 --> 00:25:43,720 animals will sleep for different 612 00:25:43,720 --> 00:25:45,460 periods of time depending on 613 00:25:45,780 --> 00:25:47,440 how hazardous the situation is. 614 00:25:47,980 --> 00:25:49,840 So support for this theory comes from 615 00:25:49,840 --> 00:25:51,900 the comparative research of different animals. 616 00:25:52,180 --> 00:25:53,900 So animals 617 00:25:53,900 --> 00:25:55,840 that have less predators will sleep for a 618 00:25:55,840 --> 00:25:57,680 longer period of time and animals that 619 00:25:57,680 --> 00:25:59,720 have more predators will 620 00:25:59,720 --> 00:26:01,180 sleep for a less period of time. 621 00:26:01,680 --> 00:26:03,540 So and there's a pretty big gap 622 00:26:03,540 --> 00:26:05,880 like you're talking from like 623 00:26:05,880 --> 00:26:07,440 12 to 15 hours 624 00:26:07,440 --> 00:26:09,600 to like 4 to 7 so there's a pretty 625 00:26:09,600 --> 00:26:10,100 large gap. 626 00:26:11,360 --> 00:26:13,480 So the third theory is one that they've been 627 00:26:13,480 --> 00:26:15,680 talking about quite often recently which is the 628 00:26:15,780 --> 00:26:17,680 information consolidation theory of sleep. 629 00:26:18,040 --> 00:26:19,620 So this is based on the fact 630 00:26:19,620 --> 00:26:21,560 that cognitive research says that 631 00:26:21,560 --> 00:26:23,340 we need to sleep in order to process 632 00:26:23,340 --> 00:26:25,700 and remember information that we 633 00:26:25,700 --> 00:26:26,840 require during the day. 634 00:26:27,640 --> 00:26:29,680 So it argues that we 635 00:26:29,680 --> 00:26:31,740 need to sleep in order for our brain to sort 636 00:26:31,740 --> 00:26:33,560 through things to be ready for the next 637 00:26:33,560 --> 00:26:34,180 day to come. 638 00:26:34,980 --> 00:26:37,600 And the support for this idea stems from a number of 639 00:26:37,600 --> 00:26:39,300 sleep deprivation studies that demonstrate 640 00:26:39,300 --> 00:26:41,560 a lack of sleep has serious impact on the ability 641 00:26:41,560 --> 00:26:42,860 to recall and remember information. 642 00:26:43,200 --> 00:26:45,460 And I'm sure you don't necessarily have all your 643 00:26:45,780 --> 00:26:47,780 jobs at home yet but I'm sure this is no surprise 644 00:26:47,780 --> 00:26:49,180 that if you've been up for a while 645 00:26:49,620 --> 00:26:51,040 it's harder to remember things. 646 00:26:51,740 --> 00:26:53,660 So while there is research and 647 00:26:53,660 --> 00:26:55,600 evidence to support each one of these theories on 648 00:26:55,600 --> 00:26:57,660 sleep there is no clear cut support for 649 00:26:57,660 --> 00:26:59,500 just any one single theory. 650 00:26:59,780 --> 00:27:01,720 It could be that all these theories 651 00:27:01,720 --> 00:27:03,780 are correct, part of these theories are correct, 652 00:27:03,960 --> 00:27:05,600 they could all be part of the puzzle or 653 00:27:05,600 --> 00:27:07,760 they could all be wrong. We just really don't 654 00:27:07,760 --> 00:27:09,820 know at this point. All we know is that 655 00:27:09,820 --> 00:27:11,900 sleeping has many physiological 656 00:27:13,440 --> 00:27:14,180 many different 657 00:27:14,180 --> 00:27:15,680 parts and it's not within 658 00:27:15,780 --> 00:27:17,460 the realm of possibility that we'll discover 659 00:27:17,460 --> 00:27:19,640 in something entirely new that we never 660 00:27:19,640 --> 00:27:20,480 considered before. 661 00:27:24,480 --> 00:27:25,720 So it actually usually 662 00:27:25,720 --> 00:27:27,080 surprises people that there's actually 663 00:27:27,620 --> 00:27:29,600 more than 70 different types 664 00:27:29,600 --> 00:27:31,520 of sleep disorders. But 665 00:27:31,520 --> 00:27:33,520 lucky for us they can easily be sorted 666 00:27:33,520 --> 00:27:35,720 into three categories. We have 667 00:27:35,720 --> 00:27:36,980 lack of sleep, 668 00:27:37,640 --> 00:27:39,560 disturbed sleep, and excessive 669 00:27:39,560 --> 00:27:41,600 sleep. And since we are 670 00:27:41,600 --> 00:27:43,320 very limited by time today 671 00:27:43,320 --> 00:27:45,700 I'm just going to cover some of the more common 672 00:27:45,780 --> 00:27:47,440 ones that you've probably heard about and 673 00:27:47,440 --> 00:27:49,540 have not really considered. But the reason we're covering it 674 00:27:49,540 --> 00:27:51,580 is it's going to come up when we're talking about the 675 00:27:51,580 --> 00:27:53,740 sleep lab later, right? Because you kind of 676 00:27:53,740 --> 00:27:55,620 have to know what problems and categories 677 00:27:55,620 --> 00:27:57,000 they fall in so you know what to look for. 678 00:27:57,840 --> 00:27:59,400 So insomnia is a 679 00:27:59,400 --> 00:28:01,640 considered lack of sleep disorder. And I've noticed that 680 00:28:01,640 --> 00:28:03,620 with insomnia a lot of people are 681 00:28:03,620 --> 00:28:05,300 kind of confused about it. They don't really 682 00:28:06,160 --> 00:28:07,400 realize that it's not only 683 00:28:08,340 --> 00:28:09,680 having difficulty falling 684 00:28:09,680 --> 00:28:10,880 asleep, it's also 685 00:28:11,880 --> 00:28:13,560 staying asleep. And you can also be 686 00:28:13,560 --> 00:28:15,620 considered having insomnia if you think you're 687 00:28:15,780 --> 00:28:17,660 sleeping but then you wake up and you're not really well 688 00:28:17,660 --> 00:28:19,700 rested. So I mean 689 00:28:19,700 --> 00:28:21,220 it's a pretty broad generalized 690 00:28:21,220 --> 00:28:23,640 category. But I'll talk 691 00:28:23,640 --> 00:28:25,400 to people and they'll say, well I don't have insomnia 692 00:28:25,400 --> 00:28:27,460 because I can fall asleep. But 693 00:28:27,460 --> 00:28:28,520 just falling asleep 694 00:28:29,760 --> 00:28:31,260 isn't necessarily, like 695 00:28:31,260 --> 00:28:33,780 just because you can fall asleep easily doesn't mean that there's 696 00:28:33,780 --> 00:28:35,160 if you're tired during the day 697 00:28:35,160 --> 00:28:37,540 then there's a problem. So 698 00:28:37,540 --> 00:28:39,320 apnea comes up a lot. 699 00:28:39,580 --> 00:28:41,480 And it's an example of disturbed 700 00:28:41,480 --> 00:28:43,100 sleep disorder. And 701 00:28:43,640 --> 00:28:45,600 we really, with apnea basically 702 00:28:45,780 --> 00:28:47,680 there's only two things that we can really do 703 00:28:47,680 --> 00:28:49,720 for it. Because it's 704 00:28:49,720 --> 00:28:51,580 an interruption of breathing during sleep 705 00:28:51,580 --> 00:28:53,680 it's a mechanical problem. Something happens 706 00:28:53,680 --> 00:28:55,300 with the windpipe. And 707 00:28:55,300 --> 00:28:57,800 so what happens is we really have two options right now. 708 00:28:57,880 --> 00:28:59,620 We have surgery or we have 709 00:29:00,160 --> 00:29:01,680 masks for people to wear at 710 00:29:01,680 --> 00:29:03,620 night. But it's a very, very common 711 00:29:03,620 --> 00:29:05,500 sleep problem. And 712 00:29:05,500 --> 00:29:07,720 we really, when you consider how 713 00:29:07,720 --> 00:29:09,800 long we've been at this 714 00:29:09,800 --> 00:29:11,920 it's really not the best option. 715 00:29:12,660 --> 00:29:13,660 So there's also 716 00:29:13,660 --> 00:29:15,720 something called restless legs and 717 00:29:15,780 --> 00:29:17,300 dandrum and periodic limb movement disorder. 718 00:29:17,640 --> 00:29:19,580 And if you've ever slept beside one of these people 719 00:29:19,580 --> 00:29:21,680 you know exactly what I'm talking about. 720 00:29:22,840 --> 00:29:23,320 So 721 00:29:23,320 --> 00:29:25,620 but they will wake themselves up because 722 00:29:25,620 --> 00:29:27,700 they'll move their legs in their sleep or they'll move their 723 00:29:27,700 --> 00:29:29,420 arms in their sleep. And it will 724 00:29:29,420 --> 00:29:31,620 then cause insomnia. So you can have 725 00:29:31,620 --> 00:29:33,640 problems that cause other disorders. 726 00:29:34,460 --> 00:29:35,420 So now 727 00:29:35,420 --> 00:29:37,660 narcolepsy is one that people talk about a lot. 728 00:29:38,080 --> 00:29:39,700 But there's not, a lot of people don't 729 00:29:39,700 --> 00:29:41,680 necessarily really understand narcolepsy. 730 00:29:42,960 --> 00:29:43,760 It's thought to 731 00:29:43,760 --> 00:29:45,480 be genetic but they're not really sure. 732 00:29:45,780 --> 00:29:46,760 It could be brain damage. 733 00:29:47,080 --> 00:29:49,460 It could be, they just really don't know why. 734 00:29:49,860 --> 00:29:51,660 And it causes individuals to fall 735 00:29:51,660 --> 00:29:53,640 asleep uncontrollably during the day for 736 00:29:53,640 --> 00:29:55,840 a period of less than a minute to half an hour. 737 00:29:56,000 --> 00:29:57,440 And these sleep attacks can occur 738 00:29:57,440 --> 00:29:59,160 at any time. Doesn't matter. 739 00:29:59,800 --> 00:30:00,640 Generally if you, 740 00:30:01,200 --> 00:30:03,520 the worst part for narcoleptics is if 741 00:30:03,520 --> 00:30:05,380 it's an emotional thing, 742 00:30:05,480 --> 00:30:07,560 if you're feeling a lot emotionally, it'll happen. 743 00:30:07,760 --> 00:30:09,120 You can fall asleep during sex. 744 00:30:09,440 --> 00:30:11,640 You could be on stage giving a speech and 745 00:30:11,640 --> 00:30:13,480 you will fall asleep. And 746 00:30:13,480 --> 00:30:15,680 the most interesting thing about narcolepsy is you actually 747 00:30:15,780 --> 00:30:17,260 go straight into REM. 748 00:30:17,580 --> 00:30:19,260 Like you skip everything else. 749 00:30:19,580 --> 00:30:21,300 So it's quite interesting. 750 00:30:21,800 --> 00:30:23,080 Especially when you think about 751 00:30:24,900 --> 00:30:25,860 what kind 752 00:30:25,860 --> 00:30:27,720 of a disorder that is that you'd be able 753 00:30:27,720 --> 00:30:28,840 to skip everything else. 754 00:30:30,740 --> 00:30:31,700 So, okay. 755 00:30:32,520 --> 00:30:33,560 How are we doing for time? 756 00:30:33,760 --> 00:30:34,840 Am I ready to head to time? 757 00:30:35,900 --> 00:30:36,380 Okay. 758 00:30:37,760 --> 00:30:38,240 So, 759 00:30:40,240 --> 00:30:41,680 this is, with the 760 00:30:41,680 --> 00:30:43,680 sleep study, I guess most people know what 761 00:30:43,680 --> 00:30:45,440 sleep studies are or you wouldn't be here. 762 00:30:46,000 --> 00:30:47,580 So, but sleep clinics, 763 00:30:47,600 --> 00:30:49,800 sleep laboratories, they're all pretty much the same 764 00:30:49,800 --> 00:30:51,820 thing. So you all, you have a bunch 765 00:30:51,820 --> 00:30:53,620 of different sensors that are attached to you 766 00:30:53,620 --> 00:30:55,280 that monitor a bunch of different things. 767 00:30:55,980 --> 00:30:57,380 So, and we can monitor 768 00:30:57,380 --> 00:30:59,140 a lot of things like airflow, 769 00:31:00,500 --> 00:31:01,760 breathing, muscle tone, 770 00:31:01,980 --> 00:31:03,580 leg movement. They watch you on 771 00:31:03,580 --> 00:31:05,480 cameras so they can figure out what's going on. 772 00:31:05,800 --> 00:31:07,560 So, but a lot of people 773 00:31:07,560 --> 00:31:09,600 will ask me, like this year, they're always 774 00:31:09,600 --> 00:31:11,680 like, wow, you know, a sleep 775 00:31:11,680 --> 00:31:13,560 lab, that's pretty, pretty cool. 776 00:31:13,640 --> 00:31:15,120 That's a good idea, but why? 777 00:31:15,780 --> 00:31:17,460 Why would you want to make a homebrew sleep lab? 778 00:31:17,560 --> 00:31:18,420 I don't really understand. 779 00:31:19,880 --> 00:31:21,540 Well, for me the problem 780 00:31:21,540 --> 00:31:22,900 has come from the fact that 781 00:31:25,640 --> 00:31:27,740 this was definitely a very selfish 782 00:31:28,460 --> 00:31:28,900 project. 783 00:31:30,060 --> 00:31:31,360 I'm lucky enough that 784 00:31:31,360 --> 00:31:33,200 I seem to be genetically flawed 785 00:31:33,200 --> 00:31:35,340 and pretty much for a decade now 786 00:31:35,340 --> 00:31:37,500 I've had problems with fatigue that they can't 787 00:31:37,500 --> 00:31:38,780 figure out what is going on. 788 00:31:39,000 --> 00:31:41,360 So of course they sent me to a sleep lab, right? 789 00:31:41,960 --> 00:31:43,720 And a lot of people don't understand 790 00:31:43,720 --> 00:31:45,560 with chemical 791 00:31:45,780 --> 00:31:47,680 sleep. I mean, we've 792 00:31:47,680 --> 00:31:49,580 talked about animals, we've talked about what sleep 793 00:31:49,580 --> 00:31:51,580 is. With 794 00:31:51,580 --> 00:31:53,600 sleeping pills, they only manage 795 00:31:53,600 --> 00:31:55,180 symptoms. They are not a cure. 796 00:31:55,480 --> 00:31:57,660 Right? And as we've learned, just because you are 797 00:31:57,660 --> 00:31:59,680 unconscious doesn't mean 798 00:31:59,680 --> 00:32:01,700 you're going through a sleep cycle. This does not mean 799 00:32:01,700 --> 00:32:03,740 you're going to wake up well rested. It just puts 800 00:32:03,740 --> 00:32:05,700 you to sleep. And if you've ever taken 801 00:32:05,700 --> 00:32:07,720 any sleeping pills, there's a lot of 802 00:32:07,720 --> 00:32:09,640 side effects that aren't fun. 803 00:32:09,940 --> 00:32:11,760 But when I went to the sleep 804 00:32:11,760 --> 00:32:13,640 clinic, they diagnosed me with having chronic 805 00:32:13,640 --> 00:32:15,540 insomnia. And they said, well, 806 00:32:15,780 --> 00:32:17,620 the only thing we have for you is sleeping 807 00:32:17,620 --> 00:32:19,060 pills. So 808 00:32:19,780 --> 00:32:21,120 among the characteristics I've 809 00:32:21,120 --> 00:32:23,720 inherited from my mother, other than her 810 00:32:23,720 --> 00:32:25,260 very short stature 811 00:32:25,260 --> 00:32:27,720 and her winning smile, is 812 00:32:27,720 --> 00:32:29,120 the fact that in my family 813 00:32:29,920 --> 00:32:31,760 there's a little quirk that none of us 814 00:32:31,760 --> 00:32:33,980 really seem to be affected by tranquilizers. 815 00:32:34,200 --> 00:32:35,740 And the only way we can be 816 00:32:35,740 --> 00:32:37,300 affected by tranquilizers is in these 817 00:32:37,300 --> 00:32:39,680 eye-popping, amazing amounts. 818 00:32:40,040 --> 00:32:41,500 It's the lamest 819 00:32:41,500 --> 00:32:43,120 superpower ever that I have. 820 00:32:44,740 --> 00:32:45,480 It's like 821 00:32:45,780 --> 00:32:47,600 I'll have an operation and they'll be like, 822 00:32:48,700 --> 00:32:49,640 you're going to kill her 823 00:32:49,640 --> 00:32:51,380 if you give her any more morphine. And I'm like, 824 00:32:51,460 --> 00:32:53,660 blink, blink. It's kind of cool to freak out the 825 00:32:53,660 --> 00:32:55,580 nurses, but lamest superpower, I don't 826 00:32:55,580 --> 00:32:57,760 recommend it. And also 827 00:32:57,760 --> 00:32:59,160 in my family we have this 828 00:32:59,160 --> 00:33:01,600 grab bag of the wackiest 829 00:33:01,600 --> 00:33:03,500 side effects. You know when they're like, 830 00:33:03,580 --> 00:33:05,440 one in 10,000 people will start singing 831 00:33:05,440 --> 00:33:07,200 I'm a little teapot if they take this drug. 832 00:33:07,840 --> 00:33:09,140 That would be me, right? 833 00:33:09,320 --> 00:33:11,220 So I get the weirdest, weirdest side effects. 834 00:33:11,800 --> 00:33:13,560 So people don't really consider this 835 00:33:13,560 --> 00:33:15,600 when we talk about drugs. The fact that 836 00:33:15,780 --> 00:33:17,560 what suits one person may not 837 00:33:17,560 --> 00:33:19,340 suit another person. And that 838 00:33:19,340 --> 00:33:21,500 basically how drugs work is they're all 839 00:33:21,500 --> 00:33:23,680 side effects. They just happen to be a common 840 00:33:23,680 --> 00:33:25,360 side effect that happens to a lot of people. 841 00:33:25,620 --> 00:33:27,280 Right? So an 842 00:33:27,280 --> 00:33:29,720 individual dosage, what works for one person 843 00:33:29,720 --> 00:33:31,000 isn't going to work for another person. 844 00:33:31,540 --> 00:33:33,440 So I went back to that sleep 845 00:33:33,440 --> 00:33:35,760 clinic and saw the doctor over and over again 846 00:33:35,760 --> 00:33:37,420 for several months. And eventually 847 00:33:37,420 --> 00:33:39,320 someone who I loved said to me, 848 00:33:39,420 --> 00:33:41,560 you gotta stop. You gotta stop. 849 00:33:41,600 --> 00:33:43,520 It's killing you. It's killing your body. 850 00:33:43,640 --> 00:33:45,160 You can't think. You can't do anything. 851 00:33:45,780 --> 00:33:47,360 The side effects are brutal. And you stopped. 852 00:33:48,560 --> 00:33:49,840 So it's been mentioned 853 00:33:49,840 --> 00:33:50,880 to me on more than one occasion, 854 00:33:51,140 --> 00:33:53,420 not by anyone in this audience, but 855 00:33:53,420 --> 00:33:55,260 that I come off as very anti-doctor. 856 00:33:55,860 --> 00:33:57,220 But I don't believe that. 857 00:33:57,280 --> 00:33:59,440 I don't believe that the doctors are the enemy. 858 00:33:59,660 --> 00:34:00,780 That's not what I believe at all. 859 00:34:01,540 --> 00:34:03,580 I'd like to officially go on record and say 860 00:34:03,580 --> 00:34:05,160 that I would not want to live 861 00:34:05,160 --> 00:34:07,320 in a world that had 862 00:34:07,320 --> 00:34:09,760 no doctors. And I wouldn't want to live in a country 863 00:34:09,760 --> 00:34:11,160 that doesn't have socialized medicine. 864 00:34:11,360 --> 00:34:13,640 Because I'm Canadian. So that is not 865 00:34:13,640 --> 00:34:14,600 what my problem is. 866 00:34:15,780 --> 00:34:17,660 I guess the point is, I'm not 867 00:34:17,660 --> 00:34:18,420 universally educated. 868 00:34:19,440 --> 00:34:21,040 A lot of people like to call me 869 00:34:21,040 --> 00:34:23,880 a wetware hacker. They like to call me a biohacker. 870 00:34:24,260 --> 00:34:26,100 They like to call me a transhumanist. 871 00:34:26,560 --> 00:34:27,760 But I really don't consider 872 00:34:27,760 --> 00:34:29,040 myself any of these things. 873 00:34:30,240 --> 00:34:31,760 For me, if I was 874 00:34:31,760 --> 00:34:33,640 going to consider myself anything, I like to 875 00:34:33,640 --> 00:34:35,360 joke that I'm a neurophite. 876 00:34:35,840 --> 00:34:37,660 Which, because one day, because I read 877 00:34:37,660 --> 00:34:39,600 so much neuro stuff. I was reading a book 878 00:34:39,600 --> 00:34:41,560 once. And I saw neophyte. 879 00:34:41,560 --> 00:34:43,380 And I read it as neurophite. I'm like, 880 00:34:43,460 --> 00:34:45,720 what the hell is a neurophite? And then I 881 00:34:45,780 --> 00:34:46,900 and then it occurred to me that 882 00:34:47,620 --> 00:34:49,260 it seemed like 883 00:34:49,260 --> 00:34:51,260 the most appropriate thing. Because 884 00:34:51,640 --> 00:34:53,520 a lot of people have been talking to me about the fact 885 00:34:53,520 --> 00:34:55,380 they're like, don't you think there's an 886 00:34:55,380 --> 00:34:57,580 ethical question with whether or not 887 00:34:57,580 --> 00:34:58,580 you should be giving people 888 00:34:59,260 --> 00:35:01,560 medical devices that haven't gone to school. 889 00:35:01,860 --> 00:35:03,680 But to me, I don't think there's 890 00:35:03,680 --> 00:35:05,320 anything ethically wrong with taking 891 00:35:05,320 --> 00:35:07,460 personal responsibility and 892 00:35:07,460 --> 00:35:09,440 figuring out how your brain works. 893 00:35:09,700 --> 00:35:11,660 And there's nothing wrong with building machines 894 00:35:11,660 --> 00:35:13,700 to figure out what's going on with you. 895 00:35:13,760 --> 00:35:15,520 So you can better work with your doctor. 896 00:35:15,780 --> 00:35:16,200 Okay. 897 00:35:17,140 --> 00:35:19,620 So I'm getting flagged. So basically the world 898 00:35:19,620 --> 00:35:21,460 of science isn't for academics. 899 00:35:21,880 --> 00:35:23,740 We can all be scientists when it comes to 900 00:35:23,740 --> 00:35:24,980 the laboratory of our own bodies. 901 00:35:25,200 --> 00:35:27,300 And all that's needed is a little bit of knowledge 902 00:35:27,300 --> 00:35:29,580 and the right tools. So now hopefully Keith 903 00:35:29,580 --> 00:35:31,240 won't kill me, because I've gone into his time. 904 00:35:31,360 --> 00:35:33,560 And he's going to explain to you exactly how 905 00:35:33,560 --> 00:35:34,720 to build your own sleep lab. 906 00:35:35,300 --> 00:35:37,700 So everybody, this is Keith. He rocks the Casbah. 907 00:35:37,700 --> 00:35:38,560 Give him a warm welcome. 908 00:35:40,640 --> 00:35:41,400 Thanks, Vessary. 909 00:35:43,580 --> 00:35:45,280 So I will present to you today 910 00:35:45,780 --> 00:35:47,140 how to build your very own sleep lab, 911 00:35:47,320 --> 00:35:47,840 the execution. 912 00:35:49,480 --> 00:35:51,600 So first off, I'll start off and I'll explain 913 00:35:51,600 --> 00:35:53,300 what we do here. We are collecting 914 00:35:53,300 --> 00:35:55,120 data for later interpretation. 915 00:35:56,280 --> 00:35:57,680 It's very, very simple. 916 00:35:58,540 --> 00:35:59,640 Doesn't need anything fancy. 917 00:35:59,660 --> 00:36:01,740 We used Pentium 3 600 918 00:36:01,740 --> 00:36:03,760 megahertz to collect all this data. 919 00:36:04,160 --> 00:36:05,460 And what we're doing is 920 00:36:05,460 --> 00:36:07,400 we have an EEG, a heart rate monitor, 921 00:36:07,680 --> 00:36:09,780 an eye sensor, and an IR 922 00:36:09,780 --> 00:36:11,640 webcam that's collecting 923 00:36:11,640 --> 00:36:13,180 all this, and then we're collecting it. 924 00:36:14,220 --> 00:36:15,760 What we don't do is we don't 925 00:36:15,780 --> 00:36:16,900 measure breathing measurements. 926 00:36:17,140 --> 00:36:19,680 We don't measure skin response on the face. 927 00:36:19,860 --> 00:36:21,620 And why we don't is very 928 00:36:21,620 --> 00:36:23,500 simply, restless leg and apnea 929 00:36:23,500 --> 00:36:25,500 are symptoms that are very obvious 930 00:36:25,500 --> 00:36:27,120 to an outside observer. It's a 931 00:36:27,720 --> 00:36:29,220 really, really low tech problem. 932 00:36:29,420 --> 00:36:31,100 So why apply high tech to it? 933 00:36:33,140 --> 00:36:35,400 At the heart, it's a desktop PC. 934 00:36:35,660 --> 00:36:37,620 Again, not very powerful. We've hooked 935 00:36:37,620 --> 00:36:39,620 up the modular EEG implementation 936 00:36:39,620 --> 00:36:41,400 of the open EEG project. 937 00:36:42,300 --> 00:36:43,280 All of this 938 00:36:43,280 --> 00:36:45,220 interfaces with the desktop via 939 00:36:45,780 --> 00:36:47,740 S232. Simple protocol. 940 00:36:48,380 --> 00:36:49,820 Keep it simple. It's great. 941 00:36:50,200 --> 00:36:52,280 We have a homebrew microcontroller. 942 00:36:52,460 --> 00:36:53,860 It's an Atmel Atmega 128 943 00:36:53,860 --> 00:36:55,780 to collect the heart rate monitor 944 00:36:55,780 --> 00:36:57,300 and eye movement sensor signals. 945 00:36:57,540 --> 00:36:59,540 And finally, a USB webcam. 946 00:37:01,860 --> 00:37:03,880 Up here is just a quick flow chart 947 00:37:03,880 --> 00:37:05,400 of how all these pieces fit together 948 00:37:05,400 --> 00:37:06,300 if you're a visual learner. 949 00:37:08,760 --> 00:37:09,700 And this 950 00:37:09,700 --> 00:37:11,640 is a quick overview of how 951 00:37:11,640 --> 00:37:13,460 the EEG is put together. 952 00:37:13,660 --> 00:37:15,560 There is a series of 953 00:37:15,780 --> 00:37:17,400 electrodes. They're sent to an analog 954 00:37:17,400 --> 00:37:19,260 board where the signals are 955 00:37:19,620 --> 00:37:21,220 amplified and then filtered. 956 00:37:21,420 --> 00:37:23,120 And then finally provided for 957 00:37:23,120 --> 00:37:25,000 ADC conversion on a 958 00:37:25,780 --> 00:37:26,880 digital EEG board. 959 00:37:27,060 --> 00:37:29,200 Also an Atmel microcontroller, 960 00:37:29,360 --> 00:37:30,360 but this one's even simpler. 961 00:37:30,580 --> 00:37:32,880 And finally, it goes off via 962 00:37:32,880 --> 00:37:34,320 RS232 to the desktop. 963 00:37:35,760 --> 00:37:37,520 Here is just an electrical 964 00:37:37,520 --> 00:37:39,580 level schematic of all of 965 00:37:39,580 --> 00:37:41,220 the different sensors and how they're wired. 966 00:37:42,620 --> 00:37:43,680 We put 967 00:37:43,680 --> 00:37:45,560 a simple amplifier on the heart rate 968 00:37:45,780 --> 00:37:46,600 monitor that we hacked. 969 00:37:46,800 --> 00:37:49,440 And there's a small change to that. 970 00:37:49,540 --> 00:37:51,620 We added a 10 microfarad cap on 971 00:37:51,620 --> 00:37:53,620 the signal for the heart rate monitor coming in. 972 00:37:53,760 --> 00:37:55,540 But otherwise is identical 973 00:37:55,540 --> 00:37:55,980 to this. 974 00:37:58,260 --> 00:37:59,600 So let me tell you 975 00:37:59,600 --> 00:38:01,160 about the sensors that we chose here. 976 00:38:04,920 --> 00:38:07,620 We got the modular EEG from the OpenEEG 977 00:38:07,620 --> 00:38:09,560 project. It's very, very 978 00:38:09,560 --> 00:38:11,800 cheap. It's well tested. 979 00:38:12,020 --> 00:38:13,520 You can buy PCBs 980 00:38:13,520 --> 00:38:15,520 and build it yourself. You don't have to 981 00:38:15,780 --> 00:38:17,680 pay someone else to build it for you. 982 00:38:17,820 --> 00:38:19,460 It's open source and 983 00:38:19,460 --> 00:38:21,740 we needed it to detect what stage of 984 00:38:21,740 --> 00:38:23,640 sleep the user of the 985 00:38:23,640 --> 00:38:24,860 machine is in. 986 00:38:25,940 --> 00:38:27,540 We grabbed a wireless 987 00:38:27,540 --> 00:38:29,680 heart rate monitor by Oregon Scientific 988 00:38:29,680 --> 00:38:31,660 off of eBay. We cracked 989 00:38:31,660 --> 00:38:33,620 open the front and took an O-scope to it 990 00:38:33,620 --> 00:38:35,300 and started looking for traces. 991 00:38:35,600 --> 00:38:37,760 And we got a nice clean square 992 00:38:37,760 --> 00:38:39,340 wave, one volt peak to peak 993 00:38:39,340 --> 00:38:41,660 with the heart rate 994 00:38:41,660 --> 00:38:42,460 of the user. 995 00:38:43,340 --> 00:38:45,580 It's actually pretty easy to do. We're 996 00:38:45,780 --> 00:38:46,380 rather impressed. 997 00:38:46,840 --> 00:38:49,540 And we need this to verify that the 998 00:38:49,540 --> 00:38:51,400 monitor user is calm. They're not going through 999 00:38:51,400 --> 00:38:52,720 night tremors, anything like that. 1000 00:38:54,580 --> 00:38:55,300 We also 1001 00:38:55,300 --> 00:38:57,540 have the eye movement sensor. It's 1002 00:38:57,540 --> 00:38:59,080 a Fairchild QRB 1003 00:38:59,710 --> 00:39:01,360 1134. It's 1004 00:39:01,360 --> 00:39:03,360 very, very cheap. Costs about a dollar a 1005 00:39:03,360 --> 00:39:05,060 piece in bulk. It's well documented. 1006 00:39:05,300 --> 00:39:07,600 There's data 1007 00:39:07,600 --> 00:39:09,320 sheets all over the net. It's 1008 00:39:09,320 --> 00:39:11,560 also quite simple. And we needed 1009 00:39:11,560 --> 00:39:13,380 this to verify REM sleep. 1010 00:39:16,780 --> 00:39:17,740 And basically 1011 00:39:17,740 --> 00:39:19,460 how it works is 1012 00:39:19,460 --> 00:39:20,900 it's an IR LED 1013 00:39:20,900 --> 00:39:23,620 and a photo transistor that are placed very, 1014 00:39:23,680 --> 00:39:25,500 very close to each other. It 1015 00:39:25,500 --> 00:39:27,140 bounces an infrared 1016 00:39:27,880 --> 00:39:29,560 light beam right off the back of the 1017 00:39:29,560 --> 00:39:31,440 retina through the iris and then 1018 00:39:31,440 --> 00:39:32,940 back to the photo transistor. 1019 00:39:33,260 --> 00:39:35,600 And if the eye moves to the left or the 1020 00:39:35,600 --> 00:39:37,720 right, the amount of 1021 00:39:37,720 --> 00:39:39,680 light reflected back changes and we can measure 1022 00:39:39,680 --> 00:39:39,880 that. 1023 00:39:42,340 --> 00:39:43,660 So let me tell you 1024 00:39:43,660 --> 00:39:45,220 about construction pitfalls. 1025 00:39:46,340 --> 00:39:47,760 The first thing I have to 1026 00:39:47,760 --> 00:39:49,660 say is if you're thinking about 1027 00:39:49,660 --> 00:39:50,860 building an EEG yourself, 1028 00:39:52,420 --> 00:39:53,640 unless you're that 1029 00:39:53,640 --> 00:39:55,700 poor, don't bother. It's worth the extra 1030 00:39:55,700 --> 00:39:57,700 hundred bucks to have someone else do it for you. 1031 00:39:58,140 --> 00:39:59,540 There are many, many hours spent 1032 00:39:59,540 --> 00:40:01,460 of cramped soldering. It was 1033 00:40:01,460 --> 00:40:03,580 incredibly easy to get all 1034 00:40:03,580 --> 00:40:05,620 those traces bridged 1035 00:40:05,620 --> 00:40:07,540 together or shorted to ground. And 1036 00:40:07,540 --> 00:40:09,680 the IC sockets aren't 1037 00:40:09,680 --> 00:40:11,840 necessarily well labeled. We put a couple 1038 00:40:11,840 --> 00:40:13,640 in backwards, blew them, had to replace them. 1039 00:40:13,860 --> 00:40:15,300 And the power supply 1040 00:40:15,780 --> 00:40:17,480 is not exactly 1041 00:40:17,480 --> 00:40:19,520 seen by default. It's a do-it-yourself 1042 00:40:19,520 --> 00:40:21,420 kit, so they assume that you're going to 1043 00:40:21,420 --> 00:40:22,980 build your own. 1044 00:40:25,440 --> 00:40:27,100 Some highlights from 1045 00:40:27,100 --> 00:40:29,320 our construction. We 1046 00:40:30,320 --> 00:40:31,660 constructed op-amp 1047 00:40:31,660 --> 00:40:33,680 circuits on the fly to boost our signal 1048 00:40:33,680 --> 00:40:35,520 that we thought was 5 volts but really 1049 00:40:35,520 --> 00:40:37,460 wasn't. We 1050 00:40:37,460 --> 00:40:39,400 added first order filters to 1051 00:40:39,400 --> 00:40:41,600 remove all the noise coming in on the heart rate 1052 00:40:41,600 --> 00:40:43,560 monitor. And we found an 1053 00:40:43,560 --> 00:40:45,500 interesting use for a soldering iron 1054 00:40:45,780 --> 00:40:47,540 in the construction of the iMovement 1055 00:40:47,540 --> 00:40:49,600 mask. Quite literally is 1056 00:40:49,600 --> 00:40:51,340 a cheap dollar store plastic 1057 00:40:51,340 --> 00:40:53,720 sleep mask. It was made of plastic 1058 00:40:53,720 --> 00:40:54,900 as was the IR 1059 00:40:56,340 --> 00:40:57,420 LED photo 1060 00:40:57,420 --> 00:40:59,640 transistor combo. So we quite literally 1061 00:40:59,640 --> 00:41:01,520 melted them together to keep them in 1062 00:41:01,520 --> 00:41:01,780 place. 1063 00:41:03,700 --> 00:41:05,560 So we plugged in the EEG 1064 00:41:05,560 --> 00:41:07,360 and nothing caught on fire. It was great. 1065 00:41:08,880 --> 00:41:09,420 We 1066 00:41:09,420 --> 00:41:11,580 hooked it up, took this screen cap and 1067 00:41:11,580 --> 00:41:13,560 asked our test subject about their favorite 1068 00:41:13,560 --> 00:41:15,640 topic. Apparently they were quite excited 1069 00:41:15,780 --> 00:41:16,080 about it. 1070 00:41:18,640 --> 00:41:19,820 We plugged in 1071 00:41:19,820 --> 00:41:21,560 our heart rate monitor and iMovement 1072 00:41:21,560 --> 00:41:23,580 sensor, captured some initial data 1073 00:41:23,580 --> 00:41:25,380 and made sure that it worked correctly. 1074 00:41:25,560 --> 00:41:27,800 And it did. We're rather excited about that. 1075 00:41:29,140 --> 00:41:29,620 Before 1076 00:41:29,620 --> 00:41:31,600 we get to the juicy bits, I just wanted to provide a 1077 00:41:31,600 --> 00:41:33,780 disclaimer. Despite any appearances 1078 00:41:33,780 --> 00:41:35,540 to otherwise, we are not doctors 1079 00:41:35,540 --> 00:41:37,600 and we don't pretend to be. 1080 00:41:39,000 --> 00:41:39,680 It is 1081 00:41:39,680 --> 00:41:41,620 rare but possible to give yourself an 1082 00:41:41,620 --> 00:41:43,080 electric shock with this equipment. 1083 00:41:44,240 --> 00:41:45,540 There is no warranty 1084 00:41:45,780 --> 00:41:47,660 explicit or implied with anything we provide 1085 00:41:47,660 --> 00:41:49,540 here and we are not responsible for the 1086 00:41:49,540 --> 00:41:51,560 consequences of anyone attempting to duplicate 1087 00:41:51,560 --> 00:41:52,300 our efforts. 1088 00:41:54,340 --> 00:41:55,580 So, without any 1089 00:41:55,580 --> 00:41:57,680 further ado, these are the 1090 00:41:57,680 --> 00:41:59,540 EEG outputs that we collected 1091 00:41:59,540 --> 00:42:01,120 in the various stages of sleep. 1092 00:42:01,920 --> 00:42:03,740 It goes upper left, 1093 00:42:03,900 --> 00:42:05,660 upper right, lower left, lower right 1094 00:42:05,660 --> 00:42:07,420 and those are the four stages that we 1095 00:42:07,420 --> 00:42:08,400 successfully captured. 1096 00:42:09,720 --> 00:42:11,500 What each of these windows shows 1097 00:42:11,500 --> 00:42:13,600 is there's an oscope view on the top. It's kind of 1098 00:42:13,600 --> 00:42:15,680 noisy. We got a lot of 60 hertz 1099 00:42:15,780 --> 00:42:17,880 EMI coming in but we filtered it 1100 00:42:17,880 --> 00:42:18,380 through software. 1101 00:42:20,460 --> 00:42:21,580 Below that 1102 00:42:21,580 --> 00:42:23,600 is a time versus frequency 1103 00:42:23,600 --> 00:42:25,400 graph of the signal coming in. 1104 00:42:26,020 --> 00:42:27,580 The four little colored bands 1105 00:42:27,580 --> 00:42:29,580 on the left represent each of the four 1106 00:42:29,580 --> 00:42:31,700 stages of sleep. The app 1107 00:42:31,700 --> 00:42:33,680 we're using came with 1108 00:42:33,680 --> 00:42:35,520 that already put in. 1109 00:42:36,160 --> 00:42:37,800 You can see on the first one 1110 00:42:37,800 --> 00:42:39,880 there's a nice purple band at the top 1111 00:42:39,880 --> 00:42:41,680 and then the green one, there's mostly 1112 00:42:41,680 --> 00:42:43,820 energy there and so on and so forth. 1113 00:42:44,720 --> 00:42:45,760 We're quite excited. 1114 00:42:45,780 --> 00:42:47,180 We're excited with the results we got here. 1115 00:42:48,660 --> 00:42:49,600 So, you're probably 1116 00:42:49,600 --> 00:42:51,820 wondering, well, what does all this great data tell me? 1117 00:42:52,340 --> 00:42:53,460 The EEG and 1118 00:42:53,460 --> 00:42:55,540 eye movement sensors, you put the two data 1119 00:42:55,540 --> 00:42:57,740 sets together and we can verify that the user 1120 00:42:57,740 --> 00:42:59,120 is entering all stages of sleep 1121 00:42:59,120 --> 00:43:01,420 going from awake to stage one 1122 00:43:01,420 --> 00:43:03,400 to two, three, four and REM. 1123 00:43:03,720 --> 00:43:05,600 And you'll notice here that awake 1124 00:43:05,600 --> 00:43:06,940 and sleep look identical. 1125 00:43:07,960 --> 00:43:09,560 That's why we need the eye movement 1126 00:43:09,560 --> 00:43:09,920 sensor. 1127 00:43:12,400 --> 00:43:13,660 Once we've gotten 1128 00:43:13,660 --> 00:43:15,480 the EEG data, we can also 1129 00:43:15,780 --> 00:43:17,520 do a nice frequency and amplitude 1130 00:43:17,520 --> 00:43:19,740 analysis on the data that comes in. 1131 00:43:19,920 --> 00:43:21,640 We didn't have time to 1132 00:43:21,640 --> 00:43:23,280 actually do this formally, 1133 00:43:23,520 --> 00:43:25,700 but you can 1134 00:43:25,700 --> 00:43:27,620 see here that it's fairly easy to 1135 00:43:27,620 --> 00:43:29,580 identify each of the stages of sleep 1136 00:43:29,580 --> 00:43:31,640 that the user is in based on that 1137 00:43:31,640 --> 00:43:32,300 frequency plot. 1138 00:43:34,320 --> 00:43:35,600 So, other things that 1139 00:43:35,600 --> 00:43:37,500 we can show here, we have 1140 00:43:37,500 --> 00:43:39,200 camera stills that will show 1141 00:43:39,530 --> 00:43:41,560 fitful sleep, sleep walking and 1142 00:43:41,560 --> 00:43:42,260 restless leg. 1143 00:43:43,580 --> 00:43:45,560 Elevated heart rate can also indicate 1144 00:43:45,780 --> 00:43:47,440 stress or night terrors. 1145 00:43:49,740 --> 00:43:51,700 We also threw up here 1146 00:43:51,700 --> 00:43:53,480 just a quick flow chart of how our 1147 00:43:53,480 --> 00:43:54,640 capture software works. 1148 00:43:54,820 --> 00:43:56,760 We spawn a couple of threads, 1149 00:43:57,040 --> 00:43:59,880 catting dev tty s0 and s1 1150 00:43:59,880 --> 00:44:01,240 to a file. 1151 00:44:01,380 --> 00:44:02,580 We capture IR 1152 00:44:02,580 --> 00:44:04,020 camera frames. 1153 00:44:04,380 --> 00:44:07,400 We decorate our frames with captured 1154 00:44:07,400 --> 00:44:09,700 data and then we sleep for 60 seconds 1155 00:44:09,700 --> 00:44:11,000 and loop if appropriate. 1156 00:44:11,500 --> 00:44:13,660 And if we exit, we kill all the 1157 00:44:13,660 --> 00:44:14,980 background threads and away we go. 1158 00:44:16,780 --> 00:44:18,760 So, I wanted to talk about 1159 00:44:18,760 --> 00:44:20,000 future expansion on this. 1160 00:44:20,520 --> 00:44:22,080 We haven't even scratched the 1161 00:44:22,080 --> 00:44:23,760 surface on what's available here. 1162 00:44:23,860 --> 00:44:25,760 There's so much more that we could be doing, 1163 00:44:25,840 --> 00:44:27,400 but I didn't even have time for. 1164 00:44:27,880 --> 00:44:29,840 We could be doing muscle sensors 1165 00:44:29,840 --> 00:44:32,300 on the face instead of the IR LEDs 1166 00:44:32,940 --> 00:44:34,560 for the eye sensors. 1167 00:44:34,860 --> 00:44:36,380 And actually we got some feedback 1168 00:44:36,380 --> 00:44:38,540 from our test subject 1169 00:44:38,540 --> 00:44:39,260 that we showed you 1170 00:44:40,380 --> 00:44:42,240 who actually said that 1171 00:44:42,240 --> 00:44:43,620 it was very, very uncomfortable 1172 00:44:43,620 --> 00:44:45,460 to have that mask on. 1173 00:44:45,780 --> 00:44:47,660 I would prefer something simpler 1174 00:44:47,660 --> 00:44:48,800 such as a muscle sensor. 1175 00:44:49,530 --> 00:44:50,780 We could also be measuring 1176 00:44:50,780 --> 00:44:52,740 volume and temperature of the airflow 1177 00:44:52,740 --> 00:44:53,940 coming out of the lungs. 1178 00:44:55,060 --> 00:44:57,320 And we could obviously 1179 00:44:57,320 --> 00:44:59,700 this is actually a PhD study 1180 00:44:59,700 --> 00:45:01,280 that I found on Google 1181 00:45:01,280 --> 00:45:02,200 a while back, 1182 00:45:02,400 --> 00:45:04,760 automatically identify and categorize 1183 00:45:04,760 --> 00:45:06,540 all this EEG data that's coming in. 1184 00:45:07,800 --> 00:45:08,880 The frequency 1185 00:45:10,220 --> 00:45:11,440 information is there 1186 00:45:11,440 --> 00:45:12,860 so it's just a matter of writing 1187 00:45:12,860 --> 00:45:14,360 a computer program to automatically 1188 00:45:15,780 --> 00:45:16,760 analyze all this data. 1189 00:45:18,660 --> 00:45:19,220 So, 1190 00:45:19,300 --> 00:45:21,540 in closing, I wanted to 1191 00:45:21,540 --> 00:45:23,720 give our shoutouts and say thanks 1192 00:45:23,720 --> 00:45:25,420 to Abend, Dead Addict, 1193 00:45:25,500 --> 00:45:27,020 Locked in Dream, Lynn, 1194 00:45:27,300 --> 00:45:29,800 MB, Old Grover, Psychedelic 1195 00:45:29,800 --> 00:45:30,920 Bike, and Tottenkoff, 1196 00:45:31,080 --> 00:45:33,020 who will be presenting here pretty shortly. 1197 00:45:33,460 --> 00:45:35,800 And we've put detailed schematics 1198 00:45:35,800 --> 00:45:37,040 and source code on 1199 00:45:37,780 --> 00:45:38,720 DEF CON 17, 1200 00:45:38,960 --> 00:45:40,900 sleeplab.googlepages.com 1201 00:45:40,900 --> 00:45:42,300 for all you guys to check out. 1202 00:45:42,500 --> 00:45:44,020 And thank you very much.