I love technology because it enables new ways of solving old problems.

Working in an office with only a single kitchen and 50+ busy software engineers, testers, and designers, my coworkers use quite a few dishes throughout each day. The kitchen is the hub of the office – a communal space for eating, talking, and taking a break. However it’s also easy for dishes to pile up, especially since there’s only one dishwasher. To maximize the capacity of the dishwasher its important to make sure it gets loaded, washed, and emptied as soon as possible so its ready for the next set of dishes. While most of my coworkers help with the dishwasher from time to time, its use isn’t always optimized with dishes stacking up on the counter and in the sink. Someone may not realize the dishwasher is full and needs started. Someone else may think the dishwasher is still washing when really its dry and needs unloaded, especially since the office dishwasher’s status light is on the top of the door and the dishwasher is fairly quiet.

I wanted to give the dishwasher a voice – a social experiment. If the dishwasher could talk to people – telling them when it needs run or when it needs unloaded – would it help optimizing the flow of dishes? Most people want to be helpful, but sometimes they need better instrumentation and information.

I started prototyping TinkurWash earlier in the year. The initial concept was to instrument the dishwasher using vibration, temperature, tilt, etc to deduce when the dishwasher is in its various cycles. I wanted to instrument the dishwasher in a non invasive manner, allowing the solution to be added to an existing dishwasher without having to wire directly into the dishwasher. I decided to use an Arduino as the base platform, also deciding to use the Adafruit CC3000 WiFi shield as this project needed to be located near the dishwasher potentially far away from wired networking connections.

The initial prototype used a temperature sensor for heat detection, a piezo sensor for vibration detection, and a tilt sensor for detecting if the door is open, and a RGB led to provide visual feedback about the dishwasher’s status. This was my first time working with a piezo sensor and tilt sensor. When working with new sensors, I start by writing a small unit of code that demonstrates the capabilities of the sensor. I save this sketch in a unit test directory of my project. This not only helps me to learn about the sensor, buy also provides documentation for future reference and a test in case there are issues in the future. These unit examples are especially useful when debugging the sensor after it’s integrates into a larger code base with multiple sensors and other hardware components.

After integrating the unit examples together, the next step was to learn how to use this instrumentation to determine the state of the dishwasher. I temporarily mounted an Arduino with sensors to the dishwasher. I ran the dishwasher and recorded a log of sensor readings over time to understand the values that occurred during washing, drying, unloading, etc. Vibration steadily increased as the dishwasher began fling with water, washed, and rinsed the dishes. Temperature rose more slowly, peaking part way through the washing and rinsing cycle and continuing through the drying cycles. So how to use this information?

I outlined the questions I needed to answer.

Is the dishwasher running?

When the dishwasher is not running, there is very little vibration and it occurs inconsistently when it does occur. These random vibrations might occur when opening the dishwasher to add dirty dishes, opening an nearby cabinet, or even walking nearby. However when the dishwasher is washing and rinsing it generates significant and fairly sustained vibration over a long period of time. However, the levels of vibration can very between different dishwashers, so I implemented a function to baseline the ambient vibration when TinkurWash boots up. I also implemented a median library and function which records the 10 most recent vibration readings, using the median value to eliminate outlier data. When the median vibration is greater than 3x the baseline vibration, the dishwasher is assumed to be in a running status. The LED also changes color when the dishwasher is in a washing status.

Is the dishwasher drying?

When the dishwasher is drying, vibrations return to near baseline levels, however temperature continues to remain high during drying. While a temperature sensor did provide the ability to measure temperature and dedice the drying cycle length, it also required mounting the temperature sensor fairly close to the dishwasher. After some consideration of the best mounting options, I decided to remove the sensor. From a user’s perceptive, they could remove the dishes from the dishwasher after the washing cycle and dry the dishes by hand – a realistic scenario. Therefore, I added another state to differentiate between washing and drying, changing the LED color as well to provide a visual indicator so a user can take action if desired. Since I removed the temperature sensor, I simplified the drying status using a 60 minute timer to approximate the length of the drying cycle. While I may add a temperature sensor in the future, the timer solution seemed adequate for an initial minimal viable product.

Is the dishwasher done and needs unloaded?

When the 60 minute timer completes, the dishwasher is assumed to be in a clean status and ready to be unloaded. Using a tilt sensor, I could determine when the dishwasher door was open. Based on timing my own usage, it seemed to take me at least a few minutes to fully unload the dishwasher. Therefore, similar to the drying state solution of using a timer, if the dishwasher door is open for more than 60 seconds it’s called beside red to be unloaded.

Is the dishwasher ready to be loaded with dirty dishes?

This one is a bit trickier. How does one measure when a dishwasher needs to be washed. As a user, you’ll probably know that you like to run the dishwasher every night after dinner or just have packed it full of dishes and know it needs washed. For now, TinkurWash provides visual feedback via its LED that it’s ready for dirty dishes and washing, however, it’s the users responsibility to run it. In the future, I anticipate using data collected from the sensors to determine the users patterns and proactively ask them if the dishwasher needs to be run based on those patterns.

Voice

There are a variety of ways TinkurWash can communicate with users.

TinkurWash has a large diffused RGB led so users can easily see its status from just a glance.

In addition to providing glanceable visual feedback about the status of the dishwasher, it is also integrated with our company’s chat tool – HipChat. Each of our teams had their own HipChat room in addition to a whole company chat room used for questions, news, or just chatting. TinkurWash posts messages to the company wide chat room when it starts washing or finishes drying, providing real time information that will hopefully help my coworkers take care of the dishes.

Memory

Every 30 seconds TinkurWash connects to Xively, a service for storing and retrieving IoT data. TinkurWash stores the median vibration value, the tilt value, the dishwasher door status, the dishwasher status, and an uptime value since the last reboot. These values are useful for debugging, are used with another integration with Zapier to post messages to HipChat, and also store the data for future use in algorithms to determine when to recommend running the dishwasher and other potentially other insights.

Learning and Pivoting

TinkurWash has had many pivots along the way – as most projects do. While I plan to discuss some of these in more detailed standalone posts to provide lessons learned, , the following major pivots occurred:

Sensors

After having issues mounting and monitoring vibration using a piezo sensor, I switched to using a 3 axis accelerometer. A accelerometer can be used to measure movement over time, which provided to add an even greater level of granularity to the vibration instrumentation. The accelerometer also replaced the tilt sensor, providing the ability to determine if the dishwasher door is tilted and again providing much greater granularity. While the accelerometer ($15) is 700% the cost of a piezo ($1) and tilt ($1) sensors it’s much more reliable and is still a very acceptable costs for a hobby project. While the outcome was much better, refactoring hardware + software is somewhat more involved than refactoring software alone.

Packaging

I finally wanted to have a proper housing for this project. In the past, I’ve used boxes or storage containers as a poor mans housing for my projects. I had cutting acrylic with my CNC machine in the past, but hadn’t made a useable housing for a project. After having the opportunity to see the Adafruit Raspberry Pi Thermal Printer housing when assembling a printer kit, I saw how awesome an acrylic housing can be and an example of how to fabricate one. After a few pivots of the design using cardboard in inlace of acrylic, I fabricated a slot fit acrylic housing, learning lots of lessons – and breaking a few bits – along the way. I also hope to write another poshope to write another post on this topic in the future.

Wireless

After getting TinkurWash’s sensors and code fairly reliable, I started noticing it stopped posting data anywhere from a few hours to a few days. After reading around the internet about the CC3000 WiFi chip, I read about similar stability issues. After trying a few different solutions, including a firmware upgrade, I ultimately implemented a watchdog timer that resets TinkurWash if a successful network connection isn’t made every 60 seconds. Before resetting, TinkurWash stores it’s current state into non volatile EEPROM memory, reloading the state variables from EEPROM after rebooting.

Source Code

https://github.com/TinkurLab/TinkurWash/

What’s Next

While I certainly have some ideas for new features to enhance the smartness of TinkurWash, including more advanced algorithms using historical data, for now my primary focus is beta testing in the office to monitor stability, learn about any unanticipated real world scenarios, and collect user feedback.