Skip to content
Open access

Implementation and Design of a Smart Pharmacy Automation System Using Raspberry Pi

Aug 2026 · Jurnal Engineering · 0 citations · 14 references

Abstract

Manual medication dispensing in pharmacies remains prone to human errors and is time-intensive, particularly under high patient loads, while existing commercial automation solutions are cost-prohibitive for small to medium-sized pharmacy settings. This paper presents the design and implementation of a cost-effective smart pharmacy automation system leveraging a Raspberry Pi 5 platform. The proposed system integrates a web camera for real-time image acquisition, a stepper motor-driven dispensing mechanism, and an HDMI display for visual feedback of identified medications. To enable accurate drug recognition, we employ the YOLOv8 deep learning object detection algorithm. A custom dataset comprising 1,500 images of ten distinct medication classes—with 150 samples per class, captured under varying illumination conditions (bright, normal, and low light) and three viewing angles—was constructed for model training and evaluation. The dataset was partitioned into 70% training, 20% validation, and 10% testing sets. Experimental results demonstrate that the YOLOv8-based model achieves exceptional performance, with an overall precision of 98%, precision and recall values approaching 1.0, and mAP50 and mAP50-95 scores of approximately 0.99, indicating high reliability for real-time deployment. The entire system, including both hardware and software, is able to accurately identify and dispense medications in an automatic manner with minimal delay. This affordable, on-site alternative to high-cost commercial systems presents an efficient and scalable solution to help decrease dispensing mistakes and enhance workflow in a pharmacy setting with limited resources.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.