Magnetic lock
By combining the Hall sensor and pressure sensor with the single-chip control circuit, the problem of low pressure detection accuracy of traditional magnetic locks is solved, and high-precision pressure detection and alarm functions are achieved, which is suitable for the application of precise pressure products.
Patent Information
- Application Number
- CN202410668511.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-05-27
AI Technical Summary
The pressure detection accuracy of traditional magnetic locks is not high. It is affected by friction, springs, shrapnel and the accuracy of micro switches. It cannot be reset and can only send a single switch signal, and cannot provide a pressure alarm.
The Hall effect sensor and pressure sensor are combined with a single-chip microcomputer control circuit. Through analog-to-digital conversion and pre-processing circuits, accurate pressure detection and alarm of the magnetic lock are achieved, including current control, filtering, amplification, and decoupling processing. A 24-bit AD chip is used for high-precision pressure signal conversion.
It realizes high-precision pressure detection, automatic zeroing and resetting, high accuracy, good repeatability, simple circuit, good working stability, fast response speed, moderate cost, and is suitable for mass production.
Smart Images

Figure CN118622097B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of electronic circuits, and in particular to a magnetic lock. Background Art
[0002] Traditional magnetic locks detect pre-pressure mainly through structural design. The repeatability error is relatively large (±5%) and is affected by friction, springs, springs, and the accuracy of micro switches. In addition, the current pressure cannot be reset and can only send out open and close signals (a single signal, either open or closed). Therefore, it is impossible to alarm based on pressure. Summary of the Invention
[0003] In view of the above problems, embodiments of the present invention are proposed to provide a magnetic lock that overcomes the above problems or at least partially solves the above problems.
[0004] According to one aspect of an embodiment of the present invention, a magnetic lock is provided, comprising: an iron plate mounted on a door panel, an electromagnet mounted on a door frame, and a pull bolt mounted in the iron plate, the electromagnet having a slot opening on its engaging surface and extending to its bottom surface, a core shaft inserted into the slot and having a pressure sensor mounted at its end, a Hall sensor mounted on the surface of the electromagnet, and a control circuit connected to the pressure sensor, the Hall sensor, and the electromagnet, wherein the control circuit comprises: a preprocessing circuit, an analog-to-digital conversion circuit, and a single-chip microcomputer;
[0005] The Hall sensor is connected to the single-chip microcomputer and is used to send a locking success signal when the magnetic lock is powered on and the iron plate and the electromagnet are attracted;
[0006] The preprocessing circuit is connected to the single-chip microcomputer and is used to control the working current of the electromagnet according to the PWM pulse width modulation signal output by the single-chip microcomputer after the magnetic lock is powered on; and to filter, amplify, and decouple the working current of the electromagnet and output it to the single-chip microcomputer;
[0007] The single-chip microcomputer is used to read the locking success signal of the Hall sensor and clear the internally stored pressure according to the locking success signal; and read the digital pressure signal output by the analog-to-digital conversion circuit to determine whether the pressure signal is greater than or equal to a preset pressure threshold. If so, an alarm signal is issued; and read the operating current output by the preprocessing circuit and the operating voltage of the electromagnet, and adjust the duty cycle of the PWM pulse width modulation signal output to the preprocessing circuit according to the operating voltage and operating current;
[0008] The pressure sensor is used to drive the pull bolt to move when someone pushes the door, thereby moving the core shaft. When triggered by the movement of the core shaft, the pressure sensor detects the displacement pressure signal and converts the detected displacement pressure signal into an analog pressure signal.
[0009] The analog-to-digital conversion circuit is connected to the pressure sensor and the single-chip microcomputer, and is used to convert the analog pressure signal into a digital pressure signal and output it to the single-chip microcomputer.
[0010] Furthermore, the pre-processing circuit includes: a current control circuit connected to the single chip microcomputer, for controlling the working current of the electromagnet according to the PWM pulse width modulation signal output by the single chip microcomputer after the magnetic lock is powered on;
[0011] A filter circuit is connected to the current control circuit and is used to filter the working current output by the current control circuit;
[0012] an amplifier circuit, connected to the filter circuit, for amplifying the filtered working current;
[0013] The decoupling circuit is connected to the amplifying circuit and is used for decoupling the amplified working current and outputting it to the single chip microcomputer.
[0014] Furthermore, the current control circuit includes: an NMOS transistor, a diode, a magnetic coil, a resistor R3 and a resistor R4; wherein, the first end of the magnetic coil is connected to the power supply VCC, the second end of the magnetic coil is connected to the drain of the NMOS transistor, the drain of the NMOS transistor is connected to the positive electrode of the diode, and the negative electrode of the diode is connected to the first end of the magnetic coil; the gate of the NMOS transistor is connected to the first end of the resistor R3, the second end of the resistor R3 is connected to the single-chip microcomputer, the source of the NMOS transistor is connected to the first end of the resistor R4, and the second end of the resistor R4 is grounded; the source of the NMOS transistor is connected to the first end of the filter circuit.
[0015] Furthermore, the filter circuit is a π-type filter circuit, which is used to filter the PWM pulse width modulation signal in the working current, wherein the first end of the π-type filter circuit is connected to the current control circuit, the second end of the π-type filter circuit is connected to the amplifier circuit, and the third end of the π-type filter circuit is grounded.
[0016] Furthermore, the amplification circuit includes: an amplifier, a resistor R8, a resistor R11, and a capacitor C7; wherein the negative input terminal of the amplifier is connected to the second end of the filter circuit, the positive input terminal of the amplifier is connected to the second end of the resistor R8 and the first end of the resistor R11, the second end of the resistor R11 is connected to the third end of the filter circuit, and the output terminal of the amplifier and the first end of the resistor R8 are connected to the decoupling circuit.
[0017] Furthermore, the decoupling circuit includes: a resistor R6 and a capacitor C6; wherein the second end of the resistor R6 is connected to the output end of the amplifier and the first end of the resistor R8, the first end of the resistor R6 and the first end of the capacitor C6 are connected to the microcontroller, and the second end of the capacitor C6 is grounded.
[0018] Furthermore, the pressure sensor is a four-wire pressure sensor, wherein the first end of the first wire and the first end of the second wire are connected to the first end of the capacitor C1, and the second end of the capacitor C1 is grounded; the second end of the first wire is connected to the first end of the third wire and connected to the analog-to-digital conversion circuit; the second end of the second wire is connected to the first end of the fourth wire and connected to the analog-to-digital conversion circuit; the second end of the third wire and the second end of the fourth wire are grounded.
[0019] Furthermore, the analog-to-digital conversion circuit includes: a resistor R1, a resistor R2, a capacitor C3, and an AD chip; wherein, the first end of the resistor R1 is connected to the second end of the first wire and the first end of the third wire of the pressure sensor; the first end of the resistor R2 is connected to the second end of the second wire and the first end of the fourth wire; the second end of the resistor R1 and the first end of the capacitor C3 are connected to the AD chip; the second end of the resistor R2 and the second end of the capacitor C3 are connected to the AD chip, and the AD chip is connected to the microcontroller.
[0020] Furthermore, the magnetic lock also includes: a resistor R5, a resistor R7, and a capacitor C5, wherein a first end of the resistor R5 is connected to the power supply VCC, a second end of the resistor R5, a first end of the resistor R7, and a first end of the capacitor C5 are connected to the microcontroller; a second end of the resistor R7 and a second end of the capacitor C5 are grounded.
[0021] Furthermore, the operating voltage Vout of the electromagnet=the voltage value of the power supply VCC×(the resistance value of the resistor R7 / (the resistance value of the resistor R7+the resistance value of the resistor R5)).
[0022] The magnetic lock provided according to the embodiment of the present invention can linearly read the current pressure with high accuracy, and can automatically clear and reset, ensuring accuracy and repeatability (±1%). In addition, the circuit is simple, the working stability is good, the response speed is fast, the accuracy is high, the cost is moderate, and it is suitable for mass production.
[0023] The above description is only an overview of the technical solutions of the embodiments of the present invention. In order to more clearly understand the technical means of the embodiments of the present invention, they can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiments of the present invention more obvious and easy to understand, the specific implementation methods of the embodiments of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the embodiments of the present invention. The same reference numerals are used throughout the accompanying drawings to denote the same components. In the accompanying drawings:
[0025] Figure 1A circuit diagram of a magnetic lock according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0026] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0027] An embodiment of the present invention provides a magnetic lock, which includes: an iron plate mounted on a door panel, an electromagnet mounted on a door frame, and a pull bolt mounted in the iron plate; the electromagnet has a slot opening on its engaging surface and extending to its bottom surface; a core shaft is inserted into the slot and a pressure sensor is mounted at the end thereof; a Hall sensor is disposed on the surface of the electromagnet; and a control circuit connected to the pressure sensor, the Hall sensor, and the electromagnet, wherein the control circuit includes: a preprocessing circuit, an analog-to-digital conversion circuit, and a single-chip microcomputer;
[0028] The Hall sensor is connected to the single-chip microcomputer and is used to send a locking success signal when the magnetic lock is powered on and the iron plate and the electromagnet are attracted;
[0029] The preprocessing circuit is connected to the single-chip microcomputer and is used to control the working current of the electromagnet according to the PWM pulse width modulation signal output by the single-chip microcomputer after the magnetic lock is powered on; and to filter, amplify, and decouple the working current of the electromagnet and output it to the single-chip microcomputer;
[0030] The single-chip microcomputer is used to read the locking success signal of the Hall sensor and clear the internally stored pressure according to the locking success signal; and read the digital pressure signal output by the analog-to-digital conversion circuit to determine whether the pressure signal is greater than or equal to a preset pressure threshold. If so, an alarm signal is issued; and read the operating current output by the preprocessing circuit and the operating voltage of the electromagnet, and adjust the duty cycle of the PWM pulse width modulation signal output to the preprocessing circuit according to the operating voltage and operating current;
[0031] The pressure sensor is used to drive the pull bolt to move when someone pushes the door, thereby moving the core shaft. When triggered by the movement of the core shaft, the pressure sensor detects the displacement pressure signal and converts the detected displacement pressure signal into an analog pressure signal.
[0032] The analog-to-digital conversion circuit is connected to the pressure sensor and the single-chip microcomputer, and is used to convert the analog pressure signal into a digital pressure signal and output it to the single-chip microcomputer.
[0033] Figure 1 FIG. 1 shows a circuit diagram of a magnetic lock according to an embodiment of the present invention. Figure 1As shown, the circuit includes: an iron plate installed on the door panel, an electromagnet installed on the door frame, and a pull bolt installed in the iron plate. The electromagnet has a slot that opens on its suction surface and extends to its bottom surface. A core shaft is inserted into the slot and a pressure sensor is installed at the end. A Hall sensor is arranged on the surface of the electromagnet, and a control circuit connected to the pressure sensor, the Hall sensor, and the electromagnet. The control circuit includes: a current control circuit, a filter circuit, an amplification circuit, a decoupling circuit, an analog-to-digital conversion circuit, and a single-chip microcomputer.
[0034] The Hall sensor is connected to the first pin of the microcontroller and is used to send a locking success signal when the magnetic lock is powered on and the iron plate and the electromagnet are attracted.
[0035] The current control circuit is connected to the single chip microcomputer and is used to control the working current of the electromagnet according to the PWM pulse width modulation signal output by the single chip microcomputer after the magnetic lock is powered on.
[0036] The current control circuit includes: an NMOS transistor, a diode, a magnetic coil, a resistor R3 and a resistor R4; wherein the first end of the magnetic coil is connected to the power supply VCC, the second end of the magnetic coil is connected to the drain of the NMOS transistor, the drain of the NMOS transistor is connected to the positive electrode of the diode, and the negative electrode of the diode is connected to the first end of the magnetic coil; the gate of the NMOS transistor is connected to the first end of the resistor R3, the second end of the resistor R3 is connected to the 6th pin of the microcontroller, the source of the NMOS transistor is connected to the first end of the resistor R4, and the second end of the resistor R4 is grounded; the source of the NMOS transistor is connected to the first end of the filter circuit.
[0037] The filter circuit is connected to the current control circuit and is used for filtering the working current output by the current control circuit.
[0038] Among them, the filter circuit can be a π-type filter circuit, which is used to filter the PWM pulse width modulation signal in the working current, wherein the first end of the π-type filter circuit is connected to the current control circuit, the second end of the π-type filter circuit is connected to the amplifier circuit, and the third end of the π-type filter circuit is grounded.
[0039] The π-type filter circuit mainly includes: resistor R9, resistor R10, capacitor C8, and capacitor C9. The first end of resistor R10 is connected to the source of the NMOS tube, the second end of resistor R10 is connected to the second end of resistor R9 and the first end of capacitor C9, the first end of capacitor R9 is connected to the first end of capacitor C8 and connected to the amplifier circuit, and the second end of capacitor C8 and the second end of capacitor C9 are grounded.
[0040] The amplifier circuit is connected to the filter circuit and is used to amplify the working current after filtering.
[0041] The amplification circuit includes: an amplifier, a resistor R8, a resistor R11, and a capacitor C7; wherein the negative input terminal of the amplifier is connected to the second end of the filter circuit, the positive input terminal of the amplifier is connected to the second end of the resistor R8 and the first end of the resistor R11, the second end of the resistor R11 is connected to the third end of the filter circuit, and the output terminal of the amplifier and the first end of the resistor R8 are connected to the decoupling circuit.
[0042] The decoupling circuit is connected to the amplifying circuit and is used for decoupling the amplified working current and outputting it to the single chip microcomputer.
[0043] The decoupling circuit includes: a resistor R6 and a capacitor C6; wherein the second end of the resistor R6 is connected to the output end of the amplifier and the first end of the resistor R8, the first end of the resistor R6 and the first end of the capacitor C6 are connected to the 5th pin of the microcontroller, and the second end of the capacitor C6 is grounded.
[0044] The microcontroller is used to read the successful lock signal from the Hall effect sensor and clear the internally stored pressure based on the successful lock signal. It also reads the digital pressure signal output by the analog-to-digital conversion circuit to determine whether the pressure signal is greater than or equal to a preset pressure threshold. If so, it issues an alarm signal. It also reads the operating current output by the preprocessing circuit and the operating voltage of the electromagnet, adjusting the duty cycle of the PWM signal output to the preprocessing circuit based on the operating voltage and current. Pin 4 of the microcontroller is grounded. Pin 2 of the microcontroller is connected to the first terminal of capacitor C4, and the second terminal of capacitor C4 is grounded. The microcontroller model can be STC8G1K08-08.
[0045] The pressure sensor is used to drive the pull bolt to move and then move the core shaft when someone pushes the door. When triggered by the movement of the core shaft, the displacement pressure signal is detected and converted into an analog pressure signal.
[0046] Among them, the pressure sensor is a four-wire pressure sensor, as shown in the dotted box part in 1, wherein the first end of the first wire and the first end of the second wire are connected to the first end of the capacitor C1, and the second end of the capacitor C1 is grounded; the second end of the first wire is connected to the first end of the third wire and connected to the analog-to-digital conversion circuit; the second end of the second wire is connected to the first end of the fourth wire and connected to the analog-to-digital conversion circuit; the second end of the third wire and the second end of the fourth wire are grounded.
[0047] The analog-to-digital conversion circuit is connected to the pressure sensor and the single-chip microcomputer, and is used to convert the analog pressure signal into a digital pressure signal and output it to the single-chip microcomputer.
[0048] The analog-to-digital conversion circuit includes: a resistor R1, a resistor R2, a capacitor C3, and an AD chip; wherein the first end of the resistor R1 is connected to the second end of the first wire of the pressure sensor and the first end of the third wire; the first end of the resistor R2 is connected to the second end of the second wire and the first end of the fourth wire; the second end of the resistor R1 and the first end of the capacitor C3 are connected to the differential signal negative input terminal (INN) of the AD chip; the second end of the resistor R2 and the second end of the capacitor C3 are connected to the differential signal positive input terminal (INP) of the AD chip, and the VREF pin (A / The ADC chip's DOUT pin (serial data output pin) is connected to pin 7 of the microcontroller, and its PD_SCK pin (power-off and serial clock input pin) is connected to pin 8 of the microcontroller. The ADC chip's AGND pin is grounded, and its VOUT pin (power output pin) is connected to its VREF pin. The ADC chip's VDD pin is connected to the first end of capacitor C2, the second end of capacitor C2 is grounded, and the ADC chip's VDD pin (power input pin) is connected to power supply VDD. The ADC chip is a 24-bit chip, such as the HX710C. When the pressure sensor detects pressure, it converts the displacement pressure signal into an analog pressure signal and outputs it to the negative and positive differential signal inputs of the ADC chip. The ADC chip then converts the analog pressure signal into a digital pressure signal and outputs it to the microcontroller.
[0049] In addition, the magnetic lock also includes: a resistor R5, a resistor R7, and a capacitor C5, wherein the first end of the resistor R5 is connected to the power supply VCC, the second end of the resistor R5, the first end of the resistor R7, and the first end of the capacitor C5 are connected to the third pin of the microcontroller; the second end of the resistor R7 and the second end of the capacitor C5 are grounded.
[0050] The following combination Figure 1 Briefly describe the working principle of magnetic lock:
[0051] Solenoid normal locking mode
[0052] When the magnetic lock is powered on, the voltage VCC passes through the magnetic coil MAG1 to the drain D of Q1 (NMOS tube). The gate G inputs the PWM pulse width modulation signal to control the current working current of the electromagnet. When the iron plate and the magnet block are attracted, the Hall sensor is triggered. The Hall sensor sends a locking success signal to inform the microcontroller that the lock has been successfully locked. The microcontroller can then reset the current pressure.
[0053] Electromagnet working current acquisition, filtering and amplification
[0054] The current is sampled through resistor R4 (0.1Ω). The current flowing through the resistor from source S = V / 0.1 ohm = A. Each MV of the current calculated represents 10 mA. After the 12 kHz fundamental frequency is filtered out by the π-type filter R9-R10 and C8-C9, the signal is amplified. The amplification calculation method is Vout = ((resistance value of resistor R8 / resistance value of resistor R11) + 1) × voltage value of Vin). The amplifier output voltage is decoupled through R6 and C6 and then reaches pin 5 of the microcontroller. Here, the voltage is used to infer the operating current of the electromagnet. The microcontroller performs software filtering calculations inside to ensure the accuracy of the read current.
[0055] Reading of electromagnet working voltage
[0056] The electromagnet operating voltage Vout = the voltage value of the power supply VCC × (the resistance value of the resistor R7 / (the resistance value of the resistor R7 + the resistance value of the resistor R5)), and the voltage value of the electromagnet operating voltage is read out by the single chip microcomputer.
[0057] Control of electromagnet working current
[0058] By reading the current working voltage value of the electromagnet (input from the 3rd pin of the microcontroller U2) and the working current value of the electromagnet (input from the 5th pin of the microcontroller U2), the voltage + current PID closed loop is controlled to adjust the duty cycle of the PWM pulse width modulation signal, which is output through the 6th pin of the microcontroller U2, thereby adjusting the working current of the electromagnet;
[0059] Stress warning detection:
[0060] When the magnetic lock is in the normal locked state (the iron plate and the magnet are electrically engaged), the Hall effect sensor is triggered, signaling a successful lock. The microcontroller then resets the current pressure. When someone pushes the door, it activates the pull bolt, which in turn moves the spindle. This movement triggers the pressure sensor. The greater the displacement, the greater the pressure change. The pressure signal is transmitted to the microcontroller via an AD chip connected to the pressure sensor. The microcontroller compares the pressure with a preset threshold. When the threshold is reached, it issues an alarm, such as an audible or visual alarm. This alarm signal can then control the corresponding alarm device.
[0061] The circuit provided in accordance with the embodiment of the present invention adopts a high-precision pressure sensor and a 24-bit AD chip, which can detect a minimum of 1 gram and a maximum of 20 kg. It linearly outputs the current pressure data and can automatically clear the current data. It has the advantages of small cumulative error, high precision, and high repetition rate. It can be used in products with relatively precise pre-pressure. In addition, the circuit is simple, has good working stability, fast response speed, high precision, and moderate cost, and is suitable for mass production.
[0062] It should be noted that, in the present invention, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not represent any actual relationship or order between the entities or operations.
[0063] The illustrations provided herein are merely schematic illustrations of the basic concept of the present invention. The illustrations only show components relevant to the present invention and are not drawn according to the number, shape, and size of components in actual implementation. In actual implementation, the type, quantity, and proportion of each component may be varied arbitrarily, and the component layout may also be more complex.
[0064] The "connection" in the present invention includes both direct connection and indirect connection, such as connection through some active devices, passive devices or electrically conductive media; it may also include connection through other active devices or passive devices on the basis of achieving the same or similar functional purposes as is well known to those skilled in the art, such as connection through circuits or components such as switches and follower circuits.
[0065] The description and application of the present invention here are illustrative and are not intended to limit the scope of the present invention to the above-described embodiments. The effects or advantages involved in the embodiments may not be embodied in the embodiments due to interference from various factors, and the description of the effects or advantages is not used to limit the embodiments. Variations and changes to the embodiments disclosed here are possible, and the replacement of the embodiments and various equivalent components are well known to those of ordinary skill in the art. It should be clear to those skilled in the art that the present invention can be implemented in other forms, structures, arrangements, proportions, and with other components, materials, and parts without departing from the spirit or essential characteristics of the present invention. Other variations and changes can be made to the embodiments disclosed here without departing from the scope and spirit of the present invention.
Claims
1. A magnetic lock, characterized in that: include: An iron plate mounted on the door panel, an electromagnet mounted on the door frame, and a pull bolt mounted in the iron plate, wherein the electromagnet has a slot opening on its engaging surface and extending to its bottom surface, a core shaft is inserted into the slot and a pressure sensor is mounted at the end thereof, a Hall sensor is arranged on the surface of the electromagnet, and a control circuit connected to the pressure sensor, the Hall sensor, and the electromagnet, wherein the control circuit includes: a preprocessing circuit, an analog-to-digital conversion circuit, and a single-chip microcomputer; A Hall sensor is connected to the single chip microcomputer and is used to send a locking success signal when the magnetic lock is powered on and the iron plate and the electromagnet are attracted; A preprocessing circuit is connected to the single-chip microcomputer and is used to control the working current of the electromagnet according to the PWM pulse width modulation signal output by the single-chip microcomputer after the magnetic lock is powered on; and to filter, amplify, and decouple the working current of the electromagnet and output it to the single-chip microcomputer; A single-chip microcomputer is configured to read a locking success signal from a Hall sensor and clear an internally stored pressure based on the locking success signal; read a digital pressure signal output by an analog-to-digital conversion circuit, determine whether the pressure signal is greater than or equal to a preset pressure threshold, and if so, issue an alarm signal; and read an operating current output by a preprocessing circuit and an operating voltage of an electromagnet, and adjust a duty cycle of a PWM pulse width modulation signal output to the preprocessing circuit based on the operating voltage and the operating current; The pressure sensor is used to drive the pull bolt to move when someone pushes the door, thereby moving the core shaft. When triggered by the movement of the core shaft, the pressure sensor detects the displacement pressure signal and converts the detected displacement pressure signal into an analog pressure signal. The analog-to-digital conversion circuit is connected to the pressure sensor and the single-chip microcomputer, and is used to convert the analog pressure signal into a digital pressure signal and output it to the single-chip microcomputer.
2. The magnetic lock according to claim 1, characterized in that: The pre-processing circuit includes: a current control circuit connected to the single chip microcomputer, used to control the working current of the electromagnet according to the PWM pulse width modulation signal output by the single chip microcomputer after the magnetic lock is powered on; a filter circuit, connected to the current control circuit, for filtering the operating current output by the current control circuit; an amplifier circuit, connected to the filter circuit, for amplifying the filtered working current; The decoupling circuit is connected to the amplifying circuit and is used for decoupling the amplified working current and outputting it to the single chip microcomputer.
3. The magnetic lock according to claim 2, characterized in that: The current control circuit includes: an NMOS transistor, a diode, a magnetic coil, a resistor R3 and a resistor R4; wherein, the first end of the magnetic coil is connected to the power supply VCC, the second end of the magnetic coil is connected to the drain of the NMOS transistor, the drain of the NMOS transistor is connected to the positive electrode of the diode, and the negative electrode of the diode is connected to the first end of the magnetic coil; the gate of the NMOS transistor is connected to the first end of the resistor R3, the second end of the resistor R3 is connected to the single-chip microcomputer, the source of the NMOS transistor is connected to the first end of the resistor R4, and the second end of the resistor R4 is grounded; the source of the NMOS transistor is connected to the first end of the filter circuit.
4. The magnetic lock according to claim 2 or 3, characterized in that: The filter circuit is a π-type filter circuit, which is used to filter the PWM pulse width modulation signal in the working current, wherein the first end of the π-type filter circuit is connected to the current control circuit, the second end of the π-type filter circuit is connected to the amplifier circuit, and the third end of the π-type filter circuit is grounded.
5. The magnetic lock according to claim 2 or 3, characterized in that: The amplifying circuit includes: an amplifier, a resistor R8, a resistor R11, and a capacitor C7; wherein the negative input terminal of the amplifier is connected to the second terminal of the filter circuit, the positive input terminal of the amplifier is connected to the second terminal of the resistor R8 and the first terminal of the resistor R11, the second terminal of the resistor R11 is connected to the third terminal of the filter circuit, and the output terminal of the amplifier and the first terminal of the resistor R8 are connected to the decoupling circuit.
6. The magnetic lock according to claim 5, characterized in that: The decoupling circuit includes: a resistor R6 and a capacitor C6; wherein the second end of the resistor R6 is connected to the output end of the amplifier and the first end of the resistor R8, the first end of the resistor R6 and the first end of the capacitor C6 are connected to the microcontroller, and the second end of the capacitor C6 is grounded.
7. The magnetic lock according to any one of claims 1 to 3, characterized in that: The pressure sensor is a four-wire pressure sensor, wherein the first end of the first wire and the first end of the second wire are connected to the first end of the capacitor C1, and the second end of the capacitor C1 is grounded; the second end of the first wire is connected to the first end of the third wire and connected to the analog-to-digital conversion circuit; the second end of the second wire is connected to the first end of the fourth wire and connected to the analog-to-digital conversion circuit; the second end of the third wire and the second end of the fourth wire are grounded.
8. The magnetic lock according to claim 7, characterized in that: The analog-to-digital conversion circuit includes: a resistor R1, a resistor R2, a capacitor C3, and an AD chip; wherein the first end of the resistor R1 is connected to the second end of the first wire and the first end of the third wire of the pressure sensor; the first end of the resistor R2 is connected to the second end of the second wire and the first end of the fourth wire; the second end of the resistor R1 and the first end of the capacitor C3 are connected to the AD chip; the second end of the resistor R2 and the second end of the capacitor C3 are connected to the AD chip, and the AD chip is connected to the single-chip microcomputer.
9. The magnetic lock according to any one of claims 1 to 3, characterized in that: The magnetic lock further includes: a resistor R5, a resistor R7, and a capacitor C5, wherein a first end of the resistor R5 is connected to a power supply VCC, a second end of the resistor R5, a first end of the resistor R7, and a first end of the capacitor C5 are connected to the single-chip microcomputer; and a second end of the resistor R7 and a second end of the capacitor C5 are grounded.
10. The magnetic lock according to claim 9, characterized in that: The operating voltage Vout of the electromagnet = the voltage value of the power supply VCC × (the resistance value of the resistor R7 / (the resistance value of the resistor R7 + the resistance value of the resistor R5)).
Citation Information
Patent Citations
Energy-saving magnetic lock
CN102943592A
Intelligent lockset
CN206753250U