As the title suggests, I’ve rolled up my sleeves and created a way to flush a toilet and integrate that into my home automation system. The commands work with my Amazon Alexa for ease of use using some custom Arduino code. I also have an Echo Dot mounted in my bathroom.
The original handle on the toilet works as normal. The servo is mounted in a custom 3D printed case that fits above the flapper and around the overflow valve. The servo wires are connected to the NodeMCU that is in a custom 3D printed case that hangs on the side of the toilet. The whole system is powered through a single cable either using a power bank or standard usb-b phone charger.
Device In Action
Component List
-Access to 3D printer
-NodeMCU
-MG996R Digital Torque Metal Gear Servo
-Chain for servo to flapper
-Power (battery bank or phone charger)
-Usb-b cable
3D Printed Parts
Available on Thingiverse – Download Here
Servo Overflow Mount
Installation
Connect the red wire to the 3.3v connector on the NodeMCU. Connect the black/brown wire to GROUND. The yellow/orange cable should be connected to D1 on the NodeMCU.
I installed the servo motor to the mount that goes on the overflow valve with two screws on each side. The chain is mounted from the last hole on the servo arm to the flapper. There should be a little play in the flapper chain. Wash your hands!!!! It is a toilet.
The original handle can be left installed. You could also replace the normal flush handle with an electric push button.
Program NodeMCU
Below is the code that I am currently using for this project. The code is horrible and I am working on better code to replace it. You can download this garbage and use it if you want. It works but it is not up to my standard. Feel free to email me or contribute in this section.