Automating Laundry: Mellow Labs' DIY Washing Machine Detergent Dispenser Hack
One task that many of us encounter regularly is doing the laundry. While washing machines have long been a staple of convenience, there are still aspects of the process that can be improved. For instance, wouldn't it be great if your washing machine could automatically dispense the right amount of detergent without you needing to measure and pour it every time?
Automating the dispensing of detergent not only makes the process more convenient but also helps to reduce waste by ensuring the precise amount is used, resulting in cost savings over time. With the rise of smart home devices and accessible DIY components, this kind of automation is within reach for anyone willing to experiment.
Ian discusses this amazing project in this episode of the Electromaker show!Project Overview: Automating Detergent Dispensing for a Smarter Laundry Experience
The core aim of the DIY detergent dispenser project is to automate the process of adding detergent to a washing machine, ensuring that the right amount is dispensed at the right time during each wash cycle. By eliminating the need for manual measuring and pouring, the project not only simplifies the laundry process but also ensures that detergent is used efficiently, reducing both waste and the chances of over- or under-dosing. The result is a smarter, more streamlined approach to doing laundry, tailored for those who enjoy enhancing everyday tasks with technology.
The Original Idea: A Practical and Convenient Solution
The initial concept for the project was straightforward: create a refillable detergent bottle that could automatically pump detergent into the washing machine’s tray. This approach would allow users to fill a large bottle with detergent, which could then be dispensed in precise amounts during each wash cycle. The idea was to have a pump connected to the bottle, which would deliver detergent directly to the washing machine whenever needed, eliminating the need for manual intervention.
Challenges Faced Along the Way
While the concept seemed simple in theory, several challenges emerged during the project's early stages:
- Power Supply Integration: One of the first hurdles was figuring out how to power the pump without adding unnecessary complexity. The goal was to tap into the washing machine’s existing power supply, but ensuring safety and compatibility proved to be a challenge.
- Choosing the Right Pump: Selecting a pump that could reliably dispense detergent in precise amounts presented its own set of difficulties. Different pump types and voltages were tested, with varying results in terms of efficiency, noise levels, and compatibility with the washing machine's detergent tray.
- Sensing the Appropriate Time to Dispense: The project required a reliable way to determine when to activate the pump. This involved experimenting with various sensing mechanisms, such as monitoring the washing machine’s door lock indicator or integrating with the wash cycle's timing. Each option had its limitations and required careful consideration.
Pivoting to a Simpler Approach: Embracing the Raspberry Pi Pico
Given the challenges encountered, the project took a turn toward a simpler, more user-friendly solution. Rather than over-complicating the build with advanced smart home integration or complex sensing mechanisms, the decision was made to use a Raspberry Pi Pico and a rotary encoder to control the detergent dispensing. This setup allowed for precise manual control over the amount of detergent dispensed, while still incorporating some automation elements, such as low-detergent alerts and a straightforward interface.
The choice of the Raspberry Pi Pico brought several advantages:
- It provided a cost-effective and accessible microcontroller platform.
- The rotary encoder enabled easy adjustment of the detergent amount, making the system more intuitive for users.
- This approach minimized the need for complicated sensing mechanisms, focusing on a straightforward yet functional solution that could be set up by anyone with basic DIY skills.
The pivot to a simpler design didn’t compromise the project's goal of automation but rather enhanced it by making the system more accessible and easier to implement. The result was a DIY detergent dispenser that perfectly balanced automation with user control, bringing convenience to everyday laundry tasks.
Tools and Materials Needed: What You'll Need to Build the DIY Detergent Dispenser
To bring this DIY detergent dispenser project to life, you'll need a combination of electronic components, hardware, and software tools. Below is a comprehensive list of the essential items required, including a discussion on the selection of each component and its role in the build. Whether you're new to DIY electronics or a seasoned maker, these materials will help you create an efficient and user-friendly automated system.
Electronics
- Raspberry Pi Pico: This microcontroller serves as the brain of the project, handling all control logic for dispensing detergent. Its low cost and ease of programming make it an ideal choice for DIY automation projects. The Pico's compatibility with MicroPython allows for straightforward coding, even for beginners.
- Rotary Encoder: A rotary encoder is used to manually adjust the amount of detergent to be dispensed. It allows for precise control by rotating the knob, providing an intuitive way to set the dosage. Additionally, the encoder's button functionality can be used for other features, such as resetting the system or switching modes.
- Pump: Selecting the right pump is crucial for the project's success. Several pump types were considered, each with its own pros and cons:
- Peristaltic Pumps: These pumps are often used in medical and laboratory applications for their ability to handle viscous liquids. They are ideal for this project because they can dispense precise amounts of detergent, but they tend to be noisier and more expensive.
- Diaphragm Pumps: A diaphragm pump provides steady flow rates and is more cost-effective than peristaltic options. However, they may require more complex mounting due to their size and shape.
- Submersible Pumps: These pumps are typically quieter and can be submerged in the detergent bottle. While they are inexpensive and easy to set up, they may not provide the same level of dosing precision as other options.
Based on testing, a peristaltic pump was chosen for its balance of precision and reliability, making it the best fit for dispensing detergent accurately.
Additional Components
- Refillable Detergent Bottle: A large, refillable bottle will be used to hold the detergent, allowing the pump to draw the liquid from the container and dispense it into the washing machine. Choose a sturdy, leak-proof bottle for best results.
- Tubing for the Pump: Ensure that the tubing is compatible with the chosen pump type and is suitable for handling detergent. The tubing needs to be long enough to reach from the bottle to the washing machine’s detergent tray.
- Mounting Hardware: Various brackets, screws, and adhesives will be needed to securely attach the components (pump, Pico, rotary encoder) inside or around the washing machine.
Software and Libraries
The software side of the project involves writing code to control the pump and read input from the rotary encoder. The following tools and libraries are recommended for this build:
- MicroPython: An easy-to-use programming language for the Raspberry Pi Pico, MicroPython enables quick development and debugging. It is well-suited for microcontroller projects and offers extensive support for various libraries.
- Encoder Library: This library simplifies reading input from the rotary encoder, allowing the system to detect rotations and button presses. It is essential for implementing user controls.
- Machine Library: A built-in MicroPython library for controlling hardware peripherals on the Raspberry Pi Pico, such as GPIO pins used for driving the pump.
- uasyncio: This MicroPython library allows for non-blocking code execution, enabling the system to handle multiple tasks concurrently, such as reading the rotary encoder while controlling the pump.
With these tools and materials, you'll be well-equipped to build the automated detergent dispenser and enhance your washing machine’s functionality. The next steps will involve assembling the components and writing the control code to bring the system to life.
Wrapping Up
If this project inspired you to start your own DIY automation journey, be sure to check out Mellow Labs' YouTube channel. The channel features a variety of inventive projects that are educational, entertaining, and often tackle everyday challenges with a maker’s mindset. Supporting creators like Mellow Labs not only helps grow the maker community but also encourages more innovative projects to be shared with the world. Subscribe, leave a comment, and share your own project ideas—your engagement fuels the creativity that drives these builds forward.
Did you enjoy this article?
For those interested in learning more about DIY electronics and home automation, here are some additional resources and related projects to explore:
Make sure you subscribe to The Electromaker Show for similar content and subscribe to our monthly newsletter!
Leave your feedback...