Back to Parent

Outcome


Proposal

People need motivations to keep a healthy habit. On the current market, there are so many products that track user's fitness data to help them stay healthy. However, most products are intrusive and may annoy the user. They tend to send notifications, display exact numbers, and compare user's performance with other people. We wanted to create a device that changes user's behavior in a subtle way so that they don't feel any pressure but still getting the encouragement of going for a walk/run. Carrying this goal in our mind, we developed "Run Forest Run".

Parts

CPU:
Photon* 2
Sensor:
Tilt Sensor * 1
Input:
Button * 1
Output:
Green LED * 1
Servo *1
Other:
220-ohm Resistor * 1,
Paper shell *1
Circular wooden plate *1
Jump wires
Glue and adhesive tapes

Problem Statement

How to build an ambient device to encourage people to keep a healthy habit?

Goal 

The goal of this project was to influence people to keep running/walking habits in a subtle manner. As a result, the product was designed to track the number of running/walking steps and display the progress on a rotating wheel. As opposed to sending notifications to users, this device would merge itself to the background and deliver the message in an ambient way.

Process

1. Designing the circuits

At the first step, we created two circuit diagrams on Autodesk Tinkercad. The first circuit is responsible for inputting step data to the cloud, and the other circuit is responsible for outputting servo motion to a rotatable plate to indicate user's current stage.

In the input diagram, red wires go to 3.3V, green wires go to ground, and other colored wires go to pins. The idea is that the tilt sensor simulates the step counter installed in any smartphone or wearable device. When the user takes a walk, the tilt sensor will register the motion and send a number to the particle cloud. The green LED serves as a power indicator. The system can be controlled on and off by a button or on the particle cloud function.

94
Show Advanced Options

In the output diagram, orange wires go to 3.3V, black wires go to ground, and the yellow wire goes to Pin A4. In this way, Servo can receive signals from the Photon and turns its wings to different angles.

Screen shot 2018 02 07 at 10.26.51 pm
Show Advanced Options

2. Wiring the circuit

We wired two circuits for input and output.

03
Show Advanced Options
01
Show Advanced Options

3. Coding the circuits

Step Counter

The step counter registers each step when the tilt sensor senses a shake. Then the Photon sends the current step number to the particle cloud. The initial thought was to send just a signal indicating a "step" and let the other Photon to do the counting. However, we decided to separate two Photon's responsibility so that the first Photon would take care of all the calculation and the second Photon would just execute the action.

Another feature for the step counter is the ability to let users control the system online. We created two cloud functions: system and reset. As a result, when users type "ON" or "OFF", they turn the system on or off. When they type "RESET", the step counter goes back to 0. In future implementations, we could let the Photon to automatically reset the counter in as daily basis, but for now we need users to manually set the counter.

Show Advanced Options

Servo

To break it down, first we added Servo library Servo myservoName. The library created a new class or type of object that we can declare and use. This gave us access to all of the functions associated with the library on a particular pin. When we started using a Servo we added the following variable declaration.

Then we told servo which pins to use. We did this by adding the line of code servo.attach (pin number).

Finally, the servo spinning angle was determined after we passed the variable value int servoTarget = angle.toInt().

Although the second part of the code was a simple servo control code with a function to fetch data from the cloud, we faced a great difficulty trying to subscribe the first Photon and get the data from the particle cloud because we could not concatenate a string into an integer. Fortunately, we solved this problem by placing a temporary variable to catch the "pointer" to prevent system resetting the reference to the next value.

Another challenge we had occured due to our own mistake. We accidentally put the rotating wheel in the wrong order so the wheel spins from "healthy" person to  "sleepy" person. We glued the rotating wheel so there was no way to change the physical component. Instead, we changed the code. The angle to spin was changed from "step" to "180 - step" so that the wheel could rotate from 180 degrees back to 0 degrees.

One more challenge was that the servo motor vibrates from time to time if the angle was too extreme. Our solution was to user constrain method to limit the angle from 5 degrees to 179 degrees, which was the range where we did not observe any issue.

Show Advanced Options

4. Building the device

* Please see details in the video.

02
Show Advanced Options
Show Advanced Options

Reflection

Overall, the project was fun to work with and the result was successful, but there are also some places that can be improved

What goes well:

  • The circuit works as expected;
  • The rotation of the wheel is subtle and not disturbing;
  • The remote control function works as expected, so users can turn the system ON/OFF, check steps, and reset the step counter online;

What needs improvement:

  • The tile sensor is not super accurate. It works only on certain angles, so it may fail if the user is not wearing the sensor correctly;
  • There might be better ways to indicate steps other than the rotating wheel;
  • The servo goes only from 0 to 180 degrees. In the future, we would use a servo that can go 360 degrees;
  • The device does not serve other functions. Users may not like having an extra object in their home. We could do better by putting light sources in it and making it a smart lamp.
  • The servo motor makes a little noise when turning. It might disturb some people.
Drop files here or click to select

You can upload files of up to 20MB using this form.