Reed switch duty ratio calibration method and device
By determining the installation range of the reed switch through simulation, the problem of complex duty cycle calibration of traditional reed switch is solved, efficient duty cycle calibration is achieved, and the accuracy of water meter measurement is improved.
Patent Information
- Application Number
- CN202510789320.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-09-12
AI Technical Summary
The traditional reed switch duty cycle calibration method is complex and requires repeated adjustment of the reed switch parameters and installation position. In addition, the AT value cannot be directly converted into the magnetic induction intensity of the permanent magnet, which increases the complexity of the calibration work.
The target magnetic field of the magnetic steel assembly is determined through simulation. Based on the duty cycle calibration results of the target reed switch under the target magnetic field, its installation range is determined, and the reed switch is assembled according to this range to meet the calibration requirements.
The process of reed switch duty cycle calibration is simplified, calibration efficiency is improved, time and cost are saved, and accurate installation of the reed switch in the water meter is ensured.
Smart Images

Figure CN120628249A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of reed switch calibration, and in particular to a reed switch duty cycle calibration method and device. Background Art
[0002] As an electromechanical conversion device, the reed switch has been widely used in the field of water metering due to its significant advantages such as small size, light weight and low cost. Its working principle is to achieve water flow measurement and signal transmission functions through cooperation with magnets. Specifically, when the water meter turntable completes one rotation, the magnet passes through the reed switch, causing the two reeds of the reed switch to be magnetized and form the north pole and the south pole respectively. Under the action of the magnetic attraction, the reeds contact each other and conduct, thereby closing the circuit and generating a pulse signal. In this process, the control of the duty cycle (defined as the ratio of the conduction time of the reed switch to the total time of the signal cycle) is crucial. By maintaining the duty cycle within a specific range, the accuracy of water meter measurement can be effectively improved, and abnormal situations such as omissions or over-counting can be avoided.
[0003] However, traditional reed switch duty cycle calibration methods have limitations. This method requires repeated experimentation to adjust the reed switch parameters and their actual installation location, resulting in a long calibration cycle. Furthermore, the reed switch's engagement threshold is typically determined by the manufacturer's AT (ampere-turn) value, which is calibrated after the reed switch is magnetized by a energized coil. In practice, however, permanent magnets are used to magnetize the reed to achieve engagement. Since the AT value cannot be directly converted into the magnetic induction intensity of the permanent magnet, this presents considerable difficulties in theoretical calculations, further complicating the calibration process. Summary of the Invention
[0004] The object of the present invention is to provide a method and device for calibrating the duty cycle of a reed switch, so as to alleviate the technical problem of complex duty cycle calibration of a reed switch assembled in a water meter existing in the prior art.
[0005] In a first aspect, the present invention provides a reed switch duty cycle calibration method, comprising:
[0006] Simulating the magnetic steel parameters of the magnetic steel assembly assembled in the current model water meter to determine the target magnetic field of the magnetic steel assembly;
[0007] Determining an installation range of the target reed switch in the current model water meter based on a duty cycle calibration result of the target reed switch under the target magnetic field;
[0008] According to the installation range, the target reed switch is installed on the current model water meter so that the duty cycle of the target reed switch under the target magnetic field meets the calibration requirements.
[0009] In an optional embodiment, the step of determining the installation range of the target reed switch in the current model water meter based on a duty cycle calibration result of the target reed switch under the target magnetic field includes:
[0010] Determine whether the duty cycle of the target reed switch installed at the current simulated installation position under the target magnetic field meets the calibration requirements;
[0011] If it meets the requirements, the current simulated installation position is included in the installation range, and the simulated installation position of the target reed switch in the current model water meter is adjusted. The adjusted simulated installation position is used as the new current simulated installation position, and the step of determining whether the duty cycle of the target reed switch installed at the current simulated installation position under the action of the target magnetic field meets the calibration requirements is performed again, until each simulated installation position for installing the target reed switch in the current model water meter is traversed;
[0012] If it does not comply, the simulated installation position of the target reed switch in the current model water meter is adjusted, and the adjusted simulated installation position is used as the new current simulated installation position. The step of determining whether the duty cycle of the target reed switch assembled at the current simulated installation position under the action of the target magnetic field meets the calibration requirements is executed again until each simulated installation position for assembling the target reed switch in the current model water meter has been traversed.
[0013] In an optional embodiment, the step of determining whether the duty cycle of the target reed switch installed in the current simulated installation position under the action of the target magnetic field meets the calibration requirements includes:
[0014] Placing a target reed switch at the current simulated installation position of the current model water meter, and determining the three-dimensional coordinates of each preset determination point of the target reed switch in the coordinate system corresponding to the magnetic steel assembly; wherein the preset determination points include both ends of the target reed switch and both ends of the lead wires connected to the two ends of the target reed switch;
[0015] Based on the three-dimensional coordinates, determining a magnetic induction intensity curve corresponding to each of the preset determination points under the action of the target magnetic field;
[0016] Determine, based on the magnetic induction intensity curve, the sum of the rotation angles of the magnetic steels having the same magnetic induction intensity direction at each of the preset determination points;
[0017] Calculating a duty cycle of the target reed switch based on the sum of the magnetic steel rotation angles, and determining whether the duty cycle is within a preset duty cycle range;
[0018] If yes, the duty cycle of the target reed switch meets the calibration requirements;
[0019] If not, the duty cycle of the target reed switch does not meet the calibration requirements.
[0020] In an optional embodiment, the step of adjusting the simulated installation position of the target reed switch in the current model water meter includes:
[0021] The simulated installation position of the target reed switch in the current model water meter is determined by moving the target reed switch toward the magnetic steel assembly, or by shortening the lead length of the right end of the target reed switch.
[0022] In an optional embodiment, the step of assembling the target reed switch on the current model water meter according to the installation range so that the duty cycle of the target reed switch under the target magnetic field meets the calibration requirements includes:
[0023] If the target reed switch is installed at the target position of the current model water meter, the duty cycle of the target reed switch under the target magnetic field generated by the magnetic steel assembly of the current model water meter meets the calibration requirements; wherein, the target position is any position in the installation range.
[0024] In an optional embodiment, the step of simulating the magnetic steel parameters of the magnetic steel assembly assembled in the current model water meter to determine the target magnetic field of the magnetic steel assembly includes:
[0025] Simulate the magnetic steel parameters of the magnetic steel assembly assembled in the current model water meter and construct a magnetic steel model of the magnetic steel assembly;
[0026] A steady-state solution is performed on the magnetic steel model according to preset rotation parameters to determine the target magnetic field of the magnetic steel model.
[0027] In an optional embodiment, the step of performing a steady-state solution on the magnetic steel model according to preset rotation parameters to determine the target magnetic field of the magnetic steel model includes:
[0028] Based on the generalized stretching operator, the coordinate system of the magnetic steel model is controlled to rotate by a preset angle to generate a three-dimensional rotation model;
[0029] Decomposing the three-dimensional rotating model according to preset magnetic field components, and dividing the calculation domain including the magnetic steel model and the air domain into refined grids;
[0030] Auxiliary scanning is performed according to the preset angle to solve the target magnetic field distribution of the magnetic steel model in a steady state.
[0031] In a second aspect, the present invention provides a reed switch duty cycle calibration device, comprising:
[0032] a determination module, which simulates the magnetic steel parameters of the magnetic steel assembly assembled in the current model water meter to determine the target magnetic field of the magnetic steel assembly;
[0033] a calibration module, which determines an installation range of the target reed switch in the current model water meter based on a duty cycle calibration result of the target reed switch under the target magnetic field;
[0034] An assembly module assembles the target reed switch to the current model water meter according to the installation range, so that the duty cycle of the target reed switch under the action of the target magnetic field meets the calibration requirements.
[0035] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a program stored in the memory and capable of running on the processor, wherein the processor implements a method as described in any one of the aforementioned embodiments when executing the program.
[0036] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, the method described in any one of the aforementioned embodiments is implemented.
[0037] An embodiment of the present invention provides a reed switch duty cycle calibration method and device, which determines the magnetic field corresponding to the magnetic steel assembly in the current model water meter through simulation. Under the action of this magnetic field, the installation range corresponding to the target reed switch that meets the calibration requirements is determined based on the duty cycle calibration qualification of the target reed switch at each installation position, and the target reed switch is installed on the current model water meter based on the installation range. At this time, the duty cycle of the installed target reed switch meets the calibration requirements. This method saves the duty cycle calibration efficiency of the target reed switch.
[0038] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description and the drawings.
[0039] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 A flow chart of a reed switch duty cycle calibration method provided by an embodiment of the present invention;
[0042] Figure 2 A schematic diagram of a simulated installation position of a reed switch provided in an embodiment of the present invention;
[0043] Figure 3 A schematic diagram of a preset determination point of a reed switch provided by an embodiment of the present invention;
[0044] Figure 4 A schematic diagram of a magnetic induction curve corresponding to a preset determination point of a reed switch provided in an embodiment of the present invention;
[0045] Figure 5 A flow chart of another reed switch duty cycle calibration method provided by an embodiment of the present invention;
[0046] Figure 6 A schematic diagram of the functional modules of a reed switch duty cycle calibration device provided by an embodiment of the present invention;
[0047] Figure 7 A schematic diagram of the hardware architecture of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0049] Currently, the duty cycle calibration of the reed switch installed in the water meter is rather troublesome, and the reed switch needs to be adjusted repeatedly to ensure that the duty cycle of the reed switch after installation meets the preset requirements. Based on this, an embodiment of the present invention provides a reed switch duty cycle calibration method and device, which can determine the installation range of the reed switch that meets the calibration requirements through simulation, and then directly install the reed switch on the water meter according to the installation range to ensure that the duty cycle of the reed switch at this time meets the requirements, thereby improving the efficiency of the reed switch duty cycle calibration.
[0050] To facilitate understanding of this embodiment, a reed switch duty cycle calibration method disclosed in an embodiment of the present invention is first introduced in detail. This method can be applied to intelligent control devices such as host computers, controllers, and servers.
[0051] Figure 1 A flow chart of a reed switch duty cycle calibration method provided in an embodiment of the present invention.
[0052] Reference Figure 1 , the method comprises the following steps:
[0053] Step S102 , performing simulation based on the magnetic steel parameters of the magnetic steel assembly assembled in the current model water meter to determine the target magnetic field of the magnetic steel assembly.
[0054] The embodiment of the present invention can calibrate the duty cycle of each target reed switch installed in a current model water meter, that is, the duty cycle calibration of each target reed switch installed in such a current model water meter can be achieved by the embodiment of the present invention;
[0055] Among them, the magnetic steel assembly is a component pre-assembled in the water meter. The magnetic steel assembly is used to provide a magnetic field, and in actual application, it triggers the reed switch to conduct. Steps S102 to S104 of the embodiment of the present invention are first simulated by preset simulation software, such as Comsol software, and then the installation range is obtained, and then the target reed switch installed in the current model water meter of this type is controlled to be assembled according to the installation range.
[0056] Step S104: determining the installation range of the target reed switch in the current model of water meter based on the duty cycle calibration result of the target reed switch under the target magnetic field.
[0057] On the basis of the above embodiments, the duty cycle of the target reed switch at each installation position under the target magnetic field is simulated, and the reasonable installation range of the target reed switch is determined based on the calibrated qualified duty cycle.
[0058] Step S106 , assembling the target reed switch to the current model water meter according to the installation range, so that the duty cycle of the target reed switch under the target magnetic field meets the calibration requirements.
[0059] Only by assembling the target reed switch according to the installation position within the installation range can it be ensured that the application duty cycle of the target reed switch in this state meets the requirements.
[0060] In a preferred embodiment of actual application, the magnetic field corresponding to the magnetic steel assembly in the current model water meter is determined through simulation. Under the action of this magnetic field, the installation range corresponding to the target reed switch that meets the calibration requirements is determined based on the qualified calibration status of the duty cycle of the target reed switch at each installation position, and the target reed switch is assembled on the current model water meter based on the installation range. At this time, the duty cycle of the assembled target reed switch meets the calibration requirements. This method saves the duty cycle calibration efficiency of the target reed switch.
[0061] In some embodiments, in step S102, a model of the magnetic steel assembly may be constructed first, and then the corresponding target magnetic field may be obtained, specifically including:
[0062] In step 1.1), a magnetic steel model of the magnetic steel assembly is constructed based on the magnetic steel parameters of the magnetic steel assembly assembled in the current model water meter.
[0063] Among them, the magnetic steel parameters include residual magnetic flux density, recovery magnetic permeability, magnetic steel size and magnetic steel rotation radius, etc.; by inputting the above magnetic steel parameters into simulation software, such as Comsol software, a magnetic steel model of the magnetic steel assembly can be constructed.
[0064] Step 1.2) Perform a steady-state solution on the magnetic steel model according to the preset rotation parameters to determine the target magnetic field of the magnetic steel model.
[0065] Among them, Figure 2 As shown, a magnetic steel model is constructed in Comsol software, and a generalized stretching operator is used to define rotation. At the same time, the variables of the rotating magnetic field components are defined. Each computational domain is meshed, and an auxiliary sweep is used to rotate the magnetic field one circle, and a steady-state solution is obtained. For example, step 1.2) can be achieved by the following steps:
[0066] In step 1.2.1), the coordinate system of the magnetic steel model is controlled to rotate by a preset angle based on the generalized stretching operator to generate a three-dimensional rotation model.
[0067] If the Figure 2 As shown in , the magnetic steel model includes four components distributed around the center, and the center can be understood as the Z-axis direction of the coordinate system. Each magnetic steel component can be a rectangular parallelepiped, and the preset angle can be 360 degrees; it rotates with the Z-axis as the reference under the control of the generalized stretching operator.
[0068] In step 1.2.2), the three-dimensional rotating model is decomposed according to the preset magnetic field components, and the computational domain including the magnetic steel model and the air domain is divided into a refined grid.
[0069] Here, the model can be decomposed to obtain the components of the magnetic field intensity along the X-axis and Y-axis; the area where the magnetic steel model is located is the main calculation domain, and the air domain surrounding the magnetic steel model is used to simulate the distribution of the magnetic field in space.
[0070] In step 1.2.3), perform auxiliary scanning at the preset angle to solve the target magnetic field distribution of the magnetic steel model in a steady state.
[0071] Here, the magnetic field is rotated by a preset angle to simulate the steady-state response of the dynamic rotation process.
[0072] Based on the above embodiment, under the action of the target magnetic field, the duty cycle of the target reed switch is calibrated according to step S104, and the appropriate installation range is determined, including:
[0073] Step 2.1) determines whether the duty cycle of the target reed switch installed in the current simulated installation position under the action of the target magnetic field meets the calibration requirements.
[0074] For example, this can be achieved by the following steps:
[0075] In step 2.1.1), the target reed switch is placed at the current simulated installation position of the current model water meter, and the three-dimensional coordinates of each preset determination point of the target reed switch in the coordinate system corresponding to the magnetic steel assembly are determined.
[0076] Among them, reference Figure 3 As shown, the preset determination points of the target reed switch include the two ends of the target reed switch (left center, right center), and the two ends of the lead wires connected to the two ends of the target reed switch (left end, right end); the three-dimensional coordinates of each preset determination point of the reed switch (left end, left center, right center, right end) are input into the post-processing module of the Comsol simulation software;
[0077] The reed switch is usually placed in a protective cover and installed in the water meter with the protective cover. Its installation position can be as follows: Figure 2 As shown, it is not far from the magnetic steel assembly and can be triggered to close under the action of the target magnetic field of the magnetic steel assembly.
[0078] Step 2.1.2) Based on the three-dimensional coordinates, determine the magnetic induction intensity curve corresponding to each preset judgment point under the action of the target magnetic field.
[0079] Based on the three-dimensional coordinates of each preset determination point, the magnetic induction intensity change curve of the target reed switch at the four preset determination points when the magnet rotates one circle can be obtained, such as Figure 4 As shown, the magnetic induction intensity change curves corresponding to the four preset judgment point positions of the left end, left middle, right middle, and right end are shown.
[0080] Step 2.1.3) Determine the sum of the rotation angles of the magnets with the same magnetic induction intensity direction at each preset determination point based on the magnetic induction intensity curve.
[0081] Specifically, according to the principle of the reed switch, when the magnetic field approaches, the two metal reeds must be magnetized to different polarities in order for the switch to be turned on. Therefore, the magnetic field lines must pass through both reeds at the same time in order for the reed switch to be turned on. Therefore, in the embodiment of the present invention, the direction of the magnetic induction intensity of the left and right reeds of the reed switch is determined to be the same, which is converted into the direction of the magnetic induction intensity of the simulation output of the four preset judgment points (left end, left middle, right middle, and right end) being the same; Figure 4 As shown, the four magnetic induction intensity change curves are all above or below the 0 scale, that is, they are in the same direction; Figure 4 FIG. 1 shows an example where the magnetic induction intensity is the same from 210 degrees to 331 degrees. In this case, the sum of the angles with the same magnetic induction intensity is 122 degrees.
[0082] In step 2.1.4), the duty cycle of the target reed switch is calculated based on the sum of the magnet rotation angles, and it is determined whether the duty cycle is within a preset duty cycle range.
[0083] Here, the coordinate system where the magnetic steel assembly is located rotates 360 degrees, and the ratio of the sum of the angles with the same magnetic induction intensity at the four positions of the reed switch to the preset rotation angle of 360 degrees is the duty cycle of the target reed switch in the current simulated installation position; it can be understood that the current simulated installation position is a position assumed to be selected for the installation of the reed switch during the simulation process; wherein, the preset duty cycle range is: 0.2~0.4.
[0084] Step 2.1.5), if yes, the duty cycle of the target reed switch meets the calibration requirements.
[0085] Step 2.1.6), if not, the duty cycle of the target reed switch does not meet the calibration requirements.
[0086] It can be understood that whether the calibration requirement is met is determined based on whether the duty cycle is within the preset duty cycle range.
[0087] Step 2.2), if it meets the requirements, the current simulated installation position is included in the installation range, and the simulated installation position of the target reed switch in the current model water meter is adjusted. The adjusted simulated installation position is used as the new current simulated installation position, and step 2.1) is repeated until each simulated installation position for assembling the target reed switch in the current model water meter has been traversed.
[0088] Based on the above example, assume that the magnet parameters are: material is neodymium iron boron, residual magnetic flux density is 1.17T, recoil magnetic permeability is 1.05, magnetic field size (length × width × height) is 3mm × 2mm × 3mm, and magnet rotation radius is 4mm; enter these parameters into Comsol software to construct a magnet model, use the generalized stretch operator to define the rotation around the model's z-axis, and define the variables of the rotating magnetic field components. Each computational domain is meshed, and auxiliary scanning is used to rotate the magnetic field one circle, and a steady-state solution is obtained. Then, enter the three-dimensional coordinates of the initial four positions of the reed switch into the Comsol simulation software post-processing module:
[0089] Left end: (x:-20.39mm, y:-2.96mm, z:-5.74mm);
[0090] Middle left: (x:-17.39mm, y:-2.96mm, z:-5.74mm);
[0091] Middle right: (x:-1.03mm, y:-2.96mm, z:-5.74mm);
[0092] Right end: (x:1.97mm, y:-2.96mm, z:-5.74mm);
[0093] Then we can get the curve of the magnetic induction intensity change of the four positions of the reed switch when the magnet rotates one circle, as shown in Figure 4 As shown, it can be seen that the sum of the angles occupied by the same direction of the magnetic induction intensity of the four positions of the reed switch when the magnet rotates 360 degrees is 122 degrees. The duty cycle of the target reed switch at the current simulation position is calculated to be 122 / 360=0.339, which meets the requirements of the preset duty cycle range. The current simulation position is included in the installation range; then the next available position of the target reed switch is selected as the new current simulation position and step 2.1 is repeated).
[0094] Step 2.3), if it does not meet the requirements, adjust the simulated installation position of the target reed switch in the current model water meter, use the adjusted simulated installation position as the new current simulated installation position, and execute step 2.1) again until each simulated installation position for assembling the target reed switch in the current model water meter has been traversed.
[0095] As an optional embodiment, the simulated installation position of the target reed switch in the current model water meter can be adjusted by moving the target reed switch closer to the magnetic steel assembly, or by shortening the lead length of the right end of the target reed switch. Figure 2 Move the target reed switch carried by the protective cover to the right, close to the magnetic steel assembly, or Figure 3 The leads between the right middle and right ends shown in the figure are shortened, thereby achieving the purpose of bringing the target reed switch close to the magnetic steel assembly.
[0096] Based on the above embodiment, the actual target reed switch can be controlled to be installed in the water meter of the current model based on the installation range determined by simulation. Specifically, step S106 can also be implemented by the following steps, including:
[0097] In step 3.1), if the target reed switch is installed at the target position of the current model water meter, the duty cycle of the target reed switch under the target magnetic field generated by the magnetic steel assembly of the current model water meter meets the calibration requirements.
[0098] The target position is any position in the installation range, which satisfies the requirement that the duty cycle of the target reed switch installed at this time calculated under the magnetic field generated by the magnetic steel assembly assembled in the current model water meter meets the requirement.
[0099] In order to solve the problems of long experimental cycle and lack of theoretical calculation method for the calibration of the duty cycle of the reed switch of the water meter, the embodiment of the present invention performs a visual analysis of the rotating magnetic field inside the water meter through numerical simulation, and simulates and calculates the duty cycle of the reed switch that meets the calibration requirements, thereby determining the installation position that meets this requirement. The reed switch can be installed in this installation position for assembly, shortening the R&D cycle or replacing the early trial experiments of the product, reducing R&D costs, and providing directional guidance for product optimization.
[0100] In some embodiments, Figure 5A flow chart of another reed switch duty cycle calibration method provided in an embodiment of the present invention.
[0101] Reference Figure 5 As shown, firstly, the magnetic steel parameters are input into COMSOL software for physical field simulation to determine the corresponding target magnetic field;
[0102] Secondly, the three-dimensional coordinates corresponding to the preset determination points of the reed switch are input as parameters, and the magnetic induction intensity of the four preset determination points when the magnet rotates one circle under the action of the target magnetic field can be obtained;
[0103] Then determine whether the directions of the magnetic induction intensities of the four preset determination points are the same;
[0104] If they are different, first adjust the position of the reed switch or adjust the length of the reed switch lead, then re-determine the three-dimensional coordinates of the current four preset determination points and input the three-dimensional coordinates corresponding to the positions of the preset determination points of the reed switch as parameters, so as to obtain the magnetic induction intensity of the four preset determination points when the magnet rotates one circle under the action of the target magnetic field;
[0105] If they are the same, calculate the duty cycle of the current reed switch and determine whether it meets the requirements; if it meets the requirements, terminate; if not, execute the steps of first adjusting the position of the reed switch or adjusting the length of the reed switch lead, and then re-determining the three-dimensional coordinates of the current four preset judgment points and inputting the three-dimensional coordinates corresponding to the positions of the preset judgment points of the reed switch as parameters, so as to obtain the magnetic induction intensity of the four preset judgment points when the magnet rotates one circle under the action of the target magnetic field.
[0106] An embodiment of the present invention proposes a calibration method for the duty cycle of a water meter reed switch. The method uses COMSOL simulation software to perform numerical calculations on the rotating magnetic field, outputting a curve showing the change in magnetic induction intensity at the four positions of the reed switch when the magnet rotates one circle. The method also uses the consistency of the direction of the magnetic induction intensity at the four positions of the reed switch at the same moment as a criterion for determining whether the reed switch is conducting, and calculates a duty cycle that meets the calibration requirements. This method can replace early stage testing and experimentation in product design, reducing design detours and saving R&D costs and time. Furthermore, based on this, the installation position of the reed switch in the water meter can be determined based on a duty cycle that meets the calibration requirements, thereby improving installation accuracy.
[0107] In some embodiments, as Figure 6 As shown, an embodiment of the present invention provides a reed switch duty cycle calibration device, comprising:
[0108] a determination module, which simulates the magnetic steel parameters of the magnetic steel assembly assembled in the current model water meter to determine the target magnetic field of the magnetic steel assembly;
[0109] a calibration module, which determines an installation range of the target reed switch in the current model water meter based on a duty cycle calibration result of the target reed switch under the target magnetic field;
[0110] An assembly module assembles the target reed switch to the current model water meter according to the installation range, so that the duty cycle of the target reed switch under the target magnetic field meets the calibration requirements.
[0111] Furthermore, the calibration module is specifically used to determine whether the duty cycle of the target reed switch assembled at the current simulation installation position under the action of the target magnetic field meets the calibration requirements; if it does, the current simulation installation position is included in the installation range, and the simulation installation position of the target reed switch in the current model water meter is adjusted, and the adjusted simulation installation position is used as the new current simulation installation position, and the step of determining whether the duty cycle of the target reed switch assembled at the current simulation installation position under the action of the target magnetic field meets the calibration requirements is executed again, until each simulation installation position for assembling the target reed switch in the current model water meter is traversed; if it does not meet, the simulation installation position of the target reed switch in the current model water meter is adjusted, and the adjusted simulation installation position is used as the new current simulation installation position, and the step of determining whether the duty cycle of the target reed switch assembled at the current simulation installation position under the action of the target magnetic field meets the calibration requirements is executed again, until each simulation installation position for assembling the target reed switch in the current model water meter is traversed.
[0112] Furthermore, the calibration module is specifically used to place the target reed switch at the current simulated installation position of the current model water meter, and determine the three-dimensional coordinates of each preset judgment point of the target reed switch in the coordinate system corresponding to the magnetic steel assembly; wherein the preset judgment points include the two ends of the target reed switch and the two ends of the lead respectively connected to the two ends of the target reed switch; based on the three-dimensional coordinates, determine the magnetic induction intensity curve corresponding to each of the preset judgment points under the action of the target magnetic field; according to the magnetic induction intensity curve, determine the sum of the rotation angles of the magnetic steels with the same magnetic induction intensity direction at each of the preset judgment points; calculate the duty cycle of the target reed switch based on the sum of the magnetic steel rotation angles, and judge whether the duty cycle is within the preset duty cycle range; if so, the duty cycle of the target reed switch meets the calibration requirements; if not, the duty cycle of the target reed switch does not meet the calibration requirements.
[0113] Furthermore, the calibration module is specifically used to determine the simulated installation position of the target reed switch in the current model water meter by moving the target reed switch toward the direction close to the magnetic steel assembly, or by shortening the lead length of the right end of the target reed switch.
[0114] Furthermore, the assembly module is specifically used to, if the target reed switch is assembled at the target position of the current model water meter, the duty cycle of the target reed switch under the target magnetic field generated by the magnetic steel assembly of the current model water meter meets the calibration requirements; wherein, the target position is any position in the installation range.
[0115] Furthermore, the determination module is specifically used to perform a steady-state solution on the magnetic steel model according to preset rotation parameters to determine the target magnetic field of the magnetic steel model.
[0116] Furthermore, the calibration module is specifically used to control the rotation of the coordinate system where the magnetic steel model is located by a preset angle based on a generalized stretching operator to generate a three-dimensional rotation model; decompose the three-dimensional rotation model according to preset magnetic field components, and divide the calculation domain including the magnetic steel model and the air domain into refined grids; perform auxiliary scanning according to the preset angle, and solve the target magnetic field distribution of the magnetic steel model in a steady state.
[0117] An embodiment of the present invention provides an electronic device for implementing an electronic device. In this embodiment, the electronic device may be, but is not limited to, a personal computer (PC), a laptop computer, a monitoring device, a server, or other computer device with analysis and processing capabilities.
[0118] As an exemplary embodiment, see Figure 7 The electronic device 110 includes a communication interface 111, a processor 112, a memory 113 and a bus 114. The processor 112, the communication interface 111 and the memory 113 are connected via the bus 114. The above-mentioned memory 113 is used to store a computer program that supports the processor 112 to execute the above-mentioned method. The above-mentioned processor 112 is configured to execute the program stored in the memory 113.
[0119] The machine-readable storage medium referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, a storage drive (such as a hard disk drive), any type of storage disk (such as a CD, DVD, etc.), or similar storage media, or a combination thereof.
[0120] The non-volatile medium may be a non-volatile memory, a flash memory, a storage drive (such as a hard drive), any type of storage disk (such as an optical disk, a DVD, etc.), or similar non-volatile storage medium, or a combination thereof.
[0121] It can be understood that the specific operation methods of each functional module in this embodiment can refer to the detailed description of the corresponding steps in the above method embodiment, and will not be repeated here.
[0122] The computer-readable storage medium provided in the embodiments of the present invention stores a computer program. When the computer program code is executed, the method described in any of the above embodiments can be implemented. For specific implementation, please refer to the method embodiment, which will not be repeated here.
[0123] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems and devices can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0124] In addition, in the description of the embodiments of the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; they may refer to mechanical connections or electrical connections; they may refer to direct connections or indirect connections through an intermediate medium; and they may refer to internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.
[0125] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0126] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above-mentioned embodiments, ordinary technicians in this field should understand that any technician familiar with this technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed by the present invention, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered by the protection scope of the present invention.
Claims
1. A method for calibrating the duty cycle of a reed switch, characterized in that: include: Simulating the magnetic steel parameters of the magnetic steel assembly assembled in the current model water meter to determine the target magnetic field of the magnetic steel assembly; Determining an installation range of the target reed switch in the current model water meter based on a duty cycle calibration result of the target reed switch under the target magnetic field; According to the installation range, the target reed switch is installed on the current model water meter so that the duty cycle of the target reed switch under the target magnetic field meets the calibration requirements.
2. The method according to claim 1, characterized in that The step of determining an installation range of the target reed switch within the current model of the water meter based on a duty cycle calibration result of the target reed switch under the target magnetic field includes: Determine whether the duty cycle of the target reed switch installed at the current simulated installation position under the target magnetic field meets the calibration requirements; If it meets the requirements, the current simulated installation position is included in the installation range, and the simulated installation position of the target reed switch in the current model water meter is adjusted. The adjusted simulated installation position is used as the new current simulated installation position, and the step of determining whether the duty cycle of the target reed switch installed at the current simulated installation position under the action of the target magnetic field meets the calibration requirements is performed again, until each simulated installation position for installing the target reed switch in the current model water meter is traversed; If it does not comply, the simulated installation position of the target reed switch in the current model water meter is adjusted, and the adjusted simulated installation position is used as the new current simulated installation position. The step of determining whether the duty cycle of the target reed switch assembled at the current simulated installation position under the action of the target magnetic field meets the calibration requirements is executed again until each simulated installation position for assembling the target reed switch in the current model water meter has been traversed.
3. The method according to claim 2, characterized in that The step of determining whether the duty cycle of the target reed switch installed at the current simulated installation position meets the calibration requirements under the action of the target magnetic field includes: Placing a target reed switch at the current simulated installation position of the current model water meter, and determining the three-dimensional coordinates of each preset determination point of the target reed switch in the coordinate system corresponding to the magnetic steel assembly; wherein the preset determination points include both ends of the target reed switch and both ends of the lead wires connected to the two ends of the target reed switch; Based on the three-dimensional coordinates, determining a magnetic induction intensity curve corresponding to each of the preset determination points under the action of the target magnetic field; Determine, based on the magnetic induction intensity curve, the sum of the rotation angles of the magnetic steels having the same magnetic induction intensity direction at each of the preset determination points; Calculating a duty cycle of the target reed switch based on the sum of the magnetic steel rotation angles, and determining whether the duty cycle is within a preset duty cycle range; If yes, the duty cycle of the target reed switch meets the calibration requirements; If not, the duty cycle of the target reed switch does not meet the calibration requirements.
4. The method according to claim 2, characterized in that The step of adjusting the simulated installation position of the target reed switch in the current model water meter includes: The simulated installation position of the target reed switch in the current model water meter is determined by moving the target reed switch toward the magnetic steel assembly, or by shortening the lead length of the right end of the target reed switch.
5. The method according to claim 1, wherein The step of assembling the target reed switch on the current model water meter according to the installation range so that the duty cycle of the target reed switch under the target magnetic field meets the calibration requirements includes: If the target reed switch is installed at the target position of the current model water meter, the duty cycle of the target reed switch under the target magnetic field generated by the magnetic steel assembly of the current model water meter meets the calibration requirements; wherein, the target position is any position in the installation range.
6. The method according to claim 1, characterized in that The step of simulating the magnetic steel parameters of the magnetic steel assembly assembled in the current model water meter to determine the target magnetic field of the magnetic steel assembly includes: Simulate the magnetic steel parameters of the magnetic steel assembly assembled in the current model water meter and construct a magnetic steel model of the magnetic steel assembly; A steady-state solution is performed on the magnetic steel model according to preset rotation parameters to determine the target magnetic field of the magnetic steel model.
7. The method according to claim 6, characterized in that The step of performing a steady-state solution on the magnetic steel model according to preset rotation parameters to determine a target magnetic field of the magnetic steel model includes: Based on the generalized stretching operator, the coordinate system of the magnetic steel model is controlled to rotate by a preset angle to generate a three-dimensional rotation model; Decomposing the three-dimensional rotating model according to preset magnetic field components, and dividing the calculation domain including the magnetic steel model and the air domain into refined grids; Auxiliary scanning is performed according to the preset angle to solve the target magnetic field distribution of the magnetic steel model in a steady state.
8. A reed switch duty cycle calibration device, characterized in that: include: a determination module, which simulates the magnetic steel parameters of the magnetic steel assembly assembled in the current model water meter to determine the target magnetic field of the magnetic steel assembly; a calibration module, which determines an installation range of the target reed switch in the current model water meter based on a duty cycle calibration result of the target reed switch under the target magnetic field; An assembly module assembles the target reed switch to the current model water meter according to the installation range, so that the duty cycle of the target reed switch under the target magnetic field meets the calibration requirements.
9. An electronic device, characterized in that: The method comprises a memory, a processor, and a program stored in the memory and capable of being run on the processor, wherein the processor implements the method according to any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium, characterized in that The readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and device for determining installation position of magnetoresistive sensor and electronic equipment
CN116894350A
Magnetic field simulation method and device for magnetic steel in signaling pointer and electronic equipment
CN119167617A
Waterproof pulse counter
CN203522705U