0 Preface This paper introduces the design of a smart medicine box based on STC90C516RD+ single-chip microcomputer. The main structure includes main control unit, clock unit, alarm unit and display unit. The display unit displays the relevant information of the medicine and the time of taking the medicine, which is beneficial for the user to grasp various information in time; the alarm unit can perform an alarm reminder within a prescribed time to ensure that the user can take the medicine in time. For those who are forgetful, those who need to take medication for a long time, those who need to be hospitalized, and those who are busy with work, it is difficult to remember clearly the information about different drugs and the time of medication and to ensure that they take medicine on time. How to promptly remind the above people to take medicine on time and in volume is a difficult problem. Aiming at this problem, this paper designs a smart medicine box based on the enhanced 51 single-chip microcomputer - STC90C516RD + single chip microcomputer. The medicine box is provided with a detecting unit to detect whether the user takes the medicine on time within a prescribed time. When detecting that the user has taken the medicine according to the time, the user is prompted to take the medicine through the display unit to avoid repeated taking medicine. Through the display unit, the user can conveniently obtain information such as the current medication situation, medication time and drug information. 1 Working principle The design is mainly composed of main control unit, clock unit, detection unit, alarm unit, display unit, power supply unit and host computer software. The main control unit is composed of STC90C516 RD+ MCU module; the time unit is composed of DS1302 clock module. It is used to detect the current time information; the detecting unit is composed of a photosensitive sensor module and a DS18B20 module, respectively detecting the condition of the medication and detecting the ambient temperature; the alarm unit is composed of a buzzer module and a GSM short message module, respectively performing an on-site sound alarm prompt and SMS alarm prompt; display unit displays information about the drug name, usage and usage of drugs, time of medication, medication and current date and time information; power supply unit provides power required by the system; PC software through RS232 interface and master control The unit communicates. The structure of the medicine box is shown in Figure 1. Figure 1 Schematic diagram of smart medicine box design 2 analysis of each component 2.1 main control unit The main control unit plays the role of information processing and control in the whole ICare system. The main control chip selects the enhanced 51 single-chip microcomputer - STC90C516RD + single chip microcomputer. STC90C516RD+ MCU is a new generation of super anti-interference, high-speed, low-power MCU based on 8051 core. The instruction code is fully compatible with traditional 8051 MCU, including central processing unit, 64 kbyte Flash program memory, 1280 bytes SRAM, 35 Bidirectional input/output (I/O) port, three 16-bit timer/counters, eight interrupt sources, on-chip clock oscillation circuit. 2.2 clock unit The clock unit uses the DS1302 chip from DALLAS. The DS1302 is a low-power real-time clock chip with a fine current charging capability that includes a real-time clock/calendar and 31-byte static RAM that can communicate with the microcontroller via a serial interface. It can count the year, month, day, week, hour, minute and second, and has many functions such as leap year compensation. The DS13 02 uses the SPI three-wire interface to communicate synchronously with the CPU, which are reset (RST), I/O data lines, and serial clock (SCLK). 2.3 detection unit The detection unit consists of a photosensor module and a temperature sensor DS18B20 module. 1) Photosensitive sensor module The photosensitive sensor module outputs a high level when the light box is not opened or the light intensity does not reach the threshold value, that is, when the medicine box is not opened; when the ambient light intensity exceeds the set threshold, the medicine box is opened, and the low level is output. The main control unit determines whether the patient opens the medicine box to take the medicine by detecting the high level and low level of the light sensor module output. The schematic diagram of the photosensitive sensor module is shown in Figure 2. Figure 2 Schematic diagram of the photosensitive sensor module Laparoscopy Drape,Sterile Laparoscopy Drape,Surgical Laparoscopy Drape,Disposable Laparoscopy Drape Xinxiang Huaxi Sanitary Materials Co., Ltd. , https://www.huaximedical.com
Design of Intelligent Medicine Box Based on Enhanced 51 Single Chip Microcomputer>