Back to Parent

Outcome


Intent

Parents are busy, and every second counts. Being able to multitask is a key aspect, but multitasking can lead to mistakes that could be costly. Young babies and kids require constant baths; setting up all the ingredients for a bath requires filling up the bathtub. We want to build a product that allows parents to set up a bathtub with the least amount of work, allowing them to multitask and be more efficient.

This goal will be accomplished through connection of the BathPal to the hue light bulb in another room through IFTTT, integration with Spotify to play a bath time song, and an LED (Phillips Hue Light Bulb) indicator on the cane.   

Initial Prototype Sketch

The BathPal will be added to the bathtub and it will have a sensor to determine how full the bathtub is. The color of the light will communicate to the user in another room how full the bathtub is. The sensor will also be connected to the user's smart-phone, where a sound will alert you based on how full the bathtub is. 

The idea is to give the parents peace of mind while unlocking some time for the parent to do some other productive tasks.


Historical Case

Our group of 4 includes 2  parents, so we were able to broaden our perspective to products that could be helpful for new parents. When brainstorming a product with IoT capabilities, we landed on multiple ideas. At the end of the day, we wanted to build a prototype that could be useful to new parents, and we landed on the product idea described above.  

There is already a plethora of products that exist that can achieve some of the goals we want to achieve, such as thermometers and temperature sensors. However, there are few products that can connect to the internet and alert a parent when the temperature and bath levels are appropriate. We were inspired by the real problems new parents face, class discussions (particularly David Rose's writings on "enchanted products"), and by the existing set of products that attempt to solve this problem.

Product examples and resources:

Phillips Hue Light Bulbs

Multi-Purpose Water Level Sensor: https://particle.hackster.io/iot-group-1/multi-purpose-water-level-sensor-fd25ee

DIY Water Level Sensor: https://www.hackster.io/Pedro52/arduino-esp32-diy-water-level-sensor-and-diy-level-indicator-3d513d

Liquid Level Sensor: https://www.adafruit.com/product/464

DioT Lab Website: https://diotlabs.daraghbyrne.me/

Approach

We are creating a new product that mimics the functionality of the Phillips Hue Light Bulbs. The main difference between our and the existing products is that our product will alert parents on bath water levels. 

The approach we took was the following:

1. Found a problem that would be good to solve

2. Brainstorm on key functionality of the product

3. Get feedback from Professor Daragh Byrne and iterate brainstorm. 

4. Sketch the prototype and iterate on design ideas to make the product seamless to view and use by the main users, parents

5. Find the list of technical/software/hardware components that we need, including items we may need to borrow/purchase. Key items we needed: Argon device, Phillips Hue Light Bulb, water sensor.

6.  Get together to build a working prototype, which includes coding through Particle, setting up a bathtub, and retrieving data from sensors

7. Continue iteration process until we get a working version

8. Receive feedback from Professor, other students in class, and other parents that could be end-users

9. Reflect on final outcome and learnings. Create pre-mortems and next steps.

Process

1. We started by setting up the coding infrastructure. This was done using Particle IDE. We also had to verify that we could get data from the water sensor that measures water levels. Once we verified that this was possible, we had all the ingredients to ensure that we can code our product to achieve the desired goals.

2. We set up a bath tub with the water sensor. The water sensor reads water height and we coded 3 zones corresponding to "filling up", "reached target height" and "exceeded target height". Those zones send a web hook to IFTTT that communicates with WiZ (allows WiFi connection to lightbulb) within the Phillips Hue Lightbulb to change the color of the light to blue, green, or red, respectively. 

3. We checked that this worked and after testing the code and troubleshooting it, we were able to get the functionality to work as desired. We can also manually control the light color from a phone (using Phillips' WiZ connectivity).

The code used to program our product is shown at the end of the documentation.

Some of the main challenges included: finding a way for the water sensor to provide data, writing the code in Particle IDE to run the commands and that it could set up the 3 different colors, get Spotify to change the song as soon as the water level is reached.

Learnings: Configuring the web hook in a different platform, calibrating the sensor height to match the ruler, using multiple web hooks to trigger different functionalities within the light bulb, using IFTTT to connect Particle to Wiz (which controls the Phillips Lightbulb), working with optimizing the code to not publish too many events (only the main events when something changes).


Resulting Prototype

Our first prototype consists in using a water level detection sensor to communicate to our Particle; from here we code different water levels, such that when water is filled up, the water detection sensor can inform us with data. Once we connected this to our Particle, we coded different water levels such that once each of those levels is achieved, we have different outcomes. Finally, we connected our Particle device, using IFTTT to the Phillips Smart LED lightbulb. Our first run is demoed below in the video (view in full screen mode to see video in best quality; code and screenshots provided below as well).

The video below shows one of us filling up a water container, and once the water hits a specific height, we instructed the lightbulb to change from green to red (green indicating that the water level is in a safe condition, red indicates it is filling up).

The List of Components is also shown below.

Show Advanced Options
Screenshot 2022 12 14 at 3.20.46 pm.thumb
Show Advanced Options

Iterations

Our first prototype was to get the sensor and light bulb to work according to our instructions. Yet, having accomplished this, we wanted the product to provide a better experience to the user (ie. busy parents may forget to look at a specific lightbulb). 

The first iteration is to connect the water sensor to a music streaming service; we focused on connecting to Spotify or to a Bluetooth speaker (Sonos). The objective of this is to allow busy parents that may otherwise be listening to music, to be alerted of what water level the bath tub currently has. Crucially, it will alert parents when the bath tub is full and/or reaching capacity. Screenshots of the IFTTT connectivity to Spotify is shown below (first image shows the 5 applets for different water levels and heights and the second image shows actions triggered when the bath tub is full, lightbulb changes to red, and Spotify skips the track that is currently playing).

We tried embedding specific songs to be played after the water level was full, but even with the pro IFTTT account, this functionality is not working. This could be done by design by Spotify, but it is something to explore further.

We also attempted to change bath tubs or containers, such that we can test and learn faster and include more functionality. We learned that our product works across bath tubs, water containers, thermos, etc.

IFTTT & Spotify API

For this product, we relied heavily on IFTTT and the Spotify API. Below, you can see some screenshots of how we connected and some of the functionality.

IFTTT integration was not very challenging. This was due to IFTTT having certain configurations built for some of the most commonly used integrations. Having the Philips Hue and the Spotify integrations defined on the platform was a huge help for creating our own applets. We quickly tested the applets we created and saw that they worked very seamlessly through IFTTT and the cloud. We also switched to a trial pro account for IFTTT in order to add multiple "then" actions to our applet with Spotify.

Integrating the Spotify API was more challenging compared to IFTTT. This was mainly due to working with the specific song ID and the playlist ID we intended to use, as well as Spotify API changing the authorization token for our private playlist randomly (this happened to us at least twice per hour). However; once we successfully created the API, testing and verifying it was very simple and quick, we were able to validate our integration instantly.

For our order of events, once the Particle Argon is fired, our Spotify API kicks in, and adds our desired song to the end of our desired playlist. We then start filling up the water in the tank, and once the water reaches to the specified level in our code, Spotify skips to the next track in the playlist that is playing in the background, which is the song we specified ("Baby Shark") for Spotify to add to the playlist. 

Whatsapp image 2022 12 08 at 12.55.31 pm.thumb
Show Advanced Options
Whatsapp image 2022 12 08 at 12.55.31 pm %281%29.thumb
Show Advanced Options
Screenshot 2022 12 11 at 2.28.40 pm.thumb
Show Advanced Options

Complete Code

The final code for the entire product is shown below:

Show Advanced Options

Final Product

Our final product and demo is shown in this video: 

Show Advanced Options

Next Steps

The more we iterated on this product, the more future ideas we got on enhancements. If we had another Mini to work on this, we would work on the following:

- Adding a temperature sensor, since there is a lot of water temperature variety and a kid may be sensitive to such varieties. 

- For aesthetic purposes, we could redesign the cane such that it is more seamless and does not look as industrial as it looks.

- Main idea of this product is to provide peace of mind to parents while the bath tub is filling up. Anything that makes the child happy and entertained will help this as well. We could explore additional functionality such as bubble machine.

Drop files here or click to select

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