REM Sleep Detector - Page 1
Forum section: electronics / beginners

author: klassicsam
author_rank: Contributor
timestamp: June 18, 2020, 05:51:48 pm
content: Hello everyone,I would like to build a device that reads brain waves and detects REM state during sleep (REM = Rapid Eye Movement) REM is when we are dreaming.There is a similar device called 'Oura Smart Ring' which works differently and creates reports of your night sleep and then sends it to your smart phone. I don't want to do any of that, I just want to be able to read brain waves from the forehead and analyze and detect the REM state, then send a signal that REM state detected meaning the person is in REM state.I know it sounds like a crazy hard project, but I thought maybe there are already electronic components or devices that do majority of what I am trying to achieve and then I'd just incorporate those into my project.I hope someone out here will put me in the right direction!Cheers!

author: ALREADYINUSE
author_rank: Newbie
timestamp: June 19, 2020, 02:16:31 am
content: The Zeo alarm clock has functionality like this. The company went out of business. I have one of the devices. The device is problematic to use because the headband easily comes off your forehead while you're sleeping. It might be possible to design a headband with a less obtrusive electronics package that doesn't come off so easily.https://en.wikipedia.org/wiki/Zeo,_Inc.

author: klassicsam
author_rank: Contributor
timestamp: June 19, 2020, 03:25:19 am
content: Thanks for the reply! So far the best thing I have found online is here:https://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/But the circuits don't look entirely complete....

author: Ducttape
author_rank: Regular Contributor
timestamp: June 19, 2020, 02:01:49 pm
content: This is a device from the mid 90's, but I think the basic concept is pretty sound.

author: DrG
author_rank: Super Contributor
timestamp: June 19, 2020, 03:21:43 pm
content: Quote from: klassicsam on June 18, 2020, 05:51:48 pmThe "right" direction is, in my view, to learn about sleep and what is required tobuild a device that reads brain waves and detects REM state during sleep.My intention is to be realistic without unnecessarily squashing your enthusiasm. On the other hand, I have a lot of mixed feelings about this so-called home neuroscience and bio-hacking. I worry about safety first and simplicity-induced delusions second.I also note that you have not said why you want to do what you want to do and you have not given any indication of your experience and skill level.Read through the sections herehttps://emedicine.medscape.com/article/1188764-overview#a2to get an idea about how sleep is measured in a laboratory.Measuring sleep stages accurately is complicated and WELL beyond the capability of a simple hobbyist or beginner electronic enthusiast.It is NOT a simple matter of getting an EEG (and those instrumentation amplifiers and associated electronics are not simple at all). Even if it were, you must understand that the hardware end of EEG is only one piece. The software end is probably more difficult.Here is a greatly simplified introduction to EEG waveforms during sleep stagesThat being said, are actigraphy devices (let's simplify that class of device as being largely accelerometer based) used as sleep detectors any good? I think yes, they are surprisingly decent at measuring TOTAL sleep time when compared to laboratory polysomnography. But, that is for total sleep time, NOT REM sleep.The alarm clock that was mentioned does NOT measure REM sleep at all [edit: I need to back off of that a bit, I don't know what the Zeo clock does for sure but it looks like it is only EEG and no EOG, but I don't know for sure]. You sleep in cycles and each cycle has stages (again I am being simplistic). The "best" time to wake up is at the end of a cycle, which is where the REM is going on. In fact, if left undisturbed, that is normally how you wake up....you have gone through enough cycles and at the "end" of the REM stage of the last cycle needed, you wake up naturally,Such alarm clocks derive some measure of the cycles and decide when you are likely to be in REM based on movement activity (and lack of movement activity) and time. There are phone apps for such clockshttps://www.sleepcycle.com/but you should be able to understand that there is no direct measurement of REM going on at all.The movie prop in the Northern Exposure clip is supposed to illustrate the idea of measuring sleep stages (as with an EEG) and eye movements (as in an EOG) and, thus, directly detect when you are in REM. That example is based on the idea that lucid dreaming (where you have awareness and, ideally control, while you are dreaming) is beneficial. Lucid dreaming is real but I am not going to comment on whether it is beneficial at all.So, where does that leave you? Hopefully pointed in the right direction. Is there any hope for a home-brew device that would do what you want? Probably it is a long shot...maybe a very long shot. Still, there are some intriguing devices out there that do not cause my BS meter to wail away - here is one and I HAVE NOT tested this at all and have not even read reviews and so on, it just looks interestinghttps://backyardbrains.com/products/heartandbrainspikershieldbundleSee the ability to measure eye movements here-Again, I am not endorsing anything other than you doing a whole lot more reading.Hope it helps.

author: RoGeorge
author_rank: Super Contributor
timestamp: June 19, 2020, 04:19:11 pm
content: If all you want is to detect and record Rapid Eye Movements during sleep, then set up 2-3 infrared cameras, (for example a Raspberry Pi with Infra Red LED lights and Nigh Vision Camera based on an OV5647 module, about 10-15 USD).Once you have an IR surveillance system, you can use face detection algorithms to detect the eyes, then apply movement amplification to detect the REM. It should be able to work in real time on a RPi, but I might be wrong about the real time processing, I never tried in practice to do that.Anyway, it's non invasive, and if it doesn't work in real time, you can send the video stream to a better computer, or you can just record it on the RPi and do the post processing next day, on a more powerful machine.If you just want lucid dreaming, a device most probably won't be of any help if you are not already able to do it without any device. One either can or can't do lucid dreaming. You need to have that ability.To know if you have it, try to remember if you ever have had dreams in which you were in total control over the dream. For example, did you remember you ever have had (when you were a kid) a dream in which you were flying, and you could fly everywhere you want, however you want? That's a good sign you can lucid dreaming. Some lose that ability after they grow up, some never had it.I can provoke lucid dreaming intentionally, simply by thinking in the evening before about it, that I would like to lucid dream next morning. Lucid dreaming is a very pleasant experience, to others it might look like a very "wow" thing to do all the time, yet I almost never induce myself lucid dreaming intentionally, no idea why not. Most of the time when it happens, it's unintentionally, and also it's not very often. No idea what triggers it.

author: klassicsam
author_rank: Contributor
timestamp: June 19, 2020, 05:23:18 pm
content: Fantastic reply wow! Thanks a lot for taking your time and writing thoroughly about what I am looking for, really appreciate it!To get to the point I just want a device that does what I need it to do and I am willing to just pay for it and buy it. Now to answer why I want this, is that I am a lucid dream and astral projection enthusiast (Among many interests) and one of the ways to achieve astral projection is through lucid dreaming, while lucid dreaming itself is also a great way of experimentation. I have naturally and randomly experimented both astral projection and lucid dreams multiple times but I'd like to achieve them at will if possible.Since I couldn't find anything out there that does what I need, I decided to see if I can just make one of my own, hoping most of these components are ready made and would require less to do hardware-wise. Software-wise tho I am a software engineer (15+ years of experience) and I thought I cold probably handle that. But the bottom line is if someone has made this device, I would rather just pay for it and buy it.I have some electronics experiments from university years using micro controllers and writing programs for them (C language at the time)... I have an understanding of electronic elements and their jobs and so on.The links you provided are the closest I have ever seen and I thank you for that as well!

author: RoGeorge
author_rank: Super Contributor
timestamp: June 19, 2020, 05:53:59 pm
content: Never heard of "astral projection" before, you made me google it. If I got it right, it seems to be some sort of out-of-body awareness/experience when one is awake, not during sleep or lucid dreaming. Never have had anything like that, and never directly met anybody who experienced that. So far seen it only in movies, in tales about certain psychoactive substances, or in tales about near-death experiences.If you find a way to get into that state at will, but without any chemical help, I will be very curious to find out how you did.

author: klassicsam
author_rank: Contributor
timestamp: June 19, 2020, 06:06:20 pm
content: Google Robert Monroe, he has some great books about this. There are a whole lot of forums with people capable of achieving this through meditation.Astral realms are other dimensions of existence just like the physical world except with much higher frequency and way less density.

author: DrG
author_rank: Super Contributor
timestamp: June 19, 2020, 06:06:45 pm
content: *sigh*Not going to touch "astral projection" except to say - try not to hurt yourself or anyone else.Lucid dreaming has been well studied and is not at all some kind of tin-foil hat, whacko, concept (and yes, I have had many lucid dreams).Scientifically, there is plenty of evidence that it exists. Basically (and with TL;DR in mind), you instruct the lucid dreamer to do something specific in the dream - like "look down and to the left" as much as you can. You are measuring eye movements and EEG and you can see an increase in the instructed behavior while dreaming. It is not new.Induction of lucid dreaming, i.e., teaching people to do it or get better at it is another matter.I would suggest you read this reviewhttps://boris.unibe.ch/39251/1/21_LucidDreamInductionReview_23_revised.pdfAgain, nothing mystic, religious, or outlandish behind lucid dreaming. In my original response, I specifically shied away from the idea that it is beneficial. I am not saying that it is....entertaining, yes it can be in my experience. I personally do not see the benefit or the significance of it at all.Good luck.

author: klassicsam
author_rank: Contributor
timestamp: June 19, 2020, 06:12:26 pm
content: I need the REM detection in real time so that I can send a buzz to my finger or a blinking light to my eyes.Also I am a lucid dreamer, I have had a few fully conscious lucid dreams with full colors and feelings such as touching, smelling, emotions and so on. And contrary to what you believe, I believe even people who never lucid dream, can practice and learn how to induce it by training their higher selves to remember the dreams, then by starting to write down the dreams and so on.I like your idea, but it involves many cameras so at least one faces the face of the sleeper.

author: klassicsam
author_rank: Contributor
timestamp: June 19, 2020, 06:18:12 pm
content: The benefit/significance of lucid dreaming/astral projection is totally secondary to this post, on the other hand how to use a device to induce someone to gain consciousness while dreaming, is what this post is about.Certainly not interested in hearing peoples personal beliefs on various things and honestly doesn't matter at all. It is really really really personal for everyone.Thank you!

author: DrG
author_rank: Super Contributor
timestamp: June 19, 2020, 06:36:26 pm
content: Quote from: klassicsam on June 19, 2020, 06:18:12 pmYou are welcome. You sound offended, especially when you say "Certainly not interested in hearing peoples personal beliefs on various things and honestly doesn't matter at all."You have only a few posts and I want you to consider that I took the time to respond to your question and, by your own admission, did so in a manner that contributed to your understanding.While you are not interested in hearing my personal beliefs on the subject, that is one of the many disappointments and injustices in life IOW, tough grit. You did not pay me a consultant fee for me to tell you only what you wanted to hear. Had you simplified your original post to one that said, "I want to build a device so I can experience Astral Projection", I would not have responded at all.Additionally, please understand that although you made the original post, you are not the only one who reads the posts. You have been civil and I appreciate that. If, however, you are not interested in hearing peoples personal beliefs on various things, while you want to learn how to be an astral projectionist, you may need to rethink the whole posting in a public forum thing.Warmest regards.

author: klassicsam
author_rank: Contributor
timestamp: June 19, 2020, 07:05:40 pm
content: While I admit I didn't like your comment here:"*sigh*Not going to touch "astral projection" except to say - try not to hurt yourself or anyone else."I felt there is a hidden message in it that you wanted to kind of bring up but not entirely. Giving me a disapproval of what I am pursuing while showing me the way. I hope you understand what I am trying to say here.I agree with you, these are public forums and I am not the only one benefiting from. I do not reject other views at all, in fact I have learned more from people who object ideas than people who just nod in agreement, however that falls into an entirely different website and forum category and not an electronic hobbyists's one.

author: klassicsam
author_rank: Contributor
timestamp: June 19, 2020, 07:06:22 pm
content: Wow this was great! I didn't know they knew about this that many years ago!

author: greasemonkey
author_rank: Contributor
timestamp: June 20, 2020, 10:52:26 am
content: I want to build one too. I will try to produce an Electrooculogram and analyze it. But it's not a trivial task.Books on the research of sleep/lucid dreams/(astral projections):Matthew Walker -Why We SleepThomas Metzinger -The Ego Tunnel

author: klassicsam
author_rank: Contributor
timestamp: July 01, 2020, 02:43:09 am
content: Did you give it a try yet?

author: rcbuck
author_rank: Frequent Contributor
timestamp: July 01, 2020, 03:42:05 am
content: QuoteI've long had doubts about this. I can go to sleep and be dreaming in 5 minutes. Sometimes I glance at the clock and it says for example 11:00pm. 11:10 my wife will wake me and say the cat wants to eat. (cat is spoiled). But during that 10 minutes I had already started dreaming. Or I wake up at 6:00am, fall back asleep, start dreaming and wake back up at 6:15. Bottom line is I don't believe you have to be in REM sleep to dream. Medical "Pros" say it takes 90 minutes to hit first REM state.