I dont want to buy a smartphone for smart alarm & I want to analyze statistics.

http://sport.com/smart_alarm_clock.html

I want to build an Arduino - based circuit to track moments then I move around in the bed a lot (REM) and build statistics, so I can later set an alarm clock to this time. (use an accelerometer, maybe a microphone)

I want to analyze this statistic on my PC. I don't know how to program a computer, only Arduino. I can learn, but what? I would like to use M$ Excel.

I am not sure to what extent I should hand this task over to a computer. I want to keep the computer off when I sleep, but play with data and define perfect alarm time when I want. How should I solve this problem?

Thank you. --Vladimir.

  1. You need at least a real time clock for your Arduino for tracking time
  2. What sensor do you have in mind for the movements? Have you investigated how professional sleep investigators work?
  3. Think you need an SD card for logging. Write records Excel can read CSV files.

A number of acceleration sensors tied to the blanket/ pillow might do the job…

your program will be a simple endless loop, calling a few functions that do the low level work.

void loop()
{
  do_measurements (time, sensor1, sensor2 , ....);
  write_to_disk (time, sensor1, sensor2 , ....);
  if (check_sensors(ALARMLEVEL))
  {
     start_alarm();
  }
}