B.A.T. Flusher

by JacobF45 in Living > Life Hacks

4001 Views, 31 Favorites, 0 Comments

B.A.T. Flusher

IMG_20160504_211317.jpg
IMG_20160504_211306.jpg
IMG_20160504_211326.jpg
IMG_20160504_211350.jpg

This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com)

Why create a Bluetooth And Touchless enabled toilet flusher?

1) Your relationship with your phone is something special.

2) You're a Germaphobe.

3) Pushing a handle down requires far too much effort and time.

4) Cause why not?

5) Some other _ _ _ _. (Insert synonym for poop here)

Download the 3D Parts!

To build a completed B.A.T. Flusher, you will need to download and print these part files.

Here's a comprehensive list of what you need and how many of each file to print:

1 x Box

1 x Lid

1 x Lever 1 of 3

1 x Lever 2 of 3

1 x Lever 3 of 3

1 x Arm

1 x HandleSleeve

1 x ServoGear

1 x Screw Cap

2 x Pin

Things You Will Need to Purchase

NEEDED Items

1 x Arduino UNO Board Buy Here

1 x Adafruit Bluefruit LE Shield Buy Here

1 x Tower Pro Micro Servo SG90 (w/Servo Horns) Buy Here

1 x Distance Sensor Buy Here

1 x On/Off Switch Buy Here

2 x AA Battery Holder Buy Here

4 x AA Batteries Buy Here

4 x Male to Female Jumper Wires Buy Here

6 x Male to Male Jumper Wires Buy Here

8 x M3 Screws Buy Here

1 x Roll of Double Sided Tape Buy Here

OPTIONAL Items

1 x Adafruit NeoPixel Ring (12 LED's) Buy Here

Assembling the Circuit

FritzCircuit.PNG

The circuit that you must construct will need to appear exactly as the one below in order for the code that is listed in the following steps will work without any alterations. The only 2 differences between this diagram and the one in the B.A.T. Flusher Prototype are that there is a Bluefruit LE Shield atop the arduino and instead of using a breadboard, I soldered everything directly to the Bluefruit LE Shield.

Not seen in this diagram is the Bluefruit LE Shield. The Bluefruit LE Shield and the distance sensor both await input that falls within their parameters. Once met, the arduino sends a signal to the LED ring to indicate it has been activated and the servo motor will turn it's set distance.

Something to note about this circuit is that instead of powering the components via the USB or power cable, I am running 6v worth of AA batteries to the VIN port on the arduino. The VIN port runs through the voltage regulator on the arduino to step it down to 5v for it to become safe for the arduino to use with all of the components that are used.

Downloads

Assembling the Servo Gear

IMG_20160505_191310.jpg
IMG_20160505_191404.jpg
IMG_20160505_191430.jpg
IMG_20160505_191523.jpg

First, cut one of the servo horns that came with your servo at the lines shown in the first picture, you should then end up with something close to what is on the right.

Next, place the servo horn on the shallow side of the servo gear so that it fits between the notches.

Finally, place the screw through the middle with the head of the screw on the deep end of the servo gear.

Assembling the Battery Holder

IMG_20160505_191824.jpg
IMG_20160505_191859.jpg
IMG_20160505_192018.jpg
IMG_20160505_192211.jpg

First, take 2 AA battery holders and use tape to connect them back to back.

Next, take a red and black lead wire and connect them. (This can be done by twisting them together and then covering the exposed wire with tape.

Install 4 AA Batteries.

Assembly of the Electronic's Housing

IMG_20160505_191635.jpg
IMG_20160505_192316.jpg
IMG_20160505_192246.jpg
IMG_20160505_193859.jpg
IMG_20160505_193933.jpg
IMG_20160505_193954.jpg
IMG_20160505_194041.jpg
IMG_20160505_194031.jpg
IMG_20160505_194059.jpg
IMG_20160505_193630.jpg
IMG_20160505_193728.jpg
IMG_20160505_193758.jpg
IMG_20160505_194420.jpg
IMG_20160505_194455.jpg
IMG_20160505_194516.jpg
IMG_20160505_195023.jpg
IMG_20160505_195156.jpg
IMG_20160505_190445.jpg
IMG_20160505_190505.jpg
IMG_20160505_195525.jpg

1) Push the LED ring between the latches on the bottom of the box to hold it in place.

2) Place the assembled battery holder into it's cavity.

3) Solder the ground wire to the On/Off switch.

4) Place your assembled servo gear on the cylinder so that the head of the screw faces the front of the box.

5) Mount the Servo into the rectangle on the other side of the servo gear so that the servo and the servo horn fit together.

6) Use the small hole on the front of the box to screw the servo gear to the servo.

7) Place the shaft of the lever into the big hole on the front of the box so that the open end of the shaft face the front of the box. Push the shaft towards the back of the box until it cannot go any further.

8) Place the gear part of the lever between the large hole and the shaft so that the short end faces the front of the box.

9) Now push the base of the lever through the large hole in the front of the box so that it attaches to the other pieces of the lever.

10) Now place a screw through the top hole on the servo to fix it in place.

11) Place the screw cap over the small hole in the front of the box to give it a cleaner look.

12) Place double sided tape between the 2 hole on the lid.

13) Now slide the cylinders of the distance sensor through those holes so that the double sided tape adheres to the distance sensor.

14) Now use 4 screws to mount the Arduino. (Note: make sure you have sent the program to the arduino before performing this step, as you will be unable to reprogram it once it is mounted.)

15) Once the Arduino is mounted, place the Bluefruit LE Shield on top and make the connections discussed in the previous circuit assembly step.

Assembling the Flusher Arm

IMG_20160505_190110.jpg
IMG_20160505_190353.jpg
IMG_20160505_190313.jpg
IMG_20160505_195800.jpg
IMG_20160505_195821.jpg
IMG_20160505_195840.jpg

To assemble to flusher arm, place the pivot hole from the handle cover and the arm so that they are aligned. Once aligned, place a pin from the side that will face the toilet. Once the arm and handle cover are attached, do the same for connecting the arm to the lever.

The Arduino Code

1) Download the following files and extract SonicBlueLED.zip.

2) Install the remaining 3 ZIP files as Libraries within the Arduino IDE. To do so, click on Sketch, Include Library, and then click Add .ZIP Library...

3) Open the SonicBlueLED.ino file in the Arduino IDE. (If you have not done so already, download it from here.)

4) Connect your Arduino to the computer.

5) I the Arduino IDE, click on Tools and select Arduino/Genuino Uno for your board type and select your arduino from the Port selection.

6) Now click in the upper left corner of the Arduino IDE, click on the arrow pointing to the right to upload your code to the Arduino. The code will begin automatically once it has completed uploading.

Understanding the Arduino Code

SonicBlueLED.ino - Contains the user facing functions. Allows for easy tweaking to work best with your toilet and its surroundings.

BluefruitConfig.h - Configures pins to be used with the Bluefruit LE shield.

packetParser.cpp - Functions that interpret incoming data from the Android Application.

Setting Up Your Android Device

Screenshot_20160504-234912-01.jpeg
Screenshot_20160504-234933.png

I have forked a version of Adafruit's Bluefruit App for Android from GitHub to work specifically with the B.A.T. Flusher.

To install the B.A.T. Flusher App on your Android device, please do the following:

1) Go to your Android device's System Settings.

2) Click on Security.

3) Enable Unknown Sources.

4) Now download the APK file from this webpage on your Android device and open the download once it has completed and click Install.

5) Once the app has installed, open it and click Connect next to Adafruit Bluefruit LE.

6) Now touch the feces emoji to activate the flushing mechanism.

NOTE: This app is not supported on Android 4.3 and below and does NOT yet work on ANY Android N Developer Preview Build.

Downloads