A scanning device, method and quantification device for a magnetic sensor
By dividing the magnetic sensor into regions and detecting signals, the problem of slow scanning speed in existing technologies is solved, enabling rapid positioning of the magnet and precise control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHANGZHOU SOLEX SMART HOME CO LTD
- Filing Date
- 2022-03-18
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies for scanning Hall sensors are slow and require scanning a large number of Hall elements, resulting in low efficiency.
Multiple magnetic sensors are divided into regions, and the control chip divides them into L regions. The signal output of a designated magnetic sensor in each region is detected. Only when a signal output is detected does the signal of other magnetic sensors continue to be judged in order to quickly locate the position of the magnet.
It speeds up the scanning process, saves software resources, can quickly acquire the magnet's position, and adapts to the application needs of various scenarios, achieving rapid scanning and precise control, such as controlling the water flow rate of a quantitative faucet or the flame size of a gas stove.
Smart Images

Figure CN116793196B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of location acquisition technology, and in particular to a scanning device, method and quantitative device for a magnetic sensor. Background Technology
[0002] The current method of scanning Hall sensors mainly involves continuously scanning each Hall element and using software to read the magnetic induction signal of each Hall sensor to determine the sensing area (the area where the magnet is located; if there is a magnet above the sensor, it will output a signal). This scanning method is relatively slow and requires scanning a large number of Hall elements. Summary of the Invention
[0003] The main objective of this invention is to provide a scanning device, method, and quantitative device for a magnetic sensor, which overcomes the shortcomings of existing magnetic sensor scanning technologies. By dividing multiple magnetic sensors into regions, it avoids scanning all magnetic sensors, which helps to speed up the scanning process and quickly obtain the position of the magnet.
[0004] The present invention adopts the following technical solution:
[0005] On one hand, a scanning device for a magnetic sensor includes:
[0006] There are N magnets, which are distributed sequentially and can rotate synchronously, where N is greater than 3.
[0007] There are M magnetic sensors, which are evenly distributed in a circle; N magnets are distributed above the magnetic sensors and between any two magnetic sensors; when the N magnets are rotated to any position, at least two magnetic sensors will output a magnetic induction signal; wherein, M is greater than N;
[0008] The control chip is used to divide the M magnetic sensors into L regions and detect the signal output of a designated magnetic sensor in each region; if a magnetic induction signal is detected from a designated magnetic sensor in a certain region, the chip continues to determine the signal output of other magnetic sensors in that region to detect the position of the magnet.
[0009] Preferably, when the number of magnets is constant, the minimum value L of the number of regions divided by the control chip is as follows:
[0010]
[0011] Preferably, when the number of magnetic sensors is constant, the minimum value L of the number of regions divided by the control chip is as follows:
[0012] L = (M-1) - N.
[0013] Preferably, the magnetic sensor includes a Hall sensor.
[0014] Preferably, the control chip is further configured to: encode the position of the magnet; read the current position code; compare it with the position code before rotation; and determine the rotation direction and rotation angle.
[0015] On the other hand, a scanning method for a magnetic sensor includes:
[0016] The M magnetic sensors are divided into L regions, and the signal output of a designated magnetic sensor in each region is detected. If a magnetic induction signal is detected from a designated magnetic sensor in a certain region, the signal output of other magnetic sensors in that region is further judged to detect the position of the magnet. The number of magnets includes N, and they can rotate synchronously. The M magnetic sensors are evenly distributed in a circle. The N magnets are installed above the magnetic sensors and between two magnetic sensors. When the N magnets rotate to any position, at least two magnetic sensors will have magnetic induction signal output, where M is greater than N and N is greater than 3.
[0017] Preferably, when the number of magnets is constant, the minimum value L of the number of regions divided by the control chip is as follows:
[0018]
[0019] Preferably, when the number of magnetic sensors is constant, the minimum value L of the number of regions divided by the control chip is as follows:
[0020] L = (M-1) - N.
[0021] Preferably, the method further includes:
[0022] The position of the magnet is encoded; the current position code is read and compared with the position code before rotation to determine the rotation direction and rotation angle.
[0023] On another front, a metering device includes a metering device body, and further includes a knob and a control circuit board; N synchronously rotating magnets are sequentially installed inside the knob, wherein N is greater than 3; the control circuit board is provided with M magnetic sensors and a control chip, the M magnetic sensors are evenly distributed in a circle and electrically connected to the control chip, wherein M is greater than N; the N magnets are positioned above the magnetic sensors and between two magnetic sensors, and when there is a magnet directly above a magnetic sensor, the magnetic sensor outputs a magnetic induction signal to the control chip; the control chip divides the M magnetic sensors into L regions and detects the signal output of a designated magnetic sensor in each region. If a magnetic induction signal is detected from a designated magnetic sensor in a certain region, the chip continues to determine the signal output of other magnetic sensors in that region to detect the position of the magnet and determine the current setting of the knob.
[0024] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0025] (1) The present invention divides multiple magnetic sensors (such as Hall sensors) into regions. It is not necessary to scan all Hall sensors every time. It is only necessary to scan the signal output of a specified magnetic sensor in the pre-divided region first, and then scan the other Hall sensors in the region. This scanning method is beneficial to speed up the scanning speed, save software resources, and quickly obtain the position of the magnet.
[0026] (2) The present invention can adjust the divided area according to the changes of the magnet or magnetic sensor to meet the application needs of various scenarios and achieve rapid scanning;
[0027] (3) In the quantitative device of the present invention, the magnet is installed in the knob. When the knob is rotated to a certain position, a designated magnetic sensor corresponding to a divided area outputs a magnetic induction signal. The position of the magnet can be determined by detecting the signal output of other Hall sensors in the area. Furthermore, the current gear can be quickly determined. The control chip performs corresponding control based on the current gear, such as controlling the water flow of the quantitative faucet and controlling the fire size of the gas stove.
[0028] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are listed below.
[0029] The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments of the invention in conjunction with the accompanying drawings. Attached Figure Description
[0030] Figure 1 This is a structural block diagram of the magnetic sensor scanning device according to an embodiment of the present invention;
[0031] Figure 2 This is a schematic diagram showing the distribution of the magnetic sensor and the magnet in an embodiment of the present invention; wherein, (a) represents a schematic diagram showing the distribution of the magnetic sensor; (b) represents a schematic diagram showing the distribution of the magnet; and (c) represents a schematic diagram showing the superposition of the magnetic sensor and the magnet.
[0032] Figure 3 This is a schematic diagram of the region division according to an embodiment of the present invention;
[0033] Figure 4This is a diagram showing the positional relationship between the magnet and each magnetic sensor when the magnet rotates according to an embodiment of the present invention; wherein, (a) represents a schematic diagram of the magnet being located in one of the positions of the first region ①; (a) to (e) represent four schematic diagrams of the magnet being located in different positions of the second region ②; and (f) represents a schematic diagram of the magnet being located in one of the positions of the third region ③.
[0034] Figure 5 This is a flowchart of the scanning method of the magnetic sensor according to an embodiment of the present invention;
[0035] Figure 6 This is a schematic diagram of the quantitative device according to an embodiment of the present invention. Detailed Implementation
[0036] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0037] In the description of this invention, it should be noted that the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0038] In the description of this invention, it should be noted that the terms "upper," "lower," "inner," "outer," "top / bottom," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0039] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installed", "equipped", "sleeved / connected", "connected", etc., should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be a connection within two components. For those skilled in the art, the specific meaning of the above terms in this invention can be understood according to the specific circumstances.
[0040] See Figure 1 and Figure 2 As shown, a scanning device for a magnetic sensor includes:
[0041] N magnets 10 are arranged sequentially and can rotate synchronously, wherein N is greater than 3;
[0042] M magnetic sensors 20 are evenly distributed in a circle; N magnets 10 are distributed above the magnetic sensors 20 and between two magnetic sensors 20; when the N magnets 10 rotate to any position, at least two magnetic sensors 20 will output magnetic induction signals; wherein, M is greater than N;
[0043] The control chip 30 is used to divide the M magnetic sensors 20 into L regions and detect the signal output of a designated magnetic sensor 20 in each region; if a magnetic induction signal is detected from a designated magnetic sensor 20 in a certain region, the control chip 30 continues to determine the signal output of other magnetic sensors 20 in that region to detect the position of the magnet 10.
[0044] In practice, N magnets 10 can be set to be equally spaced, and M magnetic sensors 20 can also be set to be equally spaced. The distance between two magnets is equal to half the distance between two magnetic sensors, so as to ensure that when the N magnets 10 are rotated to any position, at least two magnets are located directly above the two magnetic sensors, so that at least two magnetic sensors 20 have magnetic induction signal output.
[0045] In one embodiment, when the number of magnets is constant, the minimum value L of the number of regions divided by the control chip 30 is as follows:
[0046]
[0047] For example: with 10 magnetic sensors, the minimum number of areas to be scanned is: L = (10 / 2) = 5; with 9 magnetic sensors, the minimum number of areas to be scanned is: L = ((9–1) / 2) + 1 = 5.
[0048] In another embodiment, when the number of magnetic sensors is constant, the minimum value L of the number of regions divided by the control chip is as follows:
[0049] L = (M-1) - N.
[0050] For example: with 10 sensors and 4 magnets, the minimum area to be scanned is: L = (10-1) - 4 = 5.
[0051] In this embodiment, the magnetic sensor 20 includes a Hall sensor, but it can also be other magnetic sensors.
[0052] In this embodiment, the magnet 10 includes four magnets, and the magnetic sensor 20 includes nine magnets (corresponding to...). Figure 3 The number of regions divided by the control chip 30 is 5 (1, 2, 3, 4, 5, 6, 7, 8, 9). Specifically, the control chip 30 includes an MCU processor, which divides the 9 magnetic sensors 20 into 5 regions (①, ②, ③, ④, and ⑤). Each region is assigned a designated magnetic sensor 20 (the designated magnetic sensors 20 in each region are not repeated). When the magnet 10 rotates to any position, there are always two magnetic sensors 20 (one of which is the designated magnetic sensor 20, and the other is the magnetic sensor 20 adjacent to the designated magnetic sensor 20) located directly below the two magnets 10. The MCU processor first detects designated magnetic sensors 20 in each region. When a designated magnetic sensor 20 outputs magnetic induction information, it indicates that a magnet 10 is located above that designated magnetic sensor 20. Then, it further detects the signal outputs of other magnetic sensors 20 in the region where the designated magnetic sensor 20 is located (in the embodiment shown in the figure, the other magnetic sensors in the region include one magnetic sensor 20 to the left and one magnetic sensor 20 to the right of the designated magnetic sensor 20; for example, in region ②, the designated sensor is 3, and the other magnetic sensors in the region include 2 and 4) to determine the position of the magnet 10. It is understood that in other embodiments, if there are more than three magnetic sensors in a region, it is necessary to detect the signal outputs of all other magnetic sensors in the region where the designated magnetic sensor is located.
[0053] See Figure 3 The diagram illustrates the distribution of magnet 10 and magnetic sensor 20 after area division in this embodiment. As can be seen, magnet 10 has four positional distributions when rotating to areas ① to ④, and two positional distributions when rotating to area ⑤. The two positional distributions of magnet 10 directly above the same magnetic sensor 20 correspond to the same signal output. For example, when magnetic sensor 1 and magnetic sensor 2 simultaneously output signals, magnet 10 has two different positions. In specific implementation, the angle rotated by magnet 10 can be limited to 360° / m through the cooperation of parts; in this embodiment, it is 360° / 9 = 40°. Figure 3It can be seen that the designated magnetic sensor in each region outputs a magnetic induction signal when rotated to each position within the region. For example, the designated sensor for region ① is 1; the designated sensor for region ② is 3; the designated sensor for region ③ is 5; the designated sensor for region ④ is 7; and the designated sensor for region ⑤ is 9.
[0054] See Figure 4 The diagram illustrates the positional relationship between the magnet 10 and each magnetic sensor 20 during rotation in this embodiment. (a) shows a schematic diagram of the magnet 10 in one position within the first region ①; (a) to (e) show four schematic diagrams of the magnet 10 in different positions within the second region ②; and (f) shows a schematic diagram of the magnet 10 in one position within the third region ③. Only four magnet 10 distribution diagrams are shown in the second region ②, while only one magnet 10 distribution diagram is shown in the first region ① and the third region ③. For magnet 10 distribution diagrams in other regions and other magnet 10 distribution diagrams in the first region ① and the third region ③, please refer to [the original text]. Figure 3 Therefore, not all of them are shown in this embodiment.
[0055] In this embodiment, the control chip 30 is also used to perform position encoding based on the position of the magnet 10; read the current position encoding, compare it with the position encoding before rotation, and determine the rotation direction and rotation angle.
[0056] Specifically, the magnetic sensors in the five divided areas are first encoded as ① to ⑤; then the adjacent magnetic sensors in each area are encoded as a, b, c, d...n; if at the current position, the designated magnetic sensor in area ① has a magnetic induction signal output, and its adjacent magnetic sensor c also has magnetic sensing information output, then the software reads and outputs the corresponding position code value, such as 1 (c). If the position code value before rotation is 1 (a), then the rotation direction and rotation angle can be determined.
[0057] See Figure 5 As shown, a scanning method for a magnetic sensor includes:
[0058] S501, divide the M magnetic sensors into L regions, and detect the signal output of a designated magnetic sensor in each region;
[0059] S502, if a magnetic induction signal is detected from a designated magnetic sensor in a certain area, the signal output of other magnetic sensors in the same area is further determined to detect the position of the magnet; the number of magnets includes N, and they can rotate synchronously; the M magnetic sensors are evenly distributed in a circle; the N magnets are installed above the magnetic sensors and between two magnetic sensors; when the N magnets rotate to any position, at least two magnetic sensors will output magnetic induction signals, where M is greater than N and N is greater than 3.
[0060] In this embodiment, a scanning method for a magnetic sensor is implemented using an MCU processor.
[0061] In one embodiment, when the number of magnets is constant, the minimum value L of the number of regions divided by the control chip is as follows:
[0062]
[0063] In another embodiment, when the number of magnetic sensors is constant, the minimum value L of the number of regions divided by the control chip is as follows:
[0064] L = (M-1) - N.
[0065] In this embodiment, the method further includes:
[0066] The position of the magnet is encoded; the current position code is read and compared with the position code before rotation to determine the rotation direction and rotation angle.
[0067] In this embodiment, the specific implementation of a scanning method for a magnetic sensor is the same as the processing method of the control chip in a scanning device for a magnetic sensor, and will not be described again in this embodiment.
[0068] See Figure 6 As shown, a metering device includes a metering device body, and further includes: a knob 40 and a control circuit board 50; N synchronously rotating magnets 10 are sequentially installed inside the knob 40, where N is greater than 3; the control circuit board 50 is provided with M magnetic sensors 20 and a control chip 30, the M magnetic sensors 20 are evenly distributed in a circle and electrically connected to the control chip 30, where M is greater than N; the N magnets 10 are positioned above the magnetic sensors 20 and between two magnetic sensors 20, when there is a magnet 10 directly above a magnetic sensor 20, the magnetic sensor 20 outputs a magnetic induction signal to the control chip 30; the control chip 30 divides the M magnetic sensors 20 into L regions, and detects the signal output of a designated magnetic sensor 20 in each region. If a magnetic induction signal is detected from a designated magnetic sensor 20 in a certain region, the chip continues to judge the signal output of other magnetic sensors in that region to detect the position of the magnet 10 and determine the current gear of the knob 40.
[0069] In this embodiment, the metering device includes a metering faucet or a metering gas stove. The current gear is determined, and the control chip 30 performs corresponding control based on the current gear, such as controlling the water flow rate of the metering faucet or the flame size of the gas stove.
[0070] See Figure 6As shown, in this embodiment, the control circuit board 50 can be disposed inside the scale ring 60, the scale ring 60 is connected to the knob 40, and the control circuit board 50 does not rotate with the scale ring 60.
[0071] It should be noted that in other embodiments, the knob 40 is a knob 40 with a scale ring, and the control circuit board 50 is disposed in the body of the metering device directly opposite the knob 40.
[0072] The above description is merely a preferred embodiment of the present invention; however, the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and its improved concepts, should be covered within the scope of protection of the present invention.
Claims
1. A scanning device for a magnetic sensor, characterized in that, include: There are N magnets, which are distributed sequentially and can rotate synchronously, wherein N is greater than 3; the N magnets are non-circular and uniformly distributed. There are M magnetic sensors, which are evenly distributed in a circle. N magnets are distributed above the magnetic sensors and between any two magnetic sensors. When the N magnets are rotated to any position, at least two magnetic sensors will output a magnetic induction signal. M is greater than N. The spacing between the N magnets is half the spacing between the M magnetic sensors. The control chip is used to divide the M magnetic sensors into L regions and detect the signal output of a designated magnetic sensor in each region; if a magnetic induction signal is detected from a designated magnetic sensor in a certain region, the chip continues to determine the signal output of other magnetic sensors in that region to detect the position of the magnet.
2. The scanning device for the magnetic sensor according to claim 1, characterized in that, When the number of magnets is constant, the minimum value L of the number of regions divided by the control chip is as follows: 。 3. The scanning device for the magnetic sensor according to claim 1, characterized in that, When the number of magnetic sensors is constant, the minimum value L of the number of regions divided by the control chip is as follows: 。 4. The scanning device for the magnetic sensor according to claim 1, characterized in that, The magnetic sensor includes a Hall sensor.
5. The scanning device for the magnetic sensor according to claim 1, characterized in that, The control chip is also used to encode the position of the magnet; read the current position code, compare it with the position code before rotation, and determine the rotation direction and rotation angle.
6. A scanning method for a magnetic sensor, characterized in that, include: Divide M magnetic sensors into L regions and detect the signal output of a designated magnetic sensor in each region; If a magnetic induction signal is detected from a designated magnetic sensor in a certain area, the signal outputs of other magnetic sensors in that area are further evaluated to detect the position of the magnet. The number of magnets includes N, and they can rotate synchronously. M magnetic sensors are evenly distributed in a circle. The N magnets are installed above the magnetic sensors and between two magnetic sensors. When the N magnets rotate to any position, at least two magnetic sensors will output magnetic induction signals. M is greater than N, N is greater than 3, the N magnets are not evenly distributed in a circle, and the distribution spacing between the N magnets is half the distribution spacing between the M magnetic sensors.
7. The scanning method of the magnetic sensor according to claim 6, characterized in that, When the number of magnets is constant, the minimum value L of the number of regions divided by the control chip is as follows: 。 8. The scanning method of the magnetic sensor according to claim 6, characterized in that, When the number of magnetic sensors is constant, the minimum value L of the number of regions divided by the control chip is as follows: 。 9. The scanning method of the magnetic sensor according to claim 6, characterized in that, The method further includes: The position of the magnet is encoded; the current position code is read and compared with the position code before rotation to determine the rotation direction and rotation angle.
10. A metering device, comprising a metering device body, characterized in that, Also includes: A knob and a control circuit board are included. The knob contains N synchronously rotating magnets, where N is greater than 3, and the N magnets are non-circularly and uniformly distributed. The control circuit board has M magnetic sensors and a control chip. The M magnetic sensors are circularly and uniformly distributed and electrically connected to the control chip. M is greater than N, and the spacing between the N magnets is half the spacing between the M magnetic sensors. The N magnets are positioned above and between two magnetic sensors. When a magnet is directly above a magnetic sensor, the magnetic sensor outputs a magnetic induction signal to the control chip. The control chip divides the M magnetic sensors into L regions and detects the signal output of a designated magnetic sensor in each region. If a magnetic induction signal is detected from a designated magnetic sensor in a certain region, the chip continues to determine the signal output of other magnetic sensors in that region to detect the position of the magnet and determine the current gear position of the knob.