49713 Designing for the Internet of Things
· 25 members
A hands-on introductory course exploring the Internet of Things and connected product experiences.
Found in DIoT 2018 2: Ambient Affect
Ambient toilet seat that lets users know when the toilet needs to be cleaned through a progression of lighting cues.
The inspiration for this project came from the difficulties of living in a household with roommates. Roommates come with different expectations and standards for cleanliness. One of the most common issues between roommates centers around cleaning the shared bathroom space, and more specifically the toilet - one of the most intimate shared spaces.
For this project, we wanted to create an IoT device that accomplishes the following objectives:
In addition to the functionality above, the device should ease tensions between roommates who have different expectations around cleaning. It will create greater awareness around desired cleaning patterns so that users can live harmoniously with a greater sense of shared understanding. The burden of keeping the peace will fall to the ToiLit instead of to the person in the household who is the most cleaning-conscious.
Brainstorming
Our team started the process by brainstorming different challenges we have in our daily lives. In this process, we considered different ways to collect data, the impact the device might have on the various people present in the environment, and the users' ability to easily notice and/or ignore the device in the setting. We wanted to make sure that any ambient device we built was not too 'aggressive' and that it balanced eliciting an emotion with allowing users to navigate their lives without being influenced when it was not desired.
User Experience & Components
After exploring a few ideas and weighing their impact on the environment, we collectively decided the ToiLit device would be an effective ambient device. We then explored the user experience and device workflow (final iteration pictured in 'Storyboard and Product Workflow' section below). Finally, we identified the components (full bill of parts in 'Outcome' section below) and white boarded the code skeleton / framework we needed to efficiently execute on our product vision.
Building ToiLit
Finally, the team started building the circuits and code separately for our output and sensor. Once these were complete, we combined the two circuits and code files into one breadboard and code file, respectively. We also created a foam core prototype of the ToiLit product. We determined light colors for the neopixel from typical associations people have with lights of different colors. For example, blue expresses a sense of calm while red expresses danger or urgency. We used Adobe Color CC to choose values for RGB decimal codes.
In this project, our team was able to complete the prototype as planned. The following summarizes the bill of parts for the circuit and physical prototype, the circuit configuration, and the final code used.
Bill of Parts (Circuit)
Bill of Parts (Physical Prototype)
#include "neopixel.h"
// IMPORTANT: Set pixel COUNT, PIN and TYPE
#define PIXEL_COUNT 24
#define PIXEL_PIN D2
#define PIXEL_TYPE WS2812B
#define PEACH 246,187,27
#define ORANGE 255,70,10
#define RED 255,0,0
#define BLUE 52,222,246
#define GREEN 125,246,49
Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE);
int waitTime = 25;
//was 25
int i;
int timepassed = 0;
int inputPin = D0;
int ledPin = D1;
int pirState = LOW;
int val = 0;
int calibrateTime = 10000;
void setup()
{
strip.begin();
strip.show();
Particle.subscribe("timepassed", myHandler, MY_DEVICES);
pinMode( ledPin, OUTPUT );
pinMode(inputPin, INPUT);
}
void loop()
{
if ( calibrated() )
{
readTheSensor();
reportTheData();
}
if(pirState == HIGH)
{
timepassed = 0;
}
if(timepassed == 0)
{
spin (BLUE);
}
if(timepassed == 1) // timepassed > 7 && timepassed < 15
{
spin (GREEN);
}
if(timepassed == 2)
{
spin (PEACH);
}
if(timepassed == 3)
{
spin (ORANGE);
}
if(timepassed == 4)
{
spin (RED);
}
}
void readTheSensor()
{
val = digitalRead(inputPin);
}
bool calibrated()
{
return millis() - calibrateTime > 0;
}
void reportTheData() {
if (val == HIGH)
{
if (pirState == LOW) {
Particle.publish("designingiot/s15/motion");
pirState = HIGH;
setLED( pirState );
}
} else {
if (pirState == HIGH) {
pirState = LOW;
setLED( pirState );
}
}
}
void setLED( int state )
{
digitalWrite( ledPin, state );
}
void myHandler(const char *event, const char *data)
{
Particle.publish("time incremented");
timepassed = timepassed + 1;
}
void spin(int R, int G, int B)
{
for(i=0;i<PIXEL_COUNT; i++)
{
strip.setPixelColor(i, R,G,B);
strip.show();
delay(waitTime);
}
}
Click to Expand
Working on this project as a team represented its advantages and challenges. It was easier to get work done simultaneously, however, it also meant some difficulty integrating different sections of code and circuits. Furthermore, it meant that all team members were not able to practice each part of the process with some focusing more on specific functions or documenting the group's work. With that said, the team learned a lot from this project and also faced and overcame new challenges.
Learnings
Challenges
Future Iterations
A hands-on introductory course exploring the Internet of Things and connected product experiences.
Ambient toilet seat that lets users know when the toilet needs to be cleaned through a progression of lighting cues.
February 6th, 2018