REM Detecting LED Goggle Device Nova Dreamer Wanna Be Thing

lol, if you’re planning to build one, you might wanna buy a couple of those sensors as soon as you can :smile: if they’re gone from that store you’ll have a really nasty time getting them.

i HOPE mine are in by now… ooooh, if they left Michigan on Wednesday they should be here in a week or so I suppose, so in a few days I’ll be able to finish my mask and see how it works. The LEDs are already in, the switch is halfway on, the batteries are connected… all i need to do is mount the electronics on the mask, but that i’ll only be able to do when I get the sensor, so I can know how short to cut the wires and where to place everything…

waits :spinning:

The local electronics store is actually part of a chain called ELFA that has pretty much everything. Im sure they will have it in stock.

By the way I’ll probably try to make my own design with a small AVR microcontroller instead of the PIC. But i won’t have time now i’ll have to wait until the semester is over.

Edit: lol better move to Sweden if you want convinient electronics-shoping :tongue:

yeah, i saw the elfa website and i thought maybe i could order it from there, but i couldn’t figure out if they’d ship overseas… they had some weird thing about the pickup at some store or another, so i just gave up and tried to find it somewhere in north america :smile:

oh well…

:cool_laugh: i got my two samples of the S4810 from Hamamatsu :happy: … I was so excited for the whole day (they were shipped to school cause they wanted a “company” address to deliver to)…

There’s a text on the box that says something about them being excited to send out samples, let them know how they work, blah blah and send them back when you’re done with them :eh: but they were so little i LOST THEM IN A MASK !!! I CAN’T SEND THEM BACK !!! :wink: i mean they’re about 1-2$ so i assume they’re talking about bigger, pricier samples… oh well

it was the last thing missing!!! now i can finish my mask and party on hehehe :happy:

BOOYEAH !

Good luck. I hope it works well for you.

You know, if there is a way to hook a PIC to a USB port for data transfer, you could have advanced functions, such as REM state reports and such. You would probably want some form of solid state memory chip also.

That PIC has 64 bytes of EEPROM which could be used to store some information. One byte for the amount of times it triggered during the night, one for how many times you pushed the RC-button, two bytes for how many seconds you had between two given REM periods and so on. Could be interesting. If i make one i would probably use a smaller chip by Atmel called tiny15, which also has the same amount of EEPROM.

I think you need an USB-interface chip for USB-support. Unless you know enough about USB to program your own routines for sending data directly from the pic.

Yeah, you may need a seperate chip to handle the USB.

I’ve thought up some goals towards the perfect microcontroller-controlled ‘Lucidity Mask’:

  • RC-Button (helps prolong lucidity in FAs)
  • Timer-based trigger
  • REM detection
  • Remembering when the REMs were detected
  • Some method of getting that info into the computer (parallel, serial, usb ports)
  • Ability to recalibrate the system

Does anyone think this could be done with PIC chips?

It sounds like a perfect example of what you can do with a microcontroller. Have you programed in assembler before?

I’ve played around with it once. I know the basic concepts though.

The source for the kvasar mask is written in some high level language called “jal”. Seems easy enough but the source and it’s comments is in swedish. Easy for me to understand and modify, but maybe not for you? :smile:

Most of your features are already coded in it from the looks of the source.

EDIT: I think you missed the link on the other page, look here for more on the kvasar: brindefalk.solarbotics.net/kvasar/kvasar.html

EDIT_2: I just noticed he included a translated version of the source. A good opportunity to brush up on your swedish. :smile:

I found an interesting microcontroller on microchip’s (the guys who made the PIC architecture) site that can handle USB.

PIC16C745

I could code this thing if you wanted, and then you test it out (i dont think i’ll be able to get my hands on the equipment to work with these things until i’m 16)

I am not sure but i think that the C in PIC16C745 means that it is not reprogramable. You can only program it once. The F models are reprogramable (correct me if i’m wrong).

I am going to build a programmer for Atmel AVR:s instead. They are more versatile and a little more expensive. But i figured that i will only buy one for each project i make anyway.

Ohwell, whatever works best for you.

Seriously, I would like to see work on a guide for an advanced dream mask that can be programmed both by buttons on the unit and companion software.

F is flash and C is for some other thing you can reprogram if you can erase the chip with UV or something… i know reading both are reprogramable, but the F is the easy one to do so.

But you’re right, the C ones you usually program once and that’s it…

… i got my project together, all hooked up right but it’s not calibrating. there’s two reasons this may be happening:

1- the chip’s not programmed right … i sometimes get an error message so i don’t know how well it gets programmed even when i don’t get the error…

2- hiding under the blankets in the basement is not enough darkness for the sensor (but that’s a bit weird)

… or maybe i didn’t calibrate the IR led properly, i’ll play with that some more…

meanwhile I e-mailed Bjorn and asked about these things, i hope he’ll reply soon.

I’d try reprogramming the chip (if you can)

I came up with an interesting function for an MCU-controlled Dream Mask:

Remember when LaBerge tested the validity of Lucid Dreaming? And how he used a machine to track eye movements? Well, if the sensors can track eye movements, then you could have the mask continually flasing LEDs until you continuously move your eyes in a pre-determined pattern.

And another one:

A mode called ‘learning mode’ where the mask would just gather data about REM periods without giving cues. Then, the mask could target your cues to your longest REM period. (thus, disabling the need for WBTB!)

The only limits are the sensors you use and the amount of memory in the computer (the PIC).

My first design (if i make one) will aim to have only one basic function (to detect REM and flash) and to be as small as possible.

I’m not even sure if i could sleep with a mask on, even less with one that has hard parts (batteries, sensor mountings etc).

i’m still stuck with my kvasar lol… I didn’t reprogram it since I last posted, but I’ll try doing that tonight. If that doesn’t work my dad said he could help me out by using an oscilloscope and seeing if the ir led works and if the sensor works too… I checked the contacts, there are no short circuits or anything wrong…

One thing I did notice though is the adjustable resistor messing up… It was set to 40 ohm and when i took another measurment it was all the way up to 200 or so… And it didn’t move or anything so i don’t know what happened… I’ll try and buy a new one and see if that does the trick…

it’s fun though, going through all the functions and setting everything up… the mask beeps as it’s supposed to but the leds don’t really work the same way they’re supposed to from the manual…

so i’m thinking either the programming messed up or there’s something wrong with the way i built things.

but when i do the calibration i get two beeps… which is what i should get… but then when i do the test i don’t know what the result means… both leds flash once and then it goes back to the B programming mode…

so i don’t really know what’s wrong…

:smile: the sensor had one pin disconnected… now it works… better… but it has other issues. i did reprogram the pic and verified it a bunch of times with no errors, so i would assume it got programmed right.

but the leds don’t flash when they’re supposed to (ie, when in the manual it says “shows on leds”… well nothing shows there… though the mask beeps right)… and now when i do the calibration, it just doesn’t work anymore.

i’m thinking maybe something else isn’t hooked up right, so i’ll be checking things out more, but this is getting kinda annoying lol…