| It has become a concern to the society that to take care of the elderly, especially to remind the elderly to take medicine on time. For this reason that types of medicine and time of taking medicine can be recorded long-term can provide the basis for the analysis of the old pathology, so based on demands of the current market, a smart system cabinet based on STM32F103 and network will be designed in this paper, which is to remind the elderly to take medicine in time and manage medicine. The whole system is divided into two parts, including medicine cabinet and the remote server,the smart medicine cabinet is used to remind and the server is used to recorde.The main research contents of each part are as follows:1. The circuit select the STM32F103 of high performance as the core processor, which has completed each module’s hardware driver and program design. Audio file is read and decoded by the Serial Peripheral Interface, and communication between the configuration interface and the system is realized by USB. The configuration interface of smart medicine cabinet is designed by MFC, which is enable to set the number of medicine cabinet, require the local time and configure the network parameters. In addition, User Interface Process Application Block and FAT file system is transplanted to STM32F103. Communication is realized between Ethernet and the remote server through the interface functions in the u IP protocol. Audio files, which provide different music to remind the elderly, are required from Trans-flash card that can be play by the power amplifier by the FAT file system. LCD12864 that adopts serial data transmission mode can display all medicine information. In addition, there has alarming circuit to trigger the alarm buzzer waking when the program detects the dosage is insufficient. This design of graduation realizes the software design, hardware circuit of STM32F103 and The design of configuration interface by MFC.2. The system designs the database of the smart medicine cabinet and application program that remote monitor the smart medicine cabinet on time. The server database can store informations including help information, medicine information, alarm clock, the user information and so on. And the smart medicine cabinet can obtain informations from the database through the network and exchange datas real time. The database is mainly to create related database table that realise records to add, delete and so on in the database by the SQL.The system test many times and each module can be operated normally, it meets all the design requirements. Functions of this system include: the smart medicine cabinet can obtain and storage the information of medicines ã€clocks and so on from the server; Music files can be played to remind the elderly to take medicine, and medication information can be displayed on the LCD so that the elderly can take medicine correctly; this system can record the number of each medicine and drug detection. If the dosage is insufficient, it can prompt the user for dispensing. Actions of taking medicine can be recorded that transmit to the server by Internet as basis for later treatment. In addition, the system can modify the internal network information of smart medicine cabinet easily by MFC, such as server IP, port number, Gateway and so on. |