A cable identity number recognition system
By designing a cable identity identification number identification system including a microcontroller unit and a sampling cable, the problem of not being able to identify the connection cable identity identification number in the prior art is solved, and the accuracy and security of cable connection are achieved.
Patent Information
- Application Number
- CN202210755771.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-06-30
AI Technical Summary
The prior art cannot effectively identify the identity identification number of the connecting cable, resulting in a wrong cable connection, which may lead to inability to interact with electronic devices or damage to the equipment.
A cable identity identification number identification system is designed, including the master device and the slave device. The main device is electrically connected to the microcontroller unit through the sampling cable. The microcontroller unit collects the sampling voltage of the sampling cable and identifies the identity identification number of the cable to be identified based on the voltage and resistance ratio.
Effectively identify the identity identification number of the connecting cable, prevent cable connection errors, avoid inability to interact with electronic devices or cause equipment damage, reduce system design costs, and enrich identification functions.
Smart Images

Figure CN114924208B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic cables, and in particular, to a cable identity identification number recognition system. Background Art
[0002] Electrical energy or communication signals are transmitted between electronic devices through cables. For the cables connecting two electronic devices, methods such as anti-fooling by structure (including cable plug size, pin size, pin position distribution, protection position), cable color distinction, and prominent reminder signs are generally used to prevent incorrect cable connections. For example, a power cable is connected to a signal cable, the signal cable is misinserted and mismatched, the power cable specifications and models are mismatched, etc. Incorrect cable connections will cause adverse effects. At the lightest, signals cannot be exchanged between the two electronic devices, and at the heaviest, the connected electronic devices are damaged. In some applications, different connected electronic devices may use the same connection plug (such as a sampling cable), and it is necessary to distinguish different connected electronic devices in the application. In this case, it is usually necessary to identify the cable identity identification number (Identity Document, ID) of the connected cable.
[0003] Therefore, how to effectively identify the connected cable or device ID will be an urgent problem to be solved. Summary of the Invention
[0004] An embodiment of the present invention aims to provide a cable identity identification number recognition system, which can solve the problem that the existing cable identity identification number cannot be recognized for the connected cable, resulting in incorrect cable connection, so that signals cannot be exchanged between the electronic devices connected by the cable or the connected electronic devices are damaged.
[0005] To solve the above technical problems, a first aspect embodiment of the present invention provides a cable identity identification number recognition system, the system includes: a master device and a slave device, the master device includes a master device end plug, a sampling cable, and a micro control unit, and the master device end plug is electrically connected to the micro control unit through the sampling cable; the slave device includes a slave device end plug, and the slave device end plug is electrically connected to the micro control unit; wherein:
[0006] The master device end plug and the slave device end plug are respectively electrically connected to both ends of the cable to be identified;
[0007] The micro control unit is configured to collect the sampling voltage of the sampling cable, and identify the identity identification number of the cable to be identified connected to the master device end plug and the slave device end plug according to the sampling voltage and the resistance ratio.
[0008] Optionally, the master device further includes a resistor component, which is electrically connected to the master device end plug and the microcontroller unit respectively, and is used to provide multiple reference resistors for selection to form a voltage division circuit with the configuration resistor of the slave device end plug.
[0009] Optionally, the resistor component includes several reference resistors and a cable multiplexer. Both ends of the several reference resistors are electrically connected to the reference voltage terminal and the cable multiplexer respectively.
[0010] Optionally, the cable multiplexer includes several input terminals and output terminals; the several input terminals are electrically connected to the several reference resistors respectively, and are used to select one of the several reference resistors to form a voltage division circuit with the configuration resistor of the slave device end plug. The voltage division circuit divides the reference voltage to form a voltage division; the output terminal of the cable multiplexer is electrically connected to the master device end plug through the sampling cable.
[0011] Optionally, the microcontroller unit includes an analog-to-digital converter, and the analog data converter is electrically connected to the master device end plug through the sampling cable, and is used to collect the sampling voltage of the sampling cable.
[0012] Optionally, the master device end plug includes a first cable pin, and the first cable pin is electrically connected to the analog-to-digital converter of the microcontroller unit through the sampling cable.
[0013] Optionally, the slave device end plug includes a second cable pin and a configuration resistor, and the configuration resistor is electrically connected to the second cable pin.
[0014] Optionally, the voltage division includes a first voltage division section, a second voltage division section, a third voltage division section, and a fourth voltage division section;
[0015] The first voltage division section includes a first voltage division range for resistor identity number identification, and each identity number occupies a first preset proportion of the voltage division interval;
[0016] The second voltage division section includes a second voltage division range for integrated circuit chip identity number identification, distinguishing 2 categories, and each category of identity number occupies a second preset proportion of the voltage division interval;
[0017] The third voltage division section includes a third voltage division range for resistor identity number identification, and the cable identity number is identified by changing the reference resistor. Each identity number occupies a third preset proportion of the voltage division interval;
[0018] The fourth voltage division section includes a fourth voltage division range, and the fourth voltage division range is the voltage division range other than the above first voltage division range, second voltage division range, and third voltage division range, indicating that there is no connection of the cable identity number.
[0019] Optionally, the master device further includes a storage unit, which is electrically connected to the microcontroller unit and is used to pre-store the cable identity identification numbers corresponding to different service logics.
[0020] Optionally, the microcontroller unit is further configured to compare the cable identity identification number stored in the storage unit with the identity identification number of the cable to be identified inserted into the slave device to determine whether the inserted cable to be identified is correct.
[0021] Compared with the prior art, an identification system for cable identity identification numbers provided by an embodiment of the present invention provides an identification system for cable identity identification numbers, where the system includes a master device and a slave device. The master device includes a microcontroller unit, a sampling cable, and a master device end plug. The master device end plug is electrically connected to the microcontroller unit through the sampling cable; the slave device includes a slave device end plug, and the microcontroller unit is electrically connected to the slave device end plug respectively; wherein: the master device end plug and the slave device end plug are electrically connected to both ends of the cable to be identified respectively; the microcontroller unit is configured to collect the sampling voltage of the sampling cable electrically connected to the master device end plug, and identify the identity identification number of the cable to be identified connected to the master device end plug and the slave device end plug according to the sampling voltage and the resistance ratio. Therefore, the cable identity identification number of the connected cable can be effectively identified, preventing incorrect cable connection, avoiding the inability to interact signals between the electronic devices connected by the cable or causing damage to the connected electronic devices, reducing the design cost of the system, enriching the identification function of the system, and thus solving the problem that the existing cable connection cannot be identified by the cable identity identification number, resulting in incorrect cable connection, the inability to interact signals between the electronic devices connected by the cable or causing damage to the connected electronic devices. Description of the Drawings
[0022] One or more embodiments are exemplarily illustrated by the pictures in the corresponding drawings. These exemplary illustrations do not limit the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the drawings in the drawings do not constitute a proportional limitation.
[0023] Figure 1 is a schematic structural diagram of an identification system for cable identity identification numbers provided by the present invention;
[0024] Figure 2 is a schematic structural diagram of the master device in an identification system for cable identity identification numbers provided by the present invention;
[0025] Figure 3 is a schematic structural diagram of the slave device in an identification system for cable identity identification numbers provided by the present invention;
[0026] Figure 4 It is a distribution schematic diagram of voltage division sections in a cable identity identification number recognition system provided by the present invention;
[0027] Figure 5 It is a structural schematic diagram of another cable identity identification number recognition system provided by the present invention;
[0028] Figure 6 It is a structural schematic diagram of a slave device in another cable identity identification number recognition system provided by the present invention. Detailed implementation manners
[0029] For the convenience of understanding the present invention, the present invention will be described in more detail below with reference to the accompanying drawings and specific embodiments. It should be noted that when an element is expressed as "fixed to" another element, it can be directly on the other element, or there can be one or more intermediate elements therebetween. When an element is expressed as "connected to" another element, it can be directly connected to the other element, or there can be one or more intermediate elements therebetween. The terms "upper", "lower", "inner", "outer", "bottom", etc. used in this specification indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be construed as a limitation of the present invention. In addition, the terms "first", "second", "third", etc. are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.
[0030] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs. The terms used in this specification in the description of the present invention are only for the purpose of describing specific embodiments and are not used to limit the present invention. The term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.
[0031] In addition, the technical features involved in different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0032] In one embodiment, as Figure 1As shown in the figure, the present invention provides a cable identity identification number recognition system. The system 1 includes a master device 11 and a slave device 12. The master device 11 includes a master device end plug 111, a sampling cable 112, and a microcontrol unit 113. The master device end plug 111 is electrically connected to the microcontrol unit 113 through the sampling cable 112. The slave device 12 includes a slave device end plug 121, and the slave device end plug 121 is electrically connected to the microcontrol unit 113. Among them:
[0033] The master device end plug 111 and the slave device end plug 121 are respectively electrically connected to both ends of the cable to be identified.
[0034] The microcontrol unit 113 is configured to collect the sampling voltage of the sampling cable 112 electrically connected to the master device end plug 111, and identify the identity identification number of the cable to be identified connected to the master device end plug 111 and the slave device end plug 121 according to the sampling voltage and the resistance ratio.
[0035] In this embodiment, by providing a cable identity identification number recognition system, the system includes a master device and a slave device. The master device includes a microcontrol unit, a sampling cable, and a master device end plug. The master device end plug is electrically connected to the microcontrol unit through the sampling cable. The slave device includes a slave device end plug, and the microcontrol unit is electrically connected to the slave device end plug respectively. Among them: the master device end plug and the slave device end plug are respectively electrically connected to both ends of the cable to be identified. The microcontrol unit is configured to collect the sampling voltage of the sampling cable electrically connected to the master device end plug, and identify the identity identification number of the cable to be identified connected to the master device end plug and the slave device end plug according to the sampling voltage and the resistance ratio. Thus, the cable identity identification number of the connected cable can be effectively recognized, preventing incorrect cable connection, avoiding the inability of the electronic devices connected by the cable to interact signals or causing damage to the connected electronic devices, reducing the design cost of the system, enriching the identification function of the system, and thus solving the problem that the existing cable connection cannot be identified by the cable identity identification number, resulting in incorrect cable connection, so that the electronic devices connected by the cable cannot interact signals or cause damage to the connected electronic devices.
[0036] In one embodiment, as Figure 2 shown, the master device 11 further includes a resistor component 114. The resistor component 114 is respectively electrically connected to the master device end plug 111 and the microcontrol unit 113, and is used to provide multiple reference resistors for selecting a voltage division circuit formed with the configuration resistor Re of the slave device end plug 121.
[0037] Specifically, as Figure 2As shown, the resistor component 114 includes several paths of reference resistors 1141 and a cable multiplexer (MUX) 1142. Both ends of the several paths of reference resistors 1142 are electrically connected to the reference voltage terminal and the cable multiplexer 1142 respectively.
[0038] The cable multiplexer 1142 includes several input terminals and an output terminal; the several input terminals are respectively electrically connected to the several paths of reference resistors 1141, and are used to select one path of reference resistor from the several paths of reference resistors 1141 to form a voltage division circuit with the configuration resistor Re of the slave device end plug 121. The voltage division circuit divides the reference voltage Vref to form a voltage division; the output terminal of the cable multiplexer 1142 is electrically connected to the master device end plug 111 through the sampling cable 112.
[0039] As an example, as Figure 2 shown, the resistor component 114 includes 4 paths of reference resistors, namely the first reference resistor R1, the second reference resistor R2, the third reference resistor R3, and the fourth reference resistor R4. The resistance values of the first reference resistor R1, the second reference resistor R2, the third reference resistor R3, and the fourth reference resistor R4 increase in sequence. One end of the first reference resistor R1, the second reference resistor R2, the third reference resistor R3, and the fourth reference resistor R4 is electrically connected to the reference voltage terminal respectively, and the other end is electrically connected to the cable multiplexer 1142 respectively.
[0040] The cable multiplexer 1142 includes 4 input terminals (IN1, IN2, IN3, IN4), 1 control terminal IO, and 1 output terminal OUT. The 4 input terminals are respectively electrically connected to the first reference resistor R1, the second reference resistor R2, the third reference resistor R3, and the fourth reference resistor R4. The output terminal OUT is electrically connected to the master device end plug 111 through the sampling cable 112. The control terminal IO is electrically connected to the micro control unit 113, and is used to make the cable multiplexer 1142 select one path of reference resistor from the 4 paths of reference resistors according to the control instruction of the micro control unit 113, and form a voltage division circuit with the configuration resistor Re of the slave device end plug 121 through the output terminal. The voltage division circuit divides the reference voltage Vref to form a voltage division. The selected reference resistor is called the reference resistor Rx.
[0041] In this embodiment, by the master device including a resistor component, and the resistor component including several paths of reference resistors, by setting multi-level reference resistors, the identification range of the resistor ID can be expanded, so as to support the expansion of the resistor ID, and the problem that the number of IDs recognized by a single-level reference resistor is limited can be solved.
[0042] In one embodiment, the master device 11 includes a master device end plug 111, a sampling cable 112, and a micro control unit 113. The master device end plug 111 is electrically connected to the micro control unit 113 through the sampling cable 112.
[0043] Specifically, as Figure 2 shown, the micro control unit 113 includes an analog-to-digital converter (ADC) 1131. The analog data converter 1131 is electrically connected to the master device end plug 111 through the sampling cable 112 and is used to collect the sampling voltage of the sampling cable 112 electrically connected to the master device end plug 111.
[0044] Optionally, the analog-to-digital converter 1131 can also be an independent device. When the analog-to-digital converter 1131 is an independent device, the analog-to-digital converter 1131 is electrically connected to the micro control unit 113 and is electrically connected to the master device end plug 111 through the sampling cable 112. At this time, the function implemented by the analog-to-digital converter 1131 is the same as the function implemented in the micro control unit 113.
[0045] The master device end plug 111 includes a first cable pin 1111 and a first ground pin 1112. The first cable pin 1111 is electrically connected to the analog-to-digital converter 1131 of the micro control unit 113 through the sampling cable 112, and the first ground pin 1112 is grounded.
[0046] In this embodiment, by including a first cable pin in the master device end plug, and the first cable pin is electrically connected to the analog-to-digital converter of the micro control unit through the sampling cable, so that when the number of pins of the master device end plug is limited, a first cable pin is added to the master device end plug, and the ID of the connection cable is identified by analog signal or digital communication method, so that the cable identity identification number of the connection cable can be effectively identified, preventing incorrect cable connection, avoiding that the electronic devices connected by the cable cannot interact signals or causing damage to the connected electronic devices, reducing the design cost of the system, and enriching the identification function of the system.
[0047] In one embodiment, as Figure 3 shown, the slave device 12 includes a slave device end plug 121. The slave device end plug 121 includes a second cable pin 1211, a configuration resistor Re, and a second ground pin 1212. One end of the configuration resistor Re is electrically connected to the second cable pin 1211, the other end of the configuration resistor Re is electrically connected to the second ground pin 1212, and the second ground pin 1212 is grounded.
[0048] The resistance ratio is the ratio of the configured resistance Re to the reference resistance Rx. Let the resistance ratio be y, then:
[0049]
[0050] The cable multiplexer 1142 selects one of the several reference resistors 1141 as the reference resistance Rx according to the control instruction of the microcontroller unit 113, and forms a voltage division circuit with the configured resistance Re of the slave device end plug 121. The voltage division circuit divides the reference voltage Vref to form a voltage division, which is input into the analog-to-digital converter 1131 of the microcontroller unit 113 through the sampling cable 112. The analog-to-digital converter 1131 samples the voltage division (i.e., the sampling voltage of the sampling cable) passing through the reference resistance Rx and the configured resistance Re. For example, the reference voltage is 3.3V.
[0051] Let the voltage division of the reference voltage Vref passing through the reference resistance Rx and the configured resistance Re be Vi, then:
[0052]
[0053] For a specific cable to be identified, the resistance value of the configured resistance Re of the slave device end plug 121 is shown in the following formula:
[0054]
[0055] The reference resistance Rx and the configured resistance Re form a voltage division circuit. After the reference voltage Vref is voltage-divided by the voltage division circuit, it is input into the analog-to-digital converter 1131 of the microcontroller unit 113 through the sampling cable 112. The analog-to-digital converter 1131 samples the voltage division Vi (i.e., the sampling voltage of the sampling cable) passing through the reference resistance Rx and the configured resistance Re. The resistance value of the configured resistance Re can be calculated through formula (3). Different configured resistances Re are different, and the ID of the cable to be identified can be identified according to the calculated configured resistance Re.
[0056] After the reference voltage Vref is voltage-divided by the voltage division circuit, let the voltage division ratio be f(e), then:
[0057]
[0058] The relationship between the voltage division ratio f(e) and the change in the resistance ratio is shown in Table 1. In Table 1, as the resistance ratio y increases, the voltage recognition difference △ becomes smaller. The smaller the voltage recognition difference △, the more difficult it is for the analog-to-digital converter 1131 to recognize the difference between different voltage division ratios f(e), and the recognition of the cable ID may fail.
[0059] Table 1: Relationship between the resistance ratio y and the voltage recognition difference △
[0060]
[0061]
[0062] Assume that the analog-to-digital converter 1131 is 12-bit. Then the lowest voltage recognition difference △ is 3‰ (1 / 4096). If the resistance ratio y satisfies the following formula (5), then the resistance ratio y < 62.
[0063]
[0064] In practical applications, due to the tolerance of the resistor (generally with a deviation of ±10%), the true value of the resistance ratio y and the theoretical value range from 0.818 (0.9 / 1.1) to 1.222 (1.1 / 9). Considering that the voltage recognition difference △ is a decreasing function, theoretically for 12-bit ADC sampling, the maximum resistance ratio y does not exceed 50 (62 / 1.222). At this time, the tolerance range of the resistance ratio y is (45 (50 * 0.9), 62 (50 * 1.222)), and the maximum recognizable voltage division range is 5.8‰ (62 / 63 - 45 / 46). Due to the reference voltage difference and other system errors, the voltage division range interval between adjacent two cable IDs should be as wide as possible. In the present invention, the voltage division range is taken to be more than 5%, and the resistance ratio y does not exceed 4. Since the sampled voltage is affected by the reference voltage, in order to eliminate this influence, the proportional method can be used for differentiation, dividing the sampled voltage (Vi) by the reference voltage (Vref), which greatly eliminates the influence of the reference voltage.
[0065] In one embodiment, as Figure 4 shown, the voltage division includes a first voltage division section (ID Base), a second voltage division section (ID IC), a third voltage division section (ID Extend), and a fourth voltage division section (NoID).
[0066] Specifically, as shown in Table 2, the first voltage division section is ID Base, including a first voltage division range for resistor ID recognition, and each ID occupies a first preset proportion of the voltage division interval.
[0067] As an example, the first partial pressure range is 0% - 63%, and the first preset ratio is 6%. That is, each ID occupies a 6% partial pressure interval, and 10 IDs of the cables to be identified can be recognized. When the number of IDs is more than 10, more IDs can be extended through the extended segment ID Extend and the switching of the reference resistor Rx.
[0068] In the subsequent description of the present invention, the first partial pressure range is taken as 0% - 63% and the first preset ratio is taken as 6% for specific illustration. However, the first partial pressure range and the first preset ratio are not limited to the above range descriptions.
[0069] The second partial pressure section is ID IC, including a second partial pressure range for ID recognition of an IC (Integrated Circuit) chip. It can distinguish 2 categories, and each category of ID occupies a partial pressure interval of the second preset ratio.
[0070] As an example, the second partial pressure range is 63% - 75%, and the second preset ratio is 6%. That is, each category of ID occupies a 6% partial pressure interval.
[0071] In the subsequent description of the present invention, the second partial pressure range is taken as 63% - 75% and the second preset ratio is taken as 6% for specific illustration. However, the second partial pressure range and the second preset ratio are not limited to the above range descriptions.
[0072] The third partial pressure section is ID Extend, including a third partial pressure range for resistor ID recognition. The cable ID is recognized by changing the reference resistor Rx. Each ID occupies a partial pressure interval of the third preset ratio. More IDs can be extended through the extended segment ID Extend and the switching of the reference resistor Rx.
[0073] As an example, the third partial pressure range is 75% - 98%, and the third preset ratio is 6%. That is, each ID occupies a 6% partial pressure interval. More IDs can be extended through the extended segment ID Extend and the switching of the reference resistor Rx.
[0074] In the subsequent description of the present invention, the third partial pressure range is taken as 75% - 98% and the third preset ratio is taken as 6% for specific illustration. However, the third partial pressure range and the third preset ratio are not limited to the above range descriptions.
[0075] The fourth partial pressure section is NoID, including a fourth partial pressure range, which is the partial pressure range other than the above first partial pressure range, second partial pressure range, and third partial pressure range, indicating that there is no cable ID connection.
[0076] Exemplarily, the first partial pressure range is 0%-63%, the second partial pressure range is 63%-75%, the third partial pressure range is 75%-98%, and then the fourth partial pressure range is 98%-100%.
[0077] Table 2: Voltage Partial Pressure Range Planning
[0078] Serial number Segmentation Voltage division range Use 1 ID Base 0%~63% Resistance ID identification, each ID occupies a 6% voltage division interval, and 10 IDs can be distinguished 2 ID IC 63%~75% IC chip identification, each category occupies a 6% voltage division interval, and 2 categories can be distinguished 3 ID Extend identification 75%~98% Identify ID by changing Rx 4 NoID 98%~100% No ID connection
[0079] Specifically, when performing ID recognition on the cable to be recognized, both ends of the cable to be recognized are respectively inserted into the main device end plug 111 and the slave device end plug 121, so that the analog-to-digital converter 1131 of the micro control unit 113, the sampling cable 112, the first cable pin 1111 of the main device end plug 111, the cable to be recognized, the second cable pin 1211 of the slave device end plug 121, the configuration resistor Re, and the second ground pin 1212 of the slave device end 121 form an identification loop. The control end IO of the cable multiplexer 1142 selects the first reference resistor R1 from the 4-way reference resistors 1141 according to the control instruction of the micro control unit 113 and accesses it to the sampling cable 112, so that the first reference resistor R1 and the configuration resistor Re of the slave device end plug 121 form a voltage division circuit. The analog-to-digital converter 1131 collects the sampling voltage Vi of the sampling cable 112 (i.e., the voltage division of the reference voltage Vref passing through the voltage division circuit formed by the reference resistor Rx and the configuration resistor Re), and calculates the resistance value of the configuration resistor Re through formula (3). And calculate the voltage division ratio f(e) through formula (4).
[0080] According to the voltage division ratio f(e), the following three scenarios can be divided.
[0081] Scenario 1: The First Voltage Division Section (ID Base)
[0082] If the voltage division ratio is lower than 63%, it is the first voltage division section (ID Base).
[0083] The first voltage division section is ID Base, with a voltage division range of 0%-63%, which is used for resistor ID recognition. Each ID occupies a 6% voltage division interval, and 10 IDs of the cables to be recognized can be recognized.
[0084] Specifically, the voltage division rule of the ID Base is shown in Table 3, and the corresponding cable ID is recognized according to the voltage range.
[0085] Table 3: ID Base Voltage Division Allocation
[0086] Serial number Voltage division range Voltage division center f(e) ID <![CDATA[R e / R x > 1 0%~6% 3% ID_0 0.0309 2 6%~12% 9% ID_1 0.0989 3 12%~18% 15% ID_2 0.1765 4 18%~24% 21% ID_3 0.2658 5 24%~30% 27% ID_4 0.3699 6 30%~36% 33% ID_5 0.4925 7 36%~42% 39% ID_6 0.6393 8 42%~48% 45% ID_7 0.8182 9 48%~54% 51% ID_8 1.0408 10 54%~63% 58% ID_9 1.3810
[0087] For a specific cable ID, the configuration resistance Re at the slave device end plug 121 is as shown in the following formula (6):
[0088]
[0089] Scenario 2: The third voltage division section (ID Extend)
[0090] If the voltage division ratio is greater than 75%, it is the third voltage division section (ID Extend).
[0091] The third voltage division section is identified as ID Extend, with a voltage division range of 75% - 98%. The cable ID is identified by changing the reference resistance Rx. At this time, the resistance ratio y is greater than 3 (the configuration resistance Re is more than 3 times the first reference resistance R1).
[0092] When the voltage division is in the three - voltage division section, it is necessary to switch the reference resistance Rx (switch from the first reference resistance R1 to the second reference resistance R2, the third reference resistance R3, or the fourth reference resistance R4), and remap the voltage division to an area that is easy to distinguish for measurement. That is, the control end IO of the cable multiplexer 1142 selects the second reference resistance R2, the third reference resistance R3, or the fourth reference resistance R4 from the 4 - way reference resistors 1141 according to the control instruction of the micro - control unit 113 and connects them to the sampling cable 112, so that the second reference resistance R2, the third reference resistance R3, or the fourth reference resistance R4 and the configuration resistance Re of the slave device end plug 121 form a voltage division circuit.
[0093] After switching from the first reference resistance R1 to other reference resistances for voltage division, the voltage division area rules of the third voltage division section are as follows:
[0094] (1) The resistance ratio y is less than 4, and the voltage division range is less than 80%;
[0095] (2) The voltage division interval is not less than 5%;
[0096] (3) Re / (Re + R1)>75%, that is, Re / R1>3, Re>3R1.
[0097] According to the formula (4) of the voltage division ratio f(e), the new mapping interval is determined as shown in the following formula (7):
[0098]
[0099] In order to expand the available voltage division range, it is necessary to increase Rx as much as possible, but the larger the resistance, the greater the error. Preferably, the resistance values of the second reference resistance R2, the third reference resistance R3, and the fourth reference resistance R4 are selected as: R2 = 4R1, R3 = 8R1, R4 = 16R1.
[0100] As shown in Table 4, it is the allocation rule for the third voltage division section.
[0101] Table 4: Allocation Rule for the Third Voltage Division Section
[0102]
[0103] According to the allocation rule in Table 4, determine the voltage division allocation for the third voltage division section, as shown in Table 5 below.
[0104] Table 5: Voltage Division Allocation for the Third Voltage Division Section
[0105] Serial number Reference resistance Available voltage division range Voltage division center f(e) ID 1 R2 42.86%~48.86% 45.86% ID_10 2 R2 48.86%~54.86% 51.86% ID_11 3 R2 54.86%~60.86% 57.86% ID_12 4 R2 66.86%~72.86% 69.86% ID_13 5 R2 72.86%~78.86% 75.86% ID_14 6 R2 78.86%~80% 79.43% ID_15 7 R3 66.67%~72.67% 69.86% ID_16 8 R3 72.67%~78.67% 75.86% ID_17 9 R4 66.67%~72.67% 69.86% ID_18 10 R4 72.67%~78.67% 75.86% ID_19
[0106] When R4 = 16R1, according to formula (4), when measuring with the fourth reference resistor R4, the voltage division range does not exceed 80%, and the configured resistor Re is not greater than 64R1. When measuring in the stage of using the first reference resistor R1, according to formula (2), the voltage division range does not exceed 98.46% (64R1 / (R1 + 64R1)).
[0107] When using the third voltage division section for cable ID identification, the identification method is as follows:
[0108] (1) Select the first reference resistor R1 for measurement in the reference resistor Rx. If the voltage division range is greater than 75% < f(e) < 98.65%, then go to (2); otherwise, there is no ID identification access, and end.
[0109] (2) If the voltage division ratio f(e) < 94.12%, then use the second reference resistor R2 as the reference resistor Rx, and go to the voltage division interval processing of the second reference resistor R2; otherwise, go to (3).
[0110] (3) If the voltage division ratio f(e) < 96.97%, then use the third reference resistor R3 as the reference resistor Rx, and go to the voltage division interval processing of the third reference resistor R3; otherwise, go to (4).
[0111] (4) Use the fourth reference resistor R4 as the reference resistor Rx, and go to the voltage division interval processing of the fourth reference resistor R4.
[0112] Among them, the specific method for going to the voltage division interval processing of a certain reference resistor is as follows:
[0113] A1. The cable multiplexer 1142 selects the calculated reference resistor.
[0114] For example, according to the above ID recognition method, when measuring by selecting the first reference resistor R1 in the reference resistor Rx, if the voltage division range f(e) is 90.32% and the voltage division ratio f(e) < 94.12%, then the second reference resistor R2 is selected as the reference resistor Rx.
[0115] A2. The analog-to-digital converter 1131 samples the sampling voltage Vi of the sampling cable.
[0116] A3. Calculate the voltage division ratio f(e) under the selected reference resistor according to formula (4).
[0117] For example, in this embodiment, it has been determined to select the second reference resistor R2 as the reference resistor Rx. At this time, calculate the voltage division ratio f(e) under the selected second reference resistor R2 according to formula (4).
[0118] A4. Search for the ID corresponding to the voltage division ratio f(e) within the available voltage division range for cable ID matching and recognition.
[0119] For example, in step A3, the calculated voltage division ratio f(e) under the second reference resistor R2 is 50.12%. In Table 4 above, the voltage division ratio f(e) of 50.12% falls within the available voltage division range (48.86% - 54.86%) of Table 4. Then, search for the ID corresponding to the voltage division ratio f(e) within the available voltage division range (48.86% - 54.86%) to match and recognize the cable ID as ID_11.
[0120] A5. If the voltage division ratio f(e) is not within the available voltage division range, the search fails and the ID matching recognition fails.
[0121] Scenario Three: Second Voltage Division Section (ID IC)
[0122] If the voltage division ratio is between 63% - 75%, it is the second voltage division section (ID IC).
[0123] The second voltage division section is ID IC, with a voltage division range of 63% - 75%, used for IC chip identification, and can distinguish 2 categories, each category occupying a 6% voltage division interval.
[0124] At this time, as Figure 5 shown, the master device 11 further includes: a single-wire transceiver controller 115, which is electrically connected to the micro-control unit 113 and electrically connected to the first cable pin 1111 of the master device end plug 111 through the sampling cable 112.
[0125] As Figure 6As shown, the slave device end plug 121 further includes an Electrically Erasable Programmable Read Only Memory (EEPROM) 122 that supports single-wire access. The EEPROM 122 is electrically connected to the second cable pin 1211 and the first ground pin 1212 respectively.
[0126] When the voltage division ratio is between 63% - 75%, it is determined as the second voltage division section (ID IC). At this time, a single-wire communication ID recognition method needs to be adopted.
[0127] The second voltage division section (ID IC) includes two types of single-wire communication ID recognition: the voltage division ratio between 63% - 69% is the first type of single-wire communication ID recognition method, and the voltage division ratio between 69% - 75% is the second type of single-wire communication ID recognition method. Different types of single-wire communication schemes can adopt different communication protocols of different manufacturers.
[0128] When the two ends of the cable to be recognized are inserted into the master device end plug 111 and the slave device end plug 121 respectively, and it is recognized as the second voltage division section (ID IC), that is, when it is recognized that the single-wire communication chip is at the slave device end plug 121, the micro control unit 113 of the master device 11 communicates with the EEPROM 122 of the slave device 12 through the single-wire transceiver controller 115, accesses the EEPROM 122 of the slave device 12, recognizes more information from the EEPROM 122, and completes information delivery.
[0129] Among them, the single-wire transceiver communication protocol used for communication can be deployed on the single-wire transceiver controller 115 or on the micro control unit 113.
[0130] In this embodiment, by setting a single-wire transceiver controller in the master device, and setting an EEPROM that supports single-wire access and a configuration resistor Re at the slave device end plug, two application scenarios of simple ID recognition and complex information acquisition can be compatible: in the case of simple ID recognition, only the resistor ID recognition method can be used to reduce the design cost; in the case where complex information acquisition is required, more comprehensive information data can be obtained through the single-wire communication ID recognition method. And by segmenting the voltage division range of the sampled voltage division, different sampled voltage division ranges are designed for resistor ID recognition and single-wire communication ID recognition, so as to automatically judge and distinguish whether the external cable ID is of the resistor type or a single-wire communication chip, thereby making the system widely applicable and can be widely used in fields such as power cables, communication cables, sampling cables, etc.
[0131] In one embodiment, asFigure 2 and Figure 5 As shown in Figure 5 , the master device 11 further includes: a storage unit 116, which is electrically connected to the micro-control unit 113 and is used to pre-store cable IDs corresponding to different service logics.
[0132] The micro-control unit 113 is further configured to, when executing a certain service, compare the cable ID stored in the storage unit 116 with the ID of the cable to be identified inserted into the slave device 12, determine whether the cable to be identified inserted into the slave device 12 is correct, and thus decide whether connection can be made for secure connection protection.
[0133] Preferably, the storage unit 116 stores the cable IDs corresponding to different service logics in the form of a database. Among them, the cable IDs in the database can be stored locally at the time of factory, or can be obtained or dynamically updated from a cloud server by connecting to the cloud platform through a communication module.
[0134] In this embodiment, a voltage division circuit is formed by the reference resistor Rx and the configuration resistor Re. After the reference voltage Vref is voltage-divided by the voltage division circuit, it is input into the analog-to-digital converter of the micro-control unit through the sampling cable. The analog-to-digital converter collects the sampling voltage of the sampling cable, calculates the resistance value of the configuration resistor Re through formula (3), identifies the ID of the cable to be identified according to the calculated configuration resistor Re, and then compares the ID of the cable to be identified with the cable ID stored in the storage unit to determine whether the cable to be identified inserted into the slave device line is correct, and thus decide whether connection can be made for secure connection protection.
[0135] It should be noted that in this article, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article or device including that element.
[0136] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0137] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; under the idea of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and the steps can be implemented in any order, and there are many other variations in different aspects of the present invention as described above. For the sake of brevity, they are not provided in detail; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A cable identity identification number recognition system, characterized in that, the system includes: a master device and a slave device, the master device includes a master device end plug, a sampling cable, a resistor component and a micro control unit, and the master device end plug is electrically connected to the micro control unit through the sampling cable; the slave device includes a slave device end plug, and the slave device end plug is electrically connected to the micro control unit; wherein: the master device end plug and the slave device end plug are respectively electrically connected to both ends of the cable to be recognized; the resistor component is respectively electrically connected to the master device end plug and the micro control unit, and is used to provide multiple reference resistors for selection to form a voltage division circuit with the configured resistor of the slave device end plug, and the voltage division circuit divides the reference voltage to form a voltage division; the voltage division includes a first voltage division section, a second voltage division section, a third voltage division section and a fourth voltage division section; the first voltage division section includes a first voltage division range for resistor identity identification number recognition, and each identity identification number occupies a voltage division interval of a first preset ratio; the second voltage division section includes a second voltage division range for integrated circuit chip identity identification number recognition, distinguishing 2 categories, and each category of identity identification number occupies a voltage division interval of a second preset ratio; the third voltage division section includes a third voltage division range for resistor identity identification number recognition, and the cable identity identification number is recognized by changing the reference resistor, and each identity identification number occupies a voltage division interval of a third preset ratio; the fourth voltage division section includes a fourth voltage division range, and the fourth voltage division range is the voltage division range other than the above first voltage division range, second voltage division range and third voltage division range, indicating that there is no cable identity identification number connection; the micro control unit is used to collect the sampling voltage of the sampling cable and identify the identity identification number of the cable to be recognized connected to the master device end plug and the slave device end plug according to the sampling voltage and the resistance ratio.
2. The system according to claim 1, characterized in that, the resistor component includes several paths of reference resistors and a cable multiplexer, and both ends of the several paths of reference resistors are respectively electrically connected to a reference voltage terminal and the cable multiplexer.
3. The system according to claim 2, characterized in that, the cable multiplexer includes several input terminals and output terminals; several input terminals are respectively electrically connected to several paths of the reference resistors, and are used to select one path of the reference resistors from several paths of the reference resistors to form the voltage division circuit with the configured resistor of the slave device end plug; the output terminal of the cable multiplexer is electrically connected to the master device end plug through the sampling cable.
4. The system according to claim 1, characterized in that, the micro control unit includes an analog-to-digital converter, and the analog-to-digital converter is electrically connected to the master device end plug through the sampling cable and is used to collect the sampling voltage of the sampling cable.
5. The system according to claim 4, characterized in that, the master device end plug includes a first cable pin, and the first cable pin is electrically connected to the analog-to-digital converter of the micro control unit through the sampling cable.
6. The system according to claim 5, It is characterized in that the slave device end plug includes a second cable pin and a configuration resistor, and the configuration resistor is electrically connected to the second cable pin.
7. The system according to claim 1, It is characterized in that the master device further includes a storage unit, and the storage unit is electrically connected to the micro control unit for pre-storing cable identity identification numbers corresponding to different service logics.
8. The system according to claim 7, It is characterized in that the micro control unit is further configured to compare the cable identity identification number stored in the storage unit with the identity identification number of the cable to be identified inserted into the slave device to determine whether the inserted cable to be identified is correct.
Citation Information
Patent Citations
Charging device and USB cable and charging system
CN110417069A
Equipment ID identification method and system based on ADC sampling and electronic equipment
CN111487487A