Gray code-based wind direction sensor detection method

文档序号:6358 发布日期:2021-09-17 浏览:50次 中文

1. The direction sensor is characterized in that 6 specific wind direction azimuth angles and corresponding 7-bit binary codes and Gray codes thereof are 6 specific wind direction azimuth angles, 6 groups of binary codes and standard Gray codes thereof are 6 specific wind direction azimuth angles, 11 degrees, 23 degrees, 45 degrees, 90 degrees and 180 degrees, and two adjacent bits of the Gray codes in each group are 1, and one bit of the Gray codes in the 6 groups appears 1 twice.

2. A method for classifying wind direction sensor elements is characterized in that all photoelectric components in a wind direction sensor are divided into 7 groups according to a 7-bit Gray code signal source, and each group comprises a light emitting diode, a transient voltage suppression tube, a phototriode and a phase inverter.

3. A method for detecting a wind direction sensor is characterized in that a fault existing in the wind direction sensor is determined, and the method comprises the following steps of switching on a power supply of the wind direction sensor, and checking whether 7 light-emitting diodes normally emit light or not; judging whether the wind direction sensor has a photoelectric component fault or not; troubleshooting the inverter fault; troubleshooting faults of the phototriodes; determining a component with a fault of the wind direction sensor according to the result of the step; wherein, the step (32) is carried out after confirming that the light-emitting diode is normal, and comprises the following steps: (321) rotating a wind vane to 6 sets of specific wind direction azimuth angles as in claim 1 while measuring 7 transient voltage suppression tube (TVP tube) voltages, respectively; (322) recording the measured TVP tube output high level as 1 and the measured TVP tube output low level as 0 to obtain 6 groups of 7-bit Gray codes; (323) the resulting 6 sets of gray codes are compared to the standard gray code.

4. A method according to claim 3, wherein when 6 sets of gray codes obtained are not consistent with the standard gray code, it can be determined that some components in the optoelectronic device corresponding to the gray code have a fault.

5. A method for troubleshooting an inverter in a wind direction sensor as claimed in claim 3 wherein when a bit in the obtained 6 groups of gray codes always has an incoherence with the standard gray code, it is indicated that the inverter corresponding to the gray code of the bit has a failure.

6. A method for troubleshooting a fault of a phototransistor in a wind direction sensor as claimed in claim 3, wherein when a certain bit gray code is always "1", the damage of the phototransistor corresponding to the bit gray code can be determined by combining a wind direction sensor circuit principle and a unidirectional conduction characteristic of the TVP tube.

7. A method for troubleshooting a TVP tube failure in a wind direction sensor as set forth in claim 3, wherein, when a certain bit gray code is always "0" in the obtained 6 sets of gray codes, it is determined that the failed TVP tube is in the set of devices.

Background

In meteorological services, wind direction is one of six typical factors, and is an important factor influencing daily travel, flight safety, wind energy application and the like. Every department trades such as meteorological, aviation, environmental protection install in open air wind direction sensor in a large number, easily receive the thunderbolt and lead to the internals to damage, if change the sensor just here, will cause unnecessary extravagant. At present, most of wind direction measuring equipment of meteorological stations at home and abroad adopts a code disc type wind direction sensor which consists of four parts: the photoelectric module comprises 7 pairs of light emitting diodes D1-D7 and phototriodes B1-B7 which are respectively arranged on the upper side and the lower side of a 7-bit Gray code disc. The 7 pairs of light emitting diodes and the phototriodes respectively correspond to D0-D6 bits of the direction Gray code on the collector. Under the drive of a 5V power supply, the light emitting diode emits infrared light. Under the condition that infrared light is not blocked, the corresponding phototriode is conducted, and the low level output by the collector electrode of the phototriode passes through the phase inverter and then outputs the high level to the collector through the transient voltage suppression tube (TVP tube) (the corresponding Gray code bit is marked as 1). As weather vane beltWhen the moving Gray code disc rotates, infrared light emitted by some light emitting diodes is blocked, at the moment, the corresponding phototriodes are not conducted, and low level (the corresponding Gray code bit is marked as 0) appears on the collector. Therefore, by on-off combination of 7 phototransistors, 7 phototransistors can be obtained2(128) And (3) grouping Gray codes, and dividing a circle of 360 degrees into 128 directions by converting the Gray codes and binary, wherein each direction angle is 360/128 and is approximately equal to 2.8 degrees. For example, when the direction is 180 ° (positive south wind), the binary value should be 100000, and the corresponding gray code is 1100000, that is, the leds D1-D5 in the wind direction sensor are shielded, and D6 and D7 are not shielded.

A great deal of analysis and explanation are carried out on the working principle of the sensor by various observation specifications, research results and the like, and certain discussion is also carried out on the fault and maintenance of the wind direction sensor. These methods require determining the failure of the corresponding bit of the wind direction sensor from the change of the gray code by rotating the vane one turn. However, 128 different gray codes will appear, and finding a fault from such many variations is clearly a time consuming task.

Disclosure of Invention

In order to overcome the above mentioned problems, the present document divides all the optoelectronic components in the wind direction sensor into 7 groups by gray codes, each group includes a light emitting diode, a transient voltage suppression tube, a phototriode and a phase inverter, selects 6 specific wind direction azimuth angles in the direction sensor and the corresponding 7-bit binary codes and gray codes, and is specifically characterized in that:

(1)6 specific wind direction azimuths of 6 °, 11 °, 23 °, 45 °, 90 ° and 180 °;

(2) corresponding 6 sets of binary codes 0000010, 0000100, 0001000, 0010000, 0100000 and 1000000;

(3) corresponding 6 sets of standard gray codes 0000011, 0000110, 0001100, 0011000, 0110000 and 1100000,

only two adjacent bits in each group of gray codes are '1', and at most, one bit in 6 groups of gray codes has '1' twice.

Through Gray code detection, only the Gray code of 6 specific azimuth wind directions is measured to determine the corresponding fault point of the wind direction sensor or the damaged component, thereby effectively improving the troubleshooting and maintenance efficiency of the wind direction sensor.

In order to achieve the above object, the method of the present invention comprises the steps of:

(1) switching on a power supply of the wind direction sensor, and checking whether the 7 light-emitting diodes emit light normally;

(2) judging whether other components of the wind direction sensor have faults or not;

(3) troubleshooting the inverter fault;

(4) judging the fault of the phototriode;

(5) determining a component with a fault of the wind direction sensor according to the result of the step;

on one hand, the step (1) is a precondition for carrying out subsequent detection, namely, the fault of other components can be eliminated only by ensuring that 7 light-emitting diodes can normally emit light, and if the light-emitting diodes do not emit light, the components are required to be replaced.

As a preferable mode, the step (2) includes:

rotating a wind vane to 6 specific wind direction azimuth angles in table 1, and simultaneously measuring voltages of 7 transient voltage suppression tubes (TVP tubes) respectively;

recording the measured TVP tube output high level as '1' and the measured low level as '0', and obtaining 6 groups of 7-bit Gray codes;

the resulting 6 sets of gray codes were compared to the standard gray codes in table 1.

Wind direction azimuth 11° 23° 45° 90° 180°
Binary code 0000010 0000100 0001000 0010000 0100000 1000000
Gray code 0000011 0000110 0001100 0011000 0110000 1100000

TABLE 1

As another preferable mode, the checking for the inverter failure in the step (3) is that:

if the 6 groups of gray codes obtained in the step (2) and a certain bit of the 6 groups of standard gray codes in the table 1 form an NAND relationship (one is '0' and the other is '1'), the failure of the inverter can be judged, and the inverting function is lost.

As another preferable mode, the step (4) of determining the malfunction of the phototriode includes the steps of:

when a certain gray code is always '1', the damage of the phototriode corresponding to the gray code can be judged by combining the wind direction sensor circuit principle and the one-way conduction characteristic of the TVP tube.

As another preferable mode, the component for determining that the wind direction sensor is faulty in step (5) is:

and (4) eliminating the faults of the inverter and the phototriode according to the steps (3) and (4), and determining that the component device is the TVP tube with the faults.

The method has the advantages that the corresponding relation between the wind direction and the Gray codes is combined, the Gray codes under the wind directions (6 degrees, 11 degrees, 23 degrees, 45 degrees, 90 degrees and 180 degrees) of 6 specific directions are measured, the faults of the photoelectric assemblies corresponding to the wind direction sensor are rapidly found out through reverse derivation, and the damaged components are checked out under the condition that the voltage or the on-off state of the corresponding components is simply tested by combining the circuit principle of the wind direction sensor. Therefore, the efficiency of troubleshooting and maintenance of the wind direction sensor is effectively improved.

The features and advantages of the present invention will become more apparent upon reading the detailed description of the embodiments of the invention in conjunction with the accompanying drawings.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the embodiments or the prior art descriptions will be briefly introduced below, the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art according to the drawings.

Fig. 1 is a schematic diagram of a wind direction sensor circuit.

In the figure, D1, D2, D3, D4, D5, D6 and D7 are 7 light emitting diodes, B1, B2, B3, B4, B5, B6 and B7 are 7 phototriodes corresponding thereto, U2A, U2B, U2C, U1B, U1A, U1F and U1E are 7 inverters corresponding thereto, and V17, V18, V19, V20, V21, V22 and V23 are 7 TVP tubes corresponding thereto;

FIG. 2 is a flow chart of a sensor for detecting wind direction according to the present invention.

Detailed Description

[ example 1 ]

Firstly, after the power supply of the wind direction sensor is switched on, whether 7 light-emitting diodes emit light normally or not is checked, and if the light-emitting diodes do not emit light, the light-emitting diodes need to be replaced.

Then, the wind vane is rotated to the 6 specific wind direction azimuth angles according to the step (2), the voltages of 7 transient voltage suppression tubes (TVP tubes) are measured respectively, V23, V22, V21, V20, V19, V18 and V17 correspond to the highest bit to the lowest bit of the 7-bit gray code respectively, when a certain TVP tube outputs high voltage, the highest bit of the gray code is marked as '1', and when the low level is output, the highest bit of the gray code is marked as '0', so that 6 groups of 7-bit binary gray codes are obtained.

Table 2 is a table that assumes that the weathervane is rotated to a certain angle to measure the TVP tube level, and thus a set of gray codes 1001100 will be obtained.

TVP tube V23 V22 V21 V20 V19 V18 V18
Level of electricity Height of Is low in Is low in Height of Height of Is low in Is low in

TABLE 2

And comparing the obtained 6 groups of Gray codes with the standard Gray codes, and if the obtained 6 groups of Gray codes are inconsistent, judging that the photoelectric component of the wind direction sensor has a fault.

Step (3) is used to troubleshoot inverter failures, and table 3 assumes an obtained 6 sets of gray codes and their standard gray codes.

Obtaining Gray codes 0000111 0000010 0001000 0011100 0110100 1100100
Standard Gray code 0000011 0000110 0001100 0011000 0110000 1100000

TABLE 3

Through comparison, it can be found that the 3 rd bit (from low to high) in the obtained 6 groups of gray codes and the 3 rd bit in the standard gray code are always in an nand relationship, and it can be determined that the inverter U2C corresponding to the 3 rd bit gray code fails to realize the inverting function by combining fig. 2.

[ example 2 ]

And (4) and (5) are used for judging faults of other photoelectric components, 6 groups of gray codes are checked after the faults of the phase inverter are eliminated through the step (3), and when a certain bit gray code is always '0' or '1', the fact that the phototriode or (and) TVP (transient voltage protection) tube corresponding to the bit gray code has the faults can be inferred.

Table 4 assumes an obtained 6 sets of gray codes and their standard gray codes.

Obtaining Gray codes 0100011 0100110 0101100 0111000 0110000 1100000
Standard Gray code 0000011 0000110 0001100 0011000 0110000 1100000

TABLE 4

Through comparison, the 6 th bit (from low to high) in the obtained 6 groups of gray codes is always '1', and by combining the wind direction sensor circuit diagram in fig. 2 and the unidirectional conduction characteristic of the TVP tube, the fault can be judged that the phototriode D6 corresponding to the 6 th bit gray code is broken down and is always in a conduction state, so that the collector of the phototriode D6 outputs a low level all the time, and the collector outputs a high level to the transient voltage suppression tube (TVP tube) after passing through the phase inverter. Similarly, when a certain bit in the obtained 6 groups of gray codes is always '0', it can be determined that the fault is direct grounding caused by breakdown of the corresponding TVP tube, and a low level is always output.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种微机械加速度计及其校准补偿方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!