Automatic Touch-free Toilet Paper Dispenser.

by Tsartsanis in Circuits > Arduino

8081 Views, 42 Favorites, 0 Comments

Automatic Touch-free Toilet Paper Dispenser.

IMG_20160223_155016.jpg
IMG_20160223_155005.jpg
IMG_20160223_155024.jpg
IMG_20160223_154646.jpg

Hello everybody.

In this instructable we will built an automatic touch-free toilet paper dispenser that you see at coffee shops or hospitals. Our built:

  1. Is cheaper than the ready-to-buy dispensers
  2. That means can be used at home.
  3. Is based in materials that you can buy from the internet
  4. Has an open source brain, an arduino

Lets start building our dispenser.

Hardware We Need

IMG_20160223_103134.jpg
IMG_20160223_103209.jpg
IMG_20160223_115427.jpg

Our built is based at the Actobotics robotic parts . We will need:

  1. An arduino. ( I used my Arduino Yun )
  2. A couple of jumper cables male-to-male and 4 wires to connect the ultrasonic sensor.
  3. A breadboard
  4. A continuous standard servo motor ( I used my HS-625MG servo motor )
  5. A star screwdriver and a hex key
  6. An Ultrasonic Sensor HC-SR04 with a Mounting bracket
  7. 3 x different sizes Actobotics channel a 15", 9" and a 6"
  8. 2 x 90 degrees Quad hub mount C
  9. A 90 degrees Quad hub mount D
  10. A standard servo plate B
  11. 4 x Pan head machine screws, 4 x Flat head machine screws, 10 x socket head machine screws. Screws
  12. Glue or a zip tie

Ok we have all our parts, lets start building the dispenser.

Ultrasonic Sensor

IMG_20160223_104148.jpg
IMG_20160223_104536.jpg
IMG_20160223_104632.jpg
IMG_20160223_104704.jpg
IMG_20160223_104858.jpg
IMG_20160223_104921.jpg
IMG_20160223_104944.jpg

Lets start with the Ultrasonic sensor.

Find 2 little screws from your supplies and attach the sensor to the mounting bracket. You will not need more than 2 screws,tight them well and then take the zip tie and place it to the 2 holes at the base of the bracket. If the holes are small take a small screwdriver and opened them a bit.

Thats it. Lets continue with the main body of our structure.

Build the Dispenser Main Body

IMG_20160223_105158.jpg
IMG_20160223_105235.jpg
IMG_20160223_105348.jpg
IMG_20160223_105652.jpg
IMG_20160223_105708.jpg
IMG_20160223_105725.jpg
IMG_20160223_105802.jpg
IMG_20160223_105814.jpg
IMG_20160223_105958.jpg
IMG_20160223_110026.jpg
IMG_20160223_110054.jpg
IMG_20160223_110151.jpg
IMG_20160223_110204.jpg
IMG_20160223_110227.jpg
IMG_20160223_110245.jpg
IMG_20160223_110357.jpg
IMG_20160223_110452.jpg
IMG_20160223_110536.jpg
IMG_20160223_110553.jpg
IMG_20160223_110813.jpg

This is the fun part.We will need:

  1. The 3 channels: 15", 9" and 6" (in the photo i forgot the 6")
  2. The 90 degrees quad hub mount C & D
  3. The hex key
  4. 8 x socket head machine screws

The main body of our dispenser is very very simple. Take the quad hub mount D and insert it to the 9" channel. Then take the 15" channel and with 2 screws connect the 2 channels. Now you have a "90 degree" structure.

Next we have to attach the quad hub mount C with 4 screws to the open side of the 15" channel. Attach the 6" channel to the quad hub mount with 2 screws.

And that's it. We have built the base and the main body. Next step we must attach the servo to the dispenser.

Attach the Servo Motor

IMG_20160223_111124.jpg
IMG_20160223_111204.jpg
IMG_20160223_111235.jpg
IMG_20160223_111244.jpg
IMG_20160223_111338.jpg
IMG_20160223_111503.jpg
IMG_20160223_111542.jpg
IMG_20160223_111553.jpg
IMG_20160223_111642.jpg
IMG_20160223_111711.jpg
IMG_20160223_112053.jpg
IMG_20160223_112119.jpg
IMG_20160223_112132.jpg
IMG_20160223_112203.jpg
IMG_20160223_112218.jpg
IMG_20160223_112609.jpg

In this step we will need:

  1. The servo & a wheel horn from the servo accessories
  2. The standard servo plate B
  3. 4 x Pan head machine screws, 4 x Flat head machine screws & a screwdriver
  4. The dispenser main body

Place the servo plate B to the servo and keep it tight with the 4 pan head screws. Place then the wheel horn to the servo with the servo screw and last connect upside down the servo to the top of the 15" channel of the dispenser main body. The reason that the servo is connected upside down is because of the wires. They are better that way and they don't bend.

Our structure is almost finished. Next we will attach the sensor.

Sensor - Final Adjusments

IMG_20160223_113146.jpg
IMG_20160223_113152.jpg
IMG_20160223_113227.jpg
IMG_20160223_113240.jpg
IMG_20160223_114243.jpg
IMG_20160223_114323.jpg
IMG_20160223_114329.jpg
IMG_20160223_114756.jpg
IMG_20160223_114808.jpg
IMG_20160223_114813.jpg
IMG_20160223_114827.jpg

Now we are ready to add the sensor to the dispenser.We will need:

  1. The dispenser main body
  2. A quad hub mount C
  3. 2 x socket had machine screws and a hex key.

Place the quad hub mount C to the back of the 15" channel with the 2 screws and then place the sensor to the mount and tight it with the zip tie

We have now finished with the dispenser. We must now add some wires from the sensor to the Arduino.

Connect the Sensor to Arduino - Expand Your Cables.

IMG_20160223_115427.jpg
IMG_20160223_115538.jpg
IMG_20160223_115750.jpg
IMG_20160223_115759.jpg
IMG_20160223_115933.jpg
IMG_20160223_120149.jpg
IMG_20160223_120202.jpg

In this step we wil need:

  1. The arduino (Yun in my case)
  2. The jumper wires male-to-male
  3. Some old pc wires
  4. The breadboard

First we must add some old wires in order to connect the sensor with the arduino. I used some old pc wires, if you have jumper wires male-to-female will do the job. Connect the wires to the back of the sensor and drive them to breadboard. The HC-SR04 has 4 wires :

  1. Gnd for ground
  2. Echo
  3. Trig for trigger
  4. Vcc for 5V

In my case i used:

  1. A red cable for Vcc
  2. A black cable for Gnd
  3. A white cable for Echo
  4. A green cable for Trig

It is a good idea to have different colours so you can identify each cable. Drive your cables to a different hole to the breadboard. Then with jumper wires male-to-male you can connect them to the Yun. Again from the breadboard to the Yun i used:

  1. A red jumper wire for Vcc. to pin 5V to arduino
  2. A black jumper wire for Gnd to pin Gnd to arduino
  3. A yellow jumper wire for Echo to pin 12 to arduino
  4. A yellow jumper wire for Trig to pin 13 to arduino.

Expand your servo cables with 3 jumper wires male to male and drive them also to the breadboard. In my case:

  1. Red to 5V
  2. Black to Gnd
  3. Yellow to arduino pin 6

We are now ready to test our code.

Arduino Code - Test It

Screenshot - code.png
Screenshot - code2.png

The arduino code is controlling the servo to move every time the sensor senses an object closer than 5 cm.That means that as long as we keep our hands closer than 5cm to the sensor the paper will unfold.

I found the code from here Tree house projects and i made the adjustments, because i use a servo and not leds.

Upload the code from the arduino IDE to your arduino and you are ready to test it.

Use a Battery Tray to Make It Portable - Video Demostration

IMG_20160223_153149.jpg
IMG_20160223_153225.jpg
Actobotics automatic touch-free toilet paper dispenser.

It is a good idea to use a cheap 4 cell battery tray to make the dispenser portable. Just take 2 jumper wires male-to-male and connect:

  1. The black to Gnd pin of arduino
  2. The red to VIn pin of arduino

Once you upload your code from the pc to the arduino, disconnected it, connect the battery tray and if your batteries are fully charged the dispenser will work fine.You must add the toilet paper to the wheel horn with some glue.

This instructable is suitable for older people like my grandmother. It is very easy to learn how to operate it. Also you can take the dispenser to the camping during your holidays or you can teach early robotics to young people

Enjoy.