Power supply circuit and related equipment
By introducing power outage detection circuit and energy storage circuit into the power supply circuit of the charging chamber, the data loss problem caused by power outage on the power supply side of the power grid is solved, and data storage and power supply stability are achieved in the case of power outage.
Patent Information
- Application Number
- CN202411722210.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-18
AI Technical Summary
In the event of power supply on the grid side, the charging chamber may cause data loss and other problems.
A power supply circuit is designed, including an energy storage circuit and a power outage detection circuit. When the voltage output by the energy storage circuit is less than the preset voltage, the power outage detection circuit outputs a low potential signal to the microcontroller unit (MCU) to instruct the MCU to save operation information to ensure that data is not lost in the event of power outage.
Through the power provided by the energy storage circuit, the MCU can save operating data in a timely manner, avoiding data loss caused by power supply on the grid side, and reducing energy consumption when the power supply on the grid side returns to normal.
Smart Images

Figure CN119651879A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of integrated circuits, and in particular to a power supply circuit and related equipment. Background Art
[0002] With the rapid popularization of smart phones and various electronic products, whether in daily life or work, obtaining and transmitting information has become inseparable from smart electronic devices, and people's demand for mobile power sources such as power banks has also grown rapidly. At present, shared power banks can be seen everywhere in life.
[0003] Users usually interact with the charging warehouse's server by scanning QR codes and other identifiers in the charging warehouse, and then instruct the corresponding charging warehouse through the server to perform operations such as renting and returning shared power banks. The charging warehouse uploads the operating data generated when the user completes operations such as renting and returning to the server, thereby realizing functions such as timing and charging. If power outages, unstable voltage, line breaks and other faults occur at this time, the charging warehouse will experience data loss and other problems. Summary of the invention
[0004] In response to the above problems, an embodiment of the present application provides a power supply circuit and related equipment. Adopting the solution of the present application is conducive to solving problems such as data loss in the charging warehouse caused by power outages on the grid side.
[0005] To achieve the above-mentioned objectives, in a first aspect, an embodiment of the present application provides a power supply circuit, which is applied to a charging bin of a shared mobile power supply. The charging bin also includes a microcontroller unit MCU, and the power supply circuit includes: an energy storage circuit and a power-off detection circuit; the first port of the energy storage circuit is connected to the power grid side, and the second port of the energy storage circuit is connected to the first port of the power-off detection circuit and the first port of the MCU; the second port of the power-off detection circuit is connected to the second port of the MCU; the power-off detection circuit is used to output a low-voltage signal to the MCU when the voltage of the second port of the energy storage circuit is less than a preset voltage, and the low-voltage signal is used to instruct the MCU to save the operating information of the charging bin, and the energy storage circuit is used to power the MCU when the MCU saves the operating information of the charging bin.
[0006] It can be seen that in the embodiment of the present application, when the voltage value of the voltage output by the energy storage circuit to the MCU is less than the preset voltage, the power-off detection circuit outputs a low-voltage signal to the MCU, so that the MCU starts to execute operations such as saving operating information. In this way, when there is a power outage on the grid side, the MCU can save the operating data in time through the electric energy provided by the energy storage circuit, thereby avoiding problems such as data loss in the charging warehouse caused by a power outage on the grid side.
[0007] In combination with the first aspect, in a possible embodiment, the power-off detection circuit includes: a first transistor, a second transistor, a power supply, a first resistor, a second resistor, a third resistor, a light emitter and a light sensor; the first port of the first resistor is connected to the second port of the energy storage circuit, and the second port of the first resistor is connected to the first port of the first transistor; the second port of the first transistor is connected to the first port of the second transistor, the second port of the second resistor, and the first port of the third resistor, and the third port of the first transistor is connected to the second port of the third resistor and grounded; the second port of the second transistor is connected to the second port of the light emitter, and the third port of the second transistor is connected to the second port of the third resistor and grounded; the first port of the second resistor is connected to the power supply; the first port of the light emitter is connected to the power supply; the first port of the light sensor is connected to the MCU, and the second port of the light sensor is grounded; when the voltage of the second port of the energy storage circuit is less than a preset voltage, a low potential signal is output to the MCU, including: when the voltage of the second port of the energy storage circuit is less than the preset voltage, the second port of the first transistor is disconnected from the third port; the second port of the second transistor is closed to the third port; the power supply supplies power to the light emitter so that the light emitter sends a light signal; the light sensor outputs a low potential signal to the MCU after receiving the light signal sent by the light emitter.
[0008] It can be seen that in the embodiment of the present application, when the voltage output by the energy storage circuit is not less than the preset voltage, the first transistor is in a closed state, so that the second transistor is in an open state, and the power supply does not supply power to the light emitter. Only when the voltage output by the energy storage circuit is less than the preset voltage, the first transistor is in an open state, so that the second transistor is in a closed state, and the power supply supplies power to the light emitter, and the energy consumption is reduced when the voltage output by the energy storage circuit is higher than the preset voltage most of the time.
[0009] In combination with the first aspect, in a possible embodiment, the light emitter and the light sensor are configured in the same package.
[0010] In combination with the first aspect, in a possible embodiment, the power-off detection circuit also includes an overvoltage protection circuit, a fourth resistor and a capacitor; the first port of the overvoltage protection circuit is connected to the second end of the first resistor, and the second port of the overvoltage protection circuit is connected to the first port of the first transistor; the optical emitter is connected to the power supply through the fourth resistor, the first port of the fourth resistor is connected to the power supply, and the second port of the fourth resistor is connected to the first port of the optical emitter; the first port of the capacitor is connected to the second port of the first transistor, the first port of the second transistor, the second port of the second resistor, and the first port of the third resistor, and the second port of the capacitor is grounded.
[0011] It can be seen that in the embodiment of the present application, the operating stability of the power-off detection circuit is improved by the overvoltage protection circuit, the fourth resistor and the capacitor configured in the power-off detection circuit.
[0012] In combination with the first aspect, in a possible embodiment, the power supply circuit also includes: a circuit converter; the energy storage circuit is connected to the MCU through the circuit converter; the first port of the circuit converter is connected to the second port of the energy storage circuit, and the second port of the circuit converter is connected to the second port of the MCU; the circuit converter is used to adjust the voltage value of the voltage output by the energy storage circuit to the MCU to the target voltage, and adjust the frequency of the voltage output by the energy storage circuit to the MCU to the target frequency.
[0013] It can be seen that in the embodiment of the present application, by configuring a circuit converter between the energy storage circuit and the MCU, the voltage value of the voltage output by the energy storage circuit to the MCU is adjusted to the target voltage, and the frequency of the voltage output by the energy storage circuit to the MCU is adjusted to the target frequency, thereby solving the problem of unstable power supply to the MCU caused by the voltage output by the energy storage circuit decreasing as the remaining power of the energy storage circuit decreases.
[0014] In combination with the first aspect, in a possible embodiment, the circuit converter includes: a high-frequency converter, a transformer; the first port of the high-frequency converter is connected to the second port of the energy storage circuit, and the second port of the high-frequency converter is connected to the first port of the transformer; the second port of the transformer is connected to the MCU; the transformer is used to adjust the voltage value of the voltage output by the energy storage circuit to the MCU to the target voltage; the high-frequency converter is used to adjust the frequency of the voltage output by the energy storage circuit to the MCU to the target frequency.
[0015] In combination with the first aspect, in a possible embodiment, the circuit converter also includes: a pulse width modulation PWM circuit; the first port of the PWM circuit is connected to the second port of the transformer, and the second port of the PWM circuit is connected to the third port of the high-frequency converter; the PWM circuit is used to obtain a sampled voltage between the transformer and the MCU; and a pulse width modulation signal is generated according to the sampled voltage, so that the high-frequency converter adjusts the frequency between the MCUs to the target frequency according to the pulse width modulation signal.
[0016] In combination with the first aspect, in a possible embodiment, the power supply circuit also includes a rectifier and filter circuit; the energy storage circuit is connected to the grid side through the rectifier and filter circuit, the first port of the rectifier and filter circuit is connected to the grid side, and the second port of the rectifier and filter circuit is connected to the first port of the energy storage circuit; the rectifier and filter circuit is used to filter the alternating current input to the energy storage circuit from the grid side, and rectify the alternating current input to the energy storage circuit from the grid side into direct current.
[0017] In combination with the first aspect, in a possible embodiment, the power-off detection circuit is further configured to stop outputting a low potential signal to the MCU when the voltage of the second port of the energy storage circuit is not less than a preset voltage.
[0018] In a second aspect, the present application provides a charging bin, which includes any possible circuit in the above-mentioned first aspect.
[0019] It can be understood that the beneficial effects of the embodiment of the second aspect can refer to the beneficial effects in the circuit of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 A connection diagram of a power supply circuit provided in an embodiment of the present application;
[0022] Figure 2 A connection diagram of another power supply circuit provided in an embodiment of the present application;
[0023] Figure 3 A connection diagram of a power failure detection circuit provided in an embodiment of the present application;
[0024] Figure 4 A schematic diagram of voltage during a power-off process provided in an embodiment of the present application;
[0025] Figure 5 A connection diagram of an overvoltage protection circuit provided in an embodiment of the present application;
[0026] Figure 6 A connection diagram of a circuit converter provided in an embodiment of the present application;
[0027] Figure 7 A more detailed connection diagram of a circuit converter provided in an embodiment of the present application;
[0028] Figure 8 A schematic diagram of the structure of a charging bin provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0030] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0031] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0032] The embodiments of the present application are described below in conjunction with the accompanying drawings.
[0033] See also Figure 1 , Figure 1 A connection diagram of a power supply circuit provided in an embodiment of the present application, wherein the power supply circuit 101 is applied to a charging compartment of a shared mobile power source and supplies power to a microcontroller unit (MCU) 102 of the charging compartment and a shared mobile power source 103 connected to the charging compartment. The power supply circuit is specifically a power supply board, including an energy storage circuit 1011 and a power failure detection circuit 1012.
[0034] The first port of the energy storage circuit 1011 is connected to the grid side, the second port of the energy storage circuit 1011 is connected to the first port of the power failure detection circuit 1012 and the first port of the MCU102; the second port of the power failure detection circuit 1012 is connected to the second port of the MCU102.
[0035] The energy storage circuit 1011 includes a large electrolytic capacitor. When the power supply on the grid side is normal, the energy storage circuit 1011 stores the electric energy supplied by the grid side through the large electrolytic capacitor, and supplies power to the MCU 102 and the shared mobile power supply 103 connected to the charging compartment based on the electric energy supplied by the grid side; when the power supply on the grid side is abnormal, such as voltage instability, power outage and other abnormal conditions, the energy storage circuit 1011 supplies power to the MCU 102 based on the electric energy stored in the large electrolytic capacitor, so that the MCU 102 can operate normally when the power supply on the grid side is abnormal to save the operation information of the charging compartment. For the sake of convenience, only one shared mobile power supply 103 is connected to the energy storage circuit 1011. In actual application scenarios, more or fewer shared mobile power supplies 103 may be included.
[0036] Furthermore, the user performs rental and return operations by scanning the QR code provided by the charging warehouse. During the rental and return process, the charging warehouse will generate operating information such as rental time, rental object, rental location, return time, return location, rental duration, and incurred fees. After generating the above operating information, the charging warehouse needs to upload the operating information to the server to provide users with timekeeping, charging and other services. If there is a power supply abnormality on the grid side during the process from the beginning of generating the above operating information to the completion of uploading, it may cause the loss of operating information, upload failure and other problems. To solve this problem, MCU102 will save the operating information of the charging warehouse after receiving a low-voltage signal, including:
[0037] If the MCU 102 is in the operation information generation stage, the operation information continues to be generated and the generated operation information is stored locally, so that after the power failure detection circuit stops outputting the low potential signal, the operation information stored locally is sent to the server;
[0038] If MCU102 is in the operation information uploading stage, it stops uploading the operation information and saves all or part of the operation information that has stopped uploading locally, so that the power-off detection circuit stops outputting the low-voltage signal. After the MCU confirms that the power supply is normal, the operation message saved locally is sent to the server.
[0039] The power-off detection circuit 1012 here is used to detect the voltage output by the energy storage circuit 1011 to the MCU102. When the power supply on the grid side is normal, the energy storage circuit 1011 outputs a voltage to the MCU102 based on a preset fixed voltage value, and the fixed voltage value here is higher than the preset voltage value. After a fault occurs on the grid side, the energy storage circuit 1011 will supply power to the MCU 102 based on the stored electrical energy. During this process, the voltage output by the energy storage circuit 1011 to the MCU 102 will decrease as the electrical energy stored in the energy storage circuit decreases. Therefore, when the voltage output by the energy storage circuit 1011 is lower than the preset voltage, it means that the electrical energy stored in the energy storage circuit 1011 can still supply the MCU 102 for a preset operation time. The preset voltage here is determined according to the specifications of the components configured in the power-off detection circuit 1012. The specific value of this preset voltage can be changed by replacing components of different specifications, such as 1v, 2v, 2.2V, etc. The preset time here is determined based on the specifications of the large electrolytic capacitor or other components in the energy storage circuit, specifically 500ms, 300ms, 200ms, etc.
[0040] When the voltage is less than the preset voltage, the power-off detection circuit 1012 outputs a low-voltage signal to the MCU 102 , causing the MCU 102 to start executing operations such as saving the operating information of the charging bin.
[0041] Optionally, see Figure 2 , Figure 2 A connection diagram of another power supply circuit provided for an embodiment of the present application, wherein a first port of an energy storage circuit 1011 is connected to a grid side, a second port of the energy storage circuit 1011 is connected to a first port of an MCU 102, a second port of the energy storage circuit 1011 is connected to a first port of a power-off detection circuit 1012; and a second port of the power-off detection circuit 1012 is connected to a second port of the MCU 102.
[0042] exist Figure 2 In the connection relationship shown, the energy storage circuit 1011 supplies power to the MCU 102 through the second port, and sends a voltage signal to the power-off detection circuit 1012 through the third port, so that the power-off detection circuit 1012 can judge the amount of electricity stored in the energy storage circuit 1011 according to the voltage value of the voltage signal. When the voltage value of the voltage signal is less than the preset voltage, the power-off detection circuit 1012 judges that the amount of electricity stored in the energy storage circuit is low, and outputs a low-voltage signal to the MCU 102, so that the MCU 102 can save the operating data in time.
[0043] Optionally, the first port of the power off detection circuit 1012 can also be connected to the grid side and the first port of the energy storage circuit 1011 to obtain the voltage output by the grid side, and send a low potential signal to the MCU when the voltage output by the grid side is less than a preset voltage.
[0044] It can be seen that in the embodiment of the present application, when the voltage value of the voltage output by the energy storage circuit to the MCU is less than the preset voltage, the power-off detection circuit outputs a low-voltage signal to the MCU, so that the MCU starts to execute operations such as saving operating information. In this way, when there is a power outage on the grid side, the MCU can save the operating data in time through the electric energy provided by the energy storage circuit, thereby avoiding problems such as data loss in the charging warehouse caused by a power outage on the grid side.
[0045] In a possible embodiment, the power-off detection circuit includes: a first transistor, a second transistor, a first resistor, a second resistor, a third resistor, a light emitter and a light sensor; the first port of the first resistor is connected to the second port of the energy storage circuit, and the second port of the first resistor is connected to the first port of the first transistor; the second port of the first transistor is connected to the first port of the second transistor, the second port of the second resistor, and the first port of the third resistor, and the third port of the first transistor is connected to the second port of the third resistor and grounded; the second port of the second transistor is connected to the second port of the light emitter, and the third port of the second transistor is connected to the second port of the third resistor and grounded; the first port of the second resistor is connected to a power source; the first port of the light emitter is connected to the power source; the first port of the light sensor is connected to an MCU, and the second port of the light sensor is grounded; when the voltage of the second port of the energy storage circuit is less than a preset voltage, a low potential signal is output to the MCU, including: when the voltage of the second port of the energy storage circuit is less than the preset voltage, the second port of the first transistor is disconnected from the third port; the second port of the second transistor is closed to the third port; the power supply supplies power to the light emitter so that the light emitter sends a light signal; and the light sensor outputs a low potential signal to the MCU after receiving the light signal sent by the light emitter.
[0046] Specifically, the specific structure of the power-off detection circuit is described in detail in the embodiment of the present application, which includes a first transistor, a second transistor, a first resistor, a second resistor, a third resistor, a light emitter and a light sensor, and the connection relationship of the above-mentioned components is explained below.
[0047] First of all, the power supply here is specifically an independent power supply existing in the power-off detection circuit, or a power supply integrated in the energy storage circuit to power the light emitter through the energy storage circuit. The first port of the first resistor is connected to the second port of the energy storage circuit, that is to say, the first port of the first resistor is the first port of the power-off detection circuit. When the energy storage circuit outputs voltage to the MCU, the energy storage circuit will simultaneously output a voltage of the same voltage value to the first resistor, so that the power-off detection circuit can judge whether a power-off or other fault occurs based on the voltage value of the output voltage of the energy storage circuit. When the voltage value of the output voltage of the energy storage circuit decreases, the voltage value of the first port of the first transistor will also decrease, thereby changing the closed and open states of the second port and the third port of the first transistor, and the power-off detection circuit can realize the function of judging whether a power-off or other fault occurs on the grid side based on the first transistor. The first transistor and the second transistor here are specifically a MOS tube, a PMOS tube, a bipolar transistor, an insulated gate bipolar transistor, a junction field effect transistor, etc., which control the closed and open states of the second port and the third port through the voltage value of the first port.
[0048] The power-off detection circuit in the embodiment of the present application is specifically implemented through the following process to output a low potential signal to the MCU when the voltage of the second port of the energy storage circuit is less than a preset voltage.
[0049] First, the first port of the first transistor obtains the voltage output from the energy storage circuit, and when the voltage of the first port of the first transistor is not less than the preset voltage, the second port and the third port of the first transistor are turned on. Since the second port of the first transistor is connected to the second port of the first transistor and the first port of the second transistor, the second port of the second resistor, and the first port of the third resistor, and the third port of the first transistor is connected to the second port of the third resistor and grounded, the voltage of the first port of the second transistor and the voltage of the second port of the first transistor are approximately 0 at this time, the second port of the second transistor is disconnected from the third port, the optical transmitter has no power supply, the optical sensor cannot receive the optical signal sent by the optical transmitter, and will not output a low potential signal to the MCU.
[0050] The preset voltage here is determined based on the specifications of the first transistor. When the voltage of the first port of the first transistor is less than the preset voltage, the second port of the first transistor is disconnected from the third port. At this time, the voltage of the first port of the second transistor is approximately the voltage of the second port of the first transistor and rises to a high level. The second port of the second transistor is connected to the third port, and the power supply supplies power to the optical transmitter. The optical transmitter sends a light signal, and the optical sensor outputs a low potential signal after receiving the light signal sent by the optical transmitter, so that the MCU receives the low potential signal.
[0051] For example, see Figure 3 , Figure 3A connection diagram of a power failure detection circuit provided in an embodiment of the present application is shown in FIG. Figure 3 In the power-off detection circuit shown, the first transistor and the second transistor are both NMOS transistors, wherein the voltage output by the energy storage circuit is transmitted to the first transistor, ie, Q1 here, through the first resistor R1.
[0052] When the voltage output by the energy storage circuit is not less than the preset voltage, the driving voltage of Q1 is also approximately not less than the preset voltage, so the drain and source of Q1 are turned on, and the driving voltage of the second transistor, i.e., Q2, is approximately 0. The drain and source of Q2 are disconnected, and the power supply, i.e., VCC, cannot supply power to the light emitter, i.e., U5B, and the light sensor, i.e., U5A, cannot be excited.
[0053] When the voltage output by the energy storage circuit is less than the preset voltage, the driving voltage of Q1 is also approximately less than the preset voltage, so the drain and source of Q1 are disconnected, the driving voltage of Q2 is approximately the same as the drain voltage of Q1, becomes a high level, the drain and source of Q2 are turned on, and VCC supplies power to U5B through the loop formed by the second resistor R2, the third resistor R3, Q2 and U5B, so that U5B sends an optical signal. After U5A receives the optical signal sent by U5B, it outputs a low potential signal to the MCU.
[0054] Specifically, see Figure 4 , Figure 4 A voltage schematic diagram of a power-off process provided in an embodiment of the present application, including a voltage V_Ecap output by the energy storage circuit to the MCU, a drain voltage Q1_Vds of Q1, a drain voltage Q2_Vds of Q2, and a voltage V_out received by the MCU.
[0055] As shown in the figure, during the time period 0-t1, the power supply on the grid side is normal, and the voltage V_Ecap output by the energy storage circuit to the MCU is a fixed value V1. The energy storage circuit supplies power to the MCU based on the power on the grid side and stores the power provided by the grid side. The power provided by the energy storage circuit is converted into the target voltage and target frequency by the circuit converter and input into the MCU, so the voltage V_out received by the MCU is also a fixed value V2. For a detailed description of the circuit converter, please refer to the subsequent related description.
[0056] The driving voltage of Q1 is stably turned on, so the drain and source of Q1 are closed. At the same time, since the source of Q1 is grounded, the drain voltage Q1_Vds of Q1 is 0, and the driving voltage of Q2 and Q1_Vds are approximately 0. Therefore, Q2 is not turned on, the source and drain of Q2 are disconnected, and Q2_Vds is the same as the voltage of the power supply, which is approximately V4.
[0057] During the time period t1-t2, the power supply on the grid side is abnormal, the energy storage circuit stops supplying power to the MCU based on the power on the grid side, and starts supplying power to the MCU based on the stored power. As the power stored in the energy storage circuit continues to decrease, V_Ecap also continues to decrease, from V1 at t1 to V3 at t2. The drive voltage of Q1 also decreases with the decrease of V_Ecap, until Q1 is turned off at t2, the drain and source of Q1 are disconnected, and the drive voltage of Q2 is approximately the same as Q1_Vds. At t2, after the drive voltage of Q2 becomes a high level, Q2 is turned on, the drain and source of Q2 are closed, and Q2_Vds is approximately 0. At this time, U5B in the power-off detection circuit is excited and sends a signal to U5A. After U5A receives the optical signal sent by U5B, it outputs a low-potential signal to the MCU.
[0058] During the time period t2-t3, the energy stored in the circuit continues to decrease, so V_Ecap also continues to decrease. Since there is power supply, U5B will continue to send signals to U5A, and U5A will continue to output low-voltage signals to the MCU. After receiving the low-voltage signal, the MCU continues to perform operations such as saving operating information, and V_out also remains unchanged at V2.
[0059] At time t3-t4, V_Ecap also gradually drops to 0. At time t3, although the energy storage circuit still has a small amount of power supply, it can no longer maintain the voltage required for the normal operation of the energy storage circuit. Therefore, after time t3, the energy storage circuit stops running and V_out drops to 0.
[0060] In this example, only the connection situation where the first transistor and the second transistor are both NMOS transistors is shown. When the first transistor or the second transistor is a PMOS transistor, a bipolar transistor, an insulated gate bipolar transistor, a junction field effect transistor or other types of transistors, the power-off detection circuit can also achieve the same effect through different connection methods, which will not be repeated here.
[0061] In addition, the first port of U5B is connected to the MCU to output a low potential signal to the MCU through the first port, and the second port of U5B is connected to the signal ground. The signal ground is used to provide a signal reference potential and a return path to reduce the noise interference caused by the power ground and improve the purity and accuracy of the signal.
[0062] If U5B is specifically a photodiode, it directly outputs a low-potential signal to the MCU after receiving the light signal sent by U5B; if U5B is specifically a phototransistor, after receiving the light signal sent by U5B, it is turned on so that one end of the MCU is connected to the signal ground, thereby outputting a low-potential signal to the MCU.
[0063] It can be seen that in the embodiment of the present application, when the voltage output by the energy storage circuit is not less than the preset voltage, the first transistor is in a closed state, so that the second transistor is in an open state, and the power supply does not supply power to the light emitter. Only when the voltage output by the energy storage circuit is less than the preset voltage, the first transistor is in an open state, so that the second transistor is in a closed state, and the power supply supplies power to the light emitter, and the energy consumption is reduced when the voltage output by the energy storage circuit is higher than the preset voltage most of the time.
[0064] In a possible embodiment, the light emitter and the light sensor are configured in the same package.
[0065] In an embodiment of the present application, the optical transmitter and the optical sensor are configured in the same package, which is located in the optocoupler and is used to provide physical protection and an optical signal transmission channel for the optical transmitter and the optical sensor, so that the optical signal sent by the optical transmitter can only be received by the optical sensor, and the optical sensor can only receive the optical signal sent by the optical transmitter.
[0066] In a possible embodiment, the power-off detection circuit also includes an overvoltage protection circuit, a fourth resistor and a capacitor; the first port of the overvoltage protection circuit is connected to the second end of the first resistor, and the second port of the overvoltage protection circuit is connected to the first port of the first transistor; the light emitter is connected to the power supply through the fourth resistor, the first port of the fourth resistor is connected to the power supply, and the second port of the fourth resistor is connected to the first port of the light emitter; the first port of the capacitor is connected to the second port of the first transistor, the first port of the second transistor, the second port of the second resistor, and the first port of the third resistor, and the second port of the capacitor is grounded.
[0067] Specifically, in an embodiment of the present application, the power-off detection circuit also includes an overvoltage protection circuit, wherein the first port of the overvoltage protection circuit is connected to the second end of the first resistor, and the second port of the overvoltage protection circuit is connected to the first port of the first transistor, so that the voltage of the first port of the first transistor is not higher than the protection voltage, thereby protecting the first transistor.
[0068] The fourth resistor here is used to limit the current on the first end of the second transistor, and the capacitor here is used to filter out high-frequency noise or fluctuations of the power supply and help stabilize the voltage to avoid instantaneous voltage drops or fluctuations.
[0069] For example, see Figure 5 , Figure 5A connection diagram of an overvoltage protection circuit provided in an embodiment of the present application, in which the overvoltage protection circuit includes a fifth resistor R5 and a voltage zener diode ZD1, wherein the first port of R5 is connected to the second port of the first resistor and the first port of the first transistor, the second port of R5 is connected to the second port of ZD1 and is grounded; the first port of ZD1 is connected to the ground and is connected to the second port of the first resistor and the first port of the first transistor. Here, R5 is used to limit the current, and ZD1 is used to limit the voltage of the first port of the first transistor to below the protection voltage, and the protection voltage is specifically determined by the specification of ZD1, such as 3.3v, 2.2v, etc.
[0070] It can be seen that in the embodiment of the present application, the operating stability of the power-off detection circuit is improved by the overvoltage protection circuit, the fourth resistor and the capacitor configured in the power-off detection circuit.
[0071] In a possible embodiment, the power supply circuit also includes: a circuit converter; the energy storage circuit is connected to the MCU through the circuit converter; the first port of the circuit converter is connected to the second port of the energy storage circuit, and the second port of the circuit converter is connected to the second port of the MCU; the circuit converter is used to adjust the voltage value of the voltage output by the energy storage circuit to the MCU to the target voltage, and adjust the frequency of the voltage output by the energy storage circuit to the MCU to the target frequency.
[0072] Specifically, since the voltage output by the energy storage circuit will decrease as the residual energy of the energy storage circuit decreases, in order to ensure the normal operation of the MCU, the power supply circuit is also configured with a circuit converter between the energy storage circuit and the MCU. The circuit converter here is specifically a DC-DC converter, which is used to adjust the voltage value of the voltage output by the energy storage circuit to the MCU to a target voltage, and adjust the frequency of the voltage output by the energy storage circuit to the MCU to a target frequency and then input it into the MCU, so that the MCU can operate normally.
[0073] Furthermore, when the power supply circuit also includes a circuit converter, since the voltage output by the energy storage circuit to the MCU will be converted into a target voltage and a target frequency based on the circuit converter, when the power supply circuit also includes a circuit converter, the first port of the power-off detection circuit is connected to the second port of the energy storage circuit and the first port of the circuit converter, so that the voltage sent by the energy storage circuit to the power-off detection circuit is the same as the voltage sent by the energy storage circuit to the circuit converter, thereby avoiding the situation where the voltage value received by the power-off detection circuit is the voltage value converted by the circuit converter.
[0074] It can be seen that in the embodiment of the present application, by configuring a circuit converter between the energy storage circuit and the MCU, the voltage value of the voltage output by the energy storage circuit to the MCU is adjusted to the target voltage, and the frequency of the voltage output by the energy storage circuit to the MCU is adjusted to the target frequency, thereby solving the problem of unstable power supply to the MCU caused by the voltage output by the energy storage circuit decreasing as the remaining power of the energy storage circuit decreases.
[0075] In a possible embodiment, the circuit converter includes: a high-frequency converter, a transformer; the first port of the high-frequency converter is connected to the second port of the energy storage circuit, and the second port of the high-frequency converter is connected to the first port of the transformer; the second port of the transformer is connected to the MCU; the transformer is used to adjust the voltage value of the voltage output by the energy storage circuit to the MCU to the target voltage; the high-frequency converter is used to adjust the frequency of the voltage output by the energy storage circuit to the MCU to the target frequency.
[0076] Specifically, see Figure 6 , Figure 6 A connection diagram of a circuit converter provided in an embodiment of the present application, as shown in the figure, the circuit converter includes a high-frequency converter and a transformer, the first port of the high-frequency converter is connected to the second port of the energy storage circuit, the second port of the high-frequency converter is connected to the first port of the transformer; the second port of the transformer is connected to the MCU. The high-frequency converter and the transformer can also change the connection order, so that the first port of the transformer is connected to the second port of the energy storage circuit, the second port of the transformer is connected to the first port of the high-frequency converter; the second port of the high-frequency converter is connected to the MCU.
[0077] In a possible embodiment, the circuit converter also includes: a pulse width modulation (PWM) circuit; a first port of the PWM circuit is connected to a second port of the transformer, and a second port of the PWM circuit is connected to a third port of the high-frequency converter; the PWM circuit is used to obtain a sampled voltage between the transformer and the MCU; and a pulse width modulation signal is generated according to the sampled voltage, so that the high-frequency converter adjusts the frequency between the MCUs to the target frequency according to the pulse width modulation signal.
[0078] Specifically, see Figure 7 , Figure 7 A more detailed connection diagram of a circuit converter provided in an embodiment of the present application, the circuit converter also includes: a PWM circuit, a first port of the PWM circuit is connected to the second port of the transformer, and the second port of the PWM circuit is connected to the third port of the high-frequency converter. The PWM circuit obtains a sampled voltage between the transformer and the MCU, generates a pulse width modulation signal according to the sampled voltage, and the PWM circuit adjusts the width of the pulse width modulation signal (i.e., the time ratio of the high level, usually referred to as the duty cycle) by the difference between the sampled voltage and the reference voltage so that the frequency of the voltage provided by the high-frequency converter tank circuit to the MCU is adjusted to the target frequency.
[0079] In a possible embodiment, the power supply circuit also includes a rectifier and filter circuit; the energy storage circuit is connected to the grid side through the rectifier and filter circuit, the first port of the rectifier and filter circuit is connected to the grid side, and the second port of the rectifier and filter circuit is connected to the first port of the energy storage circuit; the rectifier and filter circuit is used to filter the alternating current input to the energy storage circuit from the grid side, and rectify the alternating current input to the energy storage circuit from the grid side into direct current.
[0080] Specifically, in the embodiment of the present application, the energy storage circuit is connected to the grid side through the rectifier and filter circuit, the first port of the rectifier and filter circuit is connected to the grid side, and the second port of the rectifier and filter circuit is connected to the first port of the energy storage circuit. In this way, alternating current (AC) is converted into direct current (DC), and the fluctuation in the AC signal is filtered out to make the output DC more stable. A stable DC output is achieved.
[0081] In a possible embodiment, the power-off detection circuit is further configured to stop outputting a low potential signal to the MCU when the voltage of the second port of the energy storage circuit is not less than a preset voltage.
[0082] Specifically, in the embodiment of the present application, if the power supply on the grid side returns to normal during the process of the energy storage circuit supplying power to the MCU based on the stored power, the energy storage circuit will stop supplying power to the MCU based on the stored power and supply power to the MCU based on the power provided by the grid, so the voltage provided by the energy storage circuit to the MCU will be restored to a fixed voltage value corresponding to the grid voltage. At the same time, the power failure detection circuit also detects that the voltage output by the energy storage circuit to the MCU has become a fixed voltage value, so the power failure detection circuit will stop outputting a low potential signal to the MCU, thereby reducing the power loss of the power failure detection circuit.
[0083] Furthermore, if the power-off detection circuit includes a first transistor, a second transistor, a power supply, a first resistor, a second resistor, a third resistor, a light emitter and a light sensor, and is connected in the manner described in the aforementioned application embodiment, please refer to the relevant content in the aforementioned application embodiment for the detailed connection relationship, which will not be repeated here. Here, stopping outputting a low-potential signal to the MCU specifically includes that the second port and the third port of the first transistor are turned on, the second port and the third port of the second transistor are disconnected, the power supply stops supplying power to the light emitter, and the light emitter stops sending light signals to the light sensor, so that the light sensor stops sending low-potential signals to the MCU.
[0084] Through the circuit in the above-mentioned application embodiment, a low-voltage signal is output to the MCU through the power-off detection circuit, so that the MCU can save the operating data in time, avoiding the problem of data loss in the charging bin caused by power outages on the grid side. The time of outputting the low-voltage signal to the MCU is controlled by the first transistor and the second transistor, thereby reducing the energy consumption during normal operation of the power supply circuit. The operating stability of the power-off detection circuit is improved by the overvoltage protection circuit, the fourth resistor and the capacitor. The circuit converter solves the problem of unstable power supply to the MCU caused by the voltage output by the energy storage circuit decreasing as the remaining power of the energy storage circuit decreases.
[0085] Based on the description of the above embodiment, the present application also provides a charging compartment 800, see Figure 8 , Figure 8 A schematic diagram of the structure of a charging warehouse provided in an embodiment of the present application, including a charging warehouse body 801, a charging compartment 802 and an identification position 803. The charging warehouse body 801 is configured with any possible power supply circuit described in the above embodiments, the charging compartment 802 is used to place a shared mobile power supply, and only 8 charging compartments 802 are shown here. The charging warehouse 800 may also include more or fewer charging compartments 802. The identification position 803 is used to display the identification mark of the charging warehouse 800, so that the identification mark displayed by the identification position 803 can be used for operations such as renting and returning. The identification mark here is specifically presented in the form of a QR code, a bar code, a digital mark, a text mark, etc.
[0086] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A power supply circuit, characterized in that: A charging compartment for a shared mobile power source, wherein the charging compartment further comprises a microcontroller unit MCU, and the power supply circuit comprises: an energy storage circuit and a power failure detection circuit; The first port of the energy storage circuit is connected to the grid side, the second port of the energy storage circuit is connected to the first port of the power failure detection circuit and the first port of the MCU; the second port of the power failure detection circuit is connected to the second port of the MCU; The power-off detection circuit is used to output a low-potential signal to the MCU when the voltage of the second port of the energy storage circuit is less than a preset voltage, and the low-potential signal is used to instruct the MCU to save the operation information of the charging bin. The energy storage circuit is used to power the MCU when the MCU saves the operating information of the charging bin.
2. The circuit according to claim 1, characterized in that The power-off detection circuit comprises: a first transistor, a second transistor, a first resistor, a second resistor, a third resistor, a light emitter and a light sensor; The first port of the first resistor is connected to the second port of the energy storage circuit, and the second port of the first resistor is connected to the first port of the first transistor; the second port of the first transistor is connected to the first port of the second transistor, the second port of the second resistor and the first port of the third resistor, and the third port of the first transistor is connected to the second port of the third resistor and grounded; the second port of the second transistor is connected to the second port of the light emitter, and the third port of the second transistor is connected to the second port of the third resistor and grounded; the first port of the second resistor is connected to a power supply; the first port of the light emitter is connected to the power supply; the first port of the light sensor is connected to the MCU, and the second port of the light sensor is grounded; When the voltage at the second port of the energy storage circuit is less than a preset voltage, outputting a low potential signal to the MCU comprises: When the voltage of the second port of the energy storage circuit is less than a preset voltage, the second port of the first transistor is disconnected from the third port; the second port of the second transistor is closed to the third port; the power supply supplies power to the light emitter so that the light emitter sends a light signal; and the light sensor outputs the low potential signal to the MCU after receiving the light signal sent by the light emitter.
3. The circuit according to claim 2, characterized in that The light emitter and the light sensor are configured in the same package.
4. The circuit according to claim 2 or 3, characterized in that The power failure detection circuit also includes an overvoltage protection circuit, a fourth resistor and a capacitor; The first port of the overvoltage protection circuit is connected to the second end of the first resistor, and the second port of the overvoltage protection circuit is connected to the first port of the first transistor; The optical emitter is connected to the power supply through the fourth resistor, the first port of the fourth resistor is connected to the power supply, and the second port of the fourth resistor is connected to the first port of the optical emitter; the first port of the capacitor is connected to the second port of the first transistor, the first port of the second transistor, the second port of the second resistor, and the first port of the third resistor, and the second port of the capacitor is grounded.
5. The circuit according to any one of claims 1 to 4, characterized in that: The power supply circuit further includes: a circuit converter; The energy storage circuit is connected to the MCU via the circuit converter; the first port of the circuit converter is connected to the second port of the energy storage circuit, and the second port of the circuit converter is connected to the second port of the MCU; The circuit converter is used to adjust the voltage value of the voltage output by the energy storage circuit to the MCU to a target voltage, and to adjust the frequency of the voltage output by the energy storage circuit to the MCU to a target frequency.
6. The circuit according to claim 5, characterized in that The circuit converter includes: a high frequency converter and a transformer; The first port of the high-frequency converter is connected to the second port of the energy storage circuit, the second port of the high-frequency converter is connected to the first port of the transformer; the second port of the transformer is connected to the MCU; The transformer is used to adjust the voltage value of the voltage output by the energy storage circuit to the MCU to a target voltage; The high-frequency converter is used to adjust the frequency of the voltage output by the energy storage circuit to the MCU to a target frequency.
7. The circuit according to claim 6, characterized in that The circuit converter further comprises: a pulse width modulation PWM circuit; The first port of the PWM circuit is connected to the second port of the transformer, and the second port of the PWM circuit is connected to the third port of the high-frequency converter; The PWM circuit is used to obtain a sampled voltage between the transformer and the MCU; A pulse width modulation signal is generated according to the sampled voltage, so that the high frequency converter adjusts the frequency between the MCUs to a target frequency according to the pulse width modulation signal.
8. The circuit according to any one of claims 1 to 7, characterized in that: The power supply circuit also includes a rectifier and filter circuit; The energy storage circuit is connected to the grid side through the rectifier and filter circuit, the first port of the rectifier and filter circuit is connected to the grid side, and the second port of the rectifier and filter circuit is connected to the first port of the energy storage circuit; The rectifier and filter circuit is used to filter the alternating current input from the grid side to the energy storage circuit, and rectify the alternating current input from the grid side to the energy storage circuit into direct current.
9. The circuit according to any one of claims 1 to 8, characterized in that: The power-off detection circuit is also used to stop outputting the low potential signal to the MCU when the voltage of the second port of the energy storage circuit is not less than a preset voltage.
10. A charging compartment, characterized in that: The charging compartment comprises the circuit described in any one of claims 1-9.