maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   REM-aware alarm clock (https://talk.maemo.org/showthread.php?t=23831)

baksiidaa 2008-09-23 20:04

REM-aware alarm clock
 
I read an article recently (I can't remember where, unfortunately) about an alarm clock that works with a wireless wristband accelerometer. You set a 1/2-hour window for the alarm to go off, and when it first senses movement during that window it sounds the alarm. The idea is that it's easier to wake up if you aren't in a deep sleep, and you don't move when you're in a deep sleep.
I think this is a great idea, but I don't want to shell out the money for the clock when my N800 should be capable of doing the same thing, as long as I can find a suitable accelerometer. Is anyone interested in this? Any ideas for a bluetooth accelerometer? I suppose you could strap a Wii-mote to your wrist, but that seems a bit big :D.

gemniii42 2008-09-23 20:18

Re: REM-aware alarm clock
 
Great idea!
However I rarely use an alarm clock, and my wife is motionless for hours :(

baksiidaa 2008-09-23 20:26

Re: REM-aware alarm clock
 
I found plans/schematics for a small bluetooth accelerometer here: http://www-static.cc.gatech.edu/gvu/...sources/btacc/. I might look into making this and trying it out.

pope523 2008-09-23 21:32

Re: REM-aware alarm clock
 
Lifehacker had a story today about an app for a Nokia mobile phone that uses the microphone to estimate your sleep cycles and do just what you're describing (but based on sound data rather than movement data). It's called HappyWakeUp.

It would be groovy if someone make it work on the N800, since my N800 sits on the night stand next to the bed anyway.

Joe

baksiidaa 2008-09-23 22:50

Re: REM-aware alarm clock
 
Quote:

Originally Posted by pope523 (Post 226704)
Lifehacker had a story today about an app for a Nokia mobile phone that uses the microphone to estimate your sleep cycles and do just what you're describing (but based on sound data rather than movement data). It's called HappyWakeUp.

It would be groovy if someone make it work on the N800, since my N800 sits on the night stand next to the bed anyway.

Joe

Are you sure it was on Lifehacker? I can't seem to find the story you're referencing. Sounds like a good idea, but only if you're the only one in the bedroom.

pope523 2008-09-23 23:11

Re: REM-aware alarm clock
 
Maybe it wasn't Lifehacker. It could have been Slashdot or something else.

Here's the article that it linked to, in any case.

http://blogs.computerworld.com/cell_...s_to_you_sleep

Texrat 2008-09-24 02:22

Re: REM-aware alarm clock
 
Quote:

Originally Posted by gemniii42 (Post 226684)
Great idea!
However I rarely use an alarm clock, and my wife is motionless for hours :(

Arg... you just fed me a great line for a joke but I already misfired once... :o

Vadi 2009-02-12 04:37

Re: REM-aware alarm clock
 
Guys, any news about this topic? I'm seriously thinking about writing python script for this purpose... there is easy project for maemo - giving you high level manipulation interface for multimedia. So, theoretically, you can monitor sound level from N800/N810 microphone and log it somewhere, or trigger alarm in a time window, like HappyWakeUp does.

But even thought maemo's easy package is under GPL 2.1 license, I couldn't find any source codes of it. And it gives you API for writing sound to disk, not to analyze it at the same time... May be there are other programs, packages that can do that?

Rassilon7 2009-02-12 04:58

Re: REM-aware alarm clock
 
Quote:

Originally Posted by Texrat (Post 226756)
Arg... you just fed me a great line for a joke but I already misfired once... :o

I used to have that problem too...

jolouis 2009-02-12 14:35

Re: REM-aware alarm clock
 
Two points:

First off, rather than trying to build another clock/alarm wake up program, I suggest working out this feature and then contributing it towards ciroip's awesome FlipClock app (it's written in Python so adding extra stuff isn't very hard); I think he's still working on it, though he swears about once a day that he's not a programmer and is playing around with it more than anything else. Still a good app though with lots of room for additions/enhancements.
Secondly, as far as audio checks go, I built an app in C that reads the input level of the microphone and can perform tasks based on what that level is (i.e. how much noise the mic pics up), but it's based on alsa libraries and I don't remember if Maemo actually utilizes Alsa or not... I know there's some old ESD implementation, but I don't know if ALSA is underlying that, or? Of course if there was a way to do it from python itself that might be a better solution, but I'm not a big python guy... programmer, yes, python, not so familiar with it.

ciroip 2009-02-14 23:54

Re: REM-aware alarm clock
 
Quote:

Originally Posted by pope523 (Post 226704)
Lifehacker had a story today about an app for a Nokia mobile phone that uses the microphone to estimate your sleep cycles and do just what you're describing (but based on sound data rather than movement data). It's called HappyWakeUp.

It would be groovy if someone make it work on the N800, since my N800 sits on the night stand next to the bed anyway.

Joe

making the tablet during charging time was one of the reason why I began working on the clock; in some of the previous version was present a couple of graphs with the battery and the light levels (then removed because to have access at that infos I always used weird os calls and godly permissions) but everything should be pretty ready for having some data to visualize, study or store. the Pygame lib (that the clock use for the graphics) have some sound support (that i prefered not use in the clock because was damn heavy on the cpu) that can be use for a specific application (but I should check if can access the tablet mic). Ill take a look because I need to fill a bit of empty space when the application dont run fullscreen.

@jolouis
-he swears about once a day that he's not a programmer-
many time a day: I know my limits :)
In case you'll have some result with that c app we should try to find a way to visualize something: just give me some numbers

Iikkuli 2010-09-26 10:10

Re: REM-aware alarm clock
 
I read somewhere about an app for iphone which had the same thing; monitoring your state of sleep and wakes you up when it is the best time to do that. Instead of a wristband accelometer or a mic you put your phone under your mattress and it senses your movement with its accelometers.

It would be cool if someone developed an app for maemo like this :)

niccolo 2010-09-26 17:11

Re: REM-aware alarm clock
 
During REM sleep the body does not move (only rapid eye movement -hence the term) -in fact the body is paralyzed and prevented from moving (this stops you acting out your vivid dreams which occur during this phase of sleep). It is during non-REM sleep that the body can move (and does so roughly every 20 mins or so for postural adjustment so you don't get bed sores). This is the deepest phase of sleep. The only reliable way to tell REM and non-REM sleep is to have scalp electrodes that pick up the very different patterns of brain waves associated with these two states of sleep. So monitoring movement will not give you a REM-aware alarm clock I'm sorry to say. If you used a bluetooth link to a device that could measure your brain waves, then you would get somewhere...

ossipena 2010-09-26 17:30

Re: REM-aware alarm clock
 
actually those apps aren't working very well. you can get approximately same results when you choose timeframe and let the app wake you up at random time.

there is no real way for the phone to figure in which phase of sleep you are into. don't know about bt heartbeat stuff but without it there is no difference between accelometer/mic data and using /dev/random

tomaszrybak 2010-09-29 20:42

Re: REM-aware alarm clock
 
New version of Sleep Analyser allows for setting alarm time and sets alarm when it detects your movement:
http://maemo.org/downloads/product/M...sleepanalyser/


All times are GMT. The time now is 23:22.

vBulletin® Version 3.8.8