The Toilet Paper Automatic Exchanging System with Detecting Stock Function

In this paper, we discuss the toilet paper automatic exchanging system that we have developed and improved. This system can exchange toilet paper in automatically. The system measures color of the toilet paper and its core by using the color sensor. The system judges the toilet paper is already used up or not based on measured RGB value. If the system judged the toilet paper is already used up, the system exchanges toilet paper. This system also can stock some spare toilet paper in the back of the system. The system measures the number of spare toilet paper and sends its data to web server. The toilet administrator or cleaning company can check the rest of toilet spare toilet paper through web browser. Therefore, the administrator can provide toilet paper in efficiently. By using developed system, toilet administrator or cleaning company replenishes toilet paper only and user who uses the restroom doesn't need to exchange toilet paper.


Introduction
Everyone use toile at home, station and public facility.However, some people often don't exchange toilet paper though toilet paper runs out.Reasons for people who don't exchange toilet paper are some next matters.They are "They have habit to exchange by environment in which they grew up.","They can't find that toilet paper run out."and "It is dirty to exchange toilet paper after relieving themselves.".However, most of reason is "It is bothersome.".Although we can exchange toilet paper in about 10 seconds to 20 seconds, some people feel frustrated.Due to some people never replaces the toilet paper run out, other people feel shitty (1) .That some people don't replace the toilet paper gets on other people's nerves, and sometimes they have trouble about that.Also, there are some previous researches about assisting to use toile for physically challenged persons (2) .However, exchanging toilet paper is not much studied in those researches.Therefore, it is difficult for physically challenged persons to use toilet if the toilet paper is run out.
Taking out toilet paper becomes problematic in the restroom at the station and the public facilities.This is because toilet paper is easy to exchange in the general toilet paper holder.The rate of people who had taken out that is a few, but a lot of people troubled by taking out toilet paper (3) .There is almost antitheft toilet paper holder with key (4) .Also there is special toilet paper that length eight time of normally one for saving the trouble of exchanging toilet paper (5) .But they have hard to use, for example that takes labor of exchange toilet paper with key and buy special toilet paper that compatible with those toilet paper holders.
From these backgrounds, we had developed the system using normal toilet paper holder (6,7) .It can exchange toilet paper in automatically.The system has stock case to stock spare toilet paper.After the exchanging toilet paper, the system takes out spare toilet paper from stock case.Therefore, the system can exchange toilet paper as long as the stock case is not empty.By using developed system, toilet administrator or cleaning company replenishes spare toilet paper only and user doesn't need to exchange toilet paper.
In this study, we have improved the system.We enhanced the anti-theft function of the system for the toilet paper will not be stolen.Further, the system became able to measure the number of spare toilet paper and sends its data to web server.The toilet administrator or cleaning company can check the rest of toilet spare toilet paper through web browser.Therefore, the administrator can provide toilet paper in efficiently.

Appearance of the system
Overview of this system is shown in Fig. 1.The body is composed of toilet paper holder (W373 by SAN-EI Faucet Mfg Co.,Ltd), color sensor (ColorPAL 28380 by Parallax Inc.), distance sensor (GP2YOA02YK by SHARP Inc.), wifi communication module (ESP-WROOM-02 by Espressif Systems Pte.,Ltd), servo motors, and Arduino (MEGA 2560).The Fig. 2 is the outline block diagram of this system.Arduino is performing all of the control.Spare toilet papers are stocked in the back of the system.One of spare toilet paper is put in aluminum case below the toilet paper holder.The system exchanges that toilet paper for run outed toilet paper when the toilet paper that is set in toilet paper holder is run out.

How to exchange toilet paper
The exchanging system is roughly divided into two: the moving unit, and the sensor unit.The unit is composed of the color sensor, and Arduino.From the viewpoint of privacy, using camera is not appropriate (8) .Therefore, we use color sensor for detecting the toilet paper is run out.The color sensor is placed on the inside of the toilet paper holder as shown in Fig. 3.When the color sensor irradiates light to an object, the sensor receives the reflected light.The reflected light is different by the color of the object that is irradiated light.The color sensor is measuring the color of the toilet paper.Usually, the color sensor detects the white color of the toilet paper.However, when the toilet paper is used up, the core of toilet paper appears.In that case, the color sensor measures toilet paper core's color.Due to that, the different RGB value is sent Arduino by the color sensor.By detecting this difference of   value by the Arduino, the system can know the timing of changing toilet paper.Also, if the RGB value sudden change, the system can predict toilet paper is stolen.When the system detects the toilet paper core, the system transmits the instruction to the Moving unit thorough the Arduino program.
Moving unit is composed of servo motors, Arduino and toilet paper holder.Arduino has a role to control the moving part.The direction of rotation of the servo motors is controlled by the signal submitted by Arduino.The servo motors rotate the pulleys based on the instruction from Arduino.The aluminum case attached pulley with wire.The stock of toilet paper is placed in the case.When the servo motor is rotated, the stock of toilet paper is moved upward with aluminum case by pulleys and wire.The aluminum case is moved along the rail as shown in Fig. 4, therefore the system can carry the toilet paper the holder without fail.Due to that, the toilet paper core is pushed the stock of the toilet paper and exchanged.The timing of exchanging the toilet paper is detected by the Arduino.The electrode plates are attached toilet paper holder's arm.The 5V is applied to electrodes.Usually, each electrode plates are contacting and molding the circuit, but when exchange the toilet paper, the electrode plates are move away.So, the circuit is disconnected.However, when the system has finished exchanging toilet paper, the toilet paper holder's arm returns former state.Due to that, the timing of stopping rotate servo motors is determined by measuring the voltage of the circuit by the Arduino.

Replenish spare toilet paper to aluminum case
We have made the stock case for stocking some spare toilet papers.This stock case is attached the back of the system.The system replenishes toilet paper to aluminum case from stock case.Two servo motors are attached stock case and two arms that are attached motor are put into case as shown in Fig. 5.The arms work like prop.The distance of arms is about 14 cm.If arms are open, the toilet paper is moved to aluminum case.The system controls those arms open and close for replenishing spare toilet paper one by one to aluminum case.

Network communication unit
The network communication unit is composed of the distance sensor, wifi communication module, and Arduino.The distance sensor is attached to the inside of the toilet paper stock case as shown in Fig. 6.The distance sensor measure the distance of between sensor and stacked spare toilet paper in Fig. 7. Arduino detects the number of the spare toilet paper based on measurement result.After detecting the number, the Arduino send web server the data of the number of the spare toilet paper using wifi communication module.The server receives the data using PHP.Thus the toilet administrator can check the rest of   toilet spare toilet paper through web browser.Using this function of the system, the toilet administrator or cleaning company can provide toilet paper in efficiently.

Antitheft of toilet paper
We attached the cover to the system for antitheft of toilet paper as shown in Fig. 8.When the toilet administrator provides toilet paper, he just opens the stock case and puts in toilet paper.If we lock the case, the administrator he has the key can provides toilet paper easily.Others can't open the case and take out the toilet paper from stock case.

Experiment
We tested the network communication unit whether it can detect the number of the spare toilet paper and send its data to web server.The size of toilet paper is 10 cm in diameter, 11 cm width.As a result of the experiment, the system could drive properly and the unit could detect the number of the spare.We could check the rest of spare toilet paper through web browser as shown in Fig. 9.

Conclusions
We developed and improved the system to exchange toilet paper in automatically.The system could detect used up toilet paper.After detecting that the toilet paper is already used up, the system could the exchange toilet paper.Also the system could put some stock of toilet paper and detect the rest of spare toilet paper.In finally, the system could send the data of rest spare toilet paper to web server and we could check it through web browser.However, we still have problems.Future issue is collection exchanged toilet paper core.

Fig. 4 .
Fig. 4. The aluminum case is moved along the rail.