Tissuein Aja Tissue Dispense

by kenny130 in Circuits > Arduino

124 Views, 1 Favorites, 0 Comments

Tissuein Aja Tissue Dispense

IMG-20231219-WA0142.jpg
WhatsApp Image 2023-12-19 at 23.23.00.jpeg
WhatsApp Image 2023-12-19 at 23.23.00 (1).jpeg

Tissuein Aja Tissue Dispenser Bina Nusantara University Computer Enginering

By:

  1. Nicholas Oliver Marvin S - 2540120894
  2. Adyatma Dwiki D - 2502008984
  3. Kenny Christiano Alvarez - 2540119482


Using tissue has been a crucial part of both public and personal hygiene routines. Our aim is to rethink the traditional approach to tissue management by creating an Automatic Tissue Dispenser that meets the changing needs of contemporary facilities. Advanced technology is effortlessly integrated with this gadget, which offers a refined and hygienic user experience with a responsive capacitive touch sensor. Its distinctive feature, which goes beyond traditional dispensing, is the Time-of-Flight (TOF) sensor. This sensor does more than just detect when tissue is needed as it also measures the tissue roll's width exactly.


With its ability to be used in a various places such as malls, schools, hospitals, and buildings, this dispenser ushers in a new era in automated tissue management. The dispenser communicates with a Flutter application through a connection with a Firebase server. When the TOF sensor detects a preset range value, it starts sending information to the application. This information includes precise location specifics, such as the floor and toilet area that need to have tissue refilled or regions that have already run out.


How the system works is firstly the user would touch the capacitive sensor to trigger the DC motor for rolling the tissue, the servo motor for opening the gripper and closes it to hold, after the tissue stops rolling, the user can take and strip the tissue. While all of that is running, the LCD will display a fun fact about type of feces.


Our main selling point is we aim to for the tissue management system. As time goes by if the tissue is used frequently, the width of the tissue will decrease and the TOF sensor will detect the range as it is decreasing. Once the sensor has detected a certain value that we set in the Mobile Application software, the app will give notifications of which the floor, and which toilet has the tissue run out. We aim so that tissue management can be more effective and faster. We are hoping such that hospitality managements can use this kind of technology to advantage for tissue management in hopes that whoever is in charge of managing that the tissue is ready in each toilet can check from distance whether or not the tissue has run out or need to be refilled.

Supplies

  1. 15x20 Acrylic Glass
  2. M2 Screw
  3. M3 Screw
  4. DC Motor
  5. Servo Motor
  6. TFT SPI 240x320 LCD Screen
  7. Capacitive Touch Sensor
  8. TOF Sensor
  9. 5 Volt Power Supply
  10. IRL ML 2502 MOSFET
  11. 3D printed parts

3D Print

First, we would need to 3D print the parts the are required for this project. Below is the attached stl files for the 3D print parts. There are 4 different parts that needs to be printed, the acrylic holder which has 2 different types, the tissue holder rod, the crane for holding tissue that will be mounted to the servo motor and the tissue roller holder for placing the tissue.

Code

Screenshot 2024-01-04 102442.png
Screenshot 2024-01-04 101931.png
Screenshot 2024-01-04 102110.png
Screenshot 2024-01-04 102139.png
Screenshot 2024-01-04 102201.png
Screenshot 2024-01-04 102223.png
Screenshot 2024-01-04 102243.png
Screenshot 2023-12-28 123135.png
Screenshot 2023-12-28 123203.png

Thhis is our main code for the program. Firstly we would need to setup some libraries for our program. In this code, there are several libraries included in our program which are:

  • Servo motor library
  • TFT SPI library
  • Firebase library
  • TOF sensor library

Afterwards we would need to include the libraries in our program.


We then would need to add our animation GIF files into the include file in the project file directory. These include files are .h type of files and as of the current project, there are 8 different types of frames for the animation for the LCD display. After that, we declare some of the variables that is needed for our program to run. Since we are using a MOSFET, we would need to use PWM controlled from the GPIO pin of the ESP for the DC motor, in this case we are not using any driver for any motor. We would also need to declare the variables for the capacitive touch sensor, the servo motor and firebase connections.


We need to configure a certain function for the display animation. There are currently 8 picture frames that will be played for the animation. In the function we will need to "push" the image to the TFT LCD Display and then give a delay for 1.5 seconds to move to the next frame to be played.


Since we are also using RTOS we need to declare and include the libraries as shown in the picture of the code. We will use semaphore for this project. Afterwards we declare the tasks that will run simultaneously that being the TOF sensor that will send data repeatedly to the Firebase and the LCD display to display the animation. Both of the task will loop and continue simultaneously non-stop.


Afterwards we declare another function for the Wi-Fi connection. The Wi-Fi connection will connect to the targeted SSID and Password which is declared within the code. The non dependent Wi-Fi connection task is used so that the program can run with or without the any Wi-Fi connection. However the drawbacks to when the device is not connected to Wi-Fi is that it cannot send the width data from the TOF sensor to the Firebase. If the connection from Wi-Fi is lost, it will directly reconnect back within half of a second. In this code, I also provided alternative method for connecting to the Wi-Fi using a Wi-Fi manager. Users may suit themselves which one is more preferable.


In the void setup, it is used to setup the Wi-Fi connection and firebase connection. We would also need to setup the RTOS task for the TOF and LCD so that they can run each of their own program at the same time. Then we would declare the activation of PWM for the DC motor, the servo motor and the capacitive touch sensor.


In the void loop. It is the logic for when the capacitive touch sensor is touched then the servo motor will move to open the gripper and then rotates the DC motor to roll the tissue and close the servo motor to hold the tissue.

Setup the Firebase

Screenshot 2023-12-28 124837.png

The Firebase is used as a medium placeholder to connect the Hardware and the Software. The TOF sensor will send data to the Firebase and the flutter application will fetch the TOF sensor data from the firebase. In the firebase we also stored other floors and areas indicating another Tissue Dispenser Device present. For the Firebase alone, here we set 3 locations for the tissue. We can change the location name as we wish however keep in mind that changing the location name means to make changes to the target from the TOF sensor in the main code from the ESP code. If there are multiple tissue boxes, we need to assign each TOF sensor to different IDs and locations.

Schematic & PCB Making

Screenshot 2024-01-04 105217.png
Screenshot 2024-01-04 105301.png

For the schematic and PCB design. We attempt to make it as small as we could so that it would not take any bigger space for the hardware. The power supply is directly connected to the ESP, we are using micro USB cable connected to the ESP. However it needs to have a supply to drive of a minimum 5 volt and 1 Amps. For the rest of the design PCB, you can follow the from the above design.

Flutter Application Design

WhatsApp Image 2023-12-28 at 11.36.05.jpeg
WhatsApp Image 2023-12-28 at 11.35.46.jpeg

The Flutter Mobile Application here is used to give the information of the width of the tissue for each floor and area. In the flutter program, we fetch the data of the TOF from the Firebase and when the value from the sensor reaches 90 or above 90 it will give notifications in the app that the tissue on the certain floor and area needs to be refilled.


We also prepared the values for other places, floors and toilet sections for monitoring each tissue value in each different parts of the building.

Assemble the Hardware

WhatsApp Image 2023-12-19 at 23.23.00 (1).jpeg
WhatsApp Image 2023-12-19 at 23.23.00.jpeg
WhatsApp Image 2023-12-19 at 23.22.59.jpeg

Assemble the Hardware as shown in the above picture.


Firstly we need to drill some holes into the acrylic plates. We would drill all of the sides of the acrylic plates. After we drill the necessary holes on the acrylic plates, we would need to assemble the 3D printed parts and the components as shown in the picture. We will need to assemble the acrylic plates into a cube like structure. We the insert the rod for rotating the tissue on the right side and mount the DC motor on the middle part of the acrylic plate.


And the we need to place the TOF sensor at the back of the acrylic plates as it is the way for us to detect the width of the tissue. For the SPI LCD Display, we need to make a mount on the front side of the acrylic plate. For the tissue gripper, we will need to make a mount on the lower left side of the acrylic plate. The backside is then used for the PCB placement.

Flowchart

WhatsApp Image 2023-12-28 at 12.04.44.jpeg

This is the flowchart for our system and program.

Block Diagram

WhatsApp Image 2023-12-28 at 12.14.06.jpeg

This is the block diagram for our system and program.

Demo Video

Tissue Dispenser Tissuein Aja

This is the video demo for our system and program.

Code Links

ESP32 Hardware Code:

https://github.com/KennyAlvarez130/SPE.git


Flutter Mobile App Code:

https://github.com/Adyatma-Dwiki/espeee

Conclusion & Evaluation

In conclusion, the design solution for the Automatic Tissue Dispenser seamlessly integrates advanced technology to revolutionize traditional tissue management in contemporary facilities. By combining a responsive capacitive touch interface with cutting-edge sensors, including the innovative Time-of-Flight (TOF) sensor, the dispenser offers a refined and hygienic user experience. We are optimistic to believe that the Tissue Dispenser would provide a better solution for a tissue management system.


However so, there are still improvements that is needed to be made. We would recommend improvements from the aspect of the casing. For a more compact and efficient concrete casing for the Automatic Tissue Dispenser, consider employing lightweight and high performance concrete mixes to reduce weight while maintaining durability. Implement a modular design for easy assembly and maintenance, prioritizing minimalistic aesthetic for spaces where appearance matters. We would also recommend to optimize internal component arrangement to minimize dead space and the possibilities of antimicrobial entering directly into the tissue.

References

Man, M., Abu Bakar, W. A. W., & Noor, M. I. H. M. (2019). ITDS: An Intelligent Tissue Dispenser System. International Journal of Recent Technology and Engineering (IJRTE), 8(3), ISSN: 2277-3878.