REM Detecting LED Goggle Device Nova Dreamer Wanna Be Thing

hey dwax :smile: thanks for the tips, i WAS thinking about building a much smaller one if this one works (i’m going out today to buy the parts needed for a small, simple pic programmer), so the hints you gave me are certainly going to come in handy.

i also e-mailed Bjorn Brindefalk and asked him about the com in/com out (he said they’re just for future development if needed) and if anyone was wondering about that big orangy-red component (lower left corner in the electronics picture on his website), it’s just a big push-button :smile: i couldn’t figure out what it was for the life of me.

i got your diagram, so far that takes away a whole bunch of resistors and the capacitor, and if i make the buttons the really small ones i should get a very compact design. I’ll go check the datasheet for the pic and see if i can find anything about that.

from Bjorn’s website, he’s also working on a more compact one.

Thank you very much for your help.

Hi there,

as I said I finished building the mask and all I need now is to program the PIC16F84 microcontroller in order to make the mask work. I had some problem programming the chip using the NTPICPROG program provided on the webpage of EK-projects that brindefalk refers to on his very own homepage. So I contacted the EK-project owners, and they said you definitely need to use another program (IC-prog) to write on PIC16F84 chips of newer date. So my advice woud be to start building the programmer and program the chip before starting building the actual mask. However, Vinz, here are the answers to your questions:

1.) No you have to use either the Sharp sensors ( which are NOT available in Europe, and believe me I chcked every provider in the entire country!) or the Hamamatsu s4810. It is hard enough to build the electronics, so if you have to go trouble-shooting later on you don t want to worry about non ideal parts.

2.) you can use any cheap NPN transistor, e.g. BC107A

3.) use the PIC16F84. Where did you look in order not to find that one. It is so common you should be able to get it everywhere!

MeusOpusMagnus: I piss myself laughing!! I really enjoy having someone to talk to who also started building the kvasar mask, my friend, but, I really want to see you sleeping, having that dinosaur type of monster fitted between your eyes. lol. Ok. I am sorry, as I made a comment before knowing all the background facts in detail: so, how big is your head? lol

However, it is good talking to you people about building that kind of stuff

happy soldering,

tom

:grin: my head is ABSOLUTELY GIGANTIC !!! :happy: hehehe, actually i think my hands are just really small.

anyway, ONE STEP AHEAD OF YOU !!!

old “prototype”, the batteries would go in the big empty space on the board… it fits over the safety goggles, which in the end would be spray painted black, with lining around the edges.

new, SMALLER one… which makes use of those connecting lines on the back of the plate… what you get is less wiring (waaaay less) and a much more compact design :happy:

but see, i didn’t think about that when i started the first one… hey, i’m really new to this… i mean, REALLY :smile: (i honestly don’t even know what a transistor does… yet! )…

this is the two compared… i made the buttons the smaller kind… the electronics are half the size of the old one (without the battery… then again, i don’t wanna know what the old one would have looked like WITH the batteries too :eek: IT’S ALIVE !!!)

BOOOYEAH ! :smile:

I, yes, me, that’s right, I just programmed my PIC with no problems whatsoever… I started building the programmer on Sunday, it was done by Sunday night, but it didn’t work on my PC (running windows XP)… I did some “research” and I found out I had to change some settings and use this special driver. That was Monday.

Today I changed a resistor which was too big and I tried the programmer with the new settings and the driver on my 486 (win 2000). It worked like a charm, I had no issues whatsoever. It wrote the program, it verified OK and it even read it back ok :smile:

All I need is that sensor and I can try out my Kvasar mask (which is also going to become an art project, I’ll present it in a plexyglass case with some information about it and a slide projected on a wall next to it, dealing with the idea of escapism)… Hopefully I’ll get the sensor by next week :smile:

The uJDM programmer is EXTREMELY simple to build, CHEAP and very effective (if you have the right serial port i guess)… To build it I didn’t even follow the diagram on the site, I just looked at the two pictures he posted of the PCB board (both sides are posted) and soldered my parts in the exact same manner… It took about 30 minutes to get everything done. I’ll post pictures soon.

Hey MeusOpusMagnus,

your new device looks great. I am also building the Kvasar device and I am finished alreday except for progamming the PIc16F84 though. I tried several tricks to solve the program including emailing brindefalk and the makers of the Ek project programmer. however, it seams it doesnt work for me and my windows XP. but I found a solution which is sending in my PIC chips to an electronic shop, that will progrma the chip with the correct code for about 3$. I guess thats is a deal.
also, I hop to post some pics of my kvasar soon

Very best wishes,

Thomas

getting it programmed is a really good idea, i didn’t know you could actually do this… i mean, i assumed it could be done by some store, but i never really looked into it.

windows XP is a bit tricky, it needs a driver and you have to use Windows API instead of the IO settings on the software. Also, the voltage in your socket may not be good or the IO delay needs to be played with if you do use IO… I just used this old 486 i have and that works great so i guess you could see if any of your friends has an old computer lying around.

I also e-mailed Bjorn and the guy who wrote the JAL software, asking them both about the programming difference between 16f84 and 16f84a and they both replied the chips are supposed to be 100% compatible.

So i shoved some batteries in my almost finished mask (missing the leds that are attached and the sensor) and I pushed the buttons like described in the manual. I got the right beeps when expected, so it WORKS (so far hehe, i don’t know if the leds flicker and if the sensor will work, but at least i know the button functions all work well)…

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 :smile: ).

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 :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: