Our goal in this step-by-step instructable is to build a device you can clip to your belt and wear throughout the day.  This device will log data that, when downloaded to a back-end server system, will provide a report showing the location history of your day along with the breakdown of how much time you spent indoors and outdoors.

A quick rundown of how the system will operate is as follows:

The accelerometer constantly looks to see if the user is in motion.  While the user is at rest, the unit takes a GPS and temperature reading every 15 minutes. When motion is detected the GPS unit is turned on.  After 2-minutes passes the GPS unit and thermometer again take samples.  If motion was detected during that two minute period the 2-minute wait and sample period repeats until the user is at rest again. This is done in order to conserve energy.

All the GPS and temperature data is stored on the SD card.  Upon pushing the button on the front of the unit, all data is off-loaded (requires a USB connection to a laptop) and sent to a back end server system for analysis.  The backend algorithm (coded in Java) extracts the useful features from the data (such as GPS error, # satellites and temperature) to build a decision tree that classifies the location as indoor or outdoor. The algorithm also utilizes the assistance of online public weather API's as well a GIS web service which tells if lat/long points are within a building or not, to produce a report for the user.  The report shows the amount of time (discrete periods of the day) ,and location history along with whether the user was inside or outside.

The arduino code, backend algorithm code as well as the GIS server can be found at https://github.com/pretsb/838fproject

This requires the following equipment:
Arduino Uno
Arduino WiFi Shield
GPS Unit (LS20031)
BMP085 Thermometer/Barometer
ADXL335 Accelerometer
LED Light
2.2K Ohm resister
9V Battery pack
Adafruit Arduino Case
Various wires..

This instructable was made as part of the final project requirement in the
CS graduate course "Tangible Interactive Computing" at the University of
Maryland, College Park taught by Professor Jon Froehlich. The course
focused on exploring the materiality of interactive computing and, in the
words of Hiroshii Ishii, sought to "seamlessly couple the dual worlds of
bits and atoms." Please see http://cmsc838f-f12.wikispaces.com/ for more

A video tour of the project as well as a quick overview can be seen here:

Step 1: Add Arduino Uno to the Shell

We will use the following shell from Adafruit to encase the project http://www.adafruit.com/products/337  This shell can be used for many other projects and is designed to hold an Arduino and an Ethernet shield within the case.  The WiFi shield must be a touch wider than the Ethernet shield as the shell barely screws together tight when you put it together with both devices in there.  Once you place wiring into the female pins there is a small amount of pressure being applied to the Arduino itself, but I do not think this pressure will cause any damage to the shell or the Arduino.

The shell has a nice few screw hole designed to hold the Arduino.  We'll screw the Uno itself to the shell using the enclosed screws and move on....
You have the wifi in there, why not program it to, as it is waking and reading every X minutes, to attempt to connect to the wifi if the last connection was &gt; X hours ago? This way it would be faster and easier to download the data - no buttons! ;) <br>Also, If I was building this I would put a solar panel on the pack to charge from the sun with optional usb charging (LED for low battery?). I think that the use for this is going to be quite rugged - look at an average day... - and as such you have too many ports and buttons and suchlike sticking out which can be caught/gunked/etc... <br>Apart from that... I have had the idea for something like this in my head for a while. I think I might take your idea and run with it... :) Thanks!
Two EXCELLENT points. <br> <br>First the WiFi... <br> <br>That was in the ORIGINAL idea. Unfortunately the Arduino WiFi shield is not very robust. If you look no stackoverflow or evern the Arduino Forums you will see multiple threads where I asked what I was doing wrong in my pursuit of this implementation. Apparently the shield is designed/coded to connect once, stay connected to a AP and send data as needed. Migrating connections from AP to AP is not easily accomplished and you run out of memory doing so. Migrating this from an Arduino platform (IE raspberry pie, beaglebone or the like, though keeping the footprint small) would work. Though a cell phone would as well though you'd likely lose the thermometer part AND cell phones are not really wearables, so someone could easily move around without the cell phone. <br> <br>Now, solar panel, LED for battery, etc. I originally wanted to use a LithION battery to power this but I had a mix of batteries with different amperages. Thus I could not use the materials I had in stock and had to resort to a 9V for now. Solar panel might work to keep a charge but the panels needed (that I am aware of) would be large. Doesn't mean this cannot be done.... <br> <br>Thanks for the thought and ideas!
Thanks for the reply :) Is 10cmx10cm too big? http://www.ebay.com/itm/Brand-New-0-7W-9V-Mini-Solar-Panel-Module-GP85-90-18B77mA-DIY-Solar-Kits-/261016302671?pt=LH_DefaultDomain_0&amp;hash=item3cc5c8b44f (just as an example)
I don't think that would work. That only produces 0,7W meaning ~75 mA. You would need atleast 4 or 5 of these. Would you wear A4 paper sized solar panel.
Yes, that would likely work :)
<p>The composite code on github is no longer available. Can I find it elsewhere?</p>
Someone asked that I post some of the stackoverflow/arduino message board posts where I attempted to figure out some of my issues as well as a few that helped me isolate my issues. Thus here they are: <br> <br>http://electronics.stackexchange.com/questions/50767/how-to-fully-turn-off-the-arduino-wifi-shield <br> <br>http://stackoverflow.com/questions/13554570/sd-h-not-compatible-with-other-libraries-in-arduino-c-environment <br> <br>http://arduino.cc/forum/index.php/topic,136086.msg1023835.html#msg1023835 <br> <br>http://arduino.cc/forum/index.php/topic,134233.msg1009852.html#msg1009852 <br> <br>http://playground.arduino.cc/Code/AvailableMemory <br> <br>http://stackoverflow.com/questions/11690647/arduino-memory-leaks-sd-card-strings
interesting project. <br>two points I would change <br>1. turn the installation by 180&deg;. <br>2. solder a normal 9V battery clip to the board instead of using the bulky connector. <br>with that the top is &quot;water tight&quot;. <br>I agree, for reading the data you have to open the box.
your project is too expansive... maybe cost 200$.
Yes, it is a touch expensive, but it is only a prototype at the moment. To my knowledge there is nothing around that distinctively tracks the inside/outside time of a person. This was more to prove it could be done with the hardware + back-end system than anything else. But yes, not many would really want to spend $200 for something like this. :)
Very cool. What do you plan to use this for?
Plan is to gather the data over time and provide a visualization where one can quickly see how much time they spent inside and outside each day. Also plan to use a time wheel and show the patterns that do or do not exist over time (weeks-months). We are currently working to port this to a cell phone app and expand the ubiquitous computing world.
Nice its like a personal mini black box datalogger <br>a good use for it is knowing wer ur kid is at all times and seeing what they are doing and wer they r going throughout the day. <br>Awesome man nice work <br>
Yes, that's totally what it is, much like a fitbit. Tracking kids was not so much the aim but rather to provide one a record of what parts of their day they spent inside and outside. Our initial aim was to also use the WiFi. We have a back-end server that provides a pretty good resolution. It would have been much more accurate and allowed for off-loading of data vs. the button to download data.
They have had services like that to track children phones for a while. lucky enough not to have that experience <br>

About This Instructable




More by gramsky:Building a device that clips to your belt and tracks how much time you spend inside and outside 
Add instructable to: