Thanh Chung – Automatic toilet paper dispenser


I don’t like dirty/wet hands on my toilet paper so I made an automatic toilet paper dispenser. This little machine will dispense toilet paper whenever a hand cover its right light sensor. To make this machine I use one servo motor, an adruino board, a bread board, two light sensor, an LED light, a five volt battery, foams, ducktape and wires


Just me, Thanh Chung


I build a toilet paper dispenser

The adruino, breadboard, battery and sensors was put on top of the dispenser

Two holes were cut to allow the light-sensors to sense light.

The Servo were attached to the side of the dispenser and the Paper-rolls holder were modified so it can fit into the servo. The teeth-like cardboard piece were added at the bottom  to help tearing paper from the paper-roll.

Here is a video of the servo working:

And a video after everything were put together:

Here is the wiring:

What’s missing in this picture is a wire connect from the ground port on the adruino to the ground section on the bread board. Three wires that connect the servo to the adruino but it’s pretty basic. The brown wire from the servo goes into pin 12, red and yellow wire goes into positive and negative on the bread board.

Circuit Diagram


  • Everything worked out the way I wanted it to. There is a small problem of loading and unloading rolls of toilet paper into the machine because the foam box is not very sturdy.
  • A way to solve this problem is to built a wooden box instead of foam.
  • If I were to expand my project in the future, I would add more LED light to indicate if the paper on the roll have ran out or needs to be replace soon.
October 4th, 2012 6:04 pm

very cool
do you have the code and diagram for it.
also why did you use two light sensors instead of just one.

Leave Your Comment