AUTHOR=Baroudi Wafa A. , Alnahdi Fatimah B. , Aljohani Raghad S. , Alzuabi Maryam A. , Alsaqoub Nora K. , Aljamaan Ibrahim A. , Alrubai Naif A. , Ali Sajid TITLE=State machine design for an automated peritoneal dialysis machine JOURNAL=Frontiers in Medical Technology VOLUME=Volume 7 - 2025 YEAR=2025 URL=https://www.frontiersin.org/journals/medical-technology/articles/10.3389/fmedt.2025.1630829 DOI=10.3389/fmedt.2025.1630829 ISSN=2673-3129 ABSTRACT=According to the National Library of Medicine (NLM), chronic kidney disease (CKD) affects more than 10% of the world's population, and peritoneal dialysis (PD) is one of the promising treatments. Despite the advantages of the current PD machine over alternative treatments, it has certain limitations, such as high consumable costs, lengthy daily sessions, and a lack of portability. This work aims to implement a finite state machine design to modify the process of an automated, economical PD system. The proposed optimized process includes a flush system stage, where tubes are rinsed before and after each session to avoid contamination. This design is intended for use by only one patient to prevent contamination. Furthermore, a turbidity sensor is added to measure the efficiency of the dialysis process and reduce the current dialysis time, which can reach eight hours. The finite state machine design is developed using LabVIEW software, featuring a user-friendly interface that allows users to track the process's progress.