Introduction: Automatic Touch-free Toilet Paper Dispenser.
In this instructable we will built an automatic touch-free toilet paper dispenser that you see at coffee shops or hospitals. Our built:
- Is cheaper than the ready-to-buy dispensers
- That means can be used at home.
- Is based in materials that you can buy from the internet
- Has an open source brain, an arduino
Lets start building our dispenser.
Step 1: Hardware We Need
Our built is based at the Actobotics robotic parts . We will need:
- An arduino. ( I used my Arduino Yun )
- A couple of jumper cables male-to-male and 4 wires to connect the ultrasonic sensor.
- A breadboard
- A continuous standard servo motor ( I used my HS-625MG servo motor )
- A star screwdriver and a hex key
- An Ultrasonic Sensor HC-SR04 with a Mounting bracket
- 3 x different sizes Actobotics channel a 15", 9" and a 6"
- 2 x 90 degrees Quad hub mount C
- A 90 degrees Quad hub mount D
- A standard servo plate B
- 4 x Pan head machine screws, 4 x Flat head machine screws, 10 x socket head machine screws. Screws
- Glue or a zip tie
Ok we have all our parts, lets start building the dispenser.
Step 2: Ultrasonic Sensor
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.
Step 3: Build the Dispenser Main Body
This is the fun part.We will need:
- The 3 channels: 15", 9" and 6" (in the photo i forgot the 6")
- The 90 degrees quad hub mount C & D
- The hex key
- 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.
Step 4: Attach the Servo Motor
In this step we will need:
- The servo & a wheel horn from the servo accessories
- The standard servo plate B
- 4 x Pan head machine screws, 4 x Flat head machine screws & a screwdriver
- 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.
Step 5: Sensor - Final Adjusments
Now we are ready to add the sensor to the dispenser.We will need:
- The dispenser main body
- A quad hub mount C
- 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.
Step 6: Connect the Sensor to Arduino - Expand Your Cables.
In this step we wil need:
- The arduino (Yun in my case)
- The jumper wires male-to-male
- Some old pc wires
- 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 :
- Gnd for ground
- Trig for trigger
- Vcc for 5V
In my case i used:
- A red cable for Vcc
- A black cable for Gnd
- A white cable for Echo
- 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:
- A red jumper wire for Vcc. to pin 5V to arduino
- A black jumper wire for Gnd to pin Gnd to arduino
- A yellow jumper wire for Echo to pin 12 to arduino
- 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:
- Red to 5V
- Black to Gnd
- Yellow to arduino pin 6
We are now ready to test our code.
Step 7: Arduino Code - Test It
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.
Step 8: Use a Battery Tray to Make It Portable - Video Demostration
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:
- The black to Gnd pin of arduino
- 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