CN117829196A - Counter, counting method, chip and electronic equipment - Google Patents

Counter, counting method, chip and electronic equipment Download PDF

Info

Publication number
CN117829196A
CN117829196A CN202311724785.2A CN202311724785A CN117829196A CN 117829196 A CN117829196 A CN 117829196A CN 202311724785 A CN202311724785 A CN 202311724785A CN 117829196 A CN117829196 A CN 117829196A
Authority
CN
China
Prior art keywords
magnetic
magnetic switch
sensor
magnet
based counter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311724785.2A
Other languages
Chinese (zh)
Inventor
习建国
陈燕宁
付振
王帅鹏
周飞
黄海潮
程晓峰
刘少君
赵天成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Corp of China SGCC
Beijing Smartchip Microelectronics Technology Co Ltd
Nanjing Power Supply Co of State Grid Jiangsu Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
Beijing Smartchip Microelectronics Technology Co Ltd
Nanjing Power Supply Co of State Grid Jiangsu Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, Beijing Smartchip Microelectronics Technology Co Ltd, Nanjing Power Supply Co of State Grid Jiangsu Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202311724785.2A priority Critical patent/CN117829196A/en
Publication of CN117829196A publication Critical patent/CN117829196A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06MCOUNTING MECHANISMS; COUNTING OF OBJECTS NOT OTHERWISE PROVIDED FOR
    • G06M1/00Design features of general application
    • G06M1/27Design features of general application for representing the result of count in the form of electric signals, e.g. by sensing markings on the counter drum
    • G06M1/274Design features of general application for representing the result of count in the form of electric signals, e.g. by sensing markings on the counter drum using magnetic means; using Hall-effect devices

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Measuring Magnetic Variables (AREA)

Abstract

The invention relates to the field of counters, and provides a counter, a counting method, a chip and electronic equipment. The counter comprises a control module and a magnetic sensing module, wherein the magnetic sensing module comprises a counter body 2 N Each magnetic switch sensor and a magnet, wherein N is a positive integer greater than or equal to 1. The magnetic switch sensor is used for generating pulse signals under the influence of the periodically changing magnetic field of the magnet, and the control module is used for being based on the reference number 2 N Pulse signals generated by the magnetic switch sensors are counted. The invention adopts a plurality of magnetic switch sensors, counts the pulse signals generated by the magnetic switch sensors through the control module corresponding to the data algorithm of the magnetic switch sensors, improves the sensitivity and the accuracy of pulse monitoring, and can meet the real-time accurate statistics of water consumption or gas consumption in a closed environment.

Description

Counter, counting method, chip and electronic equipment
Technical Field
The invention relates to the field of counters, in particular to a counter based on a magnetic sensor, a counting method, a chip and electronic equipment.
Background
The existing counter is mainly divided into a contact counter and a non-contact counter, wherein the non-contact counter is divided into a photoelectric sensing counter and a magnetic sensing counter according to different signal sources. The non-contact counter realizes the functions of measurement, counting, control and the like mainly by counting pulse signals of the sensor, and is widely applied to counting application scenes in industries such as industrial production, scientific experiments, electronic consumption and the like.
The photoelectric sensing counter converts an optical signal into an electric signal through an analog circuit by a photoelectric sensor, and performs logic operation by using a digital circuit to form a pulse signal for counting. The photoelectric sensing counter has the defects of poor environmental adaptability (in a closed environment), poor anti-interference performance, easiness in dust shading interference and complex installation. The magnetic sensing counter realizes counting by generating pulse signals through the magnetic sensor, and overcomes the defects of difficult installation and easy interference of the photoelectric sensing counter. However, the existing magnetic sensing counter realizes counting according to the number of pulse signals output by a single magnetic sensor, has low precision, and is not suitable for real-time accurate statistics of water consumption or gas consumption in a closed environment.
Disclosure of Invention
In order to solve the technical defects, the invention provides a counter based on a magnetic sensor and a counting method.
The invention provides a counter based on a magnetic sensor, comprising: the control module and the magnetic sensing module;
the magnetic sensing module comprises 2 N The magnetic switch sensors and the magnets are arranged, and N is a positive integer greater than or equal to 1;
the magnetic switch sensor is used for generating pulse signals under the influence of a periodically-changing magnetic field of the magnet;
the control module is used for being based on 2 N Pulse signals generated by the magnetic switch sensors are counted.
In the embodiment of the invention, the magnetic sensing module comprises two magnetic switch sensors, and the magnet comprises a south pole magnet and a north pole magnet; under the influence of a magnetic field generated by one circle of rotation of the magnet, the two magnetic switch sensors jointly generate 00, 01, 10 and 11 pulse signals which circulate once; the control module counts one time for each cycle of 00, 01, 10, 11 pulse signals generated by the two magnetic switch sensors.
In the embodiment of the invention, the magnetic sensing module comprises four magnetic switch sensors, and the magnet comprises a south pole magnet and a north pole magnet; under the influence of a magnetic field generated by one rotation of the magnet, the four magnetic switch sensors jointly generate 000, 001, 010, 011, 100, 101, 110 and 111 pulse signals which circulate once; the control module counts one time for each cycle of 000, 001, 010, 011, 100, 101, 110, 111 pulse signals generated by the four magnetic switch sensors.
In the embodiment of the invention, the magnet comprises a south pole magnet and a north pole magnet; the south pole magnet and the north pole magnet are arranged on the rotating device and are used for generating a periodically-changing magnetic field under the rotation drive of the rotating device.
In the embodiment of the invention, the rotating device comprises a wind wheel, a connecting rod and a turntable, wherein the wind wheel and the turntable are connected with the connecting rod, and the connecting rod is positioned at the center of the turntable; the south pole magnets and the north pole magnets are arranged on the turntable and symmetrically distributed relative to the connecting rod; the wind wheel rotates under the action of the force of the counting object so as to drive the south pole magnet and the north pole magnet on the turntable to rotate.
In the embodiment of the invention, the magnetic sensing module comprises two magnetic switch sensors, and an included angle between the two magnetic switch sensors and the center of the turntable is 90 degrees.
In the embodiment of the invention, the magnetic sensing module comprises four magnetic switch sensors, and the included angle intervals between the four magnetic switch sensors and the center of the turntable are 45 degrees respectively.
In the embodiment of the invention, the square wave duty ratio of the pulse signal generated by the magnetic switch sensor is 0.5.
In the embodiment of the invention, the magnetic switch sensor is a TMR magnetic switch sensor.
In the embodiment of the invention, the counter based on the magnetic sensor further comprises a display module, and the display module is used for displaying the counting number of the control module.
In the embodiment of the invention, the display module comprises an LED driving circuit and an LED lamp array;
and the LED driving circuit controls the on/off of the LED lamp array according to the logic signal output by the control module.
In the embodiment of the invention, the control module comprises a clock unit, and the clock unit is used for providing logic signals for driving the LED lamp array to be on or off in a time sequence for the LED driving circuit.
In the embodiment of the invention, the clock unit comprises a comparator, a trigger and a selector;
the comparator is used for converting an analog signal generated by the magnetic switch sensor into a pulse signal;
the trigger is used for regulating and controlling the duty ratio of the pulse signal to obtain pulse periods with different frequency divisions;
the selector is used for selecting a corresponding frequency-divided pulse period to obtain a logic signal for driving the LED lamp array to be on or off in a time sequence.
In the embodiment of the invention, the flip-flop consists of two D flip-flops to obtain a pulse period of frequency division 2; alternatively, the flip-flop is composed of three D flip-flops and two nand gates to obtain a divided-by-6 pulse period.
The invention also provides a counting method which adopts the counter based on the magnetic sensor to count.
The invention also provides a chip, which comprises the counter based on the magnetic sensor.
The invention also provides electronic equipment comprising the counter based on the magnetic sensor.
The invention adopts a plurality of magnetic switch sensors, counts the pulse signals generated by the magnetic switch sensors through the control module corresponding to the data algorithm of the magnetic switch sensors, improves the sensitivity and the accuracy of pulse monitoring, can meet the real-time accurate statistics of water consumption or gas consumption in a closed environment, and is suitable for high-precision metering of water meters, gas meters and other equipment in the existing application scene.
Other features and advantages of the present invention will be apparent from the detailed description that follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
fig. 1 is a schematic structural diagram of a magnetic sensor-based counter according to an embodiment of the present invention;
FIG. 2 is a schematic layout diagram of a magnetic sensor module according to an embodiment of the present invention;
FIG. 3 is a schematic layout diagram of a magnetic sensor module according to another embodiment of the present invention;
FIG. 4 is a schematic diagram of a flip-flop in a magnetic sensor based counter according to an embodiment of the present invention;
FIG. 5 is a schematic diagram showing a timing cycle of a clock unit in a magnetic sensor-based counter according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a timing cycle of a clock unit in a magnetic sensor based counter according to another embodiment of the present invention;
fig. 7 is a schematic circuit diagram of a display module in a magnetic sensor-based counter according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions and advantages of the embodiments of the present invention more apparent, the following detailed description of exemplary embodiments of the present invention is provided in conjunction with the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention and not exhaustive of all embodiments. It should be noted that, without conflict, the embodiments of the present invention and features of the embodiments may be combined with each other.
In the description of the present invention, it should be understood that the terms "center," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like indicate orientations or positional relationships based on the orientation or positional relationships shown in the drawings, merely to facilitate describing the present invention and simplify the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
In the present invention, unless explicitly specified and limited otherwise, the terms "mounted," "connected," "secured," and the like are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally formed; may be mechanically connected, may be electrically connected or may communicate with each other; can be directly connected or indirectly connected through an intermediate medium, and can be communicated with the inside of two elements or the interaction relationship of the two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances.
The embodiment of the invention provides a counter based on a magnetic sensor, which comprises a control module and a magnetic sensing module, wherein the magnetic sensing module comprises 2 parts N Each magnetic switch sensor and a magnet, wherein N is a positive integer greater than or equal to 1. The magnetic switch sensor is used for generating pulse signals under the influence of the periodically changing magnetic field of the magnet, and the control module is used for being based on the reference number 2 N Pulse signals generated by the magnetic switch sensors are counted. The invention adopts a plurality of magnetic switch sensors, counts the pulse signals generated by the magnetic switch sensors through the control module corresponding to the data algorithm of the magnetic switch sensors, improves the sensitivity and the accuracy of pulse monitoring, can meet the real-time accurate statistics of water consumption or gas consumption in a closed environment, and is suitable for high-precision metering of water meters, gas meters and other equipment in the existing application scene.
The technical scheme of the invention is described in detail by specific examples.
Fig. 1 is a schematic structural diagram of a magnetic sensor-based counter according to an embodiment of the present invention. As shown in fig. 1, the counter based on the magnetic sensor provided in this embodiment includes a control module, a magnetic sensing module and a display module, the magnetic sensing module includes 2 magnetic switch sensors and a magnet, the magnetic switch sensors are used for generating pulse signals under the influence of a periodically changing magnetic field of the magnet, the control module is used for counting based on the pulse signals generated by the 2 magnetic switch sensors, and the display module is used for displaying the count number of the control module. The magnetic switch sensor generates pulse signals due to the influence of the periodical magnetic field change generated by the magnet, the pulse signals are input into the control module, the input pulse signals are calculated through the counter unit of the control module, and the number of the pulses is displayed by the display module. Along with the periodical disappearance and generation of the magnetic signals of the magnet, the control module controls the on-off of the LED array of the display module, so that the signal detection is more visual.
In one embodiment of the invention, the magnetic sensing module includes two magnetic switch sensors and a magnet. As shown in fig. 2, the magnetic switch sensor 11 and the magnetic switch sensor 12 are integrated on the main board 10. The magnet comprises a south pole magnet 21 and a north pole magnet 22, and the south pole magnet 21 and the north pole magnet 22 are arranged on the rotating device and are used for generating a periodically changing magnetic field under the rotation of the rotating device. The rotating device comprises a wind wheel 23, a connecting rod 24 and a rotary table 25, wherein the wind wheel 23 and the rotary table 25 are fixedly connected with the connecting rod 24, the connecting rod 24 is positioned at the center of the rotary table 25, and a south pole magnet 21 and a north pole magnet 22 are arranged on the rotary table 25 and symmetrically distributed relative to the connecting rod 24. The wind wheel 23 rotates under the force of a counting object (e.g., flowing water or gas) to rotate the south pole magnet 21 and the north pole magnet 22 on the turntable 25. The main board 10 where the two magnetic switch sensors are located is located directly under the turntable 25 where the magnets are located, and the center of the main board 10 is collinear with the connecting rod 24, so that the magnets pass directly over the magnetic sensors when rotating. The two magnetic switch sensors are distributed at a certain angle with the magnetic field centers of the south pole magnet and the north pole magnet, so that the two magnetic switch sensors are ensured to be in the magnetic field range of the magnet and can be influenced by periodic magnetic field changes. Under the influence of a magnetic field generated by one circle of rotation of the south pole magnet and the north pole magnet, the two magnetic switch sensors jointly generate 00, 01, 10 and 11 pulse signals which circulate once, and the control module counts the 00, 01, 10 and 11 pulse signals which are generated by the two magnetic switch sensors once per cycle. For example, under normal conditions, when the N pole (north pole) magnet rotates clockwise for one circle to sweep the two magnetic switch sensors, the pulse signals generated by the two magnetic switch sensors are 00, 01, 10 and 11, and when the N pole magnet rotates anticlockwise (rotates reversely), the pulse sequences generated by the two magnetic switch sensors are changed, for example, 11, 10, 01 and 00, so long as the pulse sequences complete one cycle, namely counting is performed once, the counting accuracy can be effectively ensured. The magnet consists of a south pole magnet and a north pole magnet, and can realize counter counting, namely the counter can accurately count when the magnet rotates forwards or backwards.
In other embodiments, the magnet may be a single south pole magnet or a single north pole magnet, and the two magnetic switch sensors generate 01, 10 pulse signals once in a cycle under the influence of a magnetic field generated by a single magnet rotating one revolution, and count once based on the pulse signals once in each cycle. The case where the magnet is only a single magnet can achieve counting, but it is difficult to achieve accurate counting when the magnet is reversed.
In some embodiments, the magnetic switch sensor may be a TMR magnetic switch sensor, which has advantages of high sensitivity, low power consumption, high reliability, and the like. When the counter based on the TMR magnetic sensor is applied to a water meter, water flows into the water meter through a pipeline, a wind wheel in the water meter rotates under the action of the water flow impact force of flowing water, and through the cooperation of a gear set, the magnetic body can periodically pass through the TMR magnetic switch sensor according to a certain rule, and the TMR magnetic switch sensor outputs corresponding signals after sensing the magnetic field change, namely when the south pole magnet and the north pole magnet positively rotate, the two TMR magnetic switch sensors alternately generate switching signals according to the magnetic field change to form pulse signals of 00, 01, 10 and 11; when the south pole magnet and the north pole magnet are reversed, the order of pulse signals generated by the two TMR magnetic switch sensors can be reversed, and the control module MCU can realize forward and reverse flow counting by collecting the pulse signals. In a specific embodiment, in order to make the counting of the counter more accurate, the square wave duty ratio of the output of the two TMR magnetic switch sensors should be as close as 0.5 as possible, consistent with the signal acquisition frequency between the magnet and the TMR magnetic sensor, i.e. the included angle between the two TMR magnetic switch sensors and the center of the turntable 25 is 90 °.
In one embodiment of the invention, the display module of the counter comprises an LED driving circuit and an LED lamp array, and the LED driving circuit controls the on-off of the LED lamp array according to the logic signal output by the control module. The schematic circuit diagram of the display module is shown in FIG. 7, which includes a driving chip for driving the LED array, and a capacitor C in the circuit 1 、C 2 、C 3 、C 4 And resistance R 1 、R 2 、R 3 、R 4 The protection circuit and the signal compensation function are realized.
In one embodiment of the invention, the control module adopts a microcontroller (Micro Controller Unit, MCU for short) with a clock unit, and provides logic signals for driving the LED lamp array to be on and off in a time sequence for the LED driving circuit through the clock unit. The clock unit of the microcontroller comprises a comparator, a flip-flop and a selector. The comparator is used for converting the analog signal generated by the magnetic switch sensor into a pulse signal (corresponding to logic signals 1, 0,1 represents a high level, and 0 represents a low level). The trigger is used for regulating and controlling the duty ratio of the pulse signal to obtain different frequency division pulse periods. The frequency division principle of the flip-flop is shown in fig. 4, the flip-flop with frequency division of 4 is composed of 2D flip-flops, and the flip-flop with frequency division of 6 is composed of 3D flip-flops and 2 nand gates. For example, the square wave duty ratio of the output of the two TMR magnetic switch sensors is 0.5, and when the frequency signal enters the trigger after falling edge when the frequency signal is consistent with the signal acquisition frequency between the magnet and the TMR magnetic sensor, the high-low level inversion is started. The selector is used for selecting the corresponding frequency-divided pulse period to obtain a logic signal for driving the LED lamp array to be on and off in a time sequence. Specifically, the pulse signal output by the comparator is used as the clock pulse of the subsequent trigger, and the pulse period of frequency division by 2 and frequency division by 4 as shown in fig. 5 is obtained as the time sequence period of the microcontroller through the logic processing of the trigger. According to the on-off state of the specific LED lamp, the selector selectively drives the LED lamp array through the corresponding frequency division pulse period. And finally, the microcontroller inputs the logic signals obtained through processing to the LED driving circuit through the PWM end to control the on/off of the LED lamp array.
In another embodiment of the invention, the magnetic sensing module includes four magnetic switch sensors and a magnet. As shown in fig. 3, the magnetic switch sensor 11, the magnetic switch sensor 12, the magnetic switch sensor 13, and the magnetic switch sensor 14 are integrated on the main board 10. The magnet comprises a south pole magnet 21 and a north pole magnet 22, and the south pole magnet 21 and the north pole magnet 22 are arranged on the rotating device and are used for generating a periodically changing magnetic field under the rotation of the rotating device. The rotating device comprises a wind wheel 23, a connecting rod 24 and a rotary table 25, wherein the wind wheel 23 and the rotary table 25 are fixedly connected with the connecting rod 24, and a south pole magnet 21 and a north pole magnet 22 are arranged on the rotary table 25. The wind wheel 23 rotates under the force of a counting object (e.g., flowing water or gas) to rotate the south pole magnet 21 and the north pole magnet 22 on the turntable 25. The four magnetic switch sensors are arranged below the magnet and distributed at a certain angle with the magnetic field centers of the south pole magnet and the north pole magnet, so that the four magnetic switch sensors are ensured to be in the magnetic field range of the magnet and can be influenced by periodic magnetic field changes. Under the influence of the magnetic field generated by one rotation of the magnets (south pole magnet 21 and north pole magnet 22), the four magnetic switch sensors collectively generate 000, 001, 010, 011, 100, 101, 110, 111 pulse signals that circulate once. The control module counts one time for each cycle of 000, 001, 010, 011, 100, 101, 110, 111 pulse signals generated by the four magnetic switch sensors.
In some embodiments, four TMR magnetic switch sensors are employed, arranged at 0 °, 45 °, 90 °, 135 °. When the south pole magnet and the north pole magnet rotate positively, the four TMR magnetic switch sensors alternately generate switch signals according to the change of a magnetic field to form pulse signals of 000, 001, 010, 011, 100, 101, 110 and 111; when the south pole magnet and the north pole magnet are reversed, the order of pulse signals generated by the four TMR magnetic switch sensors can be reversed, and the control module can realize forward and reverse flow counting by collecting the pulse signals. In order to make the counting of the counter more accurate, the square wave duty ratio output by the four TMR magnetic switch sensors should be as close to 0.5 as possible, and the included angles between the four TMR magnetic switch sensors and the center of the turntable 25 are respectively 45 degrees.
In another embodiment of the invention, the control module adopts a microcontroller with a clock unit, and provides logic signals for driving the LED lamp array to be on and off in a time sequence for the LED driving circuit through the clock unit. The clock unit of the microcontroller comprises a comparator, a flip-flop and a selector. The comparator is used for converting the analog signal generated by the magnetic switch sensor into a pulse signal (corresponding to logic signals 1 and 0). The trigger is used for regulating and controlling the duty ratio of the pulse signal to obtain different frequency division pulse periods. The frequency-dividing flip-flop consists of 2D flip-flops, and the frequency-dividing flip-flop consists of 3D flip-flops and 2 NAND gates. The selector is used for selecting the corresponding frequency-divided pulse period to obtain a logic signal for driving the LED lamp array to be on and off in a time sequence. Specifically, the pulse signal output by the comparator is used as the clock pulse of the subsequent D flip-flop, and the pulse period of frequency division by 2, frequency division by 4 and frequency division by 6 as shown in fig. 6 is obtained as the timing period of the microcontroller through a series of logic processing of the D flip-flop and the nor gate. According to the on-off state of the specific LED lamp, the selector selectively drives the LED lamp array through the corresponding frequency division pulse period. And finally, the microcontroller inputs the logic signals obtained through processing to the LED driving circuit through the PWM end to control the on/off of the LED lamp array.
In other embodiments, the magnetic sensing module may employ 8 magnetic switch sensors, 16 magnetic switch sensors, etc., the more magnetic switch sensors, the higher the accuracy of the counter.
The embodiment of the invention also provides a counting method which adopts the counter based on the magnetic sensor for counting.
The embodiment of the invention also provides a chip, which comprises the counter based on the magnetic sensor.
The embodiment of the invention also provides electronic equipment, which comprises the counter based on the magnetic sensor. Such as a water meter or a gas meter, etc. The water meter of the non-contact counter based on the magnetic sensing solves the real-time accurate statistics problem of water consumption condition in a closed environment, is easy to install and not easy to be interfered, has a simplified structure and complete functions, effectively reduces the production cost, and is safe and stable in data.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein. The scheme in the embodiment of the invention can be realized by adopting various computer languages, such as object-oriented programming language Java, an transliteration script language JavaScript and the like.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention. It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (17)

1. A magnetic sensor-based counter, comprising: the control module and the magnetic sensing module;
the magnetic sensing module comprises 2 N The magnetic switch sensors and the magnets are arranged, and N is a positive integer greater than or equal to 1;
the magnetic switch sensor is used for generating pulse signals under the influence of a periodically-changing magnetic field of the magnet;
the control module is used for being based on 2 N Pulse signals generated by the magnetic switch sensors are counted.
2. The magnetic sensor-based counter of claim 1, wherein the magnetic sensing module comprises two magnetic switch sensors, the magnet comprising one south pole magnet and one north pole magnet;
under the influence of a magnetic field generated by one circle of rotation of the magnet, the two magnetic switch sensors jointly generate 00, 01, 10 and 11 pulse signals which circulate once;
the control module counts one time for each cycle of 00, 01, 10, 11 pulse signals generated by the two magnetic switch sensors.
3. The magnetic sensor-based counter of claim 1, wherein the magnetic sensing module comprises four magnetic switch sensors, the magnet comprising one south pole magnet and one north pole magnet;
under the influence of a magnetic field generated by one rotation of the magnet, the four magnetic switch sensors jointly generate 000, 001, 010, 011, 100, 101, 110 and 111 pulse signals which circulate once;
the control module counts one time for each cycle of 000, 001, 010, 011, 100, 101, 110, 111 pulse signals generated by the four magnetic switch sensors.
4. A magnetic sensor based counter according to claim 2 or 3, wherein the south and north magnets are mounted on a rotating means for generating a periodically varying magnetic field upon rotation of the rotating means.
5. The magnetic sensor-based counter of claim 4, wherein the rotating means comprises a wind wheel, a connecting rod, and a turntable, the wind wheel and turntable being connected to the connecting rod, the connecting rod being located at a center of the turntable;
the south pole magnets and the north pole magnets are arranged on the turntable and symmetrically distributed relative to the connecting rod;
the wind wheel rotates under the action of the force of the counting object so as to drive the south pole magnet and the north pole magnet on the turntable to rotate.
6. The magnetic sensor-based counter of claim 5, wherein the magnetic sensing module comprises two magnetic switch sensors that are angled 90 ° from the center of the turntable.
7. The magnetic sensor-based counter of claim 5, wherein the magnetic sensing module comprises four magnetic switch sensors that are each spaced 45 ° apart from the center of the turntable.
8. The magnetic sensor-based counter of claim 1, wherein the square wave duty cycle of the pulse signal generated by the magnetic switch sensor is 0.5.
9. The magnetic sensor-based counter of claim 1, wherein the magnetic switch sensor is a TMR magnetic switch sensor.
10. The magnetic sensor-based counter of claim 1, further comprising a display module for displaying the count number of the control module.
11. The magnetic sensor-based counter of claim 10, wherein the display module comprises an LED drive circuit and an LED light array;
and the LED driving circuit controls the on/off of the LED lamp array according to the logic signal output by the control module.
12. The magnetic sensor-based counter of claim 11, wherein the control module includes a clock unit for providing a logic signal for the LED driver circuit to drive the LED light array to go on and off in a time-sequential manner.
13. The magnetic sensor-based counter of claim 12, wherein the clock unit comprises a comparator, a flip-flop, and a selector;
the comparator is used for converting an analog signal generated by the magnetic switch sensor into a pulse signal;
the trigger is used for regulating and controlling the duty ratio of the pulse signal to obtain pulse periods with different frequency divisions;
the selector is used for selecting a corresponding frequency-divided pulse period to obtain a logic signal for driving the LED lamp array to be on or off in a time sequence.
14. The magnetic sensor-based counter of claim 13, wherein the flip-flop consists of two D flip-flops to obtain a divided-by-2 pulse period; or the flip-flop is composed of three D flip-flops and two nand gates to obtain a divided-by-6 pulse period.
15. A counting method, characterized in that it uses a magnetic sensor based counter according to any one of claims 1-14 for counting.
16. A chip comprising a magnetic sensor based counter according to any one of claims 1-14.
17. An electronic device comprising a magnetic sensor-based counter as claimed in any one of claims 1 to 14.
CN202311724785.2A 2023-12-14 2023-12-14 Counter, counting method, chip and electronic equipment Pending CN117829196A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311724785.2A CN117829196A (en) 2023-12-14 2023-12-14 Counter, counting method, chip and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311724785.2A CN117829196A (en) 2023-12-14 2023-12-14 Counter, counting method, chip and electronic equipment

Publications (1)

Publication Number Publication Date
CN117829196A true CN117829196A (en) 2024-04-05

Family

ID=90506998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311724785.2A Pending CN117829196A (en) 2023-12-14 2023-12-14 Counter, counting method, chip and electronic equipment

Country Status (1)

Country Link
CN (1) CN117829196A (en)

Similar Documents

Publication Publication Date Title
CN105043238A (en) Automobile steering wheel angle sensor and processing method for angle signal
CN204346515U (en) The electronic water meter flow sensor of rotating signal can be gathered
US20160084632A1 (en) Tamper detection through magnetic sensing
CN104634993A (en) Motor rotating direction and rotating speed detection device and method
CN103872851B (en) The rotating speed of electric rotating machine and displacement measurement system
CN102981016A (en) Processing system and method for detecting rotating speed of rotating object
CN103162725A (en) Photoelectric encoder rotating pulse display device
CN103033640B (en) Vehicle speed real-time detection method with field programmable gate array (FPGA)
CN202940701U (en) Rotation speed and displacement measurement system for rotation motor
CN104458762A (en) Digital optical fiber sensor-based detection method for quality of ABS gear ring
CN203785727U (en) Intelligent water meter and counting device thereof
Johnson et al. Optimization of incremental optical encoder pulse processing
CN117829196A (en) Counter, counting method, chip and electronic equipment
CN205861145U (en) A kind of with positive and negative function of measuring and the valve control intelligent water meter of dynamo-electric separate type
CN107643116B (en) Water meter rotating speed calibration method, system and device
Yu et al. A control system of three-axis stepper motor based on the FPGA
CN107218957B (en) Integrated electronic absolute value encoder device for electric door and window and data processing method thereof
US12055419B2 (en) Electronic rotary encoder
CN101413962B (en) Devices and methods for measuring high speed momentum wheel rotating speed
CN204286370U (en) Based on the ABS gear ring quality detection device of digital optic fiber sensor
CN204007505U (en) Hall-type angle measurement unit based on FPGA
CN207991629U (en) Two photoelectric tube flow sensor for countering
CN114383682A (en) Internet of things water meter based on magnetoresistive sensor
CN201576001U (en) Model vehicle speed measuring device adopting photoelectric encoder
CN202300375U (en) Drilling depth tester for roller-bit hole rig

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination