Takes too much effort. I was hoping for a summary! :D
Printable View
Takes too much effort. I was hoping for a summary! :D
[quote]Takes too much effort. I was hoping for a summary! :D
We're making a cheaper and more useful Nova Dreamer with different technologies
[quote]or tring to, for now ;) It seems the parts only got shipped today, so the estimated shipping date is now the 7th (did i already say that?). On the site they said the items were shipped in full a day after i placed the order, but the shipping date was the 2nd... and the estimated delivery date the 7th... it's just weird.Quote:
Takes too much effort. I was hoping for a summary! :D
We're making a cheaper and more useful Nova Dreamer with different technologies
i just found out yesterday the makers of GSR2 are from montreal, and not that far away from me. I'll go stare through their window, see if i can steal some technology ;) actually, i'll just call them and ask them about their pricing, the internet retailers must make lots of money with these producs, but i'm pretty sure they're sold to them for a lot cheaper.
either that, or i'll go stare blankly at their store, out in the cold, until they take pity on me and give me some stuff OR get angry at me and start throwing their products at me so i go away.
Sounds good to me... so when do you start on that :DQuote:
Originally posted by MeusOpusMagnus
either that, or i'll go stare blankly at their store, out in the cold, until they take pity on me and give me some stuff OR get angry at me and start throwing their products at me so i go away.
i would have started the staring today, full time... but they don't have a store per-se... it's more of a warehouse... :D
but i called them... it's 75$ canadian for the GSR2, no shipping (since i pick it up) and i guess i'd have to pay the taxes, which takes it to about 85 or so... which is roughly 60$ american, or what you pay for it when you buy it online (though i save on the shipping)...
it's tempting... but i have no money right now AND i'm hoping the one we're going to build will do the trick quite nicely... for a whole lot cheaper. But if all fails, i'll probably buy it and we can figure out how it works, steal a bit from the technology, change some stuff here and there (so that we can't get sued lol) and make "our own" version... we could build on it for the REM detection and light machine/motor and everything else, rather than starting from zero...
bah, i'll just wait for my parts, then we'll see.
I'll try to find a window to their warehouse :cry: ... and i'll pick a cold cold day... ;)
really weird, but whatever hehe. I got the two parts today, so i'll be reading up on the way it works and i'll see if i can hook up the old gsr amp i built to this... it shouldn't be too complicated.
i also found this on the net: http://www.pbs.org/saf/1310/teaching/teach.pdf
it's a silly classroom (teaching kids to be afraid of the media in a pretty chaotic way) but it shows how to build a very very simple temperature meter like the one in the gsr2/temp package (kinda).
Well, thats an alternative approach - it's not strictly GSR
If we go for temperature, that should be easy enough ;)
I could probably rig that up myself :P
well, you'd still have to get it into the computer somehow (unless you have a multimeter that has a serial connection) so it's basically the same project as the GSR we're trying to build (which I redesigned from scratch with my dad). I'm going to the library today, to pick up a book on electrodermal equipment, it seems they might have a schema that explains how a GSR should be built.
We have a trimmer through, it's pretty hard to make it self calibrating if you want it to be precise (considering GSR changes from person to person) so you'd have to turn this little knob until a red light goes on (and then off as the gsr value will change again)... this way you'll know the device is calibrated in your range.
The only thing i need to find out is just how much the value will change, because right now we have a maximum amplitude of some 6-7000 Hz for the sound (which is plenty), but we might only use 500 (for instance) if the GSR fluctuates just a little. Once i figure that out, we'll know if we need to amplify the voltage so that we get a wider range (a few thousand hertz) or not.
It's really not very hard to build, we just have to make sure the design itself is accurate enough to measure GSR half-decently (we don't need extreme precision, but it can't be way off either).
I'll see what that book gives me :)
(how hard is it to figure out the sound frequency on the computer from the microphone jack or the line in ? would it be hard to write a small program that shows you on screen the value of the sound imput in hertz ? kinda like a small window with a number on it that changes in real time ? this would be the first step towards the gsr monitor (the next being plotting the value you get every x seconds) and wold help in figuring out the frequency range i'm getting. )
Good question, I haven't really thought about it.
It can't be too hard however ;)
I'll get on it as soon as possible
Okay, imagine I'm a layman. ...What are you actually trying to build? And why? :P
For the time being, we are building a device that measures skin conductivity and/or temperature and/or pulse.
This data will be pumped into a computer, and plotted over time.
Do this when you go to sleep, and bam, you have a recording of your sleep cycle responses, and should be able to see the various stages of your sleep including REM.
Then we change the computer program to detect REM while you're asleep, and to output a signal to either (1) power a vibration motor in your hand or (2) flash LED's in your eyes.
Learn to do a reality check when you feel a funny feeling in your hand, or see a funny pattern of light - and you're lucid
This is useful for:
1) Research of sleep, and lucid dreaming
2) Inducing lucid dreams
Eventually we hope to turn it into a wireless device - but we're not sure how yet.
Really cool!
I do not like too much having the device hooked in a computer. I prefer the novadreamer approach (just one device, no computer, etc).
But, if it's a way to go, go for it. If a can help in some ways, please tell me. I do not write applications anymore but could be a very good beta-tester :D
the device could probably go wireless very easily using a PIC microprocessor... the trick though is seeing how GSR actually changes during REM... if it's the frequency in rise and fall, we'd measure distance between peaks and signal REM... if it's a matter of the value in GSR, we measure that and signal REM accordingly... but this is what we're trying to figure out first and foremost, how we can use a simple (and reliable) REM detection that doesn't need calibration.
Turning it wireless shouldn't be TOO hard... we skip the voltage to frequency part, we skip the computer connectivity and we shove the voltage (with minor modifications probably) straight into a PIC. IF however we still want the computer (which would allow for many benefits, such as biofeedback, light machine, etc) we'd have to figure out a way to either make the sound wireless (through a wireless earphone port probably) or... something else...
For now, we're taking the baby steps ;)
And speaking of baby steps, i took two books out of the library that show me how to build medical-grade GSR's (the ones that sell for muy muy expensive)... Of course, they only cost some... 10$ to build, at most. The tough part to build though is the sensors... Not that it's that hard, but because you need to use silver for the probes. Of course, we don't need THAT much accuracy (and either ways we're not measuring the GSR per-se, though we'll get a pretty close value if we do the math... we're measuring the fluctuations in GSR.)...
So, all this to say two things:
1) I have a pretty good idea of how to build a good and reliable GSR amp, do the proper math and actually know the values in ohm of the skin resistance (from the frequency)... This will be computer math mostly, but at least i have a good understanding of how the computer math will be done... which i'll basically explain once i finish the device and I make sure the values I'll be passing on won't be theoretical only... All i need now is a way to figure out how to build a 32 khz (i think it was) oscillator for the frequency calibration hehe.
k... and the second point:
2) One of the books explains how to make sensors, what the good size for sensors is, where to place them, etc.. I'll scan the instructions (along with the important GSR schematics) and we can follow those instructions for the sensors, using something else instead of silver. (maybe when i build the sensors we'll be using, I can simply draw instructions to build them the way I did)...
So, the books I'm now recommending for electrodermal anything are
"Techniques in Psychophysiology" and "Electrodermal Activity in Psychological Research"... Both of which contain instructions for building a GSR and information on building the probes, like diameter of contact and issues to consider.
... just wanted to report on the daily development I guess ;) :D we're getting real close... just like before lol, but i think this time we won't have problems with things I don't know anything about (ie I2C and HEX values and addresses) so we can't possibly get stuck... I hope hehe. Wow, I actually UNDERSTAND all of the electronics involved now, which is considerable progress I suppose....
Congratulations again!
When I said about that I don't like the device connected to a computer, I said "connected at all. I thing that just the device alone, by itself. You can carry in everywhere, do not have to bring a computer with you, the entry barrier ($, etc) is lower, etc... And I can put it in my pocket and use it, for exemple, in a hick in the mountains. Just the device, as simples as that.
But yes, I understand the value of a computer controlled device. The device can have only the detectors and the computers are "almost" everywhere (ubiquitous).
As I said before, If I can help, just drop a note!
Ho, and I forgot. What's a GSR??
we'll see about the stand alone unit once we get there :) the ideal case i think would be to have a microcontroller operate the device, with enough flash memory to record some significant data... then you could use it in the mountains, but if you'd still like to see a graph of your night's sleep, you could plug it into the computer, do the transfer of data and see it on screen... kinda like the super nova dreamer i suppose... or maybe the real time computer connectivity would be switchable, on and off... if you just want rem detection you wouldn't get all the fancy data, but i you happen to have your computer around, you can push a button and make the connection happen... but we're still pretty far away from there... and the GSR is the reason why hehe.
GSR (galvanic skin response) is an old (and aparently out of date since the 70's or so?) term wich refers to the electrical activity on your skin (the skin itself acting as a series of resistors)... To clear up some of the confusion, the proper terminology is now electrodermal response, which can split into several types of response... you can have SCL (skin conductivity level) or SCR (skin conductivity response, which is the change in conductivity level)... or SRL (skin resistance level) and SRR (skin resistance response)... and so on... GSR used to refer to the SRL and SRR, since it measures the resistance of skin.
What we're building is something that measures the resistance level, since it's of higher value... at the same time, the resistance level is a function of the conductivity of the skin, so by knowing the resistance and knowing how much electricity you run across the surface of the skin (0.5V) you can figure out the conductivity as well... So with one pretty sensitive unit, you can figure out both... The reason is because, apparently, during REM sleep, electrodermal activity is different than at any other time of day. For now, we're just trying to figure out HOW it's different and how this change can be used to detect REM...
"EDA consistently
decreases during the six minutes preceding a REM period and can be used to detect
REM-phase onset (Koumans, Tursky, & Solomon, 1968). An early study by Broughton,
Poire, and Tassinari (1965) found that when EDA does occur in REM sleep, it is often
accompanied by bursts of eye movement activity (REM)."
From what I read, there is also a lot more electrodermal activity in deep sleep, which then drops significantly when you enter REM... We're hoping this drop will be enough for us to detect REM.
The problem of course is that they don't say WHAT exactly changes... which goes back to measuring distance between peaks or amplitude of response... but this we'll figure out when the time comes... For now we just need a somewhat reliable "GSR" unit...
Which brings me back to the new design. We'll have to use a trimmer pot (it will appear as a tuning knob outside the box for now) in oder to center the signal for each individual... I'm combining the design from the wireless GSR that I posted earlier (with the operational amplifier) with the design that splits voltage across a resistor and your skin. The trimmer pot will be used to change the resistance of the resistor that's in series with your skin, so that if your skin for instance has a natural level of around 200Kohm it won't show on the graph very high up as opposed to someone who's resistance level is... sat 30kohm, which would show up very low on the graph.
This is simply to calibrate the software easily. If the fluctuations in skin resistance are about 25kohm, then the range of the graph should have to be say... 50 kohm at max, instead of 250 kohm... and to determine the 0 or the middle value you'd have to do a quick calibration till a LED light goes on (which is simple, you just turn until you turn a led on and that's basically it, you start monitoring).
If we skip this, then the graph would have to have a variable range, and i don't know how practical that is with the programming (a variable range in a graph would be awesome nonetheless, because you'd be able to zoom in and pick up small fluctuations as well as big ones).
But for now we'll have to have the trimmer pot (it's possible to just take it out and replace it with a set resistor, but it wouldn't be as precise and it would complicate the programming i think)
I'm hoping this weekend I'll be able to start working on the hardware. We'll switch to a 9V battery (we have to get a 3V or a 5V for the voltage to frequency part, and i thought instead of 3 AAA for 3V we might as well go for one 9V and reduce it to 5V)... I have most of the parts (except for a few for the oscillator clock, which I hope I can get soon)...
And yeah, if Placebo can get a small program to show up sound frequency on screen, that would be great.
And Cerebusdreamer, do you know stuff about either programming or electronics ? given a schematic, would you be able to build your own device or have someone help you build it ? As soon as I get the first two done (one for me and one for placebo so he can do the software) and I know they work (in that I can see a fluctuation in frequency on screen) I'll draw up schematics and plans of construction for both the device and the sensors. (that's another thing, it would be nice if the sensors would have jacks so you can plug them in, rather than have them stuck to the unit... this way you'd be able to change the sensors when they wear out without having to open it and unsodder or cut wires, etc)... Hmmmm hehe yet another idea. I'll try to find simple jacks as well then. Headphone jacks or something would work (this of course would be optional)
... what is it with me and long posts? I guess I'm just overly excited about most things most of the time...
Yes, for sure! After you guys pass the very earlier stages and have something that do something :-) I'd like to build my one and help debuging and suggests improvements!Quote:
And Cerebusdreamer, do you know stuff about either programming or electronics ? given a schematic, would you be able to build your own device or have someone help you build it ? [/b]
Great! :D
About the trimmer pot ... another alternative is to have the software mark the point at which you are awake, and plot the change. When the resistance returns near waking levels, then we are either (1) dreaming or (2) awake.
Advantage: no variable pots
Disadvantage: it can trigger after you've woken
Just a thought.
PS - if you run into problems with the amount of power for vibration (eg), you can use a cap to charge up before activating the motor. Also just a thought :)
After some research, it turns out that it's a bit of a pain to determine the frequency on the sound card.
But I found some source code, and here's the binary (EXE)
I haven't had the time to change it so it displays a single value, but the graph may give you some pointers if you need it soon :)
Tomorrow I can have a closer look. I suspect it uses waveIn functions, and buffers the data
PS: More info on the program = http://www.relisoft.com/freeware/freq.html
Hmm ok. Now that I have the program figured out, and I'm logging values, plotting them on a history graph..... I'm confused about what I'm meant to be plotting. Frequency probably isn't it.
You're gonna plug pure analog values across through the line in/mic ... right?
That means I should be measuring average intensity of values. I think. After all, those values are technically 'voltages'
My head hurts :P
Someone clear it up for me :D
[EDIT]
Okay, I hit the books, and now understand the whole thing quite a bit better.
From what I can understand, you're just gonna stick the analog straight into the sound card. That's going to change the samples individually which means I need to examine the amplitude of each sample.
If I record a reading every eg. 1 second, perhaps I should average it out over that second. That's quite a lot of samples :
Otherwise, if any value is reliable enough, I can simply read a sample when I feel like it, and trust it to be true... right ?
I can always try both, with options. And give you the program like that :)
I'll finish a pre-beta test version by about tomorrow probably
Other than displaying and logging to file the obvious values of eg. current amplitude, etc, it'll display the waveform, the fast fourier transform and a chart of amplitudes over time which auto scales to fit. (eg. 6 hours or 1 minute will both fit the full size of the chart).
The latter one is the one I created and is most useful visual for our purposes. Over a night of sleep, it will ideally look like a sleep phase chart (with the different sleep stages causing the amplitude to rise and fall).
And of course, the log file will be useful too - mainly because it will be in CSV format and importable into Excel ... to be manipulated and charted all we like.
At least we're getting somewhere! I'm excited :D
wow!!!!
i mean WOW !!! hehehe, that program looks so cool, if we get ours to use the bottom display i'll be a very happy kid. You're doing amazing in figuring these things out, and at this point, you're running ahead hehe.
as for the values, yes, you're plotting frequency versus time: what i'm doing is taking the voltage across the skin which gives me the resistance of the skin. this voltage goes into an operational amplifier which compares the "answer" to a standard 0.5V, makes the difference (0.5-0.47 for instance) and it then amplifies the answer by 100 or 1000 times (this i have to figure out). So what you get is a value that shows the difference between 0.5 and skin current. The higher this difference, the higher the frequency amplitude... the smaller the difference, the lower the amplitude. By doing the necessary math we can convert this back into the resistance of the skin and have a scale on the side of the screen going from whatever kohm to whatever else... But you don't have to figure out the value of the resistance for each frequency value, you're just plotting the frequency amplitude. You could plot averages though, if for one second you take the average value rather than the one point at the beginning of the second, it would certainly be a lot more precise, i just don't know how hard it is to do. For the data recording, i think taking samples ever x seconds is a good idea too, you could make that a variable and allow the user to punch in the settings (for 20 min sessions you could go with a smaller value, for 8 hours you'd use a larger value).
The trimmer was going to be used to center the signal to 0, but if you can do it automaticlly (AND the autoscaling :shock: ) then you're a god and we don't need any trimmers... For people with less amplitude, you can just "zoom in" to see the details. I'll still have to use a trimmer in my design to figure out what the optimal value of the resistor would be (i'll take measurments on my family and whoever else is willing) but it won't be necessary for everyone.
Ok, so I really have to build this thing faster (it's taking a bit longer because i had a few other things come my way and i'm also trying to find some of the components)...
This is the plan so far:
http://www.thrice-blessed.com/gsrplan.jpg
(once i build it i'll provide a complete list of parts and i'll draw a schematic that shows you which pin goes where and what the parts actually look like)
it uses a 9V battery... We can either use voltage regulators for the 1V and 5V values, or we can go with a zener/resistor combo (which is what i'll be doing cause voltage regulators are pretty hard to find around here, especially below 5V... i have no idea why). Once i get that in, i'll update the schematic. Also, the oscillator part is still lagging behind, i don't know where i can find the crystals i need or if there are easier alternatives... I have an very good operational amplifier that has filters and amplification built in (from aircraft boards), I'd love to use it, but i don't know how available it is... so this is why it's taking a bit more time.
for the probes, i'll look for simple plug in connectors, but this is optional. As a general (and important rule) the surface contact of each probe should be 0.125 cm square, that's about 0.3 by 0.4 cm. From there on, construction is optional, whatever goes with the way you work. I'm going to punch holes in electrical tape and stick it to a small sheet of conductive metal. This way, the only part of the metal touching the skin is the one that shows through the hole. I'll use velcro to make them tight (you don't want them TOO tight on your fingers lol) and relatively long wires.
this is getting really exciting... :D :mrgreen:
here we go... the beta version of the design, i'll buy the missing parts by wednesday (and i'll hopefully get most of it done wednesday) and by the weekend i hope i'll have the values for the trimmer pots so i can replace them with simple resistors.
if all goes well, by the end of the weekend i should have an updated schematic and one finished unit. and if all goes great, i'll have the second unit (without trimmers) as well.
http://www.thrice-blessed.com/gsrplan2.jpg
the 32kHz crystal needs to use 1uW. It takes a bit of research into the component schematics to build after this design, so I hope with the simplified one (i'll just draw the components and number the pins and show how to connect them) it will become easier to read, it's not as complicated as it looks.
:) i just downloaded a pcb making software, so i'll try make a pcb for the design. should be cool
Sounds good.. getting there :)
I need some clarification on this.... is it the frequency AMPLITUDE, or the FREQUENCY?
In other words, if you stuck that jack from the device into a oscilloscope, would you get a sine wave? or a straight line?
See.. if I have to decode the frequency, that's a lot more complex. Thankfully not impossible since I already have some free sourcecode to determine the fourier transforms (its like a multi-dimensional map of the frequencies)
Let me try explain it another way: the digitiser in the soundcard works by taking voltage readings, and converting it to a positive or negative number. I then read all those values (called samples).
If you open sound recorder in windows - that green line is the samples I'll see.
If you record yourself singing a note, you'll see that they form a sine wave with negative and positive values
So ... are you going to be providing a sine wave note, with frequency? Or simply an amplitude value on the samples.
Is that line in sound recorder going to be dead straight, or form a wave?
Another problem. If you are giving me amplitudes only, I have to determine how the negative values work. Hopefully you will end up giving me only positive values :P
For the time being, my amplitude chart is using the average absolute amplitude of the samples, averaged out over each second, and distance between each point of the chart. So if you are giving me a nice sine wave, I don't think it's going to work :)
When I get some time, I'm going to try convert the sourcecode to Borland C++ 4. I have a free compiler from them. That way it's both legal, and much faster to develop in. The disadvantage is that Borland pisses me off from time to time :
yeah, sorry, my bad...
when i said frequency amplitude (which is kinda stupid) i meant really the value of the frequency and not the amplitude of the sound.
so, to simplify: you'll be getting only positive values of a hissy noise (i think) of various frequencies of the same amplitude (amplitude being volume). What you have is good. You basically plot the value of the frequency in kHz over time.
I hope this makes it clearer...
You're using an analogue to frequency chip right?
In that case, it actually complicates things - I don't have it right ;)
I'll have to make a moving average of the average frequency.
Let me explain, a sine wave looking sample like this....
http://www.relisoft.com/Science/Physics/images/sine.gif
... is a frequency.
I read it in, in a format like this:
http://www.relisoft.com/Science/Phys.../resonance.gif
I get each sample (point along sine wave) individually as a positive or negative number. Which means I have no clue what frequency it is just an individual value.
Only by analysing the whole damn thing do I know it's a frequency
In comparison, a flat line is not a frequency, but an amplitude of constant strength.
I was hoping for the latter, but from what my co-workers say it sounds like I'll be getting a frequency
I can probably work around it, but as a system it's not a good idea ;)
Way too much processing and instability in the decoding.
We have to consider an alternative at some point. My co-workers highly recommend a A to D converter and a UART (to serial port)
The sound version might be okay for now though... :