An-Najah National University Faculty of Engineering Information Technology Department of Computer Engineering Clothes Printing Machine Done by Tasneem Adnan Khalil Asma Jehad Hamideh Supervisor Dr.Saed Tarapiah January , 2024 Acknowledgements As we close this chapter of our academic journey with the completion of our graduation project, our heart is filled with immense gratitude and deep emo- tions. This journey has been more than just an educational endeavor; it has been a journey of growth, challenges, and relentless pursuit of our dreams. To our family and closest friends, words fall short of expressing our gratitude. Your unwavering faith in us, your endless encouragement, and your sacrifices have been the wind beneath our wings. You have been our safe harbor in the storms and our cheerleaders in every small victory. This moment of triumph is not just mine but ours. It is the culmination of countless shared moments, words of encouragement, and mutual support. As we stand on the brink of graduation, looking back at this incredible journey, I am reminded that the greatest achievements are never solitary, but a tapestry woven from the love and support of those around us. Thank you, from the bottom of our hearts, for being an integral part of our story. 1 Disclaimer This report is the work of students from the Computer Engineering Department at the Faculty of Engineering, An-Najah National University. It has been sub- ject to limited revisions, primarily focused on editorial enhancements, in line with the evaluation criteria. As such, it may contain certain linguistic inaccu- racies and content discrepancies. The views, conclusions, and recommendations presented in this document are exclusively those of the student authors. An- Najah National University does not bear any responsibility for any outcomes resulting from the use of this report beyond its intended educational purpose. 2 Contents 1 Introduction 6 1.1 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3 Importance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4 Scope of the Work . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2 Literature Review 9 3 Methodology 9 3.1 HARDWARE COMPONENT . . . . . . . . . . . . . . . . . . . . 9 3.1.1 Micro-controllers . . . . . . . . . . . . . . . . . . . . . . . 9 3.1.2 Motors and Drivers . . . . . . . . . . . . . . . . . . . . . . 10 3.1.3 Pumps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.1.4 Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.1.5 CNC XY LINEAR MOTION . . . . . . . . . . . . . . . . 13 3.1.6 Circular MOTION . . . . . . . . . . . . . . . . . . . . . . 13 3.1.7 Color sensor . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.1.8 Limit switches . . . . . . . . . . . . . . . . . . . . . . . . 14 3.1.9 Reed Switch and Magnet . . . . . . . . . . . . . . . . . . 15 3.1.10 LCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.1.11 Keypad . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.1.12 Bluetooth Module . . . . . . . . . . . . . . . . . . . . . . 17 3.1.13 BREADBOARD . . . . . . . . . . . . . . . . . . . . . . . 18 3.1.14 WIRES . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.1.15 Ultrasonic sensor . . . . . . . . . . . . . . . . . . . . . . . 19 3.1.16 Power Supply . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.2 SOFTWARE IMPLEMENTATION . . . . . . . . . . . . . . . . 21 3.2.1 Libraries: . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.2.2 Flow Chart: . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.3 MOBILE APPLICATION . . . . . . . . . . . . . . . . . . . . . . 23 4 RESULTS AND DISCUSSION: 25 5 CONCLUSIONS AND RECOMMENDATIONS 26 5.1 SUMMARY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5.2 RECOMMENDATIONS . . . . . . . . . . . . . . . . . . . . . . . 26 5.3 WHAT WE HAVE LEARNED . . . . . . . . . . . . . . . . . . . 27 5.4 FUTURE WORK . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3 List of Figures 1 Arduino Mega 2560 . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2 Stepper Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3 Microstep Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4 DC Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 5 Peristaltic Pump . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 6 Water Pump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 7 4 channel relay module . . . . . . . . . . . . . . . . . . . . . . . . 12 8 1 channel relay module . . . . . . . . . . . . . . . . . . . . . . . . 12 9 CNC XY LINEAR MOTION . . . . . . . . . . . . . . . . . . . . 13 10 Circular MOTION . . . . . . . . . . . . . . . . . . . . . . . . . . 13 11 Color Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 12 Limit switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 13 Reed Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 14 Magnet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 15 LCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 16 4x4 Keypad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 17 HC-05 Bluetooth Module . . . . . . . . . . . . . . . . . . . . . . 17 18 BREADBOARD . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 19 Electrical wires . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 20 male-to-male, and male-to-female,female-to-female . . . . . . . . 19 21 Ultrasonic sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 22 pc power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 23 24V power supply . . . . . . . . . . . . . . . . . . . . . . . . . . 20 24 Flow Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 25 User interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 26 Choose Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 27 Choose Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4 Abstract The fashion industry’s demand for personalized and custom clothing has grown exponentially. Our hardware graduation project presents an innovative system that com- bines color mixing technology with screen printing to enable customized clothing design. Also, screen printing takes a lot of physical effort when done manually. By automating the screen-printing part, we save time and a lot of effort in producing personalized clothes. Our goal is to design a hardware system capable of accurately mixing colors and use them in the screen-printing process for fabric customization. It utilizes a 2 X,Y CNC’s with limit switches to handle clothes and printing on the frames. and a Spur gears with stepper motor and reed switch for choosing the design. A color mixing unit using peristaltic pumps, a color sensor and a motor for mixing. Users will get to choose between 6 colors and 3 designs through either an LCD with a keypad. Or a mobile application connected to the machine through Bluetooth. 5 1 Introduction 1.1 Problem Statement The fashion industry is currently experiencing a significant surge in demand for personalized and custom clothing. However, existing methods of fabric cus- tomization, particularly in screen printing, are facing several challenges: • Manual Intensity: Traditional screen printing requires substantial physi- cal effort, making it a time-consuming, especially when producing large quantities of a specific design. • Limited Customization in Color Mixing: Current printing techniques of- ten lack the capability for color mixing, restricting the potential for true customization in clothing designs. • Technical Constraints: The lack of advanced technological integration in the printing process limits the ability to offer versatile and user-friendly customization options to consumers. Our hardware graduation project aims to address these problems by intro- ducing a system that combines color mixing technology with automated screen printing. This system is designed to enhance the efficiency and customization capabilities in the screen printing of fabrics, meeting the evolving demands for personalized fashion. 1.2 Objectives The overarching objective of our hardware graduation project is to revolutionize the process of fabric customization in the fashion industry, aligning with the growing trend of personalized and custom clothing. To achieve this, our goals are: 1. Innovative Color Mixing: Design and implement a system capable of ac- curately mixing colors, enhancing the scope of customization in clothing designs. 2. Automated Screen Printing: Develop an automated screen-printing mech- anism to reduce the physical effort and time involved in producing multiple garments with a specific design. 3. Efficient Handling and Precision: Utilize a X,Y CNC mechanism, ensuring efficient and precise handling of clothes during the printing process. 4. Integration of Technology: Incorporate a color mixing unit using peri- staltic pump and a color sensor, paired with a screen printer capable of handling fixed designs. 6 5. User-Friendly Interface: Provide a dual-mode user interface an LCD with a keypad and a mobile application connected via Bluetooth. This will allow users to easily select their preferred colors and designs. 6. Educational and Practical Application: As a student project, we aim to not only demonstrate the practical application of our engineering knowl- edge but also to contribute a meaningful and innovative solution to the current challenges in textile customization. Through these objectives, our project aims to create a user-friendly system that opens up new possibilities for personalized clothing production, offering a blend of technological innovation and practical utility in the realm of fashion. 1.3 Importance Our project impacts the fashion industry by introducing an innovative, au- tomated solution for customized clothes printing. It streamlines the screen printing process, enhancing efficiency and enabling color customization. This advancement is not only a technological leap in textile production but also serves as a valuable educational model demonstrating the practical application of engineering in addressing industry challenges. 1.4 Scope of the Work The scope of our project encompasses the following key areas: 1. Design and Development: Creating a prototype of an automated clothes printing machine. This includes the design of both the hardware (2 X,Y cnc mechanism, color mixing unit using pumps and a DC motor, and Spur gears carrying a Circular disc containing the frames that have the designs). and software components (control interface via LCD keypad and mobile application). 2. Color Mixing Technology: Integrating a system capable of accurate color mixing to offer 6 colors to choose from. using peristaltic pump, color sensor and DC motor for mixing. 3. Automation of Screen Printing: Automating the screen printing process to improve efficiency and reduce the manual effort typically associated with traditional methods using Stepper motors and CNC mechanism. 4. User Interface: Developing a dual-mode interface (LCD keypad and mo- bile application) to allow users to easily select and customize designs and colors. 5. Testing and Evaluation: Conducting tests to assess the functionality, ef- ficiency, and user-friendliness of the machine. This includes ensuring the precision of color mixing and the effectiveness of the automated printing process. 7 6. Educational Contribution: Documenting the development process and re- sults to contribute to the academic understanding of applying computer engineering principles in practical, real-world problems. This project does not cover the mass production of the machine, detailed market analysis, or long-term durability testing, as these aspects fall beyond the scope of our current academic and resource constraints. 8 2 Literature Review Our project adds to the idea of color mixing by incorporating it into the screen printing process. Leveraging the existing idea of color blending, we introduce a new dimension to fabric customization. By seamlessly integrating this color mixing concept into our automated screen printing system, we optimize the efficiency of the printing process. This innovative approach not only streamlines traditional methods but also offers users a wider range of customized options. By mixing colors and using screen printing together, we aim to create a better way of customizing fabrics, our project seeks to provide an advanced solution to meet the rising demand for personalized and uniquely designed clothing in the fashion industry. 3 Methodology In this project, both software and hardware methods were combined to control the whole project. This project have color choosing and mixing part, choosing the design part, and handling clothes during the printing part. 3.1 HARDWARE COMPONENT 3.1.1 Micro-controllers • ARDUINO MEGA 2560: Arduino Mega has 54 digital input/output pins, 16 analog inputs, 4 hardware serial ports, a 16MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller. Figure 1: Arduino Mega 2560 9 3.1.2 Motors and Drivers • Stepper Motors: we used 5 stepper motors 4 for the X,Y movement. and one to move the Spur gears to move the circle carrying the designs. each stepper we used needs at least 12V and 3.5A when working 1.5A just to turn it on. Figure 2: Stepper Motor • Microstep Driver: we used 5 drivers to control the 5 steppers we have. Figure 3: Microstep Driver 10 • DC Motor: For the colors mixer. Figure 4: DC Motor 3.1.3 Pumps • peristaltic pump: we used 4 peristaltic pumps each pump uses a 12V DC Motor. to move the color from a container to the mixer (each pump is detected to a specific color) and the last pump is to move the final mixed color to the frame. Figure 5: Peristaltic Pump 11 • water pump: We used water to clean the mixer. Figure 6: Water Pump 3.1.4 Relays we used 6 relays, 3 to control the color pumps, 1 for the pump of the final mixed color, 1 for the water pump, and 1 to control the DC motor used in the mixer. Figure 7: 4 channel relay module Figure 8: 1 channel relay module 12 3.1.5 CNC XY LINEAR MOTION we have 2 XY motions one to carry the clothes from start to under the chosen frame and one for the ”printing” part. Figure 9: CNC XY LINEAR MOTION 3.1.6 Circular MOTION we used Spur gears connected to a stepper motor to move a circle carrying the frames that contain the designs. Figure 10: Circular MOTION 13 3.1.7 Color sensor A color sensor detects the color it stops the mixer when the color is the same as the chosen color. This sensor usually detects color in RBG scale. This sensor can categorize the color as red, blue or green. These sensors are also equipped with filters to reject unwanted IR light and UV light. We used the color sensor to detect the desired color after the mixing to stop the blender Figure 11: Color Sensor 3.1.8 Limit switches The micro limit switch has three pins (NO, NC, COM), which makes the circuit connected when pressed and breaks when released. Our machine utilizes 8 limit switches to manage motion and ensure it op- erates within safe parameters. These switches automatically halt or alter the machine’s movement when it reaches certain points 14 Figure 12: Limit switches 3.1.9 Reed Switch and Magnet The reed switch[i] is an electromechanical switch operated by an applied mag- netic field. We used it along with magnets to halt the rotational motion of the circle at the desired frame. Figure 13: Reed Switch Figure 14: Magnet 3.1.10 LCD LCDs are used to display information from Arduino, keypad or any sensor con- nected to it. There are two different types of LCDs available: graphical and 15 character LCDs. In this project, a 20×4 character LCD was used (20 columns and 4 rows). A potentiometer is also needed to adjust the contrast of the LCD Figure 15: LCD 3.1.11 Keypad The 4×4 matrix keypad is an input device; it is usually used to provide input value in a project. It has 16 keys in total, which means it can provide 16 input values, and it uses 8 GPIO pins of a microcontroller. In this project, a keypad was used to allow users to choose the colors and frame they want and to turn on the printing machine Figure 16: 4x4 Keypad 16 3.1.12 Bluetooth Module HC-05 is a Bluetooth module that is designed for wireless communication. This module allows all serial-enabled devices to communicate with each other using Bluetooth. We added it to our project so it can connect with our mobile app. This lets us control the machine wirelessly from a phone. Figure 17: HC-05 Bluetooth Module 17 3.1.13 BREADBOARD We utilized 3 breadboards to link different parts like the ground (GND), as well as the 5-volt and 12-volt power supplies, with devices that require these specific voltages. Figure 18: BREADBOARD 3.1.14 WIRES A variety of connections was made using four types of wires: Electrical wire, male-to-male, female-to-female, and female-to-male. • Electrical Wires Figure 19: Electrical wires 18 • male-to-male, male-to-female,and female-to-female. Figure 20: male-to-male, and male-to-female,female-to-female 3.1.15 Ultrasonic sensor We used an ultrasonic sensor to monitor the fill levels of color containers in our project. This sensor measures the distance to the surface of the contents using sound waves, providing an accurate and automated method to determine container fullness. Figure 21: Ultrasonic sensor 19 3.1.16 Power Supply • pc power supply: to power the pumps with 12V and other components which needed 5V. Figure 22: pc power supply • 24V power supply: to power the stepper motors we used (2) 24V power supplies one gives 5A and the other gives 10A. Figure 23: 24V power supply 20 3.2 SOFTWARE IMPLEMENTATION 3.2.1 Libraries: • Liquid Crystal Library: Controls LCDs with Arduino Mega. • Keypad Library: Enables the use of matrix keypads with Arduino Mega. • Wire Library: Allows I2C communication with devices, using only two wires for data and clock signals. • SoftwareSerial: to use the Bluetooth. 3.2.2 Flow Chart: First, the system initializes, prompting the user to make a choice. If the user inputs ’C’, the system initiates a cleaning cycle, activating the water pump and mixer before discarding the contents, which suggests a purge or reset. For other inputs, the system requires the user to make further choices. Input ’A’ prompts the user to select a frame, while inputs ’1’, ’2’, or ’3’ lead to a color selection, indicating a customization phase before the main operation. If the user inputs ’D’, it triggers an immediate start to the printing process, skipping any customization. This direct route implies a preset or quick operation mode. After these selections, the system concludes with ’start printing’, executing the core function based on the provided inputs. 21 Figure 24: Flow Chart 22 3.3 MOBILE APPLICATION The mobile application was built using React Native is a simple and user-friendly interface for custom screen printing, aligning perfectly with the innovative hard- ware system for fabric customization. The app features a sleek design with a straightforward, intuitive navigation structure. The home screen presents a prominent logo and two main options: ’Start Printing’ and ’Clean,’ indicating a clear action path for the user. In the color selection screen, users are greeted with a vibrant array of six colors, laid out in an easy-to-select grid format. Once a color is chosen, the app smoothly transitions to the frame selection screen, where users can pick from three distinct design frames, displayed with the pre- viously selected color for convenience. This app simplifies the custom printing process, making it accessible and efficient for the user use our machine via a mobile platform connected through Bluetooth. we are assuming that the user here is a printing place worker. Figure 25: User interface 23 Figure 26: Choose Color Figure 27: Choose Frame 24 4 RESULTS AND DISCUSSION: At the culmination of our project, we have successfully developed a hardware system for custom clothing design that fuses advanced color mixing with au- tomated screen printing technology, achieving remarkable results. This system streamlines the production of personalized apparel, significantly reducing man- ual labor. Challenges and Resolutions: 1. Power Supply Management: The varied power supply needs for different components posed a challenge. We overcame this by using different power supplies two power supplies 24v with 10A and 5A to provide the 5 stepper motors we have and power supply 5 and 12 volts for the color mixing system. 2. Component Acquisition Delays: Due to challenging economic and political conditions, as well as transportation issues, we experienced delays in ob- taining certain components. This was mitigated by adjusting our project timeline and sourcing alternative local components where possible. 3. Limited University Access: The same conditions also restricted our phys- ical presence at the university, impacting our project schedule. To adapt, we maximized the efficiency of our work sessions and utilized remote col- laboration tools for planning and troubleshooting. 4. Mechanical Problems: Throughout development, we encountered mechan- ical issues such as gear alignment and wear, and synchronization of moving parts. 25 5 CONCLUSIONS ANDRECOMMENDATIONS 5.1 SUMMARY In conclusion, our project has met its objectives by delivering a fully functional, automated hardware system designed for the custom clothing industry. The in- novative integration of color mixing and automated screen printing technologies has proven to be effective in reducing manual labor and time, thus responding to the industry’s demand for personalized clothing options. The system’s hardware, consisting of CNC machinery, peristaltic pumps for color mixing, a color sensor for accuracy, and a DC motor for mixing, has performed well under testing. The dual-interface approach, offering both a physical LCD keypad and a mobile application, provided users with flexible and user-friendly options to interact with the system. We encountered and overcame a series of challenges throughout the project, including delays in component procurement due to external economic and polit- ical factors, as well as mechanical and technical issues within the system itself. By implementing strategic solutions such as extending project timelines, opti- mizing software controls, and redesigning mechanical components, we ensured the system’s performance met our standards. 5.2 RECOMMENDATIONS For the proper functioning and longevity of the system, we recommend the following best practices: 1. Thorough Component Understanding: Conduct comprehensive research on each component to understand its specific power requirements. 2. Careful Power Distribution: When distributing current and voltage, do so with care to prevent damage to the components. 3. Isolated Component Testing: Test each component separately and record its connections and Arduino board pins to verify the correct operation. 4. Secure Wiring: To ensure durability and prevent system failure, solder wires instead of using temporary connections. 5. Common Grounding: Ensure a common ground for all components within the system. This is crucial to avoid potential damage due to ground loops or voltage differentials, which can lead to component failure. Following these recommendations will help to maintain the system’s in- tegrity, prevent component damage, and ensure efficient and reliable operation of the hardware system for custom clothing design. 26 5.3 WHAT WE HAVE LEARNED Throughout this project, our team has gained invaluable knowledge and experi- ence in both the theoretical and practical aspects of designing and implementing a hardware system. We learned the importance of interdisciplinary collabora- tion, combining principles of mechanical engineering, electronics, and software development to create a cohesive product. Key learnings include: 1. How to work with sensors like Color sensors, and motors like stepper motors. 2. How to connect and use various types of high-voltage devices and how to distribute currents and voltages 3. How to deal with the Bluetooth module using a mobile application and connect it to our hardware system 5.4 FUTURE WORK Building upon the successful completion of this project, several areas have been identified for future work to enhance the system further: 1. Advanced User Experience: Improving the interface design to be more intuitive and incorporating user feedback to refine functionality. 2. Expanded Customization: Increasing the range of color options and design templates available, potentially incorporating AI to offer design suggestions based on user preferences. 3. Enhanced Mechanical Components: Continuing to test and improve the durability and reliability of mechanical parts, possibly integrating newer materials or technologies. 4. Increased Scalability: Adapting the system for larger-scale production, which may involve modular design considerations or parallel processing capabilities. 5. Eco-friendly Options: Researching and utilizing sustainable materials and processes, including biodegradable inks and energy-efficient opera- tions. 6. Provide payment system 27