8 All of the sensors we have implemented are accessed via the Tmotes external ADC ports. They return a voltage that can be converted into the speciﬁed units for the type of data the sensor collects. This conversion is performed in the base station in order to keep the mote software simple, so that the formula’s can be modiﬁed as necessary. The base implements a queue for the sensor data it receives in order to process them eﬃciently and without worry of losing data. After the threshold limit for the queue has been reached, the base program dequeues the data, averages each reading, and sends it to the server. Since the sensor nodes send in data twice a second, an optimal threshold limit is 120 data packets, or one minute’s worth of data. One minute is enough time to average out any sensor hiccups and also a small enough time span in which graphs and analysis can have ﬁne grain data control. Larger limits can be used as well, and we will have to do more research to ﬁnd the optimal limits for diﬀerent sensor types. The server side programming is currently implemented with a PHP ﬁle. The base posts the sensor data to the website, and the server then stores the data in a ﬂat ﬁle xml system. When the site is accessed by the user in a browser, the sensor data collected over the last hour is displayed. The completed system will have authentication by the base and user account for each individual user. They will be able to login to the website and view statistics for the last day, month, or even year. The website will be the user’s primary means for accessing analysis of the data and doctor’s recommendations, and the data will also be sent to the base for easier display. 7. EVALUATION To help us evaluate the idea of a home-based sleep mon- itoring system and continuous information gathering, we took a survey of 20 participants. Our survey conﬁrmed the statement that a home-based system is a better alternative for many people than an overnight sleep center. Figure 5 details the results of our survey, where the subjects were asked if how likely they were to seek professional opinion, if they suspected they had a minor or major sleeping disorder, and then how likely they would go to a sleep center or stay at home for a diagnosis. The results show that the participants were 10% more likely to receive home monitoring than go to a sleep center if they suspected they had a major sleeping disorder. The diﬀerence increased dramatically when a minor sleeping disorder was concerned: home monitoring was favored 29% more than a sleep center. Our survey also showed that the participants were twice as likely to seek professional opinion if they suspected they had a major sleeping disorder rather than a minor sleeping disorder. Finally, in a question where participants were asked outright which they would prefer, only 10% chose the sleeping center, versus 75% who would prefer to have the monitoring done at home. Figure 6 shows the distribution of participants who would prefer at home diagnosis or a sleep center. The majority of the participants would prefer to be monitored at home, which could be due to several reasons, including increased comfort and convenience. This survey International Journal of Telemedicine and Applications data conﬁrms that there is a large need for inexpensive, easy to use home sleep monitoring. Also, over 70% of the participants said they would be willing to enter data throughout the course of the day if it were convenient and helped the diagnosis of a sleep disorder. Although this ﬁgure is favorable, it could be higher, which means a prototype system must be very convenient and easy to use. Another possibility is that the user is asked a short series of questions once or twice per day, which would cut down on the number of times a user has to remember to interact with the system. Finally, the participants were asked whether they have, suspect they have, are unsure, or do indeed have a sleeping disorder, the results of which are shown in Figure 7. Even from this small sample of participants, it is clear that there is a need for a simple, at-home sleep monitoring solution because around 40% of participants were unsure whether or not they have a sleeping disorder. If disorders were easier to diagnose, that number would be much lower. 8. RELATED WORKS Many projects are underway that focus on general health monitoring. A long term monitoring system known as Terva [8] has been implemented to collect critical health data such as blood pressure, temperature, sleeping conditions, and weight. The problem with Terva is that although it is self contained, it is housed in a casing about the size of a suitcase, which seriously dampers mobility. As a result, Terva is only practical inside the home. IST VIVAGO is a system used to remotely monitor activity and generate alarms based on received data [9]. In contrast with Terva, our system is small and completely wireless, allowing it to easily adapt to new situations. Another system, wireless wellness monitor (WWM), is builtspeciﬁcally to manage obesity [10]. The system has measuring devices, mobile terminals (handheld devices), and a base station home server with a database. It uses Bluetooth and Jini network technology and everything is connected through the internet. The MobiHealth project [11] is similar to WWM as it monitors a person’s health data using small medical sensors which transmit the data via a powerful and inexpensive wireless system. A combination of these sensors creates a body area network (BAN), and the project utilizes cell phone networks to transmit a signal on the ﬂy from anywhere the network reaches. Students at Duke University [5], as part of their DELTA Smart House design, described a system for monitoring sleeping patterns that is easy to use and inexpensive. In order to gather detailed sleep data, they used a pulse oximeter to record the user’s heart rate and respiratory rate, a watch style actigraph to measure movement, in-bed thermistors for body temperature, and a microphone for audio. Their system achieves a low cost by using multifunctional sensors, but their choice of an actigraph adds a considerable amount to cost. Their approach depends on a computer for data interpretation, and the sensors themselves are not actually integrated. For instance, the watch actigraph must be