A device for reading character wheel with error correction coding
By using the (7,4) system cycle Hanming code disk and microprocessor in the mechanical counting table, the error correction and alarm functions of reading the word wheel numbers are realized, and data errors in the prior art are solved. Problem, improving the reliability and accuracy of the count table.
Patent Information
- Application Number
- CN202111159688.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2041-09-30
AI Technical Summary
Existing mechanical counting gas meters, electricity meters and water meters are prone to interference when reading word wheel numbers, causing data errors, especially when reading high digits, which lacks error correction capabilities, which may cause misreading and unnecessary troubles. .
Design an error correction code reading wheel device, adopts the (7,4) system to cycle the Hanming code disk and microprocessor, convert the angle information into level signals through infrared photoelectric coupling, and realize the arbitrary use of decoding processing. Automatic correction of one error and alarm prompt of any two or more errors.
It realizes accurate error correction and alarm prompts for reading code values, improves the reliability and accuracy of the system, ensures the accuracy of high-digit reading, and avoids misreading and troubles caused by errors.
Smart Images

Figure CN113886134B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of remote transmission of counting values of mechanical counting gas meters, electric energy meters, water meters and the like, and in particular to an error correction coding reading character wheel device. Background Art
[0002] To achieve remote transmission of the three meters counting by mechanical devices, it is necessary to convert the mechanical readings into electronic information through technologies such as photoelectric conversion. At present, most of them use photoelectric coupling angle position encoding to convert the counting wheel angle information into the corresponding binary code value. The electronic circuit system composed of a microprocessor reads the user's usage data and performs corresponding processing and services. At present, the encoding settings basically use ordinary binary code and Gray code. Since a 4-bit binary code has 16 code values, it can represent 10 numbers of the word wheel.
[0003] The accuracy of digital position does not necessarily require high precision, but accurate reading is very important, especially for high digits such as hundreds and thousands (including tens for home users). A wrong digit may cause disputes. As mentioned above, ordinary coding may cause data acquisition errors when interfered with (optical, electrical and other factors). As long as the misread code value is included in the coding table, it may lead to incorrect understanding and processing. Of course, using redundant coding (for example, increasing the number of bits, 5 bits can have 32 code values, and 20 of them are taken), there is a certain error reporting capability (the above 5 bits have 12 invalid states). However, if the code value that is wrong after interference is a valid code value, it is more difficult to report the error.
[0004] In view of this, this application is hereby filed. Summary of the invention
[0005] The technical problem to be solved by the present invention is to judge the code value of the read character wheel number, and if the code value is correct, the correct result can be output; if any one of the 7-bit code values is wrong, resulting in an error in the character wheel reading, the error can be automatically corrected and the correct character wheel number can be output; if any two of the 7-bit code values are wrong, resulting in an error in the character wheel reading, an alarm can be issued to prompt the reading error.
[0006] The present invention is achieved through the following technical solutions:
[0007] An error correction coding reading character wheel device comprises a transmitting board, a character wheel code disk, a receiving board and a microprocessor, etc., wherein the character wheel code disk is arranged between the transmitting board and the receiving board; the transmitting board is used to transmit infrared light, and the infrared light passes through the character wheel code disk, and the coding information is mapped to the receiving board; the receiving board converts the received optical signal into a high level and a low level, which are read by the microprocessor; the transmitting board, the character wheel code disk and the receiving board are combined to generate 14 (7,4) system cycle Hamming code values when the character wheel rotates one circle; the microprocessor is used to decode the 7-bit level input signal.
[0008] The current methods of reading the numerical value of a mechanical character wheel by using photoelectric coupling angle position coding basically use ordinary binary code and Gray code. A 4-bit binary code has 16 code values, which can represent 10 numbers of the character wheel. Increasing the number of bits can only improve the accuracy. However, if a single-bit reading error of the code value occurs in this coding method, it cannot correct the error by itself; in many cases, it is also impossible to determine whether an error has occurred. If an error occurs in a high-position character wheel, it may cause unnecessary trouble. The present invention provides an error correction coding character wheel reading device, the core of which is to design a code disk that can generate a (7,4) system cyclic Hamming code value to correspond to the character wheel displacement angle, which is read by a microprocessor through infrared photoelectric coupling. After processing by the microprocessor, it can realize automatic correction of any single-bit error in the read code value and error prompts for any two or more errors.
[0009] The code channel pattern should be carefully designed. The two code values of all 0 and all 1 in Table 1 cannot be used. Only 14 code values are used. Preferably, the character wheel code disk is a single code channel, including 3 fan-shaped holes and slots, which are concentric with the center of the character wheel and on the same circumference. The 3 fan-shaped holes and slots are respectively the first light-transmitting band, the second light-transmitting band and the third light-transmitting band, and the rest are opaque parts; the first light-transmitting band has a radian of 3π / 7, the second light-transmitting band has a radian of 3π / 7, the third light-transmitting band has a radian of π / 7, the first light-transmitting band and the second light-transmitting band have a radian of 2π / 7, the first light-transmitting band and the third light-transmitting band have a radian of 4π / 7, and the second light-transmitting band and the third light-transmitting band have a radian of π / 7.
[0010] Preferably, another type of character wheel code disk is a single code channel, including three fan-shaped holes, which are concentric with the center of the character wheel and on the same circumference, and the three fan-shaped holes are respectively the first light-transmitting band, the second light-transmitting band and the third light-transmitting band, and the rest are opaque parts; the curvature of the first light-transmitting band is 2π / 7, the curvature of the second light-transmitting band is 2π / 7, the curvature of the third light-transmitting band is 3π / 7, the curvature of the first light-transmitting band and the second light-transmitting band is π / 7, the curvature of the first light-transmitting band and the third light-transmitting band is 5π / 7, and the curvature of the second light-transmitting band and the third light-transmitting band is π / 7.
[0011] Preferably, the first light-transmitting band, the second light-transmitting band and the third light-transmitting band are replaced by opaque parts, and the opaque parts of the character wheel code disk are changed into transmissive parts, which are all usable code channel patterns.
[0012] Preferably, 7 infrared emitting tubes are provided on the transmitting board, and the infrared emitting tubes are evenly and equidistantly arranged in a circular shape on the transmitting board, and the circular ring formed by the infrared emitting tubes and the circular ring formed by the light-transmitting band are arranged with equal diameters corresponding to each other, and 7 infrared receiving tubes are provided on the receiving board, and each of the infrared receiving tubes is arranged one-to-one correspondingly with each of the transmitting tubes.
[0013] Preferably, the character wheel device further comprises a signal conditioning circuit, and the signal conditioning circuit is used for conditioning and shaping 7 level signals, and the signal conditioning circuit is a resistor-capacitor network or a gate circuit.
[0014] The signal adjusted by the signal conditioning circuit is read by the microprocessor.
[0015] Preferably, the specific method steps of the decoding process are:
[0016] The obtained 7-bit level signal is sorted in sequence as R(X)={r6 r5 r4 r3 r2 r1 r0};
[0017] Perform 7-bit XOR operation on the above read information to obtain p1~p7;
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025] Fill the obtained results into three byte units in the following order to obtain bytes S0, S1 and S2;
[0026] S0: {X p1 p2 p3 p4 p5 p6 p7}
[0027] S1: {X p2 p3 p4 p5 p6 p7 p1}
[0028] S2: {X p7 p1 p2 p3 p4 p5 p6},
[0029] Where: X is an arbitrary value.
[0030] Perform the inverse operation on each bit of byte S1 to obtain byte S11;
[0031] Perform an AND operation on the bytes S0, S11 and S2 to obtain E(X):
[0032] E(X)=S0&S11&S2
[0033] Perform an XOR operation on the obtained E(X) and the received data R(X) to obtain the decoding result L(X):
[0034]
[0035] If the read code value R(X) is correct, the lower 7 bits of L(X) are equal to R(X); if the interference causes any one bit error in R(X), the lower 7 bits of L(X) are the correct result of correcting the error. The obtained lower 7 bits of L(X) are compared with the (7, 4) cyclic Hamming code table. If the code value of the lower 7 bits of L(X) is in the table, the read word wheel angle information is correct and reliable. If the lower 7 bits of L(X) are not in the table, any two or more errors occur, and the read R(X) is unreliable and discarded.
[0036] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0037] 1. An error correction coding reading wheel device provided by an embodiment of the present invention realizes the (7,4) system cyclic Hamming code representation of angle displacement information with error correction function through a code disk. It realizes automatic error correction for any one-bit code value error, and realizes automatic alarm prompt function for any two or more code value errors;
[0038] 2. An error correction coding reading wheel device provided by an embodiment of the present invention is also a redundant design. When a hardware failure occurs in any infrared transmitting tube or receiving tube, the device can still work normally (equivalent to automatically correcting an error code), thereby improving the reliability of the system. At this time, an error prompt will be reported when an error occurs in any other bit. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, without paying creative work, other related drawings can be obtained based on these drawings, which should also be regarded as the protection scope of this solution.
[0040] Figure 1 Read part of the overall schematic diagram for the device
[0041] Figure 2 Schematic diagram of the code channel structure of the character wheel code disk
[0042] Figure 3 To read the circuit schematic
[0043] Figure 4 Another code structure diagram of the character wheel code disc
[0044] Reference numerals:
[0045] 1. Infrared transmitting tube; 2. Transmitting board; 3. Character wheel code disk; 4. Receiving board; 5. Infrared receiving tube; 6. Support rod; 7. First light-transmitting belt; 8. Second light-transmitting belt; 9. Third light-transmitting belt; 10. Microprocessor; 11. Signal conditioning circuit. DETAILED DESCRIPTION
[0046] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.
[0047] In the following description, a large number of specific details are set forth in order to provide a thorough understanding of the present invention. However, it is apparent to one of ordinary skill in the art that these specific details are not necessarily employed to practice the present invention. In other embodiments, in order to avoid obscuring the present invention, well-known structures, circuits, materials, or methods are not specifically described.
[0048] Throughout the specification, references to "one embodiment," "an embodiment," "an example," or "an example" mean that a particular feature, structure, or characteristic described in conjunction with the embodiment or example is included in at least one embodiment of the present invention. Therefore, the phrases "one embodiment," "an embodiment," "an example," or "an example" appearing in various places throughout the specification do not necessarily all refer to the same embodiment or example. In addition, particular features, structures, or characteristics may be combined in one or more embodiments or examples in any suitable combination and / or sub-combination. In addition, it will be appreciated by those of ordinary skill in the art that the figures provided herein are for illustrative purposes and that the figures are not necessarily drawn to scale. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0049] In the description of the present invention, the directions or positional relationships indicated by terms such as “front”, “rear”, “left”, “right”, “up”, “down”, “vertical”, “horizontal”, “high”, “low”, “inside” and “outside” are based on the directions or positional relationships shown in the accompanying drawings and are only for the convenience of describing the present invention and simplifying the description. They do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction. Therefore, they should not be understood as limiting the scope of protection of the present invention.
[0050] Embodiment 1
[0051] This embodiment discloses an error correction coding reading character wheel device, such as Figure 1 , Figure 2 As shown, it includes a transmitting board 2, a character wheel code disk 3, a receiving board 4 and a microprocessor. The character wheel code disk 3 is arranged between the transmitting board 2 and the receiving board 4, and the signal received on the receiving board 4 is transmitted to the signal conditioning circuit through a circuit connection. The transmitting board 2 is used to emit infrared light. The infrared light emitted by the transmitting board 2 can be directed to the corresponding place on the character wheel code disk 3. The character wheel code disk 3 transmits or blocks the infrared light so that the angular displacement information is mapped to the receiving board 4; the receiving board 4 converts the received optical signal into a level signal to be read by the microprocessor 10, and the microprocessor 10 decodes the input information, determines whether the generated decoding result is correct, and obtains that the result is correct or gives a prompt that the result is invalid.
[0052] The left column of Table 1 shows 16 position information codewords, and the right column shows the corresponding error correction codewords encoded with the (7,4) system cyclic Hamming code. The first 4 bits are information codewords, and the last 3 bits of supervision code are added according to the (7,4) system cyclic Hamming code encoding rules. The code channel design must ensure that the received code is the (7,4) system cyclic Hamming code corresponding to the position.
[0053] Position base code (7, 4) System Cycle Hamming Codeword 0000 0000000 0001 0001011 0010 0010110 0011 0011101 0100 0100111 0101 0101100 0110 0110001 0111 0111010 1000 1000101 1001 1001110 1010 1010011 1011 1011000 1100 1100010 1101 1101001 1110 1110100 1111 1111111
[0054] Table 1
[0055] The radial distribution of 7 pairs of optocouplers can easily realize the (7,4) system cyclic Hamming code encoding in Table 1, but it has many code channels (7) and is bulky, so it is generally not used.
[0056] If the optical coupler is used to be evenly spaced on the circumference and a single code channel is used, the volume can be much smaller, but the code channel pattern must be carefully designed, and the two code values of all 0 and all 1 cannot be used, and only 14 code values are used. In this embodiment, the transmitting board 2 and the receiving board 4 are evenly spaced on the circumference, and the character wheel code disk 3 is a single code channel method.
[0057] In this embodiment, the character wheel code disk is a single code track, including three fan-shaped holes, which are concentric with the center of the character wheel and on the same circumference. The three fan-shaped holes are respectively the first light-transmitting belt 7, the second light-transmitting belt 8 and the third light-transmitting belt 9, and the rest are opaque parts; the arc of the first light-transmitting belt 7 is 3π / 7, the arc of the second light-transmitting belt 8 is 3π / 7, the arc of the third light-transmitting belt 9 is π / 7, the arc of the first light-transmitting belt 7 and the second light-transmitting belt 8 is 2π / 7, the arc of the first light-transmitting belt 7 and the third light-transmitting belt 9 is 4π / 7, and the arc of the second light-transmitting belt 8 and the third light-transmitting belt 9 is π / 7. If the code track pattern obtained by exchanging the light-transmitting belt and the opaque part on the code track can also obtain the (7,4) system cyclic Hamming code value.
[0058] In this embodiment, if Figure 3 As shown, the transmitting plate 2 is provided with 7 infrared transmitting tubes 1, and the infrared transmitting tubes 1 are evenly and equidistantly arranged on the transmitting plate 2 in a circular shape, and the circular ring formed by the infrared transmitting tubes 1 and the circular ring formed by the light-transmitting belt are arranged with equal diameters corresponding to each other, and the receiving plate 4 is provided with 7 infrared receiving tubes 5, and each infrared receiving tube 5 is arranged one-to-one with each transmitting tube 1. When the infrared transmitting tube 1 passes through the light-transmitting belt of the character wheel code disk 3, the emitted infrared light can be directly emitted to the infrared receiving tube 5, and in the place where there is no light-transmitting belt, the infrared receiving tube 5 cannot receive the infrared light.
[0059] In an embodiment, the method for reading angle information is as follows: Figure 3 As shown, when the transmitting board and the receiving board are powered on, the transmitting tube emits infrared light, which passes through the code disk to the receiving board. If the light passes through the light-transmitting band, the corresponding receiving tube is turned on, and this bit outputs a low level (regarded as 0); if the light encounters an opaque area, the corresponding receiving tube is turned off, and this bit outputs a high level (regarded as 1). In this way, the collectors of the 7 receiving tubes output the 7-bit binary code value corresponding to the angle position of the character wheel, which is read by the microprocessor after the signal conditioning and shaping. The signal conditioning circuit is a resistor-capacitor network or a gate circuit.
[0060] In this embodiment, the code pattern (translucent band and opaque area) of the character wheel code disk 3 cooperates with 7 sets of transmitting and receiving pairs to ensure that the character wheel disk rotates one circle to generate 14 (7,4) system cycle Hamming code values (except all 0 and all 1). Therefore, the device can automatically correct any error in the code value read, and alarm for any error in the code value of more than two digits read.
[0061] In this embodiment, in the microprocessor 10, the decoding process is:
[0062] Assume the read 7-bit code value R(X) is {r6 r5 r4 r3 r2 r1 r0};
[0063] Perform 7-bit XOR operation on R(X) to obtain p1~p7;
[0064]
[0065]
[0066]
[0067]
[0068]
[0069]
[0070]
[0071] Fill the obtained results into three byte units in the following order to obtain bytes S0, S1 and S2;
[0072] S0: {X p1 p2 p3 p4 p5 p6 p7}
[0073] S1: {X p2 p3 p4 p5 p6 p7 p1}
[0074] S2: {X p7 p1 p2 p3 p4 p5 p6},
[0075] Where: X is an arbitrary value.
[0076] Perform the inverse operation on each bit of byte S1 to obtain byte S11;
[0077] Perform an AND operation on the byte units S0, S11 and S2 to obtain E(X):
[0078] E(X)=S0&S11&S2
[0079] Perform an XOR operation on the obtained E(X) and the received data R(X) to obtain the decoding result L(X):
[0080]
[0081] If the read code value R(X) is correct, the lower 7 bits of L(X) are equal to R(X); if the interference causes any bit of R(X) to be wrong, the lower 7 bits of L(X) are the correct result of correcting the error.
[0082] The obtained L(X) lower 7 bits are compared with the (7, 4) cyclic Hamming code table. If the L(X) lower 7 bits are in the table, the read wheel angle information is correct and reliable. If the L(X) lower 7 bits are not in the table, any two or more errors occur, and the read R(X) is unreliable and discarded.
[0083] Working principle:
[0084] When the error correction device is powered on, the infrared transmitting tube 1 emits infrared light to the character wheel code disk 3. Where the character wheel code disk 3 has a light-transmitting band, the infrared light passes through the light-transmitting band and hits the corresponding infrared receiving tube 5. The receiving tube hit by the light is turned on and outputs a low level (equivalent to the value 0); where there is no light-transmitting band, the infrared receiving tube 5 does not receive infrared light and is in a cut-off state, outputting a high level (equivalent to the value 1). The 7 infrared receiving tubes 5 set on the receiving board 4 convert the received infrared light information into 7-bit binary information and input it into the signal conditioning circuit. After signal conditioning and shaping, it is uniformly read by the microprocessor 10 for decoding, and the decoding result is compared with the code table, so as to judge whether the result is correct or not for the next step of processing.
[0085] The present embodiment discloses an error correction coding reading wheel device. If a certain bit of the received information is erroneous due to interference or other factors during the reading process (for example, 0 becomes 1), the device can automatically correct the error and obtain correct information; if two bits of the received information are erroneous due to interference or other factors during the reading process, the device can automatically report an error prompt; if a hardware failure occurs in any bit, the system can still operate normally.
[0086] Embodiment 2
[0087] This embodiment discloses an error correction coding reading wheel device. This embodiment redesigns the angle part of the light-transmitting belt in the first embodiment, and the rest of the parts are exactly the same as the first embodiment, specifically:
[0088] The designed code channel graphics are as follows Figure 4 In this embodiment, the character wheel code disk is still a single code channel, including three fan-shaped holes, which are concentric with the center of the character wheel and on the same circumference. The three fan-shaped holes are respectively the first light-transmitting belt 7, the second light-transmitting belt 8 and the third light-transmitting belt 9, and the rest are opaque parts; the first light-transmitting belt 7 has a radian of 2π / 7, the second light-transmitting belt 8 has a radian of 2π / 7, the third light-transmitting belt 9 has a radian of 3π / 7, the first light-transmitting belt 7 and the second light-transmitting belt 8 have a radian of π / 7, the first light-transmitting belt 7 and the third light-transmitting belt 9 have a radian of 5π / 7, and the second light-transmitting belt 8 and the third light-transmitting belt 9 have a radian of π / 7. If the code channel image obtained by exchanging the light-transmitting belt and the opaque part on the code channel can also obtain the (7,4) system cyclic Hamming code value.
[0089] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. An error correction coding reading wheel device, characterized in that: The invention comprises a transmitting board (2), a character wheel code disk (3), a receiving board (4) and a microprocessor (10), wherein the character wheel code disk (3) is arranged between the transmitting board (2) and the receiving board (4); the transmitting board (2) is used to transmit infrared light, and the infrared light passes through the character wheel code disk (3), and the coded information is mapped onto the receiving board (4); the receiving board (4) converts the received optical signal into a high level and a low level, which are read by the microprocessor (10); the transmitting board (2), the character wheel code disk (3) and the receiving board (4) are combined to generate 14 (7, 4) system cycle Hamming code values when the character wheel rotates one circle; the microprocessor (10) is used to decode the 7-bit level input signal; The character wheel code disk (3) is a single code track, comprising three fan-shaped apertures, the fan-shaped apertures are concentric with the center of the character wheel and on the same circumference, the three fan-shaped apertures are respectively a first light-transmitting band (7), a second light-transmitting band (8) and a third light-transmitting band (9), and the rest are opaque parts; the first light-transmitting band (7) has an arc of 3π / 7, the second light-transmitting band (8) has an arc of 3π / 7, the third light-transmitting band (9) has an arc of π / 7, the first light-transmitting band (7) and the second light-transmitting band (8) have an arc of 2π / 7, the first light-transmitting band (7) and the third light-transmitting band (9) have an arc of 4π / 7, and the second light-transmitting band (8) and the third light-transmitting band (9) have an arc of π / 7; The transmitting plate (2) is provided with 7 infrared transmitting tubes (1), the infrared transmitting tubes (1) are arranged on the transmitting plate (2) in a circular shape and are evenly and equidistantly arranged, and the circular ring formed by the infrared transmitting tubes (1) and the circular ring formed by the light-transmitting band are arranged with equal diameters corresponding to each other, and the receiving plate (4) is provided with 7 infrared receiving tubes (5), and each infrared receiving tube (5) is arranged in one-to-one correspondence with each transmitting tube; The character wheel device further comprises a signal conditioning circuit (11), wherein the signal conditioning circuit (11) is used for conditioning and shaping 7 level signals, and the signal conditioning circuit (11) is a resistance-capacitance network or a gate circuit; The specific steps of the decoding process are as follows: The obtained 7-bit level signal is sorted from high to low as R(X)={r6 r5 r4 r3 r2 r1 r0}; Perform 7-bit XOR operation on the above read information to obtain p1~p7; The operation results are sequentially loaded into three byte units to obtain bytes S0, S1 and S2; each bit of the S1 byte is inverted to obtain the S11 byte; Perform AND operation on the bytes S0, S11 and S2 to obtain E(X), and perform XOR operation on the obtained E(X) and the received R(X) to obtain the decoding result L(X); Compare the obtained L(X) with the (7, 4) system cyclic Hamming code table. If the read R(X) is correct, the lower 7 bits of L(X) are equal to R(X); if the interference causes any bit error in R(X), the lower 7 bits of L(X) are the correct result of correcting the error. The obtained lower 7 bits of L(X) are compared with the (7, 4) cyclic Hamming code table. If the code value of the lower 7 bits of L(X) is in the table, the read word wheel angle information is correct and reliable; If the lower 7 bits of L(X) are not in the table, any two or more errors occur, and the read R(X) is unreliable and discarded; The specific expressions of p1 to p7 are: p1=r6 ⊕ r5 ⊕ r4 ⊕ r2 p2=r5 ⊕ r4 ⊕ r3 ⊕ r1 p3=r4 ⊕ r3 ⊕ r2 ⊕ r0 p4=r6 ⊕ r3 ⊕ r2 ⊕ r1 p5=r5 ⊕ r2 ⊕ r1 ⊕ r0 p6=r6 ⊕ r4 ⊕ r1 ⊕ r0 p7=r6 ⊕ r5 ⊕ r3 ⊕ r0; The specific storage order of S0, S1 and S2 is: S0: {X p1 p2 p3 p4 p5 p6 p7} S1: {X p2 p3 p4 p5 p6 p7 p1} S2: {X p7 p1 p2 p3 p4 p5 p6}, Among them: X is the highest bit and can take any value; The specific expression of E(X) is: E(X)=S0&S11&S2, and the specific expression of L(X) is L(X)=R(X)⊕E(X).
2. The error correction coding reading wheel device according to claim 1, characterized in that: The first light-transmitting belt (7), the second light-transmitting belt (8) and the third light-transmitting belt (9) are replaced by light-impermeable parts, so that the light-impermeable parts of the character wheel code disc are transformed into light-impermeable parts.
3. The error correction coding reading wheel device according to claim 1, characterized in that: The device also includes a support rod (6), on which a transmitting plate (2), a character wheel code disk (3) and a receiving plate (4) are arranged in sequence, and the infrared receiving tube (5) arranged on the receiving plate (4) is connected to a signal conditioning circuit (11) through a circuit.
4. An error correction coding reading wheel device, characterized in that: The invention comprises a transmitting board (2), a character wheel code disk (3), a receiving board (4) and a microprocessor (10), wherein the character wheel code disk (3) is arranged between the transmitting board (2) and the receiving board (4); the transmitting board (2) is used to transmit infrared light, and the infrared light passes through the character wheel code disk (3), and the coded information is mapped onto the receiving board (4); the receiving board (4) converts the received optical signal into a high level and a low level, which are read by the microprocessor (10); the transmitting board (2), the character wheel code disk (3) and the receiving board (4) are combined to generate 14 (7, 4) system cycle Hamming code values when the character wheel rotates one circle; the microprocessor (10) is used to decode the 7-bit level input signal; The character wheel code disc (3) is a single code track, comprising three fan-shaped apertures, the fan-shaped apertures are concentric with the center of the character wheel and on the same circumference, the three fan-shaped apertures are respectively a first light-transmitting band (7), a second light-transmitting band (8) and a third light-transmitting band (9), and the rest are opaque parts; the first light-transmitting band (7) has an arc of 2π / 7, the second light-transmitting band (8) has an arc of 2π / 7, the third light-transmitting band (9) has an arc of 3π / 7, the first light-transmitting band (7) and the second light-transmitting band (8) are spaced at an arc of π / 7, the first light-transmitting band (7) and the third light-transmitting band (9) are spaced at an arc of 5π / 7, and the second light-transmitting band (8) and the third light-transmitting band (9) are spaced at an arc of π / 7; The transmitting plate (2) is provided with 7 infrared transmitting tubes (1), the infrared transmitting tubes (1) are arranged on the transmitting plate (2) in a circular shape and are evenly and equidistantly arranged, and the circular ring formed by the infrared transmitting tubes (1) and the circular ring formed by the light-transmitting band are arranged with equal diameters corresponding to each other, and the receiving plate (4) is provided with 7 infrared receiving tubes (5), and each infrared receiving tube (5) is arranged in one-to-one correspondence with each transmitting tube; The character wheel device further comprises a signal conditioning circuit (11), wherein the signal conditioning circuit (11) is used for conditioning and shaping 7 level signals, and the signal conditioning circuit (11) is a resistance-capacitance network or a gate circuit; The specific steps of the decoding process are as follows: The obtained 7-bit level signal is sorted from high to low as R(X)={r6 r5 r4 r3 r2 r1 r0}; Perform 7-bit XOR operation on the above read information to obtain p1~p7; The operation results are sequentially loaded into three byte units to obtain bytes S0, S1 and S2; each bit of the S1 byte is inverted to obtain the S11 byte; Perform AND operation on the bytes S0, S11 and S2 to obtain E(X), and perform XOR operation on the obtained E(X) and the received R(X) to obtain the decoding result L(X); Compare the obtained L(X) with the (7, 4) system cyclic Hamming code table. If the read R(X) is correct, the lower 7 bits of L(X) are equal to R(X); if the interference causes any bit error in R(X), the lower 7 bits of L(X) are the correct result of correcting the error. The obtained lower 7 bits of L(X) are compared with the (7, 4) cyclic Hamming code table. If the code value of the lower 7 bits of L(X) is in the table, the read word wheel angle information is correct and reliable; If the lower 7 bits of L(X) are not in the table, any two or more errors occur, and the read R(X) is unreliable and discarded; The specific expressions of p1 to p7 are: p1=r6 ⊕ r5 ⊕ r4 ⊕ r2 p2=r5 ⊕ r4 ⊕ r3 ⊕ r1 p3=r4 ⊕ r3 ⊕ r2 ⊕ r0 p4=r6 ⊕ r3 ⊕ r2 ⊕ r1 p5=r5 ⊕ r2 ⊕ r1 ⊕ r0 p6=r6 ⊕ r4 ⊕ r1 ⊕ r0 p7=r6 ⊕ r5 ⊕ r3 ⊕ r0; The specific storage order of S0, S1 and S2 is: S0: {X p1 p2 p3 p4 p5 p6 p7} S1: {X p2 p3 p4 p5 p6 p7 p1} S2: {X p7 p1 p2 p3 p4 p5 p6}, Among them: X is the highest bit and can take any value; The specific expression of E(X) is: E(X)=S0&S11&S2, and the specific expression of L(X) is L(X)=R(X)⊕E(X).
Citation Information
Patent Citations
Tele-metering direct-reading encoder of meter counter
CN101319918A
Photoelectric coding counting device and photoelectric coding counter
CN101349573A
Four-position angle coder
CN101592500A
Encoding method for batching counter
CN102306272A
Error detection and correction of one-time programmable elements
CN104956445A
