Electronic lock control device and method, storage medium and computer equipment

By using the current sampling module and detection module in the charging pile electronic lock, the problem of inaccurate unlocking status is solved, the accuracy of state recognition and system stability are improved, the phenomenon of virtual unlocking is avoided, and the user experience is improved and charging pile performance.

CN119296211APending Publication Date: 2025-01-10SHENZHEN ENDLESS WATT DIGITAL ENERGY CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411508340.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The unlocking status of existing charging pile electronic locks is inaccurate, resulting in virtual unlocking, affecting user experience and security.

Method used

By setting up a current sampling module between the motor drive module and the motor, collect the motor drive current generated when the motor drive signal is driven, and use the current detection module to determine whether the electronic lock is locked or unlocked, so as to avoid excessive short circuit current to damage the control circuit .

Benefits of technology

It improves the accuracy of electronic lock status recognition, enhances the stability and reliability of the system, avoids virtual unlocking, reduces operation inconvenience and equipment wear, and improves user experience and charging pile performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119296211A_ABST
    Figure CN119296211A_ABST
Patent Text Reader

Abstract

The invention discloses an electronic lock control device and method, a storage medium and computer equipment. The device comprises a controller used for responding to a locking instruction or an unlocking instruction of an electronic lock and outputting a motor control signal; the motor driving module is connected with the controller and is used for receiving the motor control signal and outputting a motor driving signal; the motor is connected with the motor driving module and is used for operating based on the motor driving signal so as to drive a locking mechanism of the electronic lock to move; the current sampling module is connected between the motor driving module and the motor and is used for collecting motor driving current generated when the motor driving signal drives the motor; and the current detection module is connected with the current sampling module and the controller and is used for detecting the motor driving current and sending a detection signal of the motor driving current to the controller, so that the controller judges whether the electronic lock is locked in place or unlocked in place according to the detection signal of the motor driving current. The device can improve the state recognition accuracy of the electronic lock.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automatic control technology, and in particular to an electronic lock control device, method, storage medium and computer equipment. Background Art

[0002] With the popularity of electric vehicles, the demand for electric vehicle charging piles is also growing. In the design and use of charging piles, it is crucial to ensure the safety of the charging process. Especially when the charging current reaches or exceeds 20 amperes, in order to prevent safety hazards caused by accidental disconnection, the charging pile needs to be equipped with a locking function to fix the charging gun, so as to avoid accidental unplugging due to external force during the charging process.

[0003] At present, most charging piles use electronic locks to achieve this function. In related technologies, the electronic lock status feedback mechanism mainly relies on the travel switch to determine the status of the electronic lock. However, although this method can detect whether the bolt is locked in place when locking, during the unlocking process, the electronic lock bolt usually only needs to move a very short distance to trigger the travel switch. At this time, the control device will mistakenly report that the unlocking is successful, resulting in the bolt not actually completely exiting the lock hole, which causes the phenomenon of "virtual unlocking".

[0004] In this case, even if the system shows that it is unlocked, the user may find it difficult to unplug the charging gun, or may forcibly unplug the gun without fully unlocking it, which may cause damage to the charging port. This not only affects the user experience, but may also bring certain safety hazards. Summary of the invention

[0005] In view of this, the embodiments of the present application provide an electronic lock control device, method, storage medium and computer equipment, the main purpose of which is to solve the technical problem of inaccurate identification of the unlocking state of the electronic lock.

[0006] According to one aspect of the present application, there is provided an electronic lock control device, the device comprising:

[0007] A controller, used to respond to a locking instruction or an unlocking instruction of the electronic lock and output a motor control signal;

[0008] A motor driving module, connected to the output end of the controller, for receiving the motor control signal and outputting a motor driving signal;

[0009] a motor connected to the output end of the motor drive module and configured to operate based on the motor drive signal to drive the locking mechanism of the electronic lock to move so that the electronic lock is in a locked state or an unlocked state;

[0010] A current sampling module, connected between the output end of the motor driving module and the input end of the motor, for collecting the motor driving current generated when the motor driving signal drives the motor;

[0011] A current detection module is connected to the output end of the current sampling module and the input end of the controller, and is used to detect the motor drive current and send the detection signal of the motor drive current to the controller, so that the controller determines whether the electronic lock is locked or unlocked according to the detection signal of the motor drive current.

[0012] Optionally, the current sampling module includes a sampling resistor, wherein the sampling resistor is connected between the output end of the motor driving module and the input end of the motor, and both ends of the sampling resistor are connected to the input end of the current detection module as the output end of the current sampling module.

[0013] Optionally, the current detection module includes a differential amplifier consisting of an operational amplifier and a plurality of resistors and a first reference power supply, wherein the negative input terminal of the differential amplifier is connected to the first output terminal of the current sampling module, the positive input terminal of the differential amplifier is connected to the second output terminal of the current sampling module, the positive input terminal of the differential amplifier is also connected to the first reference power supply, and the output terminal of the operational amplifier is connected to the input terminal of the controller.

[0014] Optionally, the output end of the operational amplifier is connected to the analog-to-digital conversion input end of the controller, and the operational amplifier is used to input the detection signal of the motor drive current into the controller; or, the current detection module also includes an analog-to-digital converter, the input end of the analog-to-digital converter is connected to the output end of the operational amplifier, and the output end is connected to the input end of the controller; the analog-to-digital converter is used to convert the detection signal of the motor drive current into a digital signal and input it into the controller.

[0015] Optionally, the electronic lock control device also includes a timing detection module, wherein the input end of the timing detection module is connected to the output end of the current detection module, and the output end is connected to the timer input end of the controller; the timing detection module is used to detect the timing detection signal when the electronic lock is in a locked state or an unlocked state, and send the timing detection signal to the controller.

[0016] Optionally, the timing detection module includes a voltage follower, a first comparator, a second comparator, a second reference power supply and a third reference power supply; the voltage of the second reference power supply is greater than the voltage of the first reference power supply, and the voltage of the first reference power supply is greater than the voltage of the third reference power supply, wherein the positive input terminal of the voltage follower is connected to the output terminal of the current detection module, and the negative input terminal of the voltage follower is connected to the output terminal of the voltage follower; the output terminal of the voltage follower is also connected to the positive input terminal of the first comparator, the negative input terminal of the first comparator is connected to the second reference power supply, and the output terminal of the first comparator is connected to the first timer input terminal of the controller; the output terminal of the voltage follower is also connected to the negative input terminal of the second comparator, the positive input terminal of the second comparator is connected to the third reference power supply, and the output terminal of the second comparator is connected to the second timer input terminal of the controller.

[0017] Optionally, the electronic lock control device also includes at least one filtering module; the filtering module is arranged between the output end of the voltage follower and the positive input end of the first comparator; and / or the filtering module is arranged between the output end of the voltage follower and the negative input end of the second comparator; and / or the filtering module is arranged between the output end of the current detection module and the input end of the controller.

[0018] Optionally, the electronic lock control device is arranged in the charging terminal, and the controller is communicatively connected to the signal display module of the charging terminal; the controller is also used to send an electronic lock status signal to the signal display module, so that the signal display module displays at least one of the locked state, unlocked state, locked in place state and unlocked in place state of the electronic lock.

[0019] Optionally, the electronic lock control device also includes a first energy storage module and a second energy storage module; the first energy storage module is connected between the power supply end and the power supply end of the motor drive module, and is used to provide power to the motor drive module when the electronic lock loses power; the second energy storage module is connected between the output end of the controller and the input end of the motor drive module, and is used to provide the motor control signal to the motor drive module when the electronic lock loses power.

[0020] Optionally, the first energy storage module includes a first diode, a first current limiting resistor and a first energy storage capacitor, wherein the anode end of the first diode is connected to the power supply end, the cathode end of the first diode is connected to the first end of the first current limiting resistor, the second end of the first current limiting resistor is connected to the first end of the first energy storage capacitor and the power supply end of the motor drive module, and the second end of the first energy storage capacitor is grounded.

[0021] Optionally, the second energy storage module includes a second diode, a second current limiting resistor, a second energy storage capacitor and a discharge resistor, wherein the anode terminal of the second diode is connected to the output terminal of the controller, the cathode terminal of the second diode is connected to the first end of the second current limiting resistor, the second end of the second current limiting resistor is connected to the first end of the second energy storage capacitor and the first end of the discharge resistor, the second end of the discharge resistor is connected to the input terminal of the motor drive module, and the second end of the second energy storage capacitor is grounded.

[0022] Optionally, the output end of the controller includes a first output end and a second output end, wherein the controller responds to a locking instruction of the electronic lock, controls the first output end to output a high level, and controls the second output end to output a low level, so as to output a locked motor control signal; the controller responds to an unlocking instruction of the electronic lock, controls the first output end to output a low level, and controls the second output end to output a high level, so as to output an unlocking motor control signal; the second energy storage module is connected between the second output end of the controller and the input end of the motor drive module.

[0023] Optionally, when the controller is configured for the power-off unlocking function, if the electronic lock is locked in place, the first output terminal and the second output terminal are controlled to output a high level so that the electronic lock performs an unlocking action when the power is off; when the controller is configured for the power-off locking function, if the electronic lock is locked in place, the first output terminal and the second output terminal are controlled to output a low level so that the electronic lock remains in a locked state when the power is off.

[0024] Optionally, the electronic lock control device also includes a discharge and protection module, wherein the discharge and protection module is arranged between the first output end of the control end and the first input end of the motor drive module; the discharge and protection module is used to limit the signal strength of the motor control signal and speed up the release of the motor control signal when the electronic lock loses power.

[0025] Optionally, the discharge and protection module includes a third diode and a third current limiting resistor, wherein the cathode end of the third diode and the first end of the third current limiting resistor are connected to the first output end of the controller, and the anode end of the third diode and the second end of the third current limiting resistor are connected to the first input end of the motor drive module.

[0026] According to another aspect of the present application, an electronic lock control method is provided, which is applied to any of the electronic lock control devices described above, and the method includes:

[0027] In response to receiving a locking instruction or an unlocking instruction of the electronic lock, outputting a motor control signal to the motor drive module to put the electronic lock in a locked state or an unlocked state;

[0028] When the electronic lock is in a locked state or an unlocked state, receiving a detection signal of a motor driving current generated when the motor driving module drives the motor;

[0029] Based on the detection signal of the motor drive current, the time taken for the motor drive current to increase from an initial current value to a preset first current threshold is recorded, and when it is detected that the time is greater than or equal to the first preset time, it is determined that the electronic lock is locked in place or unlocked in place.

[0030] Optionally, the detection signal based on the motor drive current records the time taken for the motor drive current to increase from an initial current value to a preset first current threshold, including: in response to receiving the detection signal of the motor drive current sent by the current detection module, recording the time taken for the motor drive current to increase from the initial current value to the preset first current threshold through the value of the detection signal; and / or, in response to receiving a timing detection signal sent by the timing detection module indicating that the electronic lock is in a locked state or an unlocked state, recording the time taken for the motor drive current to increase from the initial current value to the preset first current threshold through the timing detection signal.

[0031] Optionally, the method further includes: after determining that the electronic lock is locked in place or unlocked in place, stopping outputting the motor control signal, and outputting an indication signal of locking in place or unlocking in place.

[0032] Optionally, the method further includes: when it is detected that the motor drive current is greater than a preset second current threshold for more than a second preset time period, outputting an overcurrent alarm signal, and / or stopping outputting the motor control signal.

[0033] Optionally, the method further includes: when it is detected that the time taken for the motor drive current to increase from the initial current value to the first current threshold is less than the first preset time, outputting an electronic lock stall alarm signal, and / or stopping outputting the motor control signal.

[0034] Optionally, the motor control signal includes a first control signal and a second control signal; the response to receiving a locking instruction or an unlocking instruction of the electronic lock, outputting the motor control signal to the motor drive module to put the electronic lock in a locked state or an unlocked state, including: in response to receiving a locking instruction of the electronic lock, outputting a high-level first control signal and a low-level second control signal to the motor drive module to put the electronic lock in a locked state; in response to receiving an unlocking instruction of the electronic lock, outputting a low-level first control signal and a high-level second control signal to the motor drive module to put the electronic lock in an unlocked state.

[0035] Optionally, the method also includes: in response to receiving a power-off unlocking configuration instruction, when it is determined that the electronic lock is locked in place, outputting a high-level first control signal and a high-level second control signal to the motor drive module, so that the electronic lock performs an unlocking action when the power is off; in response to receiving a power-off locking configuration instruction, when it is determined that the electronic lock is locked in place, outputting a low-level first control signal and a low-level second control signal to the motor drive module, so that the electronic lock remains in a locked state when the power is off.

[0036] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned electronic lock control method is implemented.

[0037] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned electronic lock control method when executing the program.

[0038] By means of the above technical scheme, the embodiment of the present application provides an electronic lock control device, method, storage medium and computer equipment. The above electronic lock control device can collect the motor drive current generated when the motor drive signal drives the motor by setting a current sampling module between the motor drive module and the motor, so that the controller can judge whether the electronic lock is locked or unlocked in place according to the detection signal of the motor drive current. On the one hand, by using the stall current to detect the unlocking state, and the current in the monitoring circuit to avoid the short-circuit current from damaging the control circuit, the above electronic lock control device judges the unlocking state of the electronic lock by detecting the change of the motor drive current, which not only improves the accuracy of state recognition, but also enhances the stability and reliability of the system. The above device can effectively avoid the occurrence of the "virtual unlocking" phenomenon, reduce the inconvenience of operation and equipment wear caused by misjudgment, and effectively improve the user experience and the overall performance of the charging pile. Compared with the traditional judgment method of the travel switch, the detection method based on the current change of the above device is more reliable and accurate. On the other hand, the control of the energy storage circuit and the state delay cooperate to realize the control of whether the electronic lock is unlocked after power failure, which improves the user experience.

[0039] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it 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 present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0041] Figure 1 A circuit structure diagram of an electronic lock control device provided by the prior art is shown;

[0042] Figure 2 A schematic diagram of the module structure of an electronic lock control device provided in an embodiment of the present application is shown;

[0043] Figure 3 A circuit structure diagram of an electronic lock control device provided in an embodiment of the present application is shown;

[0044] Figure 4 A schematic diagram of the module structure of an electronic lock control device provided in an embodiment of the present application is shown;

[0045] Figure 5 A circuit structure diagram of an electronic lock control device provided in an embodiment of the present application is shown;

[0046] Figure 6 A schematic diagram of the module structure of an electronic lock control device provided in an embodiment of the present application is shown;

[0047] Figure 7 A schematic diagram of the module structure of an electronic lock control device provided in an embodiment of the present application is shown;

[0048] Figure 8 A circuit structure diagram of an electronic lock control device provided in an embodiment of the present application is shown;

[0049] Fig. 9 A schematic diagram of a flow chart of an electronic lock control method provided in an embodiment of the present application is shown;

[0050] Fig.10 A schematic diagram of a flow chart of another electronic lock control method provided in an embodiment of the present application is shown;

[0051] Fig.11 A flow chart of another electronic lock control method provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0052] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0053] In the field of electric vehicle charging infrastructure, especially for charging pile systems equipped with gun holder versions, when the charging current reaches or exceeds the high-power charging requirement of 20A, for safety reasons, the charging pile needs to implement a charging gun locking mechanism during the charging process to ensure the stability and safety of the charging process. Figure 1 As shown, the electronic lock system is equipped with a controller, a motor drive module and a motor M. Among them, the controller can send a motor control signal to the motor drive module through signal lines CTR1 and CTR2, and the motor drive module can send a drive signal according to the motor control signal to drive the motor M to operate, thereby driving the locking mechanism of the electronic lock to move, so that the electronic lock is in a locked state or an unlocked state. At this time, there are components in the electronic lock system that can provide feedback signals of locking and unlocking to the controller, and these signals mainly depend on the triggering of the travel switch. However, this electronic lock state recognition method cannot accurately distinguish whether the electronic lock has been fully unlocked, and can only roughly judge the state of the lock by the change in the travel of the pin, resulting in the problem of "virtual unlocking". The existence of this problem not only affects the normal use of the charging pile, but may also cause unnecessary wear on the charging interface of the electric vehicle, reducing the overall user experience and reliability of the charging pile.

[0054] In order to solve the technical problem of inaccurate identification of the electronic lock status in the charging pile system, in one embodiment, an electronic lock control device is provided. Figure 2 As shown, the electronic lock control device includes a controller 10, a motor drive module 20, a motor 30, a current sampling module 40 and a current detection module 50. Among them, the controller 10 can be used to respond to the locking instruction or unlocking instruction of the electronic lock and output a motor control signal; the motor drive module 20 is connected to the output end of the controller 10, and can be used to receive the motor control signal and output the motor drive signal; the motor 30 is connected to the output end of the motor drive module 20, and can be used to operate based on the motor drive signal to drive the locking mechanism of the electronic lock to make the electronic lock in a locked state or an unlocked state; the current sampling module 40 is connected between the output end of the motor drive module 20 and the input end of the motor 30, and can be used to collect the motor drive current generated when the motor drive signal drives the motor 30; the current detection module 50 is connected to the output end of the current sampling module 40 and the input end of the controller 10, and can be used to detect the motor drive current, and send the detection signal of the motor drive current to the controller 10, so that the controller 10 determines whether the electronic lock is locked or unlocked according to the detection signal of the motor drive current.

[0055] Specifically, the electronic lock control device includes a controller, a motor drive module, a motor, a current sampling module, a current detection module and other circuit modules. Among them, the controller can receive a locking instruction or an unlocking instruction sent from the system or the user, and output a motor control signal accordingly. The motor control signal can specifically be a high or low level signal corresponding to the locking instruction or the unlocking instruction. After receiving the motor control signal, the motor drive module can generate a motor drive signal to drive the motor to rotate, thereby driving the locking mechanism of the electronic lock to move to achieve the locking or unlocking function. In this process, the current sampling module can collect the motor drive current in real time, and then the current detection module can send the detection signal of the motor drive current to the controller. Further, the controller can analyze the change of the motor drive current through the detection signal of the motor drive current, especially the transition from the normal drive current I1 to the stall current I2 and its duration t, to determine whether the electronic lock has been completely unlocked or locked in place. Since the stall current I2 increases significantly when the electronic lock is in place, and the time point of its occurrence (i.e., the duration t) can accurately reflect the state change of the lock, therefore, this detection method based on current change is more reliable and accurate than the traditional travel switch method.

[0056] In this embodiment, the motor drive module can be implemented by a motor drive chip, or it can be composed of switching devices such as relays and MOS tubes. The motor can be a stepper motor or other motors that can be used in electronic lock scenarios. When the motor is in normal operation, it can drive the locking mechanism such as the lock rod to move and convert electrical energy into mechanical energy. At this time, a current value I1 can be obtained; when the electronic lock drives the lock rod into place, the electronic lock is blocked and the electrical energy is converted into thermal energy. At this time, another current value I2 can be obtained, wherein the blocking current I2 is greater than the normal driving current I1. Through the above principle, the controller can identify whether the electronic lock is normally locked or unlocked by recording the time t of the motor drive current from I1 to I2. It can be understood that the controller 10 can also determine whether the electronic lock is locked or unlocked in place according to the detection signal of the motor drive current in other ways, and this embodiment is not specifically limited here.

[0057] It should be noted that the motor drive module can output a stable motor drive signal, which is usually a constant voltage signal. Based on this, the motor drive current generated when the motor is driven by the motor drive signal is also stable. Therefore, by sampling the current change duration of the electronic lock, the locking state of the electronic lock and the state of the electronic lock can be identified. It can be understood that this embodiment does not require precise current sampling of the motor drive current. It only needs to detect the current change interval and its duration of the motor drive current to accurately determine whether the electronic lock is locked or unlocked.

[0058] The electronic lock control device provided in the above embodiment can collect the motor drive current generated when the motor drive signal drives the motor by setting a current sampling module between the motor drive module and the motor, so that the controller can judge whether the electronic lock is locked or unlocked in place according to the detection signal of the motor drive current. The above electronic lock control device judges the unlocking state of the electronic lock by detecting the change of the motor drive current, which not only improves the accuracy of state identification, but also enhances the stability and reliability of the system. The above device can effectively avoid the occurrence of "virtual unlocking" phenomenon, reduce the problems such as operating inconvenience and equipment wear caused by misjudgment, and effectively improve the user experience and the overall performance of the charging pile. Compared with the traditional judgment method of the travel switch, the detection method based on current change of the above device is more reliable and accurate.

[0059] In one embodiment, Figure 3 As shown, the current sampling module includes a sampling resistor R1, wherein the sampling resistor R1 is connected between the output end of the motor driving module 20 and the input end of the motor 30, and both ends of the sampling resistor R1 can be used as the output end of the current sampling module to be connected to the input end of the current detection module.

[0060] Specifically, Figure 3 As shown, the sampling resistor R1 can be arranged between the motor drive module 20 and the motor 30, and is used to collect the current change in the motor drive process in real time. In this embodiment, the resistance range of the sampling resistor R1 can be determined according to the specific parameters of the motor, such as the drive current, the stall current, the supply voltage, the minimum drive voltage of the motor, the maximum current of the drive chip, etc., to ensure that the resistance of the sampling resistor R1 can not only meet the needs of current sampling, but also realize the current limiting protection and overcurrent protection functions of the circuit.

[0061] The control principle of the above circuit is: after the controller receives the locking command or unlocking command, it can send the motor control signal to the motor drive module by adjusting the level state of the CTR1 and CTR2 signals. The motor drive module can output the motor drive signal accordingly to drive the motor to rotate. At the same time, the current detection module can continuously monitor the voltage drop on the sampling resistor R1, thereby indirectly obtaining the magnitude of the motor drive current. Subsequently, the controller can accurately determine whether the electronic lock has been locked or unlocked in place by analyzing the changes in the motor drive current, especially the transition process from the normal drive current to the stall current and its duration. In addition, by real-time monitoring of the current value of the motor drive current, it is also possible to promptly detect and respond to overcurrent conditions in the device, thereby realizing the overcurrent protection function of the circuit.

[0062] The above embodiment not only improves the accuracy of electronic lock state recognition by setting a sampling resistor in the current sampling module, avoids the misjudgment problem that may be caused by the traditional travel switch method, but also reduces the difficulty and cost of circuit design. In addition, the above circuit can also realize comprehensive monitoring and protection of the motor driving process through current monitoring, thereby enhancing the safety and reliability of the electronic lock control device.

[0063] In one embodiment, Figure 3 As shown, the current detection module includes a differential amplifier composed of an operational amplifier U1 and a plurality of resistors R2, R3, R4, and R5, and a first reference power supply Vref1. The negative input terminal of the differential amplifier is connected to the first output terminal of the current sampling module, the positive input terminal of the differential amplifier is connected to the second output terminal of the current sampling module, the positive input terminal of the differential amplifier is also connected to the first reference power supply Vref1, and the output terminal of the operational amplifier is connected to the input terminal of the controller 10.

[0064] Specifically, the current detection module includes a differential amplifier circuit composed of an operational amplifier U1 and resistors R2 to R5, and the above circuit can be used to amplify the voltage difference across the sampling resistor R1. Among them, the negative input terminal and the positive input terminal of the differential amplifier are respectively connected to the two output terminals of the current sampling module, and the positive input terminal is connected to the first reference power supply Vref1 through the resistor R5, wherein the first reference power supply Vref1 can provide a stable reference voltage for the differential amplifier. Based on the above circuit, when the motor drive current passes through the sampling resistor R1, the voltage drop generated can be amplified by the differential amplifier, and a voltage signal proportional to the motor drive current is output. This voltage signal can be input into the controller 10 after appropriate processing, such as analog-to-digital conversion processing or filtering processing, so that the controller 10 can judge the locked or unlocked state.

[0065] In this embodiment, the voltage value of the first reference power supply Vref1 can be set according to the actual requirements of the circuit. For example, the voltage value of the first reference power supply Vref1 can be set to 1.65V (half of the controller power supply voltage 3.3V), so as to ensure that when the motor drive current flows in both directions, the output signal of the differential amplifier can be maintained at a level greater than 0V, thereby avoiding signal confusion and misjudgment.

[0066] This embodiment can improve the accuracy and sensitivity of motor drive current detection by setting a differential amplifier circuit in the current detection module. The above circuit can accurately amplify the weak voltage change on the sampling resistor R1 and convert it into a voltage signal that is easy for the controller to process. In this way, the controller can accurately determine the locked state or unlocked state of the electronic lock based on the received voltage signal, thereby improving the stability and reliability of the electronic lock control device. At the same time, since the differential amplifier circuit has the characteristics of strong common mode suppression capability and good anti-interference performance, the system's resistance to external interference is also enhanced.

[0067] In one embodiment, Figure 3 As shown, the output end of the operational amplifier U1 is connected to the analog-to-digital conversion input end of the controller 10, wherein the operational amplifier U1 can be used to input the detection signal of the motor drive current into the controller 10. Alternatively, the current detection module also includes an analog-to-digital converter, the input end of the analog-to-digital converter is connected to the output end of the operational amplifier, and the output end is connected to the input end of the controller, wherein the analog-to-digital converter can be used to convert the detection signal of the motor drive current into a digital signal and then input it into the controller.

[0068] Specifically, based on the consideration of the compatibility of the controller interface, a variety of methods can be designed to achieve the signal connection between the current detection module and the controller. In the first method, the output end of the operational amplifier U1 can be directly connected to the analog-to-digital conversion input end of the controller 10, so that the detection signal of the amplified motor drive current can be directly input into the controller. This method simplifies the circuit design, reduces the circuit cost, and can maintain a high signal integrity. Further, in the second method, in order to meet the needs of different controllers for signal types, an analog-to-digital converter can be set between the operational amplifier and the controller. Among them, the input end of the analog-to-digital converter can receive an analog voltage signal from the operational amplifier, and after conversion, the analog-to-digital converter can output the detection signal of the motor drive current to the input end of the controller in the form of a digital signal. This method can enhance the flexibility and scalability of the system, so that the current detection module can adapt to various types of controllers, thereby improving the accuracy and efficiency of signal processing.

[0069] The above embodiment can realize stable signal connection between the current detection module and the controller by designing multiple interface connection methods. The above circuit design method not only improves the compatibility and configurability of the system, but also ensures that the detection signal of the motor drive current can be accurately transmitted to the controller, thereby improving the overall performance and reliability of the electronic lock control device.

[0070] In one embodiment, Figure 4As shown, the electronic lock control device further includes a timing detection module 60, wherein the input end 60 of the timing detection module is connected to the output end of the current detection module 50, and the output end is connected to the timer input end of the controller 10. The timing detection module 60 is used to detect the timing detection signal when the electronic lock is in a locked state or an unlocked state, and send the timing detection signal to the controller 10.

[0071] Specifically, a timing detection module can also be provided in the electronic lock control device to achieve accurate measurement of the duration of the electronic lock locking process or unlocking process. In the present embodiment, the input end of the timing detection module is connected to the output end of the current detection module, and the detection signal of the motor drive current can be directly obtained, so that it can be judged whether the electronic lock has entered the locked state or the unlocked state according to the detection signal of the motor drive current. Once the change of the electronic lock state is detected, the timing detection module can start the timing function and record the time the electronic lock maintains the current state. Subsequently, the timing detection module can send the timing detection signal (i.e., the duration of the electronic lock state) to the timer input end of the controller through its output end for further processing and judgment by the controller.

[0072] This embodiment can enhance the functionality of the electronic lock control device by introducing a timing detection module, and enable the controller to accurately grasp the duration of the electronic lock locked state or unlocked state. This embodiment implements the timing function of the electronic lock state by hardware, which can improve the accuracy of the electronic lock timing, thereby avoiding the influence of external environmental information such as temperature on the timing function of the controller.

[0073] In one embodiment, Figure 5 As shown, the timing detection module includes a voltage follower U2, a first comparator U3, a second comparator U4, a second reference power supply Vref2 and a third reference power supply Vref3. Among them, the voltage Vref2 of the second reference power supply is greater than the voltage of the first reference power supply Vref1, and the voltage of the first reference power supply Vref1 is greater than the voltage of the third reference power supply Vref3. In this embodiment, the positive input terminal of the voltage follower U2 is connected to the output terminal of the current detection module (for example, connected to the output terminal of the differential amplifier U1), the negative input terminal of the voltage follower U2 is connected to the output terminal of the voltage follower U2, the output terminal of the voltage follower U2 is also connected to the positive input terminal of the first comparator U3, the negative input terminal of the first comparator U3 is connected to the second reference power supply Vref2, and the output terminal of the first comparator U3 is connected to the first timer input terminal of the controller 10. Furthermore, the output end of the voltage follower U2 is also connected to the negative input end of the second comparator U4 , the positive input end of the second comparator U4 is connected to the third reference power supply Vref3 , and the output end of the second comparator U4 is connected to the second timer input end of the controller 10 .

[0074] Specifically, a voltage follower U2, a first comparator U3, a second comparator U4, and reference power supplies Vref2 and Vref3 are provided in the timing detection module, so that accurate timing of the locking time and unlocking time of the electronic lock can be achieved. In this embodiment, the voltage follower U2 can be used to buffer and isolate the detection signal of the motor drive current output by the current detection module, and follow the detection signal of the motor drive current. The output end of the voltage follower U2 is respectively connected to the positive input end of the first comparator U3 and the negative input end of the second comparator U4. The output ends of the two comparators are respectively connected to the two timer input ends of the controller 10, and the timing can be started and stopped by monitoring the high and low level changes of the timer interface.

[0075] In this embodiment, in order to realize the timing of the locked state and the unlocked state, two voltage comparison modules need to be set. At the same time, the voltage of the second reference power supply Vref2 needs to be set to be greater than the voltage of the first reference power supply Vref1, and the voltage of the first reference power supply Vref1 needs to be greater than the voltage of the third reference power supply Vref3. Under this condition, Figure 5 Taking the scenario shown as an example, the circuit principle of the above timing detection module is as follows:

[0076] In the idle state, the voltage output by the current detection module is Vref1. At this time, both comparators output low level, and the controller does not start timing. In the locked state, the current sampling module can collect the current signal in the first direction. At this time, the current detection module can convert the current signal in the first direction into a voltage greater than the first reference power supply Vref1, and output it to the timing detection module. In this state, the higher the current value, the greater the voltage detection value output by the current detection module; in the unlocked state, the current sampling module can collect the current signal in the second direction. At this time, the current detection module can convert the current signal in the second direction into a voltage less than the first reference power supply Vref1, and output it to the timing detection module. In this state, the higher the current value, the smaller the voltage detection value output by the current detection module. At the same time, the voltage value is always greater than 0.

[0077] In the locked state, when the motor starts, the pulse voltage output by the current detection module is greater than the voltage of the second reference power supply Vref2. At this time, the first comparator U3 outputs a high level and the second comparator U4 outputs a low level, triggering the controller 10 to start identification and start timing and current sampling. The time when the motor starts timing is very close to the time when the motor starts to operate normally, and can be regarded as the same time. During the locking process, the motor operates normally, and the voltage of the second reference power supply Vref2 is higher than the voltage generated by the current when the motor operates normally. Therefore, during the rotation of the motor, the voltage output by the current detection module is between the voltage of the first reference power supply Vref1 and the voltage of the second reference power supply Vref2. At this time, the first comparator U3 resumes outputting a low level, and the second comparator U4 also outputs a low level. When the motor rotates to the right position, the motor is blocked, the current increases, and the voltage signal output by the operational amplifier U1 increases. At this time, the voltage output by the operational amplifier U1 is greater than the voltage of the second reference power supply Vref2. The first comparator U3 outputs a high level again, and the second comparator U4 outputs a low level, triggering the controller to stop timing, and obtain the time length t between the two signals through the timer. 上锁 And the current sampling current I 上锁 After locking is completed, the electronic lock returns to the idle state. At this time, the output level of the operational amplifier U1 is the voltage of the first reference power supply Vref1, the first comparator U3 outputs a low level, and the second comparator U4 outputs a low level.

[0078] In the unlocked state, when the motor starts, the pulse voltage output by the current detection module is less than the voltage of the third reference power supply Vref3. At this time, the first comparator U3 outputs a low level and the second comparator U4 outputs a high level, so that the controller 10 starts the unlock timing and starts current sampling at the same time. The time when the motor starts timing is very close to the time when the motor starts to operate normally, and can be regarded as the same time. After the motor starts, the current value decreases, so that the voltage output by the operational amplifier U1 increases to between the voltage of the third reference power supply Vref3 and the voltage of the first reference power supply Vref1. At this time, the first comparator U3 outputs a low level and the second comparator U4 also outputs a low level. When the unlocking is in place, the motor is blocked and the current increases, so that the voltage of the operational amplifier U1 decreases again. At this time, the voltage output by the operational amplifier U1 is less than the voltage of the third reference power supply Vref3, so that the first comparator U3 outputs a low level and the second comparator U4 outputs a high level again, triggering the controller 10 to stop timing and obtain the unlocking time t 解锁 At the same time, the unlocked current value I 解锁 At this time, the controller 10 can 解锁 and I 解锁After unlocking, the electronic lock returns to the idle state. At this time, the output level of the operational amplifier U1 is the voltage of the first reference power supply Vref1, the first comparator U3 outputs a low level, and the second comparator U4 outputs a low level.

[0079] In this embodiment, the controller can realize the recording of the locking or unlocking time through the timing function of the timing detection module, or through the control logic inside the controller according to I 上锁、 I 解锁 The comparison relationship between the current and the preset threshold records the duration of the current that meets the value range, and realizes the recording of the locking or unlocking duration. The above two methods can also be combined to realize the recording of the locking or unlocking duration. When the external environment, such as temperature, changes, the detected signal of the motor drive current collected may change. In this scenario, by combining the above two methods to collect the locking duration or unlocking duration of the electronic lock, the accuracy of the duration recording can be guaranteed, thereby improving the accuracy of the electronic lock status recognition.

[0080] The timing detection module provided in the above embodiment can realize the independent timing function of the locking process and the unlocking process of the electronic lock. In addition, by setting different reference voltages, the trigger threshold of the timing detection can be flexibly adjusted to adapt to the working characteristics and control requirements of different electronic locks. In addition, by designing a voltage follower in the circuit, the above timing detection module can utilize the buffering effect provided by the voltage follower to improve the stability and anti-interference ability of signal transmission, thereby ensuring the accuracy and reliability of the timing detection. In addition, the timing function of the electronic lock state is realized by hardware in this embodiment, which can improve the accuracy of the electronic lock timing and avoid the influence of external environmental information such as temperature on the timing function of the controller.

[0081] In one embodiment, Figure 5 As shown, the electronic lock control device further includes at least one filter module. The filter module can be arranged at at least one of the following positions: between the output end of the voltage follower U2 and the positive input end of the first comparator U3; between the output end of the voltage follower U2 and the negative input end of the second comparator U4; between the output end of the current detection module (for example, the output end of the differential amplifier U1) and the input end of the controller 10.

[0082] Specifically, at least one filtering module can be provided in the electronic lock control device, and is used to improve the stability and accuracy of signal processing and transmission. In the present embodiment, the filtering module can be provided at the connection point between the voltage follower U2 and the voltage comparators U3 and U4, or it can be provided on the connection path between the current detection module and the controller 10. Among them, the filtering module can be formed as a basic form of an RC filtering circuit using components such as resistors and capacitors, or it can be integrated with more complex filtering components or design forms to meet the requirements of noise suppression of different frequencies. In the present embodiment, by providing a filtering module in the electronic lock control device, the voltage or current signal in the circuit can be smoothed, thereby reducing signal fluctuations caused by factors such as electromagnetic interference and power supply fluctuations, thereby ensuring that the detection signal received by the comparator and the controller is purer.

[0083] By setting the filter module, the present embodiment can improve the signal quality and system stability of the electronic lock control device. In addition, the setting of the filter module can also make the electronic lock control device better adapt to the complex and changeable working environment, thereby reducing the occurrence of misjudgment and missed judgment of the electronic lock state.

[0084] In one embodiment, the electronic lock control device may be disposed in a charging terminal, wherein the controller may be communicatively connected to a signal display module of the charging terminal. In this scenario, the controller may be used to send an electronic lock state signal to the signal display module, so that the signal display module displays at least one of the locked state, unlocked state, locked in place state, and unlocked in place state of the electronic lock.

[0085] Specifically, the electronic lock control device can be integrated inside the charging terminal and communicated with the signal display module of the charging terminal. In this embodiment, the controller can be used to monitor various states of the electronic lock, including locked state, unlocked state, locked in place state, and unlocked in place state, etc., and then convert these state information into corresponding electronic lock state signals in real time, and send them to the signal display module through a preset communication protocol. Furthermore, after receiving the electronic lock state signal, the signal display module can indicate the electronic lock state signal through the display screen, indicator light, buzzer and other devices of the charging terminal, thereby displaying the current state of the electronic lock in an intuitive and clear manner, thereby providing instant feedback to the user.

[0086] This embodiment communicates with the signal display module of the charging terminal to enable the user to know the working status of the electronic lock at any time, thereby effectively improving the user experience. In addition, by indicating the current status of the electronic lock, the overall performance of the charging terminal can be enhanced.

[0087] In the prior art, the charging gun of the charging pile will remain in a locked state after the power is lost. However, in charging operations or certain home use situations, when a power outage occurs during the charging process, the user has the need to unlock the charging gun to avoid the problem of not being able to retrieve the charging gun due to a power outage. However, in other scenarios (such as home use), users hope that the charging gun can be locked on the charging pile for a long time, and do not want the charging gun to be unplugged when charging is completed or the power is lost. However, in response to the above problems, the prior art has not proposed a solution for configuring the locking state of the charging gun after the charging pile loses power to meet the actual needs of users, nor can it realize the function of unlocking the charging gun when the power is lost.

[0088] In view of the above problems, in one embodiment, Figure 6 As shown, the electronic lock control device includes a first energy storage module 70 and a second energy storage module 80. The first energy storage module 70 is connected between the power supply terminal POWER and the power supply terminal of the motor drive module 20, and can be used to provide power to the motor drive module 20 when the electronic lock is powered off. The second energy storage module 80 is connected between the output terminal of the controller 10 and the input terminal of the motor drive module 20, and can be used to provide a motor control signal to the motor drive module when the electronic lock is powered off.

[0089] Specifically, this embodiment can realize the function of unlocking the electronic lock when the power is off by setting the first energy storage module 70 and the second energy storage module 80 in the electronic lock control device, so that the charging pile can be flexibly unlocked when the power is off. Among them, the first energy storage module 70 is connected between the power supply end of the motor drive module 20 and the power supply, and can be used to provide the necessary power to the motor drive module 20 when the power is interrupted, and support it to complete the unlocking action. The second energy storage module 80 is set between the output end of the controller 10 and the input of the motor drive module 20, and can be used to send an unlocking control signal to the motor drive module through a discharge delay after power failure, thereby realizing the unlocking function of the electronic lock.

[0090] This embodiment integrates the first energy storage module and the second energy storage module in the electronic lock control device, which can solve the problem that the charging gun cannot be unlocked after the charging pile loses power. Based on this, the above-mentioned circuit connection method can greatly improve the user experience and the applicability of the system.

[0091] In one embodiment, Figure 8As shown, the first energy storage module includes a first diode D1, a first current limiting resistor R9 and a first energy storage capacitor C4. The anode end of the first diode D1 is connected to the power supply end POWER, the cathode end of the first diode D1 is connected to the first end of the first current limiting resistor R9, the second end of the first current limiting resistor R9 is connected to the first end of the first energy storage capacitor C4 and the power supply end of the motor drive module 20, and the second end of the first energy storage capacitor C4 is grounded.

[0092] Specifically, the first energy storage module can provide the required electrical energy for the motor drive module after power failure, and at the same time ensure the safety of the circuit. In this embodiment, when the power supply end is powered normally, the current in the power supply can enter the first current limiting resistor R9 through the unidirectional conductivity of the first diode D1, and then charge the first energy storage capacitor C4. Through the electrical energy stored in the first energy storage capacitor C4, the motor drive module can continue to be powered after the power supply is powered off, thereby realizing the power-off unlocking function of the device. In addition, during the charging process, the first current limiting resistor R9 can play a role in limiting the current size, thereby effectively preventing the problem of overheating or damage of the motor drive module 20 caused by instantaneous large current.

[0093] This embodiment can effectively limit the size of the charging current by setting the first current limiting resistor in the first energy storage module, thereby avoiding damage to the motor drive module and improving safety. In addition, by setting the first energy storage capacitor in the first energy storage module, the stored electric energy can be used to continue to power the motor drive module in the event of a power failure, thereby realizing the power failure unlocking function, thereby improving the user experience.

[0094] In one embodiment, Figure 8 As shown, the second energy storage module includes a second diode D2, a second current limiting resistor R10, a second energy storage capacitor C5 and a discharge resistor R11. Among them, the anode end of the second diode D2 is connected to the output end of the controller 10, the cathode end of the second diode D2 is connected to the first end of the second current limiting resistor R10, the second end of the second current limiting resistor R10 is connected to the first end of the second energy storage capacitor C5 and the first end of the discharge resistor R11, the second end of the discharge resistor R11 is connected to the input end of the motor drive module 20, and the second end of the second energy storage capacitor C5 is grounded.

[0095] Specifically, when the controller 10 is working normally, the second energy storage capacitor C5 can be charged through the unidirectional conductivity of the second diode D2. When the power is off, the second energy storage capacitor C5 can be discharged to the motor drive module 20 through the discharge resistor R11, thereby providing the motor drive module 20 with the necessary motor control signal to drive the motor to operate, thereby driving the lock core to return to its position. In this embodiment, the resistance value of the second current limiting resistor R10 can be set to be relatively small to prevent the motor drive module 20 from being damaged due to excessive current at the moment of power-on. In addition, the resistance value of the discharge resistor R11 can be set to be relatively large to ensure that the discharge process has a sufficient duration so that the lock core can successfully complete the return action.

[0096] In this embodiment, by providing a second diode and a second energy storage capacitor in the second energy storage module, the control signal of the motor drive module can be supplied when the power is off, thereby ensuring that the device can realize the power-off unlocking function when the power is off. In addition, by providing a second current limiting resistor and a discharge resistor in the second energy storage module, it can be ensured that the circuit elements are not damaged and the lock core can be accurately returned to its position.

[0097] In one embodiment, Figure 6 As shown, the output end of the controller 10 includes a first output end CTR1 and a second output end CTR2. Among them, the controller 10 can respond to the locking instruction of the electronic lock, control the first output end CTR1 to output a high level, and control the second output end CTR2 to output a low level, so as to output a locked motor control signal. Correspondingly, the controller 10 can also respond to the unlocking instruction of the electronic lock, control the first output end CTR1 to output a low level, and control the second output end CTR2 to output a high level, so as to output an unlocked motor control signal. In this embodiment, the second energy storage module 80 can be connected between the second output end CTR2 of the controller 10 and the input end of the motor drive module 20.

[0098] Specifically, the controller 10 has two independent output terminals CTR1 and CTR2, and the two output terminals can be used to flexibly control the locking and unlocking states of the electronic lock. Among them, when the controller 10 receives a locking instruction, the first output terminal CTR1 can be controlled to output a high-level signal, and the second output terminal CTR2 can be controlled to output a low-level signal. The two signals are combined and can be used as a motor control signal for controlling the locking of the electronic lock to drive the motor to perform the locking action. On the contrary, when the controller 10 receives an unlocking instruction, its output state can be switched, that is, the first output terminal CTR1 is controlled to output a low level, and the second output terminal CTR2 is controlled to output a high level, thereby generating an unlocking motor control signal, and driving the motor to perform an unlocking action. In this embodiment, the second energy storage module 80 can be arranged between the second output terminal CTR2 of the controller and the motor drive module 20 to ensure that in the case of power failure, the energy stored in the second energy storage module 80 can be used to provide the necessary motor control signal to the motor drive module 20 to maintain the execution of the unlocking function.

[0099] This embodiment can realize accurate control of the locking and unlocking states of the electronic lock. At the same time, by setting the second energy storage module between the second output terminal of the controller and the motor drive module, the electric energy stored in the second energy storage module can be used to provide the necessary power supply guarantee for the unlocking control signal, so that in the event of power failure, the electronic lock can be unlocked in time, thereby improving the security of the system and the user experience.

[0100] In one embodiment, Figure 8 As shown, when the controller 10 is configured as the power-off unlocking function, if the electronic lock is locked in place, the first output terminal CTR1 and the second output terminal CTR2 are controlled to output a high level, so that the electronic lock performs an unlocking action when the power is off. On the contrary, when the controller 10 is configured as the power-off locking function, if the electronic lock is locked in place, the first output terminal CTR1 and the second output terminal CTR2 are controlled to output a low level, so that the electronic lock remains in a locked state when the power is off.

[0101] Specifically, the controller 10 can be configured according to different functions so that the electronic lock can automatically perform an unlocking action or remain in a locked state when the power is off according to actual needs. In this embodiment, when the controller 10 is configured as a power-off unlocking function, after the electronic lock is locked in place, the controller can control the first output terminal CTR1 and the second output terminal CTR2 to output a high level. At this time, the capacitor C5 is charged, and after the power is off, the residual power in the capacitor C5 can be used to cooperate with the capacitor C4, and the electronic lock is driven to unlock through the motor drive module 20. On the contrary, when the controller is configured as a power-off locking function, after locking in place, the controller can control the first output terminal CTR1 and the second output terminal CTR2 to output a low level to ensure that there is no voltage at both ends of the electronic lock when the power is off, so that the electronic lock remains in a locked state.

[0102] Reference Figure 8 The working principle of the above circuit is as follows: when the controller 10 is configured to unlock the power-off function, when locking, the first output terminal CTR1 is first controlled to output a high level, and the second output terminal CTR2 is controlled to output a low level. After locking is completed, the first output terminal CTR1 and the second output terminal CTR2 are controlled to output a high level. At this time, the capacitor C5 is charged through the diode D2 and the resistor R10. When the power reaches the control high level of the motor drive module 20, both ends of the electronic lock output the power supply voltage, and the motor stops rotating. When the system power supply is powered off, the control signal sent by the second output terminal CTR2 is a signal formed by the electric energy stored in the capacitor C5 being discharged through the resistor R11. By configuring the resistance value of R11, the power-off time of CTR2 can be delayed, and the control signal of the first output terminal CTR1 can be quickly powered off. The power stored in the capacitor C4 can only be discharged through the motor drive module 20. At this time, the motor can be controlled by the residual power of the capacitor C5, and the electronic lock is driven to unlock by the residual power of the capacitor C4.

[0103] When the controller is configured to have a power-off locking function, when locking, the first output terminal CTR1 is first controlled to output a high level, and the second output terminal CTR2 is controlled to output a low level. After locking is completed, the first output terminal CTR1 and the second output terminal CTR2 are both controlled to output a low level. At this time, both ends of the electronic lock output 0V, and the motor stops rotating. When the system power fails, since the capacitor C5 has no residual power, the control signal sent by the second output terminal CTR2 cannot make the residual power of the capacitor C4 drive the electronic lock to unlock. At this time, the electronic lock remains in the locked state.

[0104] This embodiment can achieve flexible control of the electronic lock in the case of power failure by precisely controlling the high and low levels of the two output terminals of the controller and combining the charge and discharge characteristics of the capacitor. In this way, not only the flexibility and adaptability of the system are improved, but also the safety requirements of users for electronic locks in different scenarios are met, thereby providing users with a more convenient and reliable use experience.

[0105] In one embodiment, Figure 7 As shown, the electronic lock control device further includes a discharge and protection module 90. The discharge and protection module 90 is arranged between the first output terminal CTR1 of the control terminal 10 and the first input terminal of the motor drive module 20. In this embodiment, the discharge and protection module 90 can be used to limit the signal strength of the motor control signal and speed up the release of the motor control signal when the electronic lock loses power.

[0106] Specifically, a discharge and protection module 90 may be further provided in the electronic lock control device, and the module may be provided between the first output terminal CTR1 of the controller 10 and the first input terminal of the motor drive module 20. In the present embodiment, the main function of the discharge and protection module 90 is to optimize the motor control signal. On the one hand, the discharge and protection module 90 can limit the signal strength to prevent the excessive control signal from causing potential damage to the motor drive module; on the other hand, when the electronic lock control device encounters a power failure, the discharge and protection module 90 can respond quickly and speed up the release speed of the motor control signal, thereby avoiding the electronic lock from working in an uncertain state, thereby improving the safety and stability of the electronic lock control device.

[0107] This embodiment can effectively protect the motor drive module from the impact of high-intensity control signals by setting a discharge and protection module in the electronic lock control device, and can improve the response speed of the electronic lock in a power-off state, ensuring that the electronic lock can be immediately and completely unlocked or remain locked when the power is off.

[0108] In one embodiment, Figure 8 As shown, the discharge and protection module includes a third diode D3 and a third current limiting resistor R12. The cathode end of the third diode D3 and the first end of the third current limiting resistor R12 are connected to the first output end CTR1 of the controller 10, and the anode end of the third diode D3 and the second end of the third current limiting resistor R12 are connected to the first input end of the motor driving module 20.

[0109] Specifically, this embodiment can limit the strength of the control signal by setting the third current limiting resistor R12 in the discharge and protection module, thereby preventing the overly strong control signal from causing potential damage to the motor drive module. In addition, by setting the third diode D3 in the discharge and protection module, the voltage of the first output terminal CTR1 of the controller can be quickly released and restored to a low level state when the power is off, thereby helping the electronic lock to be immediately fully unlocked or to remain locked.

[0110] This embodiment can effectively limit and protect the motor control signal by setting the third diode D3 and the third current limiting resistor R12 in the discharge and protection module. In addition, through the above circuit, in the case of power failure, the electronic lock can be immediately fully unlocked or remain locked, thereby effectively improving the response speed and reliability of the electronic lock control device and enhancing the user experience.

[0111] In one embodiment, Fig. 9 As shown, an electronic lock control method is provided, and the method is applied to the controller in the electronic lock control device described in any of the above embodiments as an example for explanation, and the following steps may be included: the controller responds to receiving the locking instruction or unlocking instruction of the electronic lock, and outputs a motor control signal to the motor drive module to put the electronic lock in a locked state or an unlocked state. When the electronic lock is in a locked state or an unlocked state, a detection signal of the motor drive current generated when the motor drive module drives the motor is received. Based on the detection signal of the motor drive current, the time taken for the motor drive current to increase from the initial current value to the preset first current threshold is recorded, and when the time length is detected to be greater than or equal to the first preset time length, it is determined that the electronic lock is locked in place or unlocked in place.

[0112] Specifically, the controller can receive a locking instruction or unlocking instruction sent from the system or user, and output a motor control signal accordingly, wherein the motor control signal can be a high or low level signal corresponding to the locking instruction or unlocking instruction. After receiving the motor control signal, the motor drive module can generate a motor drive signal to drive the motor to rotate, thereby driving the locking mechanism of the electronic lock to move to achieve the locking or unlocking function. In this process, the controller can receive the detection signal of the motor drive current generated by the motor drive module when driving the motor in real time, and analyze the change of the motor drive current through the detection signal of the motor drive current, especially the change from the initial current value I1 to the first current threshold I2 and its duration t to determine whether the electronic lock has been completely unlocked or locked in place. Since the motor drive current will increase significantly when the electronic lock is locked or unlocked in place, and the time point of its occurrence can accurately reflect the state change of the electronic lock, this detection method based on current change is more reliable and accurate than the traditional travel switch method.

[0113] In this embodiment, when the motor is in normal operation, it can drive the locking mechanism such as the lock rod to move and convert electrical energy into mechanical energy, at which time the initial current value I1 can be obtained; when the electronic lock drives the lock rod into place, the electronic lock is blocked and the electrical energy is converted into thermal energy, at which time another current value I2 can be obtained, wherein the blocked current I2 is greater than the initial current value I1. Based on the above principle, the controller can identify whether the electronic lock is normally locked or unlocked by recording the time t of the motor driving current from I1 to I2.

[0114] The electronic lock control method provided in the above embodiment determines the unlocking state of the electronic lock by detecting the time taken for the motor drive current to increase from the initial current value to the preset first current threshold value, which not only improves the accuracy of electronic lock status recognition, but also enhances the stability and reliability of the system. The above method can effectively avoid the occurrence of "virtual unlocking" phenomenon, reduce the operational inconvenience and equipment wear caused by misjudgment, and effectively improve the user experience and the overall performance of the charging pile. Compared with the traditional travel switch judgment method, the above method is more reliable and accurate based on the detection method of current change.

[0115] In one embodiment, the method for recording the time taken for the motor drive current to increase from the initial current value to the preset first current threshold value can be implemented in at least one of the following ways: Way 1, in response to receiving the detection signal of the motor drive current sent by the current detection module, the time taken for the motor drive current to increase from the initial current value to the preset first current threshold value is recorded through the value of the detection signal. Way 2, in response to receiving the timing detection signal sent by the timing detection module when the electronic lock is in the locked state or the unlocked state, the time taken for the motor drive current to increase from the initial current value to the preset first current threshold value is recorded through the timing detection signal.

[0116] Specifically, the controller can realize the recording of locking or unlocking time through the timing function of the timing detection module set in the electronic lock control device, or through the control logic inside the controller, according to the comparison relationship between the current and the preset threshold, record the time when the current meets the value range, and realize the recording of locking or unlocking time. The above two methods can also be combined to realize the recording of time. When the external environment such as temperature changes, the detection signal of the motor drive current collected by the electronic lock control device may change. In this scenario, by combining the above two methods to collect the locking time or unlocking time of the electronic lock, the accuracy of the time recording can be guaranteed, thereby improving the accuracy of the electronic lock state recognition.

[0117] This embodiment can enhance the flexibility and adaptability of the timing function setting of the electronic lock control device by providing multiple duration recording methods, ensuring that the change process of the motor drive current can be accurately recorded, thereby helping to improve the accuracy of determining the locked state and unlocked state of the electronic lock.

[0118] In one embodiment, the electronic lock control method may further include the following steps: after determining that the electronic lock is locked or unlocked, stopping outputting the motor control signal and outputting a locked or unlocked indication signal.

[0119] Specifically, after the controller determines that the electronic lock has been locked or unlocked, it can immediately stop outputting the motor control signal to the motor drive module to avoid unnecessary energy consumption and mechanical wear. At the same time, in order to feedback the current state of the electronic lock to other circuits in the electronic lock control device or to the user, the controller can output a locked or unlocked indication signal, which can be used as a basis for subsequent operations, such as triggering the start or end of the charging process, or indicating the status information of the electronic lock to the user.

[0120] This embodiment can achieve accurate control and timely response to the state of the electronic lock by introducing a state feedback mechanism, and can significantly enhance the overall functionality and user experience of the electronic lock control device.

[0121] In one embodiment, Fig.10 As shown, the electronic lock control method may further include the following steps: when it is detected that the motor drive current is greater than a preset second current threshold for more than a second preset time period, outputting an overcurrent alarm signal, and / or stopping outputting the motor control signal.

[0122] Specifically, the controller can continuously monitor the size of the motor drive current during the process of receiving the detection signal of the motor drive current. When it is detected that the motor drive current exceeds the preset second current threshold, and this state lasts for more than the second preset time, it can immediately trigger an overcurrent alarm signal to warn the system or user. At the same time, in order to protect the circuit and controller from further damage, the controller can also stop outputting the motor control signal, thereby cutting off the power supply to the motor. In actual application scenarios, overcurrent generally occurs when the motor is damaged. This embodiment can promptly determine whether an overcurrent fault has occurred in the circuit by monitoring the motor drive current in real time to be greater than the preset second current threshold for more than the second preset time.

[0123] This embodiment can effectively improve the safety and reliability of the electronic lock control device by introducing an overcurrent protection mechanism. Through the above method, when the motor drive current increases abnormally, it can quickly identify and take corresponding protection measures, thereby preventing the current shock from damaging the internal coil and controller of the electronic lock, so that the electronic lock control device of the charging pile can have a better experience and a higher safety level.

[0124] In one embodiment, Fig.11 As shown, the above-mentioned electronic lock control method may also include the following steps: when it is detected that the time taken for the motor drive current to increase from the initial current value to the first current threshold is less than the first preset time, an electronic lock stall alarm signal is output, and / or the motor control signal is stopped.

[0125] Specifically, when the controller detects that the motor drive current increases from the initial current value to the first current threshold value, and the time taken is less than the preset first preset duration, it can be determined that the electronic lock has been blocked. At this time, the controller can immediately output an electronic lock blocking alarm signal to alert the system or user. At the same time, in order to prevent further damage caused by the blocking, the controller can also stop outputting the motor control signal to cut off the power supply to the motor. In actual application scenarios, when ice forms in winter and water vapor condenses on the electronic lock, the problem of electronic lock blocking will occur, or when the electronic lock is blocked or other faults occur, the problem of blocking will also occur. In the prior art, the motor drive module cannot be effectively identified when failure or blocking occurs, which easily causes problems such as the drive module burning. This embodiment detects the time taken for the initial current value to increase to the first current threshold value, and outputs the electronic lock blocking alarm signal and / or stops outputting the motor control signal when the above-mentioned time is less than the first preset time, so that abnormal problems such as motor failure or blocking can be discovered in time, thereby improving the safety of the electronic lock control device.

[0126] This embodiment can effectively solve the problem that the motor drive module cannot be identified in time when it fails or is blocked by introducing a stall detection method. The above method can accurately identify the stall state of the electronic lock and take corresponding protective measures in time by monitoring the changes in the motor drive current in real time and judging it in combination with a preset time threshold. The above method not only improves the safety and stability of the electronic lock control device, but also extends the service life of the device and provides users with a more reliable and safe charging experience.

[0127] In the prior art, the charging gun of the charging pile will remain in a locked state after the power is lost. However, in charging operations or certain home use situations, when a power outage occurs during the charging process, the user has the need to unlock the charging gun to avoid the problem of not being able to retrieve the charging gun due to a power outage. However, in other scenarios (such as home use), users hope that the charging gun can be locked on the charging pile for a long time, and do not want the charging gun to be unplugged when charging is completed or the power is lost. However, in response to the above problems, the prior art has not proposed a solution for configuring the locking state of the charging gun after the charging pile loses power to meet the actual needs of users, nor can it realize the function of unlocking the charging gun when the power is lost.

[0128] In one embodiment, in response to the above problem, the method for the controller to output a control signal to control the electronic lock to be in a locked state or an unlocked state can be implemented in the following manner: in response to receiving a locking instruction of the electronic lock, outputting a high-level first control signal and a low-level second control signal to the motor drive module to put the electronic lock in a locked state; in response to receiving an unlocking instruction of the electronic lock, outputting a low-level first control signal and a high-level second control signal to the motor drive module to put the electronic lock in an unlocked state.

[0129] Specifically, the motor control signal includes a first control signal and a second control signal, wherein, by combining the two control signals at high and low levels, the electronic lock can be flexibly controlled to work in a locked state and an unlocked state. In this embodiment, when the controller receives a locking instruction of the electronic lock, it can output a high-level first control signal and a low-level second control signal to the motor drive module. These two signals can be combined to serve as a motor control signal for controlling the locking of the electronic lock to drive the motor to perform a locking action. On the contrary, when the controller receives an unlocking instruction of the electronic lock, it can switch its output state, that is, output a low-level first control signal and a high-level second control signal to the motor drive module, thereby generating an unlocking motor control signal and driving the motor to perform an unlocking action.

[0130] This embodiment can realize accurate control of the locking and unlocking states of the electronic lock by combining the two control signals at high and low levels, thereby improving the flexibility and reliability of the electronic lock control. This signal combination method not only simplifies the control logic of the controller, but also enhances the control capability of the electronic lock state.

[0131] In one embodiment, the above-mentioned electronic lock control method may further include the following steps: in response to receiving a power-off unlocking configuration instruction, when it is determined that the electronic lock is locked in place, outputting a high-level first control signal and a high-level second control signal to the motor drive module, so that the electronic lock performs an unlocking action when the power is off; in response to receiving a power-off locking configuration instruction, when it is determined that the electronic lock is locked in place, outputting a low-level first control signal and a low-level second control signal to the motor drive module, so that the electronic lock remains in a locked state when the power is off.

[0132] Specifically, the controller can be configured according to different functions so that the electronic lock can automatically perform an unlocking action or remain in a locked state when the power is off according to actual needs. In this embodiment, when the controller receives a power-off unlocking configuration instruction, after determining that the electronic lock is locked in place, a high-level first control signal and a high-level second control signal can be output to the motor drive module. At this time, the controller can ensure that a voltage difference can be formed at both ends of the electronic lock when the power is off through an energy storage module connected between the controller and the motor drive module and an energy storage module connected to the power supply end of the motor drive module, so that the electronic lock can be driven to unlock when the power is off. Conversely, when the controller receives a power-off locking configuration instruction, after determining that the electronic lock is locked in place, a low-level first control signal and a low-level second control signal can be output to the motor drive module to ensure that there is no voltage at both ends of the electronic lock when the power is off, so that the electronic lock remains in a locked state.

[0133] This embodiment introduces the configuration functions of power-off unlocking and power-off non-unlocking, which can provide higher flexibility and security for the use of electronic locks. Users can choose appropriate configurations according to actual needs to ensure that the electronic lock can be unlocked or locked as expected in specific scenarios, thereby improving the user experience and enhancing the adaptability and reliability of the electronic lock in complex environments.

[0134] It should be noted that the various embodiments provided by the above-mentioned electronic lock control method can be implemented with the aid of the embodiments provided by any of the above-mentioned electronic lock control devices. Based on this, the implementation methods and technical effects not involved in the electronic lock control method can refer to the description of the embodiments provided by any of the above-mentioned electronic lock control devices, and this embodiment is not specifically described and limited here. In addition, the information (including but not limited to user information, device information, etc.) and data (including but not limited to data for analysis, storage and display, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0135] The embodiment of the present application also provides a computer device, which can be a personal computer, a server, a network device, etc. The computer device includes a bus, a processor, a memory and a communication interface, and can also include an input and output interface and a display device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in each method embodiment are implemented.

[0136] Those skilled in the art will appreciate that the structure of the above-mentioned computer device is only a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components, or combine certain components, or have a different arrangement of components.

[0137] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program thereon. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0138] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0139] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0140] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0141] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An electronic lock control device, characterized in that: The electronic lock control device comprises: A controller, used to respond to a locking instruction or an unlocking instruction of the electronic lock and output a motor control signal; A motor driving module, connected to the output end of the controller, for receiving the motor control signal and outputting a motor driving signal; a motor connected to the output end of the motor drive module and configured to operate based on the motor drive signal to drive the locking mechanism of the electronic lock to move so that the electronic lock is in a locked state or an unlocked state; A current sampling module, connected between the output end of the motor driving module and the input end of the motor, for collecting the motor driving current generated when the motor driving signal drives the motor; A current detection module is connected to the output end of the current sampling module and the input end of the controller, and is used to detect the motor drive current and send the detection signal of the motor drive current to the controller, so that the controller determines whether the electronic lock is locked or unlocked according to the detection signal of the motor drive current.

2. The electronic lock control device according to claim 1, characterized in that: The current sampling module includes a sampling resistor, wherein: The sampling resistor is connected between the output end of the motor driving module and the input end of the motor, and both ends of the sampling resistor are connected to the input end of the current detection module as the output end of the current sampling module.

3. The electronic lock control device according to claim 1, characterized in that: The current detection module includes a differential amplifier composed of an operational amplifier and a plurality of resistors and a first reference power supply, wherein: The negative input terminal of the differential amplifier is connected to the first output terminal of the current sampling module, the positive input terminal of the differential amplifier is connected to the second output terminal of the current sampling module, the positive input terminal of the differential amplifier is also connected to the first reference power supply, and the output terminal of the operational amplifier is connected to the input terminal of the controller.

4. The electronic lock control device according to claim 3, characterized in that: The output end of the operational amplifier is connected to the analog-to-digital conversion input end of the controller, and the operational amplifier is used to input the detection signal of the motor driving current into the controller; or, The current detection module also includes an analog-to-digital converter, the input end of the analog-to-digital converter is connected to the output end of the operational amplifier, and the output end is connected to the input end of the controller; the analog-to-digital converter is used to convert the detection signal of the motor drive current into a digital signal and input it into the controller.

5. The electronic lock control device according to claim 3 or 4, characterized in that: The electronic lock control device also includes a timing detection module, wherein: The input end of the timing detection module is connected to the output end of the current detection module, and the output end is connected to the timer input end of the controller; the timing detection module is used to detect the timing detection signal when the electronic lock is in a locked state or an unlocked state, and send the timing detection signal to the controller.

6. The electronic lock control device according to claim 5, characterized in that: The timing detection module includes a voltage follower, a first comparator, a second comparator, a second reference power supply and a third reference power supply; the voltage of the second reference power supply is greater than the voltage of the first reference power supply, and the voltage of the first reference power supply is greater than the voltage of the third reference power supply, wherein, The positive input terminal of the voltage follower is connected to the output terminal of the current detection module, and the negative input terminal of the voltage follower is connected to the output terminal of the voltage follower; The output end of the voltage follower is also connected to the positive input end of the first comparator, the negative input end of the first comparator is connected to the second reference power supply, and the output end of the first comparator is connected to the first timer input end of the controller; The output end of the voltage follower is also connected to the negative input end of the second comparator, the positive input end of the second comparator is connected to the third reference power supply, and the output end of the second comparator is connected to the second timer input end of the controller.

7. The electronic lock control device according to claim 6, characterized in that: The electronic lock control device also includes at least one filtering module; The filtering module is arranged between the output end of the voltage follower and the positive input end of the first comparator; and / or, the filtering module is arranged between the output end of the voltage follower and the negative input end of the second comparator; and / or, the filtering module is arranged between the output end of the current detection module and the input end of the controller.

8. An electronic lock control method, characterized in that: The method is applied to the electronic lock control device according to any one of claims 1 to 7, and the method comprises: In response to receiving a locking instruction or an unlocking instruction of the electronic lock, outputting a motor control signal to the motor drive module to put the electronic lock in a locked state or an unlocked state; When the electronic lock is in a locked state or an unlocked state, receiving a detection signal of a motor driving current generated when the motor driving module drives the motor; Based on the detection signal of the motor drive current, the time taken for the motor drive current to increase from an initial current value to a preset first current threshold is recorded, and when it is detected that the time is greater than or equal to the first preset time, it is determined that the electronic lock is locked in place or unlocked in place.

9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to claim 8 is implemented.

10. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to claim 8 is implemented.

Citation Information

Cited By

  • Electronic lock unlocking method and device, electronic lock and readable storage medium

    CN115713822A

  • Electronic lock unlocking method, device, electronic lock and readable storage medium

    CN115713822B

  • Control method of switch lock structure, switch lock structure and lock

    CN120139588A