MeusOpusMagnus
sounds like you did it. Let us know how it works.
MeusOpusMagnus
sounds like you did it. Let us know how it works.
That’s great that someone already made schematics (and that sensor is available at the local electronics store ).
I glanced at the source for it and it looks like the trick is to calibrate the infra-red LED to the lowes level that is detected when the eyelid is still (this is done with the mask on). Once you have done that the slightest change in the eyelid will probably disrupt the signal temporarly which is detected by the micro controller.
I think the biggest problem will be to build one that’s comfortable enough to sleep with.
lol, if you’re planning to build one, you might wanna buy a couple of those sensors as soon as you can 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
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
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
oh well…
i got my two samples of the S4810 from Hamamatsu … 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 but they were so little i LOST THEM IN A MASK !!! I CAN’T SEND THEM BACK !!! 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
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’:
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?
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.
I found an interesting microcontroller on microchip’s (the guys who made the PIC architecture) site that can handle USB.
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).