I conducted some experiments with the tilt sensor in the lab. The first was started on December 22 and ended a week later on the 29th. The following table summarizes the angle changes made during the experiment.
| Event |
Time |
| Experiment started at 0 degrees |
12/22/10 at 3:21 pm |
| Moved to 30 degrees |
12/27/10 at 8:49 am |
| Moved to 60 degrees |
12/27/10 at 12:22 pm |
| Moved to 90 degrees |
12/27/10 at 3:20 pm |
| Sensor turned off |
12/27/10 at 3:49 pm |
| Sensor turned on at 45 degrees |
12/27/10 at 4:45 pm |
| Experiment ended |
12/29/10 at 9:43 am |
Since this experiment was informally conducted, I changed the angles whenever it was convenient, which happened to be on the 27th. The data file obtained from this experiment was very encouraging. The sensor recorded an integer value representing the angle reading in degrees every ten seconds. The following is a sample of the data when the angle was set to 30 degrees.
30
30
30
30
30
30
30
30
30
30
30
30
30
30
30
30
30
30
30
30
30
30
30
30
30
30
30
That’s right, it the recorded angle matched the expected angle with no visible noise. I checked the times based on the number of entries, and they all matched within a minute of the expected times, except the last one which was within four minutes. I am assuming this was due to an error I made in recording the time. The full data file can be downloaded here: https://docs.google.com/leaf?id=0B2GN0bxAc29yNTY1NWRiZGYtN2YzZi00YzdhLWE0YmYtZmQyZTkxMmQ3N2Q0&hl=en&authkey=CNSM_NMC
Note that -120 is the value the tilt sensor records when it is turned on. I am not sure why there are multiple -120′s in a row.
Since the data entries are so consistent, it would probably be more efficient to record the angle and mote time whenever the angle changes.
The second experiment took place on the 29th and lasted about an hour. I did it because I had just added a calibration routine to the program and wanted to test that. The following table summarizes the experiment.
| Event |
Time |
| Sensor calibrated and set to 5 degrees |
01:40:00 PM |
| Moved to 165 degrees |
01:56:00 PM |
| Moved to 45 degrees |
02:08:00 PM |
| Moved to 0 degrees |
02:18:00 PM |
| Sensor recalibrated and set to 60 degrees |
02:31:00 PM |
| Moved to 30 degrees |
02:37:00 PM |
| Moved to 0 degrees |
02:42:00 PM |
| Experiment ended |
02:54:00 PM |
Results were similar to before, although some angles were one degree off, but I would consider this acceptable. The data file can be found here: https://docs.google.com/leaf?id=0B2GN0bxAc29yZWFiMDExNzEtMTQyNy00YzM4LThiNzMtZGM5YzljOTdjMjkw&hl=en&authkey=CN3Xzo4F
Note that since I downloaded this data in a different format, the -120′s show up as 136. Also note that there is nothing to indicate when the sensor was recalibrated. I will change this.