CN-224218413-U - Protocol adapter of six-element information collector and serial port screen
Abstract
The utility model discloses a protocol adapter of a six-element information collector and a serial port screen, which comprises a data transceiver module, a data analysis module, a power-on control module, a level conversion circuit, a power supply module, an interface and a control circuit. Compared with the prior art, the protocol adapter can effectively solve the problem that a six-element information collector and a serial display screen cannot communicate due to different protocols, and achieves real-time display of meteorological data. The method has the advantages of realizing the timing power-on control of the display screen, reducing the energy consumption of equipment, prolonging the service life of the display screen, along with simple and convenient operation, low hardware cost, simple software design, reduced development cost, and strong universality, and can modify programs, thereby being suitable for information collectors of various types and serial display screens.
Inventors
- ZHANG ZHENG
- CHENG CHAO
- LI FANGJUN
Assignees
- 张正
- 程超
- 李方军
Dates
- Publication Date
- 20260508
- Application Date
- 20250430
Claims (3)
- 1. The protocol adapter of the six-element information collector and the serial port screen is characterized by comprising a data receiving and transmitting module, a data analysis module, a power-on/off control module, a level conversion circuit, a power supply module, an interface and a control circuit, wherein the data receiving and transmitting module is connected with the six-element information collector through an RS232 interface and is used for receiving and transmitting meteorological data transmitted by the collector, converting RS232 protocol data into TTL level data through the level conversion circuit and transmitting the TTL level data to an STM32 main control chip for processing, converting the TTL level data into RS232 protocol data and transmitting the RS232 protocol data to the serial port display screen through the RS232 interface; The control circuit selects STM32F030F4P6 as a main control chip, ports 2, 3 and 14 of the main control chip are connected with a SWITCH and then grounded, port 4 is connected with a resistor R4 and then connected with VCC, port 6 is connected with LEDs 1 and R5 in series and then connected with VCC, port 7 is connected with VCC after connected with LEDs 2 and R6 in series, port 18 is connected with VCC after connected with LEDs 3 and R8 in series, ports 11, 12, 13 and 17 are connected with H2, ports 19 and 20 are connected with H1, ports 5 and 16 are connected with VCC, and ports 8, 9 and 10 are respectively connected with MCU_TXD, MCU_RXD and SWITCH; The level conversion circuit selects MAX3232 chips as level conversion chips, ports 1 and 3 of the level conversion circuit are connected to two ends of C1, ports 4 and 5 of the level conversion circuit are connected to two ends of C2, port 2 is connected to +5V after being connected to C8, port 6 is connected to C9 and then to ground, ports 15 and 16 are connected to two ends of C14, port 15 is grounded, port 16 is connected to +5V, port 14 is connected to ground after being connected to R1 and D3, R1 and D3 are connected to RS 232-TX, port 13 is connected to ground after being connected to R2 and D2, R2 and D2 are connected to RS 232-RX, and ports 11 and 12 are respectively connected to MCU-TXD and MCU-RXD; The power supply module comprises a voltage reducing module and a voltage stabilizing module, wherein the voltage reducing module converts 12V voltage into 5 voltage for output, the voltage stabilizing module converts 5V voltage into 3.3V voltage by selecting an AMS1117 chip, a port 1 of the voltage stabilizing module is grounded, a port 3 of the voltage stabilizing module is connected to +5V, a port 4 of the voltage stabilizing module is connected to VCC, two ends of C3 and C4 are connected to the ports 1 and 3 in parallel, one end of C5, C7 and C11 is connected to the port 4 in parallel, and the other end of the voltage stabilizing module is grounded; The interface is provided with two rows of 4P terminals, one row is 12V input, grounded, RS232_RX1 and RS232_TX1, and the other row is screen power+, grounded, RS232_RX2 and RS232_TX 2; The control circuit selects an SRD-05VDC-SL-C relay, the port 1 of the control circuit is connected to +5V, the port 2 of the control circuit is connected to +12V, the port 4 of the control circuit is connected to Q1 and then grounded, two ends of the D5 are connected to the ports 1 and 4, one end of the R7 is connected to Q1, and the other end of the R7 is connected to SWITCH.
- 2. The protocol adapter of the six-element information collector and the serial port screen according to claim 1, wherein the GPIO pin of the master control chip STM32F030F4P6 is connected to the relay switch control end to control the on-off of the display screen power supply.
- 3. The protocol adapter of the six-element information collector and the serial port screen according to claim 1, wherein each module comprises a data receiving program, a data analyzing program, a data reorganizing program, a data transmitting program and a timing control program; The data receiving program is used for receiving RS232 data sent by the six-element information collector in real time, converting the RS232 data into TTL level data through the MAX3232 chip and then transmitting the TTL level data to the STM32 main control chip; The data analysis program is used for analyzing the received TTL level data according to the communication protocol of the six-element information collector and extracting meteorological data and time information; The data reorganization program is used for repackaging the extracted meteorological data according to the communication protocol of the serial display screen; Converting the recombined TTL level data into RS232 protocol data through a MAX3232 chip, and sending the RS232 protocol data to a serial display screen; And the timing control program is used for controlling the GPIO pin of the STM32 main control chip according to the extracted time information, driving the relay switch and realizing the timing power-on control of the display screen.
Description
Protocol adapter of six-element information collector and serial port screen Technical Field The utility model relates to the technical field of data transmission, in particular to a protocol adapter of a six-element information collector and a serial port screen. Background In the field of meteorological information acquisition, the six-element information acquisition device is widely applied by virtue of the advantage that the six-element information acquisition device can acquire various meteorological element data simultaneously. The collector is provided with an RS232 interface and is often matched with a serial display screen for use so as to display the collected meteorological data in real time. However, because the six-element information collector and the serial display screen adopt different communication protocols, data interaction cannot be directly carried out between the six-element information collector and the serial display screen, and real-time display and application of meteorological data are severely limited. The current method for solving the problem of incompatibility of the protocols needs to carry out complex modification on the internal program of the collector or the display screen, which not only has great operation difficulty, but also can have adverse effect on the stability and compatibility of the equipment. In addition, some solutions are costly, lack versatility, and are difficult to meet the needs of different users. Meanwhile, the existing scheme rarely relates to a display screen timing power-on control function, and the requirements of reducing energy consumption and flexibly managing equipment cannot be met. Therefore, the protocol adapter which is simple, efficient and low in cost and can realize the timing power-on and power-off control of the display screen is developed, stable communication between the six-element information collector and the serial display screen is realized, and the protocol adapter has important practical significance. Disclosure of utility model The system comprises a data receiving and transmitting module, a data analysis module, a power on-off control module, a level conversion circuit, a power supply module, an interface and a control circuit, wherein the data receiving and transmitting module is connected with a six-element information acquisition device through an RS232 interface and is used for receiving and transmitting weather data transmitted by the acquisition device, converting RS232 protocol data into TTL level data through the level conversion circuit and transmitting the TTL level data to an STM32 main control chip for processing, converting the TTL level data into RS232 protocol data and transmitting the RS232 protocol data to a serial display screen through the RS232 interface, the data analysis module analyzes the received TTL level data, identifies data types and formats and extracts time information, and the power on-off control module controls a relay-mounted switch according to time information extracted from the six-element data so as to realize timing on-off control of the display screen. The control circuit selects STM32F030F4P6 as a main control chip, ports 2, 3 and 14 of the main control chip are connected with a SWITCH and then grounded, port 4 is connected with a resistor R4 and then connected with VCC, port 6 is connected with LEDs 1 and R5 in series and then connected with VCC, port 7 is connected with VCC after connected with LEDs 2 and R6 in series, port 18 is connected with VCC after connected with LEDs 3 and R8 in series, ports 11, 12, 13 and 17 are connected with H2, ports 19 and 20 are connected with H1, ports 5 and 16 are connected with VCC, and ports 8, 9 and 10 are respectively connected with MCU_TXD, MCU_RXD and SWITCH; The level conversion circuit selects MAX3232 chips as level conversion chips, ports 1 and 3 of the level conversion circuit are connected to two ends of C1, ports 4 and 5 of the level conversion circuit are connected to two ends of C2, port 2 is connected to +5V after being connected to C8, port 6 is connected to C9 and then to ground, ports 15 and 16 are connected to two ends of C14, port 15 is grounded, port 16 is connected to +5V, port 14 is connected to ground after being connected to R1 and D3, R1 and D3 are connected to RS 232-TX, port 13 is connected to ground after being connected to R2 and D2, R2 and D2 are connected to RS 232-RX, and ports 11 and 12 are respectively connected to MCU-TXD and MCU-RXD; The power supply module comprises a voltage reducing module and a voltage stabilizing module, wherein the voltage reducing module converts 12V voltage into 5 voltage for output, the voltage stabilizing module converts 5V voltage into 3.3V voltage by selecting an AMS1117 chip, a port 1 of the voltage stabilizing module is grounded, a port 3 of the voltage stabilizing module is connected to +5V, a port 4 of the voltage stabilizing module is connected to VCC, two ends of C3 and C4 are