CSE 477 Spring 2014

This is the project page for CSE 477 Spring 2014.

Revised case design

I heavily revised the case design from my first mockup. Now the clip is a separate part, and there's one single large clip rather than two small ones. The battery no longer has an external hole, it'll be inserted below the PCB in the main compartment of the case. Also, we wanted to have a switch that would detect when the clip was being worn, so I made some recesses for metal plates on the back surface of the case and on the clip. We hacked up a coin cell battery clip to get a piece of metal with bent out tabs that will touch the other plate when the device is not being worn. Also, there are cutouts for the wires that will connect these metal contacts to GPIO pins on the PCB.

Initial case design

I modeled a first draft of the case we'll 3D print to house the battery and PCB for our device. Here are some screenshots:

The bottom of the case, with clips to hold it to the belt.
The top of the case. The upper compartment is to hold the PCB, and the lower compartment will hold the battery. The hole between the compartments is for running the wires for the battery. The gap in the wall of the PCB compartment is to expose the micro-USB connector.
The case from the side to show the shape of the clips.
The case lid, with a lip that will fit in the top of the PCB compartment.

This is just a first draft, and there's some things I need to improve. One idea we had is to have the battery be inserted through a larger hole in the PCB compartment, so that it's not exposed to the outside. We also want to have a switch that is engaged when the device is not being worn (i.e. when there's nothing in the belt clip). Our idea for that was to recess small buttons in the back surface of the case, and make the clips have posts on them that would actuate the buttons when the clips weren't being worn. However, I'm not sure how we would make this work, considering there wouldn't be a PCB surface to mount buttons to, and buttons of other mounting styles would be too bulky and deep. Other ideas we had for a "deadman" switch seemed too difficult to engineer in the time we have, and/or unreliable.

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.

iPhone app update

Last Week:
This is a weekly update on the iPhone app. I create an create incorporated some UI design from Zach. I used Core Data database to store the data from the actual device. Concretely, when iPhone sync with the device, all the data will be stored in the Core Data database in the iPhone. In the future, we could synchronize the local Cora Data databases to the cloud, so that user/authorized person can look at the data online.

This Week:
I will finish the Stats tab with all the detail statistics graph, and prepared the device synchronize flow.

PCB update

I finalized the PCB schematic and layout. Some of components are custom libraries because I found the the physical circuit components  are too small to solder, I need to make the pads on the board bigger in oder to ease soldering process. The way I use to test if the physical circuit components fit the board is that I printed out a 1 by 1 scale board on regular printing paper, and then place the some components to check of accuracy of the custom libraries. This method allowed me to ensure the the size of the pads are right, and correctly spaced. More importantly, it saves our group not to place wrong order before it is too late.  I placed order at advanced circuit, one of the PCB manufacturers, hopefully the physical boards will ship no latter than week. The next goal is to solder all the components on the board and then perform thorough test for the circuit. 

Meeting notes from May 20th

Kickstarter page:

  • Make a “money shot” image

  • Upload video to youtube/vimeo/whatever, link it on kickstarter page

  • Should be updating kickstarter page whenever we have new weekly updates

  • Make second draft of video

    • Introduction (motivation for product)

    • Show “theory of operation”, hardware, and phone app

    • Shots of prototype (sensortag) sensing tilt

    • Shots of iPhone app prototype

    • Shots of UI/data visualization mockups

3D printing case:

  • Get dimensions of board and battery

  • Design case back that holds components (leave space for battery wires?)

  • Design case front, decide on attachment method (hinge, pins, screws)

PCB:

  • Figure out how to panel board without extra cost

Update: UI design, plans

I sent the previous UI prototype to Dori to ask her opinion on it and to ask for examples of the feedback they currently give to patients. She sent back examples and some feedback on the prototype. She also forwarded it to their group at UCSD, who sent us examples of the graphs that were the most popular among their participants.
We got some good feedback on what elements of the UI were liked, and what parts they didn't think were necessary. A summary:
  • The Details screen included the same numbers as the Summary, which was unnecessary. It should focus on showing the breaks in sitting throughout the day as this is "one of the most important concepts for health benefits".
  • They would like activity (walking/moving/etc) separated from standing time in the analysis.
  • They currently use bar charts to show daily stats on how long a patient spent lying, sitting, standing, and moving, either with the bars separated or with them stacked on each other and distinguished by color.
The UCSD group also mentioned they would like a feature where the application asks patients how they are feeling throughout the day and tracks that as well; however, this would be a stretch to implement in the time we have available.
Based on the feedback, last week I drew a revised paper prototype for the Details and Week View screens. For the Week View I decided to use separate bars for lying, sitting, etc., but we could also stack them into a single bar for each day. This might make the UI less visually noisy, but I feel it could make it a little harder to compare the size of each bar between days.

For the Details screen, I filled in the graph with different shades to represent the different categories. In the finished version, this would be colored. The examples Dori sent us use a "stoplight" color scheme: red for sitting, yellow for standing, and green for moving. The examples from UCSD use the same color scheme, plus purple for sleeping time. We would probably adopt the same color scheme for our application.

For the next week, I plan to CAD up a case that will hold our battery and PCB. I've got some experience with Solidworks and with 3D printing so it should go fairly quickly once I figure out how to use the Dimension printer we've got in the lab. I'll need to figure out the precise dimensions of the battery and the PCB with our components attached, so that I can make a case that's compact but still fits everything. I'm planning to make the exterior gently curved, so that it will fit nicely on the hip, which will make the design somewhat more complex. Also, we'll need it to be in two pieces so we can put the hardware inside it, and the way those pieces will attach is still up in the air. We may resort to using one or two small screws to hold it together.

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.

Data mining on 2nd prototype

I made an iPhone app that takes data from our 2nd prototype, and applied the same algorithm. We get similar graph and accuracy as the first prototype. I will start working on the iPhoene app that incorporates the Zach's UI design this week.

Edit: add the cycling data