Urine measuring instrument based on ARM master control
By using the STM32F103C8T6 main control chip and related sensor modules in the urine detector, the limitations of real-time high-speed communication are solved, real-time data collection and transmission of the urine detector are realized, and the urine detector's requirements for high precision and automation are met. needs, providing user-friendly data management and monitoring functions.
Patent Information
- Application Number
- CN202410834010.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-10-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Real-time high-speed communication cannot be achieved between the high-performance image processor and the fast sensor, which has limitations and cannot meet the needs of urine detectors for real-time response and data transmission.
Using STM32F103C8T6 as the main control chip, combined with YZC131 load sensor, MFRC522 radio frequency card module, Air724UG 4G module, ESP8266 WIFI module and OLED display, real-time data collection, transmission and display are realized through a variety of hardware interfaces and communication protocols.
It realizes real-time data collection, transmission and display of urine measuring instrument, has high precision, reliability and automation functions, supports urine volume measurement and historical data recording, and provides user-friendly data management and monitoring functions.
Smart Images

Figure CN118743552A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a urine measuring instrument based on ARM main control. Background Art
[0002] STM32F103C8T6 is a commonly used microcontroller chip, using the ARM Cortex-M3 architecture, widely used in embedded systems, industrial control, automation equipment and electronic products. It has a rich peripheral interface, including multiple general-purpose IO pins, timers, serial communication interfaces (such as SPI, I2C, USART), analog to digital converter (ADC), etc., which can meet the needs of various applications.
[0003] With the advancement of medical technology and the growing attention to health management, the demand for urine testers has gradually increased. This equipment is essential for quickly and accurately analyzing various parameters in urine samples, such as pH, protein, red blood cells, and white blood cells. The use of urine testers simplifies the urine test process, provides instant results, and helps to detect potential health problems at an early stage. Therefore, the demand for urine testers that are highly accurate, easy to operate, and have automation functions is increasing, which has prompted the continuous innovation of related technologies to meet the needs of the modern medical and health field. Summary of the invention
[0004] The technical problem to be solved by the present invention is that real-time high-speed communication cannot be achieved between a high-performance image processor and a fast sensor, which has certain limitations.
[0005] In order to solve the above technical problems, the embodiment of the present invention provides a urine measuring instrument circuit based on ARM master control. The overall design of the measuring instrument is as follows Figure 2 As shown in the figure, it is mainly composed of 6 parts, including main control, weighing module, card swiping module, 4G module, WIFI module and display module. The working voltage of the measuring instrument is DC-5V.
[0006] The main control system of the measuring instrument of the present invention must have a high degree of real-time performance and reliability to ensure that it can respond quickly when the user swipes the card and perform the weighing function in real time. At the same time, it also needs to be able to transmit the collected data to the server for further processing and analysis, and display key information on the screen so that users can monitor and manage data. Therefore, the performance and functions of the main control system must be effectively optimized and expanded to meet various practical needs.
[0007] The present invention intends to adopt STM32F103C8T6 as the main control chip, which is a microcontroller based on the ARM Cortex-M series and has a high degree of real-time performance. Equipped with a fast processor and multiple hardware timers, accurate timing tasks and real-time response can be achieved, while also having higher reliability. The microcontroller of the STM32 series also provides a variety of protection mechanisms, such as watchdog timer, hardware fault detection, etc., which can increase the stability and reliability of the system. C8T6 provides multiple GPIO pins and various peripheral interfaces, such as serial communication interfaces such as UART, SPI, I2C, etc., which can easily connect various expansion modules and sensors to meet different application requirements. Therefore, STM32F103C8T6 is selected as the main control chip to meet the design requirements of this project.
[0008] The measuring instrument of the present invention has the function of being connected to the patient's urine bag and can work in conjunction with the urine collection bag to measure the weight of urine in the urine bag. In order to ensure accurate urination data of the patient, a high-precision weighing sensor is selected to measure the patient's urine weight.
[0009] The present invention intends to use the YZC131 weighing sensor to measure the patient's urine weight. The YZC131 sensor is usually highly accurate and can provide accurate weight measurement. The YZC131 sensor is very sensitive to changes in force and can detect small weight changes. In addition, the YZC131 sensor usually has good reliability and stability. The YZC131 sensor is used in conjunction with the HX711 module. The HX711 module uses a 24-bit high-precision A / D converter chip and an internal 128-fold gain programmable amplifier to convert the analog signal of the weighing sensor YZC131 into a digital signal. The STM32F103C8T6 reads the digital signal output by the HX711 module to obtain the urine weight.
[0010] The present invention intends to use MFRC522 radio frequency card as a card reader module. MFRC522 is a radio frequency module commonly used in near field communication (NFC) and radio frequency identification (RFID) applications. The module operating voltage is DC3.3V. The MFRC522 module is highly integrated and has built-in key components such as radio frequency front end, analog signal modem, modem, encoder and decoder, which makes it simpler in circuit design and reduces the demand for external components. In addition, MFRC522 has fast reading and writing speed and highly sensitive receiver performance. It can complete the reading and identification of radio frequency signals in an instant, realize fast data transmission and processing, and improve work efficiency. MFRC522 also adopts a low-power design, which can reduce energy consumption in standby mode and has a fast wake-up function. And MFRC522 supports multiple types of cards, such as mifare1s50, mifare1s70 and mifare UltraLight. MFRC522 supports SPI interface, and the communication between STM32F103C8T6 single-chip microcomputer is simpler. Therefore, the MFRC522 module is selected as the card swiping module to meet the design requirements of this project.
[0011] The present invention intends to use the Air724UG module as a 4G module. The operating voltage of the module is between DC5V and DC12V. The module supports a serial port interface and can communicate with the STM32F103C8T6 single-chip microcomputer via a serial port. In addition, the module supports multiple communication functions, including 2G, 3G and 4G network connections. The Air724UG module supports multiple communication protocols to communicate with the server. (1) Through the HTTP or HTTPS protocol, the Air724UG module can use standard Web requests to communicate with the server; (2) The Air724UG module can use the MQTT protocol to perform real-time data transmission with a server that supports MQTT; (3) The Air724UG module supports TCP / IP and UDP protocols, and these protocols can be used to establish a persistent connection or perform data packet transmission. Therefore, the Air724UG module is selected to upload data to meet the design requirements of this project.
[0012] The present invention intends to use the ESP8266 module as the WIFI module. The operating voltage of the module is DC3.3V. The module supports a serial port interface and can communicate with the STM32F103C8T6 single-chip microcomputer through a serial port. In addition, the module supports a variety of network connection modes, including STA mode and AP mode, and can be connected to other devices or directly provide a wireless network. The ESP8266 module supports a variety of communication protocols to communicate with the server. (1) Through the TCP / IP protocol, the ESP8266 module can achieve reliable data transmission with the server and the development of various network applications. (2) Through the HTTP protocol, HTTP-based remote control, data acquisition, web page access and other applications can be realized. (3) Supporting the MQTT protocol makes the module suitable for sensor data acquisition and remote control in Internet of Things applications. Therefore, the selection of the ESP8266 module for data transmission meets the design requirements of this project.
[0013] The present invention intends to use an OLED module as a display screen. The OLED display screen has excellent contrast, presenting clear and sharp images and text, ensuring that users have a high-quality visual experience. Secondly, the OLED screen has a wide viewing angle, allowing multiple viewers to easily see the content from different angles, which is very practical in public display occasions. In addition, the OLED display screen has a very fast response time, so when the interface switches and animations are displayed, the user feels a smooth and instant response. At the same time, OLEDs generally support high resolution and are capable of displaying more details and high-definition content. In addition, the operating voltage of the OLED module is DC3.3V, supports the IIC interface, and the IIC communication method can be selected to simplify the communication process and improve the overall efficiency of the system.
[0014] Beneficial effects of the present invention: The measuring instrument has the ability to hang a urine bag and can work in conjunction with a urine collection bag to accurately measure the volume of urine discharged by a patient within a specific period of time. In addition to the real-time measurement function, the instrument also has the function of recording and querying the patient's historical urination data. The measuring instrument regularly transmits the patient's urine data to the server. Through the user interface of the server, the user can easily query the data of each measuring instrument. The server supports viewing the data of multiple measuring instruments, providing users with more efficient and comprehensive data management and monitoring functions. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 Shown is an overall design diagram of a urine testing system based on the Internet of Things.
[0016] Figure 2 Shown is the overall hardware design diagram. DETAILED DESCRIPTION
[0017] The present invention is further described below in conjunction with the accompanying drawings, but is not intended to limit the present invention:
[0018] like Figure 1 As shown, according to the design function requirements and design index requirements,
[0019] When a patient rents a measuring instrument, after the measuring instrument is turned on and completes the self-test, the patient is first required to swipe the card to bind personal information. After the user swipes the card, the measuring instrument will regularly send the device number of the machine, the patient's card number and urine data to the server. The server will identify the device number and match it with the card number according to the patient information in the database, and display the patient's information and urine data on the server interface.
[0020] After the device is turned on, the system will perform a self-check and initialize each module. ① Configure the communication interface, network parameters and data transmission method of the 4G module; ② Configure the WIFI connection, IP address, data transmission method and communication interface of the WIFI module; ③ Configure the OLED display screen, including brightness, contrast and interface display.
[0021] RFID cards are uniformly issued, card information is uniformly registered, and data is associated with the database. The card identification code is stored in the server background database. When the patient swipes the RFID card, the system communicates with the card and identifies the card's unique identification code (UID), and matches it with the database. If the match is successful, the measuring instrument can start working. After the first card swipe, the measuring instrument will continue to weigh. If the card is swiped again, the weighing work will end until the next card swipe. STM32F103C8T6 first initializes the SPI interface and configures the MFRC522 module. This includes setting the SPI communication parameters (such as clock speed, data bit number, mode, etc.) and initializing the MFRC522 (such as setting the working mode, turning on the antenna, etc.). Then the microcontroller sends a card search command to the MFRC522 through the SPI interface. The MFRC522 broadcasts a card search signal at its operating frequency (13.56MHz). If there is an RFID card within the working range of the card reader, the card will respond to this signal. When multiple cards respond, the MFRC522 enters the anti-collision state to select a unique card. After the card is read successfully, the operation can be performed.
[0022] STM32F103C8T6 first initializes and configures the Air724UG module to work mode through the UART or SPI interface. The MCU continuously collects the data to be uploaded, and when the data is ready, the MCU sends the data to the Air724UG module. The Air724UG module can actively connect to the remote server using the DTU firmware to establish a stable data communication link. The module will use the configured IP address and port number to connect to the server. Once the connection is successfully established, the module can send and receive data with the remote server. Sensor data, status information, etc. can be sent to the server periodically or according to demand, and control instructions from the server can also be received. In order to maintain a stable connection with the remote server, the DTU firmware will periodically send heartbeat packets or keep-alive information to the server to maintain the stability of the connection. This ensures that the communication between the module and the server is always unobstructed. The 4G module monitors the network status and establishes a connection with the base station. When an RFID card is swiped, the weighing module starts working, and the collected data is transmitted to the MCU for data processing. The data is sent to the base station through the 4G module at regular intervals, and then sent to the terminal by the base station. If the 4G module cannot establish a network connection, the system will automatically switch to the WIFI module to ensure that the data can be uploaded to the server.
[0023] STM32F103C8T6 first initializes ESP8266 to STA mode and connects to the target WIFI hotspot. Then, it configures ESP8266 to TCP client mode, specifies the server IP and port number to connect to. Then, AT commands are used to let ESP8266 initiate a TCP connection request. ESP8266 sends the connection request to the remote server. If the server receives and confirms the request, a TCP connection channel will be established between ESP8266 and the server. At this point, STM32F103C8T6 can send and receive data with the server through ESP8266, realize TCP connection communication with external terminals through WIFI network, and periodically transmit the data collected by the sensor and patient information to the server.
[0024] The above description is only a preferred embodiment of the present invention, and does not limit the scope of implementation of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A urine measuring instrument based on ARM main control, characterized in that: It includes the following components: main control, weighing module, card swiping module, 4G module, WIFI module and display module; the urine measuring instrument uses Rockchip RK3588 chip for fast front-end recognition, command control and video stream transmission, and tracks and changes the field of view according to the location of a specific target.
2. The urine measuring instrument based on ARM master control according to claim 1 is characterized in that: The master control for the measuring instrument can transmit the collected data to the server for further processing and analysis, and display key information on the screen so that users can monitor and manage the data.
3. The urine measuring instrument based on ARM master control according to claim 1 is characterized in that: The weighing module is used to work with the urine collection bag to measure the weight of urine in the urine bag. The weighing module selects the high-precision YZC131 weighing sensor to measure the patient's urine weight.
4. The urine measuring instrument based on ARM main control according to claim 1 is characterized in that: The card swiping module is used for patients to swipe the card and bind the user information before using the measuring instrument.
5. The urine measuring instrument based on ARM main control according to claim 1 is characterized in that: The 4G module is used to package the patient's data and send it to the server. The 4G module has sufficient data transmission speed and secure data transmission protocol, and needs to be stable and reliable to reduce the risk of connection interruption or data loss.
6. The ARM-controlled urine measuring instrument according to claim 1, characterized in that: The WIFI module is used when the 4G module cannot establish a network connection. The system will automatically switch to the WIFI module to ensure that the data can be uploaded to the server. The dual-module design ensures the reliability and continuity of data transmission under various network conditions, ensuring the integrity and timeliness of patient data.
7. The ARM-controlled urine measuring instrument according to claim 1, characterized in that: The display module is used to display the information recorded by the measuring instrument and the relevant data of the patient, including the bed number, the time interval for recording the urine volume, and the patient's historical urination data.
