CSE 477 Spring 2014

This is the project page for CSE 477 Spring 2014.

Weekly Update!

Hardware:
Our PCB order is in.  Boards may arrive late this week, or at the latest, this coming Tuesday (June 3).  Case design (including clip) still in progress.

Firmware
:
The machine learning classifier is now running on the SensorTag, successfully distinguishing the user's posture, and reporting it to a Raspberry Pi.  Data logging is mostly complete, but still has bugs.  Integrating the firmware with the iPhone app remains a work in progress.

iPhone app:
Database backend is in-place and complete.  Work continues on export and synchronize features.

Firmware Update!

Last week's firmware accomplishments
  • Ran benchmarks on default SensorTag firmware to determine how much stack/heap space is left after the bluetooth stack is up and running.
  • Wrote C code to detect features from raw accelerometer data, using Steven's algorithm.
  • Checked and rechecked PCB schematic. Verified our chosen pins and ports are usable from the software.
  • Started porting code for Atmel Dataflash.

This week's firmware goals:
  • Get ML classifier working completely on the CC2541 device.
  • Finish the datalogging (and data transmitting) code.
  • Finish the Atmel DataFlash driver.

I have also suffered from hardware problems of my own (namely, my laptop ingesting a large amount of earl grey tea).  This has hampered my progress somewhat, but nothing was permanently lost.

Platform perils

Week2 did not end smoothly, as our MegaMiniR4 died under mysterious circumstances before we could collect enough data to validate our project idea.  Because of the extremely bad timing (and because the MegaMini's untimely death was likely my fault), I put together a new test board.


This is an Arduino Uno R3 with BMA180 accelerometer.  Same idea as the MegaMini, except considerably less sexy because it's breadboarded instead of using a custom PCB.  I repurposed the parts from a prior project.


Bulky, but it is indeed wearable.


Experimentation shows that leg angle is an extremely accurate measure of standing.  Even dancing, or sitting cross-legged, can't fool it.  A simple IIR filter applied to the calculated tilt is sufficient to mitigate sensor noise (and spiky events such as footsteps).  The process is simple enough that sitting vs.  standing detection runs onboard the Arduino itself.


As a proof-of-concept, here's 20 minutes of me being a couch potato.  Whenever I get up for drinks, you can see the tilt of my upper leg shift to vertical, and my footsteps look like a minor earthquake.  I get up and walk around 3 times for a total of about 3 1/2 minutes.  Can you spot them all?

Data Collection!

Most of today was spent writing new tools for accelerometer data collection.  We have written Matlab scripts to scrape 5-second chunks of data from the MegaMini R4, save and graph the result.



As you can see, data collection has been very successful so far.  Next step - find commonalities and find techniques to programmatically recognize them.