Conversion device for the communication protocol format of a sensor and method for converting the communication protocol format of a sensor
Patent Information
- Application Number
- TW114103921
- Authority / Receiving Office
- TW · TW
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-02-04
- Publication Date
- 2026-08-16
- Estimated Expiration
- 2045-02-03
AI Technical Summary
Existing temperature and humidity sensors from different brands require adjustments to communication interface settings and mathematical conversions due to varying communication protocols and data formats, complicating the reading of sensor data.
A sensor communication protocol format conversion device and method that integrates control circuits and communication interfaces to identify and convert data formats, allowing seamless reading of sensors from different brands without modifying hardware or software settings.
Enables easy and rapid switching between different sensor brands, simplifying the design burden and improving the convenience and accuracy of reading sensor data by hosts.
Smart Images

Figure TWG2TA001071982_001 
Figure TWG2TA001071982_002 
Figure TWG2TA001071982_003
Abstract
Description
[Technical Field]
[0001] This invention relates to a sensor, and more particularly to a device and method for converting the communication protocol format of a sensor. [Previous Technology]
[0002] Existing temperature and humidity sensors can be divided into analog output and digital output based on their output method. Digital output sensors typically transmit data through specific communication interfaces (such as I2C, SPI, UART, etc.). When reading the sensor data, the signal needs to be converted according to the communication protocol provided by the sensor. Sometimes, mathematical calculations are required to convert the raw data into specific temperature and humidity values. If sensors from different brands use the same communication interface, the differences in their communication protocols and data formats will necessitate adjustments to the communication interface settings and mathematical conversion methods according to the specific brand's technical specifications in order to successfully read the sensor data. [Summary of the Invention]
[0003] In order to solve the above-mentioned technical problems, the present invention provides a device and a method for converting the communication protocol format of a sensor.
[0004] This embodiment of the invention provides a sensor communication protocol format conversion device, including a first communication interface, a second communication interface, and a control circuit. The control circuit is electrically connected to the first communication interface and the second communication interface; the control circuit identifies the sensor connected to the first communication interface, obtains a first communication protocol format sensing data of the sensor according to the identification result, converts the first communication protocol format sensing data into a second communication protocol format sensing data, and outputs the second communication protocol format sensing data through the second communication interface.
[0005] This invention provides a method for converting the communication protocol format of a sensor, comprising: when a sensor is connected to a first communication interface of a conversion device, the control circuit of the conversion device identifies the communication protocol format of the sensor; the control circuit obtains the first communication protocol format sensing data of the sensor according to the identification result; and the control circuit converts the first communication protocol format sensing data into a second communication protocol format sensing data, so that the second communication interface of the conversion device outputs the second communication protocol format sensing data.
[0006] In summary, the sensor communication protocol format conversion device and the sensor communication protocol format conversion method provided in the embodiments of the present invention, when connected between the sensor and the host through the conversion device, enable the host to easily read different brand sensors through the conversion device and quickly switch to use different brand sensors.
[0007] To further understand the features and technical content of the present invention, please refer to the following detailed description and drawings of the present invention. However, the drawings provided are for reference and illustration only and are not intended to limit the present invention.
Implementation Method
[0008] The following describes the implementation of the present invention through specific embodiments. Those skilled in the art can understand the advantages and effects of the present invention from the content provided in this specification. The present invention can be implemented or applied through other different specific embodiments, and various details in this specification can also be modified and changed based on different viewpoints and applications without departing from the concept of the present invention. In addition, the accompanying drawings of the present invention are only simple illustrations and are not depictions based on actual dimensions, as stated in advance. The following embodiments will further describe the relevant technical content of the present invention in detail, but the provided embodiments are not intended to limit the content of this disclosure.
[0009] It should be understood that although terms such as “first,” “second,” and “third” may be used herein to describe various components or signals, these components or signals should not be limited by these terms. These terms are primarily used to distinguish one component from another, or one signal from another. Furthermore, the term “or” as used herein may, as appropriate, include any combination of one or more of the associated listed items.
[0010] This invention provides a sensor communication protocol format conversion device and method. The sensor communication protocol format conversion device (hereinafter referred to as the conversion device) integrates the relevant control command sets required by multiple sensors from different brands, enabling the conversion device to support and automatically identify sensors from the same brand. Furthermore, the conversion device can convert the data into a format readable by the device (such as a host) that requires the sensing data. Therefore, this conversion device simplifies the design burden of the host for reading different sensor brands and also enables the rapid switching of different sensor brands, effectively improving the convenience and accuracy of the host reading sensors from different brands via the conversion device.
[0011] [Usage Architecture Example of a Sensor Communication Protocol Format Conversion Device]
[0012] Please refer to Figures 1, 2, and 3. Figure 1 is a schematic diagram of the usage architecture of the conversion device provided in an embodiment of the present invention. Figure 2 is an exploded view of the conversion device provided in an embodiment of the present invention. Figure 3 is a functional block diagram of the conversion device provided in an embodiment of the present invention. The conversion device 1 described in this embodiment is provided with multiple communication interfaces. For example, the first communication interface 12 and the second communication interface 14 are used as examples. In other words, the conversion device 1 connects to the sensor 3 through the first communication interface 12 and connects to the host 5 through the second communication interface 14. After the conversion device 1 obtains the sensing data of the sensor 3 through the first communication interface 12, it converts the sensing data into a format that can be read by the host 5. Finally, the sensing data of the sensor 3 can be output to the host 5 through the second communication interface 14 of the conversion device 1.
[0013] In one embodiment, as shown in FIG2, the conversion device 1 has a main board 10 disposed within the housing C, and the main board 10 is provided with a first communication interface 12 and a second communication interface 14. The first communication interface 12 and the second communication interface 14 are, for example, a first I2C communication interface and a second I2C communication interface, respectively, so that the sensor 3 and the host 5 can be directly or via a transmission line connected to the first I2C communication interface and the second I2C communication interface, respectively. Furthermore, the first I2C communication interface and the second I2C communication interface can be disposed on both sides of the housing C, wherein the housing C includes an upper cover C1 and a lower cover C2, the housing C being assembled from the upper cover C1 and the lower cover C2, and the main board 10 is disposed within the receiving portion C3 of the housing C.
[0014] It should be noted that, as shown in FIG3, the motherboard 10 further includes a control circuit 101, which is electrically connected to the first communication interface 12 and the second communication interface 14 respectively. Furthermore, when the sensor 3 is connected to the first communication interface 12 and the host 5 is connected to the second communication interface 14, the control circuit 101 can identify the sensor 3 connected to the first communication interface 12, obtain the first communication protocol format sensing data of the sensor 3 according to the identification result, convert the first communication protocol format sensing data into the second communication protocol format sensing data, and output the second communication protocol format sensing data through the second communication interface 14.
[0015] In one embodiment, the communication transmission interface used by the first communication interface 12 and the second communication interface 14 may be, for example, I2C (Inter-Integrated Circuit), I3C (Improved Inter-Integrated Circuit), SPI (Serial Peripheral Interface), CAN bus (Controller Area Network), UART (Universal Asynchronous Receiver / Transmitter), RS-232 / RS-485 or GPIO (General Purpose Input / Output), Lin (Local Interconnect Network), USB (Universal Serial Bus), Ethernet, analog interface, but is not limited thereto, and the transmission interfaces used by the first communication interface 12 and the second communication interface 14 may be the same or different.
[0016] It should be noted that the first communication interface 12 and the second communication interface 14 can be one type of communication transmission interface or two or more types of communication transmission interfaces.
[0017] Regarding the implementation of the control circuit 101, please refer to Figure 4, which is a functional block diagram of the control circuit provided in an embodiment of the present invention. The control circuit 101 includes, for example, a processor 1011, a database 1013, and a memory 1015, with the processor 1011 connected to the database 1013 and the memory 1015.
[0018] The database 1013 described herein stores multiple sets of command sets with different communication protocol formats. These command sets correspond to the command sets used by different brand sensors 3. For ease of explanation, four sets are used as an example here. For instance, the first set of command sets corresponds to sensor A and uses communication protocol format A; the second set of command sets corresponds to sensor B and uses communication protocol format B; the third set of command sets corresponds to sensor C and uses communication protocol format C; and the fourth set of command sets corresponds to sensor D and uses communication protocol format D. Accordingly, the processor 1011 can identify the communication protocol used by different brand sensors 3 based on these command sets.
[0019] For example, the processor 1011 can select one set of commands from multiple sets of commands in the database 1013 at a time to identify the sensor 3 connected to the first communication interface 12, and determine which set of commands can successfully identify the sensor 3 based on the identification result. Here, "the processor 1011 can successfully identify the sensor 3" means that the processor 1011 can successfully obtain the response signal from the sensor 3. Further, the processor 1011 selects one set of commands from the multiple sets of commands based on the identification result as an input command set for successfully identifying the sensor. Then, the processor 1011 outputs this input command set through the first communication interface 12 to obtain the first communication protocol format sensing data of the sensor 3.
[0020] It should be noted that after the processor 1011 obtains the first communication protocol format sensing data, the processor 1011 will further convert the first communication protocol format sensing data into a second communication protocol format sensing data that can be read by the host 5. Specifically, the processor 1011 selects one set of commands from multiple command sets as the output command set, and the processor 1011 converts the first communication protocol format sensing data into the second communication protocol format sensing data according to the output command set, so that the host 5 can read this second communication protocol format sensing data through the second communication interface 14.
[0021] In one embodiment, the input command set and output command set used by the processor 1011 may be the same or different command sets. For example, the input command set may be the signal command set of the sensor model SENSIRION SHT85 and the output command set may also be the signal command set of SENSIRION SHT85; or the input command set may be the signal command set of the sensor model SENSIRION SHT85 and the output command set may be the signal command set of the sensor model Texas Instruments HDC1080.
[0022] In one embodiment, the processor 1011 may store the first communication protocol format sensing data and the second communication protocol format sensing data in the memory 1015.
[0023] In one embodiment, when the processor 1011 receives a read instruction from the host 5 through the second communication interface 14, the processor 1011 outputs the second communication protocol format sensing data in the memory 1015 to the second communication interface 14 according to the read instruction, so that the host 5 can obtain the second communication protocol format sensing data.
[0024] In one embodiment, when the processor 1011 receives the update instruction from the host 5 through the second communication interface 14, the processor 1011 updates the contents of the database 1013 according to the update instruction. For example, it can update the multiple command sets stored in the database 1013 to command sets that use sensors from other brands.
[0025] In one embodiment, the sensor 3 may be a temperature sensor, a humidity sensor, or a temperature and humidity sensor.
[0026] In one embodiment, the sensing data output by the sensor 3 is a digital signal or an analog signal.
[0027] In one embodiment, the database 1013 is a storage memory.
[0028] [Example of a method for converting communication protocol formats of sensors]
[0029] Referring to Figures 5A and 5B, which are control flowcharts of a method for converting the communication protocol format of a sensor according to an embodiment of the present invention. The process shown in Figures 5A and 5B includes, for example, the steps described below, and can be used in conjunction with the sensor communication protocol format conversion device in the foregoing embodiments.
[0030] Step S501: System startup. When the conversion device 1 is connected to the host 5 through the second communication interface 14, the conversion device 1 can obtain the power supply of the host 5 to start the system.
[0031] Step S503: Initialization. After the conversion device 1 is started, the initialization function operation can be performed to enable the conversion device 1 to perform smoothly in terms of software and hardware operation.
[0032] Step S505: Determine whether sensor 3 is connected. Here, the conversion device 1 determines whether sensor 3 is further connected via the first communication interface 12. If step S505 determines yes, proceed to step S507; if step S505 determines no, proceed to step S503.
[0033] Step S507: Identify the model of sensor 3. The conversion device 1 identifies whether the model of sensor 3 can be successfully identified by the conversion device 1 in a step-by-step manner according to multiple command sets in the database 1013. The detailed identification method of step S507 will be explained in Figure 6 later.
[0034] Step S509: Transmit the input command set to the sensor 3. Based on the identification result of step S507, it can be determined which command set in the database 1013 can successfully identify the sensor 3 currently connected to the first communication interface 12. Therefore, the conversion device 1 will use this command set as the input command set. Specifically, after the conversion device 1 learns of the input command set, the control circuit 101 of the conversion device 1 will output this input command set to the sensor 3 through the first communication interface 12 to control the sensor 3 to start sensing according to this input command set.
[0035] Step S511: Wait for calculation time. When sensor 3 starts sensing, sensor 3 will perform a calculation time, and at the same time, conversion device 1 will wait for this calculation time to cooperate with the sensing action of sensor 3.
[0036] Step S513: Obtain the first communication protocol format sensing data. After the sensor 3 performs a calculation for a period of time, the sensing result of the sensor 3 will be sent back to the first communication interface 12. For the conversion device 1, the sensing result of the sensor 3 can be obtained through the first communication interface 12. This sensing result is the first communication protocol format sensing data.
[0037] In one embodiment, the control circuit 101 outputs a read packet to the first communication interface 12 according to the input command set, so as to control the sensor 3 to perform a sensing calculation according to the read packet, and after a waiting calculation time, the control circuit 101 can obtain the first communication protocol format sensing data returned by the sensor 3.
[0038] In one embodiment, after the control circuit 101 obtains the first communication protocol format sensing data, it can then perform calculations on the first communication protocol format sensing data using the conversion formula of the corresponding brand sensor 3. Examples of the conversion formulas used for different brand sensors 3 are explained below.
[0039] For example, the temperature and humidity conversion formulas for sensor model 3, Texas Instruments HDC1080, can be shown in formulas 1 and 2 below:
[0040] Temperature(°C)=((TEMPERATURE[15:00]) / 2^16)x165-40...Formula 1
[0041] Relative Humidity(%RH)=(HUMIDITY[15:00] / 2^16)x100...Formula 2
[0042] For example, the temperature and humidity conversion formulas for sensor model 3, such as TEXAS INSTRUMENTS HDC3020, can be shown in formulas 3 and 4 below:
[0043] Temperature(°C)=((TEMPERATURE[15:00]) / 2^16-1)x175-45...Formula 3
[0044] Relative Humidity(%RH)=(HUMIDITY[15:00] / 2^16-1)x100...Formula 4
[0045] For example, the temperature and humidity conversion formulas for sensor model 3 SENSIRION SHT45 can be shown in formulas 5 and 6 below:
[0046] Temperature(°C)=((TEMPERATURE[15:00]) / 2^16-1)x175-45...Formula 5
[0047] Relative Humidity(%RH)=(HUMIDITY[15:00] / 2^16-1)x100...Formula 6
[0048] For example, the temperature and humidity conversion formulas of sensor 3 can be shown in formulas 7 and 8 below:
[0049] Temperature(°C)=(Type D temperature digital signal)×A+B……Formula 7, where A and B are constants.
[0050] Relative Humidity (%RH) = (Type D humidity digital signal) ÷ C + D conversion... Formula 8, where C and D are constants.
[0051] Step S515: Convert the first communication protocol format sensing data to the second communication protocol format sensing data according to the output command set. After the conversion device 1 obtains the first communication protocol format sensing data, the conversion device 1 will use one of the multiple command sets in the database 1013 as the output command set, and the control circuit 101 of the conversion device 1 will convert the first communication protocol format sensing data to the second communication protocol format sensing data according to the output command set. That is, the second communication protocol format sensing data is a data reading format compatible with the host 5, so that the host 5 can know the sensing result of the sensor 3 by recognizing the second communication protocol format sensing data.
[0052] In one embodiment, the control circuit 101 converts the first communication protocol format sensing data into the second communication protocol format sensing data according to the conversion formula and conversion compensation corresponding to the output command set. For example, when the input command set is a command set using digital signals for the sensor model TEXAS INSTRUMENTS HDC1080, and the output command set is a MODBUS digital signal reading format used by the host, the conversion formula and conversion compensation used by the control circuit 101 can be expressed by the following formula 9:
[0053] (((TEXAS INSTRUMENTS HDC1080 temperature digital signal)×A+BD)÷C+Error value generated by conversion=MODBUS temperature digital signal……Formula 9
[0054] In other embodiments, the input command set and the output command set may also be command sets used by other different brands of sensors, such as sensor models Texas Instruments HDC3020, SENSIRION SHT45 or other commercially available sensor products, but the present invention is not limited thereto.
[0055] Step S517: Determine whether to execute the calibration procedure. When the conversion device 1 completes the conversion of the sensing data in the second communication protocol format, the conversion device 1 determines whether to execute the calibration procedure through the second communication interface 14. For example, when the control circuit 101 obtains the calibration function provided by an external device (such as a host) through the second communication interface 14, it can execute the subsequent calibration procedure. If step S517 determines yes, proceed to step S519; if step S517 determines no, proceed to step S521.
[0056] Step S519: Correct the second communication protocol format sensing data. Performing the correction procedure here means that the control circuit 101 corrects the second communication protocol format sensing data according to the correction function. For example, under normal conditions, the humidity accuracy of sensor 3 is generally around ±2%, but in extreme environments (relatively high or low temperatures), the accuracy of sensor 3 will be affected and not perform well. Therefore, this correction function can correct the humidity curve based on the data from the original sensor 3 and the verification test of the dew point meter, allowing each sensor 3 to perform more stably in some extreme environments.
[0057] Step S521: Store the first communication protocol format sensing data and the second communication protocol format sensing data. After obtaining the first communication protocol format sensing data and the second communication protocol format sensing data, the conversion device 1 can store them in the memory 1015 by the control circuit 101 for retrieval and use.
[0058] Step S523: Determine the host connected to the corresponding communication interface. When the second communication interface 14 of the conversion device 1 is connected to an external device (such as a host), the control circuit 101 can further determine whether the communication interface used by the host 5 can be supported by the conversion device 1. If step S523 determines yes, proceed to step S525; if step S523 determines no, proceed to step S509.
[0059] Step S525: Use the corresponding communication protocol format. When the control circuit 101 determines that the host 5 currently connected to the second communication interface 14 belongs to a supported communication protocol format, the control circuit 101 will use the corresponding communication protocol format to transmit data with the host 5. For example, this conversion device 1 can support various communication interfaces such as I2C, I3C, SPI, CAN, UART, RS-232 / RS-485 or GPIO, Lin, USB, Ethernet, analog interface, etc. When the control circuit 101 determines that the communication interface used by the host 5 is I2C, the control circuit 101 will use the I2C communication protocol format to transmit data with the host 5; or when the control circuit 101 determines that the communication interface used by the host 5 is RS-485, the control circuit 101 will use the RS-485 communication protocol format to transmit data with the host 5, and so on.
[0060] Step S527: Determine whether a read command has been received. Here, the control circuit 101 determines whether the second communication interface 14 has received a read command from the host 5. If step S527 determines that it is yes, step S533 is executed; if step S527 determines that it is no, step S529 is executed.
[0061] Step S529: Determine whether to perform an update. Here, the control circuit 101 determines whether the second communication interface 14 has received an update command from the host 5. If step S529 determines that it is yes, step S535 is executed; if step S529 determines that it is no, step S531 is executed.
[0062] Step S531: Determine whether to perform other function operations. Here, the control circuit 101 determines whether the second communication interface 14 receives other instructions from the host 5. If step S531 determines yes, step S537 is executed; if step S531 determines no, step S509 is executed.
[0063] Step S533: Return to host. The control circuit 101 outputs the second communication protocol format sensing data in the memory 1015 to the second communication interface 14 according to the read instruction, so that the host 5 can obtain the second communication protocol format sensing data.
[0064] Step S535: Update database 1013. The control circuit 101 updates the multiple sets of command sets with different communication protocol formats stored in the database 1013 of the conversion device 1 according to the update instruction.
[0065] Step S537: Execute other instructions. The control circuit 101 performs other functional operations on the conversion device according to other instructions.
[0066] Referring to FIG6, FIG6 is a control flowchart of the identification sensor provided in an embodiment of the present invention. FIG6 further explains step S507 of FIG5A, that is, the model of identification sensor 3 of conversion device 1 can be illustrated by the following steps.
[0067] Step S5071: Model Identification. When the control circuit 101 learns that the first communication interface 12 is connected to the sensor 3, the control circuit 101 can initiate the model identification of the sensor 3. For example, in this case, the control circuit 101 will use one of the multiple command sets in the database 1013 to identify the sensor 3 one by one.
[0068] Step S5073: Execute the first set of commands. Here, the control circuit 101 selects the first set of commands to identify the sensor 3. For example, when the control circuit 101 executes the first set of commands, it can output the relevant instructions of the first set of commands through the first communication interface 12 to identify the sensor 3.
[0069] Step S5075: Determine if there is a response. The control circuit 101 determines whether the model of the sensor 3 is applicable to the first set of command by determining whether the first communication interface 12 receives a response message from the sensor 3. If step S5075 determines yes, step S5089 is executed; if step S5075 determines no, step S5077 is executed.
[0070] Step S5077: Execute the second set of commands. Here, the control circuit 101 selects the second set of commands to identify the sensor 3. For example, when the control circuit 101 executes the second set of commands, it can output the relevant instructions of the second set of commands through the first communication interface 12 to identify the sensor 3.
[0071] Step S5079: Response. The control circuit 101 determines whether the model of the sensor 3 is applicable to the second set of command sets by judging whether the first communication interface 12 receives a response message from the sensor 3. If step S5079 determines yes, step S5089 is executed; if step S5079 determines no, step S5081 is executed.
[0072] Step S5081: Execute the third set of commands. Here, the control circuit 101 selects the third set of commands to identify the sensor 3. For example, when the control circuit 101 executes the third set of commands, it can output the relevant instructions of the third set of commands through the first communication interface 12 to identify the sensor 3.
[0073] Step S5083: Response. The control circuit 101 determines whether the model of the sensor 3 is applicable to the third set of command by judging whether the first communication interface 12 receives a response message from the sensor 3. If step S5083 determines yes, step S5089 is executed; if step S5083 determines no, step S5085 is executed.
[0074] Step S5085: Execute the fourth set of commands. Here, the control circuit 101 selects the fourth set of commands to identify the sensor 3. For example, when the control circuit 101 executes the fourth set of commands, it can output the relevant instructions of the fourth set of commands through the first communication interface 12 to identify the sensor 3.
[0075] Step S5087: Response. The control circuit 101 determines whether the model of the sensor 3 is applicable to the fourth command set by judging whether the first communication interface 12 receives a response message from the sensor 3. If step S5087 determines yes, step S5089 is executed; if step S5087 determines no, step S5071 is executed.
[0076] Step S5089: Model Confirmation. Here, the control circuit 101 confirms the model of the sensor 3 based on whether the sensor 3 responds with a message. For example, if step S5075 determines that the sensor 3 is applicable to the first command set; or if step S5079 determines that the sensor 3 is applicable to the second command set; or if step S5083 determines that the sensor 3 is applicable to the third command set; or if step S5087 determines that the sensor 3 is applicable to the fourth command set.
[0077] In one embodiment, the control circuit 101 may be one or any combination of an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), or a system-on-a-chip (SOC), and may be used in conjunction with other related circuit elements and firmware to realize the above-mentioned functional flow.
[0078] [Beneficial Effects of the Embodiments]
[0079] The present invention provides a sensor communication protocol format conversion device and a sensor communication protocol format conversion method. The conversion device is connected to the sensor and the host, enabling the host to easily read sensors from different brands. This device retains the original communication format without requiring modification of the original hardware and software settings, thereby providing diverse product expandability.
[0080] The above-described contents are merely preferred embodiments of the present invention and are not intended to limit the scope of the patent application of the present invention. Therefore, all equivalent technical changes made using the contents of the present invention specification and drawings are included within the scope of the patent application of the present invention. [Simplified Explanation of the Diagram]
[0081] Figure 1 is a schematic diagram of the usage architecture of the conversion device provided in an embodiment of the present invention.
[0082] Figure 2 is an exploded view of the conversion device provided in an embodiment of the present invention.
[0083] Figure 3 is a functional block diagram of the conversion device provided in an embodiment of the present invention.
[0084] Figure 4 is a functional block diagram of the control circuit provided in an embodiment of the present invention.
[0085] Figures 5A and 5B are control flowcharts of the communication protocol format conversion method for sensors provided in the embodiments of the present invention.
[0086] Figure 6 is a control flowchart of the identification sensor provided in an embodiment of the present invention.
Claims
1. A device for converting the communication protocol format of a sensor, comprising: First communication interface; A second communication interface; The system also includes a control circuit electrically connected to the first communication interface and the second communication interface. The control circuit identifies a sensor connected to the first communication interface based on multiple sets of command sets with different communication protocol formats. Based on the identification result, it selects one set of command sets from the multiple sets of command sets as an input command set for successfully identifying the sensor. It then obtains sensing data of the sensor in a first communication protocol format through the input command set. The control circuit selects one set of command sets from the multiple sets of command sets as an output command set. Based on the output command set, it converts the sensing data in the first communication protocol format into sensing data in a second communication protocol format, and outputs the sensing data in the second communication protocol format through the second communication interface.
2. The sensor communication protocol format conversion device as claimed in claim 1, wherein the control circuit includes a processor and a database storing multiple sets of command sets of different communication protocol formats, and the processor identifies the communication protocol of the sensor according to the command sets.
3. The sensor communication protocol format conversion device as described in claim 2, wherein when the sensor is connected to the first communication interface, the processor selects one set of commands from multiple command sets as the input command set for successfully identifying the sensor based on the identification result, and obtains the sensor's first communication protocol format sensing data through the input command set.
4. The sensor communication protocol format conversion device as described in claim 3, wherein the processor selects one set of commands from a plurality of command sets as the output command set, and the processor converts the first communication protocol format sensing data into the second communication protocol format sensing data according to the output command set.
5. A communication protocol format conversion device for a sensor as described in claim 4, wherein the input command set and the output command set are the same or different command sets.
6. The communication protocol format conversion device for the sensor as described in claim 2, wherein the control circuit further includes a memory that stores the first communication protocol format sensing data and the second communication protocol format sensing data.
7. A sensor communication protocol format conversion device as described in claim 6, wherein when the processor receives a read instruction from a host through the second communication interface, the processor outputs the second communication protocol format sensing data in the memory to the second communication interface according to the read instruction, so that the host can obtain the second communication protocol format sensing data.
8. A sensor communication protocol format conversion device as described in claim 2, wherein when the processor receives an update instruction from a host through the second communication interface, the processor updates the contents of the database according to the update instruction.
9. A device for converting the communication protocol format of a sensor as described in claim 1, wherein the first communication interface and the second communication interface are the same or different communication interfaces.
10. A sensor communication protocol format conversion device as claimed in claim 1, wherein a control circuit is disposed on a motherboard, the motherboard is disposed on a receiving portion of a housing, and the first communication interface and the second communication interface are respectively disposed on one side of the housing.
11. A method for converting the communication protocol format of a sensor, comprising: When a sensor is connected to a first communication interface of a conversion device, a control circuit of the conversion device identifies the communication protocol format of the sensor according to multiple sets of command sets with different communication protocol formats; the control circuit selects one set of command sets from the multiple sets of command sets as an input command set for successfully identifying the sensor according to the identification result, and obtains sensing data of the sensor in a first communication protocol format through the input command set; and the control circuit selects one set of command sets from the multiple sets of command sets as an output command set, and converts the sensing data in the first communication protocol format into sensing data in a second communication protocol format according to the output command set, so that a second communication interface of the conversion device outputs the sensing data in the second communication protocol format.
12. The method for converting the communication protocol format of a sensor as described in claim 11, wherein the control circuit outputs a read packet to the first communication interface according to the input command set to control the sensor to perform a sensing calculation according to the read packet, and after a waiting calculation time, the control circuit obtains the sensing data of the first communication protocol format returned by the sensor.
13. The method for converting the communication protocol format of the sensor as described in claim 11 further includes: The sensing data in the second communication protocol format is stored in a memory of the conversion device.
14. The method for converting the communication protocol format of a sensor as described in claim 13, wherein the control circuit converts the first communication protocol format sensing data into the second communication protocol format sensing data according to a conversion formula and a conversion compensation corresponding to the output command set.
15. The method for converting the communication protocol format of the sensor as described in claim 13 further includes: The control circuit determines whether to perform a calibration procedure; if the control circuit determines no, it stores the second communication protocol format sensing data in the memory; and if the control circuit determines yes, it calibrates the second communication protocol format sensing data according to a calibration function and stores the calibrated second communication protocol format sensing data in the memory.
16. The method for converting the communication protocol format of the sensor as described in claim 13 further includes: When the second communication interface receives a read command from a host, the control circuit outputs the second communication protocol format sensing data in the memory to the second communication interface according to the read command, so that the host can obtain the second communication protocol format sensing data.
17. The method for converting the communication protocol format of the sensor as described in claim 11 further includes: When the second communication interface receives an update command from a host, the control circuit updates the multiple sets of command sets with different communication protocol formats stored in the database of the conversion device according to the update command.