Abstract:Liquid pharmaceuticals filled with vials are widely used and stored in hospitals and pharmacies. In order to achieve realtime monitoring of such agents, an on-line monitor was designed with photoelectric sensor, STM32 main control chip and UDP communication protocol. The light intensity parameters of the photoelectric sensor used in the monitor are calculated according to the inverse square law of direct illumination distance of point light source, and verified by Comsol simulation platform. The monitor uses photoelectric sensors to monitor the number of drugs in real time and synchronize drug information. The designed PCside drug monitoring software uses UDP protocol to connect multiple drug monitors to achieve onetomany online monitoring functions. The monitor can use a variety of power supply methods to monitor the ambient temperature in real time, and meet the needs of various types of vials filling liquid pharmaceuticals in multiple scenarios and multiple environments. The test results show that the power consumption of the monitor is 3.08 W, 3.23 W and 3.35 W at no-load, half-load and full-load, respectively, and the monitoring accuracy of the remaining number of vials is 100%. Combined with the low cost features, the monitor is worth promoting in hospital pharmacies, retail pharmacies and other places.