Back to the main page: PRE2015_3_Groep4
We can conclude that our final product is a working prototype of the Smart Bedroom we dreamed of in the beginning. Our final product can namely measure the sleep phase of a single person real time, and it can also analyze these data to determine the ideal moment of waking the person up. And when the person is awake, our final product will also pay attention to the feedback the person give. The output has the biggest potential. In our dream scenario, the Smart Bedroom should also control the blinds, temperature and lights in the room. Our test setup shows that the primary user is woken up at the right time. The right time is, according to multiple sources mentioned on this wiki, just after the REM-sleep of the user. After excessive testing, our model is able to recognize the sleep cycle of the user and is also able to determine the right moment to wake the person. When this moment is reached, the program will give an output, able to be used for enabling the robot to turn on the connected outputs. In our case, these outputs are sound from the laptop, and a lamp connected to an Arduino. These outputs do not instantly activate fully but become more prevalent as time goes on, so that you are not woken instantly, but wake up more naturally. This is all to ensure the person using the device will wake up more consistently and less tired. When the person is less tired because of a good night sleep, the user will perform better in objectives, and has more free time for social activities.
The product we have currently is able to improve further. Examples of future improvements include: full integration in a bedroom. The Smart Bedroom will be able to control the blinds, temperature of the bedroom and the already present lighting. The Smart Bedroom would also be able to work for multiple people sleeping in the same room. Now it is not 100 percent sure if our product would work in that case since the multiple people might interfere with the data obtained. Thus, the wake-up moment cannot be accurately calculated. The product will still activate within the given time frame, so the alarm will function with multiple people.
Another thing to mention is the fact that in our case, the product consists of an Arduino with sensors, a laptop for logging and an Arduino for output. Our intent was to have as much of the program running on the Arduino itself. That means that you, in theory, would be able to have the Arduino as a standalone product. In our case, that would mean you start the program from your computer, and then would be able to unplug your Arduino since it is able to run the whole code by itself. This was however not possible because of multiple reasons. One of the reasons discussed here is saving the gathered data to read it.
For a more accurate calculation of the wake-up moment, as many measurements as able should be saved. The problem is the size of the information, and saving that information on the Arduino. The used Arduino (Arduino Mega) has up to 256 KB of storage. Not all of this can be used since a lot would already be taken up by the program itself, and 8 KB for the bootloader. If we then want to review the last 30 minutes to choose the best moment to wake up (the larger the reviewed period, the more accurate the decision), the sample time has to be reduced dramatically. Reducing the sample time results in an inaccurate measurement, leading to the program not able to choose the correct moment to wake the person. For this reason, we chose to keep the laptop in the loop for this prototype, since a laptop has more than enough storage to store samples of the whole night. In our tests, the files containing all the measurements had a size of ~130 MB.
So, the data will be stored on the computer. This will be done with the aid of the program Gobetwino . This program logged the data in a .txt file. And this file can (while Gobetwino is still logging) be further processed in Matlab.
In the beginning of the project, it was difficult to start. The assignment was namely totally open. During the first meetings, we had search for general information about our subject. But then, we had to decide what we want to make as the final product. First, we wanted to make a simulation. But this idea was very vague for us. But after working on the simulation for a whole week, we had another idea. We could also make a final product which measured the sleep phase real time. This final product had to wake the person at the ideal moment by analyzing the gathered data.
So we collect the needed stuff to measure and analyze the sound during the sleep. When all the stuff was collected, we started by creating an algorithm which can measure the sound during your sleep and can calculate the sleep graph out of this data. This part of the project went very fast. But when this part was finished, the test phase was started. This phase was much more difficult. This, because we had some problems with measuring a complete night. Also, the output of the algorithm was more work as we aspected. There was namely confusion about the way we could play music on the Arduino. Finally, it could be done on the computer.
With every script made to stand alone, the hardest part started: combine all made scripts. This was not as easy as we thought, but with some changes and a lot of testing, all scripts were working together.
The most important things we have learned as a group is how to make a project which is very open and that we have to think really hard what we want to make as the final product in the beginning. We lost a lot of time by switching after a few weeks. Some things we learned individually are for example using MatLab, programming of an Arduino and a manner to sleep better.
- ↑ The Arduino Mega, https://www.arduino.cc/en/Main/ArduinoBoardMega2560
- ↑ Gobetwino, http://mikmo.dk/gobetwino.html