Introduction: CamSense: an Emotion-Triggered Camera

Have you ever wanted to capture pictures of most important moments of your day on camera, without ever having to think about it? CamSense is a camera and sensing platform that detects your emotion throughout the day--the times you feel stressed, engaged, excited, or angry--and uses these phenomena as triggers for taking life-logging photography.

CamSense consists of three parts:

1. Sensor Hardware worn around the wrist, communicates over bluetooth

2. IP Camera (Android camera works well)

3. Computer with bluetooth for processing, browser display

Update: You can see a video of our presentation at HackPrinceton Here:

Step 1: Parts

  • 1 Light Blue Bean
  • 1-3 CR2302 Coin Cell Batteries (Likely to die in the prototyping process)
  • 1 switch
  • Velcro strips
  • 1 Pulse Sensor
  • 2 pennies or other electrodes
  • Laptop with Bluetooth le support

Step 2: Connecting the Board

The Light Blue Bean is a cute Arduino-compatible bluetooth low energy board that comes with a coin cell battery onboard. For this project, we connected two analog meters to the Bean, and soldered them together on the spare perf board on Bean. You can see a physical picture and circuit diagram here. To measure skin conductivity, we soldered two clean pennies to wire and connected them as shown in the circuit diagram: one electrode is connected to power, the other connects to a resistor that connects to ground. The user serves as a giant resistor whose resistance is measured in a voltage-divider setup in this circuit. Skin conductivity was input to analog pin 0. Our heartbeat meter was prebuilt with much of the amplification needed to get a good heartbeat signal, so that data went directly into analog pin A1.

You can see the way we attached our electrodes and light meter to our fingers: we simply wrapped them in a ring of velcro. The entire device, in fact, is strapped on to a velcro band on my wrist.

Step 3: Setting Up Plotly

In this project, we plot data coming from the analog inputs on the device via an API called plotly. To plot your own data, you'll need to sign up for an account here. You'll also have to create streaming keys as described here. The code below runs in python, and plots the data in plot.ly plots. You won't be able to run this until you've got your python flask server set up as described in the next step but here's the code:

https://gist.github.com/dalequark/02274aaec91d90049b35

Step 4: Python Server

Now, in order to plot the data and trigger picture taking, you'll have to install the python server framework Flask and download the following:

https://github.com/dalequark/hack2015/tree/master/...

To run:

python camsense.py

And navigate to 127.0.0.1:5000 in your browser of choice.

Step 5: Set Up IP Camera

If you have an Android phone, download IP Camera from the App store. Replace my IP address in the templates file (https://github.com/dalequark/hack2015/blob/master/... with my own, and you're good to go! Any other IP Camera will work too, as long as it has a simple url API (some hacking may be require).

Good luck!