Logic switching circuit of power supply system
By designing a logic switching circuit for the power supply system, the switching between battery and adapter power supply modes is realized, solving the problem of the battery not being able to be fully charged. This ensures that the battery is charged when powered by the adapter and switches to battery power when the adapter is unplugged, improving the stability of battery power supply and the normal operation of the device.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2026-03-03
AI Technical Summary
In existing technologies, when a product with a battery and adapter is plugged in for charging, the battery cannot be fully charged, causing the device's charging indicator light to flash and resulting in a poor user experience. Existing software algorithms have failed to fundamentally solve this problem.
Design a power supply system logic switching circuit. The main control circuit provides control signals to the power supply switching circuit to realize the switching between battery and adapter power supply modes. This ensures that the battery is charged when powered by the adapter and switches to battery power during printing or when the adapter is unplugged, thus avoiding power output disorder.
It achieves stable battery charging and power supply, avoids power output disorder, improves the stability of battery power supply and normal operation of the device, and enhances the user experience.
Smart Images

Figure CN223967686U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of logic switching technology for circuit power supply systems, and in particular to a logic switching circuit for power supply systems. Background Technology
[0002] Power supply system logic switching circuits are generally used in circuit design for power supply logic control, providing a stable power supply to various hardware functional modules, avoiding safety issues caused by unstable power supply, and improving product stability.
[0003] Currently, in products that include both a battery and an adapter, the adapter typically only charges the battery and does not power the entire hardware system; therefore, the power supply system switching circuit is not used.
[0004] In existing technologies, the entire load is powered solely by the battery. When an adapter is plugged in to charge the battery, the entire system simultaneously consumes battery energy, causing the battery to never fully charge, resulting in the device's charging indicator light flashing continuously and a poor user experience. This problem is usually solved through software algorithms, but since the battery is not actually fully charged, it does not fundamentally address the issue of the battery not being fully charged. Utility Model Content
[0005] In view of this, it is necessary to provide a power supply system logic switching circuit to solve the technical problem of unstable power supply in the prior art.
[0006] To solve the above problems, this utility model provides a power supply system logic switching circuit, including: an adapter for providing power to a label printer, a battery, and a functional circuit;
[0007] A power supply switching circuit, electrically connected to the adapter and the battery, is used to turn on the adapter to supply power to the functional circuit based on a first control signal, and to turn on the adapter to charge the battery based on the first control signal, and to cut off the power supply from the battery to the functional circuit.
[0008] The main control circuit, electrically connected to the power supply switching circuit, is used to send a first control signal to the power supply switching circuit when it detects that the adapter is inserted before the label printer starts printing or when the adapter is inserted during the printing process and the current printed page is completed.
[0009] In one possible implementation, the main control circuit includes: a main control chip, a crystal oscillator, a first resistor, and a first capacitor, wherein the main control chip includes a reset pin, a crystal oscillator input pin, a crystal oscillator output pin, and at least three GPIO pins;
[0010] The crystal input pin and crystal output pin of the main control chip are electrically connected to the crystal oscillator, respectively.
[0011] The reset pin is electrically connected to one end of the first resistor and one end of the first capacitor, respectively.
[0012] The other end of the first resistor is electrically connected to an external power supply, and the other end of the first capacitor is grounded.
[0013] In one possible implementation, the power supply system logic switching circuit further includes:
[0014] The adapter detection circuit, electrically connected to the main control circuit, is used to detect whether the adapter is inserted before the label printer starts printing and to detect whether the adapter is inserted or removed during the printing process, and sends the detection results to the main control circuit.
[0015] The main control circuit is also used to send a second control signal to the power supply switching circuit when it detects that the adapter has not been inserted before the label printer starts printing or when it detects that the adapter has been unplugged during the printing process, so that the power supply switching circuit can connect the battery to supply power to the functional circuit and disconnect the adapter from supplying power to the functional circuit based on the second control signal.
[0016] In one possible implementation, the adapter detection circuit includes: a second resistor, a third resistor, and a fourth resistor;
[0017] Wherein, one end of the second resistor is electrically connected to an external power supply, and the other end is electrically connected to one end of the third resistor and the fourth resistor;
[0018] The other end of the third resistor is grounded;
[0019] The other end of the fourth resistor is electrically connected to the main control circuit.
[0020] In one possible implementation, the other end of the fourth resistor is electrically connected to the first GPIO pin of the main control chip.
[0021] In one possible implementation, the power supply switching circuit includes: a switching circuit and a protection circuit that are electrically connected to each other;
[0022] The switching circuit and protection circuit are also electrically connected to the main control chip;
[0023] The switching circuit is used to connect the adapter to supply power to the label printer and disconnect the battery based on a first control signal, or to connect the battery to supply power to the label printer and disconnect the adapter based on a second control signal.
[0024] The protection circuit is used to disconnect the switching circuit when the switching circuit malfunctions.
[0025] In one possible implementation, the switching circuit includes: a first PMOS transistor, a second PMOS transistor, a third PMOS transistor, a fourth PMOS transistor, a first transistor, and a second transistor;
[0026] The drain of the first PMOS transistor is electrically connected to the battery, the source is electrically connected to the source of the second PMOS transistor, and the gate is electrically connected to the gate of the second PMOS transistor.
[0027] The drain of the second PMOS transistor is electrically connected to the label printer, and the gate is electrically connected to the collector of the first transistor.
[0028] The base of the first transistor is electrically connected to the main control circuit, and the emitter is grounded;
[0029] The drain of the third PMOS transistor is electrically connected to the label printer, the source is electrically connected to the source of the fourth PMOS transistor, and the gate is electrically connected to the gate of the fourth PMOS transistor.
[0030] The drain of the fourth PMOS transistor is electrically connected to the adapter, and the gate is electrically connected to the collector of the second transistor.
[0031] The base of the second transistor is electrically connected to the main control circuit, and the emitter is grounded.
[0032] In one possible implementation, the switching circuit further includes: a fifth resistor, a sixth resistor, a seventh resistor, an eighth resistor, a ninth resistor, a tenth resistor, an eleventh resistor, a twelfth resistor, a second capacitor, and a third capacitor;
[0033] The source and gate of the first PMOS transistor are electrically connected to the two ends of the fifth resistor, respectively.
[0034] The gate of the second PMOS transistor is electrically connected to the collector of the first transistor through the sixth resistor.
[0035] The base of the first transistor is electrically connected to the main control circuit through the seventh resistor;
[0036] The base and emitter of the first transistor are electrically connected to the two ends of the eighth resistor, respectively.
[0037] One end of the second capacitor is electrically connected to the base of the first transistor, and the other end is grounded;
[0038] The source and gate of the third PMOS transistor are electrically connected to the two ends of the ninth resistor, respectively.
[0039] The gate of the fourth PMOS transistor is electrically connected to the collector of the second transistor through the tenth resistor;
[0040] The base of the second transistor is electrically connected to the main control circuit through the eleventh resistor;
[0041] The base and emitter of the second transistor are electrically connected to the two ends of the twelfth resistor, respectively.
[0042] One end of the third capacitor is electrically connected to the base of the second transistor, and the other end is grounded.
[0043] In one possible implementation, the first to fourth PMOS transistors are of type WMS12P03T1.
[0044] In one possible implementation, the base of the first transistor is electrically connected to the second GPIO pin of the main control chip via a seventh resistor;
[0045] The base of the second transistor is electrically connected to the third GPIO pin of the main control chip through the eleventh resistor.
[0046] In one possible implementation, the protection circuit includes: a protection chip and a third transistor, wherein the protection chip includes two input terminals and one output terminal;
[0047] The two input terminals of the protection chip are electrically connected to the main control circuit, and the output terminal is electrically connected to the base of the third transistor.
[0048] The emitter of the third transistor is grounded, and its collector is electrically connected to the base of the first PMOS transistor.
[0049] In one possible implementation, the protection chip is model RS1G08XF5.
[0050] In one possible implementation, the protection circuit further includes: a thirteenth resistor, a fourteenth resistor, a fifteenth resistor, a sixteenth resistor, and a seventeenth resistor;
[0051] The base and emitter of the third transistor are electrically connected to the two ends of the thirteenth resistor, respectively.
[0052] The collector of the third transistor is electrically connected to the base of the first transistor through the fourteenth resistor;
[0053] The output terminal of the protection chip and the base of the third transistor are electrically connected to the two ends of the fifteenth resistor, respectively.
[0054] The first input terminal of the protection chip is electrically connected to the main control circuit through the sixteenth resistor;
[0055] The second input terminal of the protection chip is electrically connected to the main control circuit through the seventeenth resistor.
[0056] In one possible implementation, the first input terminal of the protection chip is electrically connected to the second GPIO pin of the main control chip through the sixteenth resistor;
[0057] The second input terminal of the protection chip is electrically connected to the third GPIO pin of the main control chip through the seventeenth resistor.
[0058] In one possible implementation, the adapter is also electrically connected to the battery;
[0059] The adapter is also used to charge the battery when electrically connected to an external power source.
[0060] The beneficial effects of this utility model are as follows: This utility model provides a power supply system logic switching circuit. The main control circuit provides different control signals to the power supply switching circuit, thereby controlling the power supply switching circuit to switch between two power supply modes: battery-only and adapter-only. This single-power supply mode can stably output power. Furthermore, when powered only by the adapter, the battery can be in a unidirectional charging state and will not be in an output state until a control signal is received, ensuring the battery reaches a full charge and enhancing the stability of battery power supply. In addition, the main control circuit will switch to adapter power supply only after confirming the completion of the current printing interface, and will cut off power and switch to battery power supply before restarting the printer when the adapter is detected being unplugged during printing. This effectively avoids power output disturbances caused by accidental factors, thus effectively solving the technical problem of unstable power supply in the prior art. Attached Figure Description
[0061] Figure 1 A schematic diagram of a structure of an embodiment of the logic switching circuit of the power supply system provided by this utility model;
[0062] Figure 2 for Figure 1 A schematic diagram of the structure of one embodiment of the main control circuit;
[0063] Figure 3 for Figure 1 A schematic diagram of an embodiment of the adapter detection circuit;
[0064] Figure 4 for Figure 1 A schematic diagram of one embodiment of the power supply switching circuit. Detailed Implementation
[0065] It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.
[0066] The technical solutions of the present utility model will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present utility model, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present utility model without creative effort are within the scope of protection of the present utility model.
[0067] It should be noted that all directional indicators (such as up, down, left, right, front, back, etc.) in this utility model embodiment are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicator will also change accordingly.
[0068] Furthermore, the use of terms such as "first" and "second" in this utility model is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. When the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed by this utility model.
[0069] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the present invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0070] like Figure 1 As shown in the figure, a specific embodiment of the present invention discloses a power supply system logic switching circuit 10, comprising:
[0071] An adapter 110, a battery 120, and a functional circuit 130 for providing power to a label printer; an adapter, a battery, and a functional circuit for providing power to a label printer;
[0072] The power supply switching circuit 140 is electrically connected to the adapter 110 and the battery 120. It is used to turn on the adapter 110 to supply power to the functional circuit 130 based on the first control signal, and to turn on the adapter 110 to charge the battery 120 based on the first control signal, and to turn off the power supply from the battery 120 to the functional circuit 130.
[0073] The main control circuit 150 is electrically connected to the power supply switching circuit 140. It is used to send a first control signal to the power supply switching circuit 140 when it detects that the adapter 110 is inserted before the label printer starts printing or when the adapter 110 is inserted during the printing process and the current printed page is completed. It also sends a second control signal to the power supply switching circuit 140 when it detects that the adapter 110 is not inserted before the label printer starts printing or when it detects that the adapter 110 is unplugged during the printing process.
[0074] It should be noted that in products with batteries, the battery typically powers the entire system. When an adapter is plugged in to charge the battery, the system continues to consume battery energy, preventing the battery from fully charging. This invention, however, uses a simpler power supply system logic switching circuit to control the system's power supply path. When an adapter is plugged in to charge the battery, the logic switching circuit switches to adapter power, eliminating battery energy consumption and allowing the battery to fully charge normally. This avoids repeated charging and reduces battery life.
[0075] Compared with existing technologies, the power supply system logic switching circuit provided by this utility model provides different control signals to the power supply switching circuit through the main control circuit, thereby controlling the power supply switching circuit to switch between two power supply modes: battery-only and adapter-only. This single power supply mode can stably output power. Furthermore, when powered by the adapter only, the battery can be in a unidirectional charging state and will not be in the output state until the control signal is received, ensuring that the battery can reach a full charge and enhancing the stability of battery power supply. In addition, the main control circuit will switch to adapter power supply only after confirming that the current printing interface is complete, and will cut off the power and switch to battery power supply before restarting the printer when the adapter is detected to be unplugged during printing. This can effectively avoid power output disorder caused by accidental factors, thereby effectively solving the technical problem of unstable power supply in existing technologies.
[0076] like Figure 2 In one possible implementation, the main control circuit 150 includes: a main control chip U4, a crystal oscillator X1, a first resistor R30 and a first capacitor C38, wherein the main control chip U4 includes a reset pin 14, a crystal oscillator input pin 12, a crystal oscillator output pin 13 and at least three GPIO pins 80, 93 and 95.
[0077] The crystal input pin 12 and crystal output pin 13 of the main control chip U4 are electrically connected to the crystal X1 to provide clock signals.
[0078] The reset pin 14 is electrically connected to one end of the first resistor R30 and the first capacitor C38, respectively, to provide a reset signal;
[0079] The other end of the first resistor R30 is electrically connected to the external power supply, and the other end of the first capacitor C38 is grounded.
[0080] In one possible implementation, the power supply system logic switching circuit 10 further includes:
[0081] The adapter detection circuit 160 is electrically connected to the main control circuit 150. It is used to detect whether the adapter 110 is inserted before the label printer starts printing and to detect whether the adapter 110 is inserted or removed during the printing process. The detection results are sent to the main control circuit 150.
[0082] The main control circuit 150 is also used to send a second control signal to the power supply switching circuit 140 when it is detected that the adapter 110 is not inserted before the label printer starts printing or when it is detected that the adapter 110 is unplugged during the printing process, so that the power supply switching circuit 140 connects the battery 120 to supply power to the functional circuit 130 and disconnects the adapter 110 from supplying power to the functional circuit 130 based on the second control signal.
[0083] like Figure 3 In one possible implementation, the adapter detection circuit 160 includes: a second resistor R6, a third resistor R12, and a fourth resistor R200;
[0084] Among them, one end of the second resistor R6 is electrically connected to the external power supply, and the other end is electrically connected to one end of the third resistor R12 and the fourth resistor R200 respectively.
[0085] The other end of the third resistor R12 is grounded;
[0086] The other end of the fourth resistor R200 is electrically connected to the main control circuit 150;
[0087] In one possible implementation, the other end of the fourth resistor R200 is electrically connected to the first GPIO pin 80 of the main control chip U4, where the first GPIO pin 80 is mainly used to provide logic input for adapter insertion detection.
[0088] In one possible implementation, the power supply switching circuit 140 includes a switching circuit 141 and a protection circuit 142 that are electrically connected to each other.
[0089] The switching circuit 141 and the protection circuit 142 are also electrically connected to the main control chip U4;
[0090] The switching circuit 141 is used to turn on the adapter 110 to supply power to the label printer and turn off the battery 120 based on the first control signal, or to turn on the battery 120 to supply power to the label printer and turn off the adapter 110 based on the second control signal.
[0091] The protection circuit 142 is used to disconnect the switching circuit 141 when the switching circuit 141 malfunctions.
[0092] like Figure 4 In one possible implementation, the switching circuit 141 includes: a first PMOS transistor Q4, a second PMOS transistor Q7, a third PMOS transistor Q8, a fourth PMOS transistor Q9, a first transistor Q5, and a second transistor Q10.
[0093] It should be noted that, since MOSFETs have the characteristic of unidirectional conduction, different circuits can be switched by controlling the high and low levels on the gate of the MOSFET. This is also the main implementation principle of this invention.
[0094] The drain of the first PMOS transistor Q4 is electrically connected to the battery 120, the source is electrically connected to the source of the second PMOS transistor Q7, and the gate is electrically connected to the gate of the second PMOS transistor Q7.
[0095] The drain of the second PMOS transistor Q7 is electrically connected to the label printer, and the gate is electrically connected to the collector of the first transistor Q5.
[0096] The base of the first transistor Q5 is electrically connected to the main control circuit 150, and the emitter is grounded;
[0097] The drain of the third PMOS transistor Q8 is electrically connected to the label printer, the source is electrically connected to the source of the fourth PMOS transistor Q9, and the gate is electrically connected to the gate of the fourth PMOS transistor Q9.
[0098] The drain of the fourth PMOS transistor Q9 is electrically connected to the adapter 110, and the gate is electrically connected to the collector of the second transistor Q10.
[0099] The base of the second transistor Q10 is electrically connected to the main control circuit 150, and its emitter is grounded.
[0100] In one possible implementation, the switching circuit 141 further includes: a fifth resistor R102, a sixth resistor R103, a seventh resistor R105, an eighth resistor R106, a ninth resistor R178, a tenth resistor R181, an eleventh resistor R179, a twelfth resistor R180, a second capacitor C80, and a third capacitor C125.
[0101] In this circuit, the source and gate of the first PMOS transistor Q4 are electrically connected to the two ends of the fifth resistor R102, respectively.
[0102] The gate of the second PMOS transistor Q7 is electrically connected to the collector of the first transistor Q5 through the sixth resistor R103.
[0103] The base of the first transistor Q5 is electrically connected to the main control circuit 150 through the seventh resistor R105.
[0104] The base and emitter of the first transistor Q5 are electrically connected to the two ends of the eighth resistor R106, respectively.
[0105] One end of the second capacitor C80 is electrically connected to the base of the first transistor Q5, and the other end is grounded;
[0106] The source and gate of the third PMOS transistor Q8 are electrically connected to the two ends of the ninth resistor R178, respectively.
[0107] The gate of the fourth PMOS transistor Q9 is electrically connected to the collector of the second transistor Q10 through the tenth resistor R181.
[0108] The base of the second transistor Q10 is electrically connected to the main control circuit 150 through the eleventh resistor R179.
[0109] The base and emitter of the second transistor Q10 are electrically connected to the two ends of the twelfth resistor R180, respectively.
[0110] One end of the third capacitor C125 is electrically connected to the base of the second transistor Q10, and the other end is grounded.
[0111] In one possible implementation, the first to fourth PMOS transistors Q4, Q7, Q8, and Q9 are model WMS12P03T1.
[0112] In one possible implementation, the base of the first transistor Q5 is electrically connected to the third GPIO pin 95 of the main control chip U4 through the seventh resistor R105.
[0113] The base of the second transistor Q10 is electrically connected to the second GPIO pin 93 of the main control chip U4 through the eleventh resistor R179.
[0114] In one possible implementation, the protection circuit 142 includes a protection chip U10 and a third transistor Q13, wherein the protection chip U10 includes two input terminals A and B and one output terminal Y;
[0115] The two input terminals A and B of the protection chip U10 are electrically connected to the main control circuit 150, and the output terminal Y is electrically connected to the base of the third transistor Q13.
[0116] The emitter of the third transistor Q13 is grounded, and its collector is electrically connected to the base of the first PMOS transistor.
[0117] In one possible implementation, the protection chip U10 is model RS1G08XF5.
[0118] In one possible implementation, the protection circuit 142 further includes: a thirteenth resistor R193, a fourteenth resistor R194, a fifteenth resistor R195, a sixteenth resistor R196, and a seventeenth resistor R197;
[0119] Among them, the base and emitter of the third transistor Q13 are electrically connected to the two ends of the thirteenth resistor R193, respectively;
[0120] The collector of the third transistor Q13 is electrically connected to the base of the first transistor Q5 through the fourteenth resistor R194.
[0121] The output terminal Y of the protection chip U10 and the base of the third transistor Q13 are electrically connected to the two ends of the fifteenth resistor R195, respectively.
[0122] The first input terminal A of the protection chip U10 is electrically connected to the main control circuit 150 through the sixteenth resistor R196;
[0123] The second input terminal B of the protection chip U10 is electrically connected to the main control circuit 150 through the seventeenth resistor R179.
[0124] In one possible implementation, the first input terminal A of the protection chip U10 is electrically connected to the third GPIO pin 95 of the main control chip U4 through the sixteenth resistor R196;
[0125] The second input terminal B of the protection chip U10 is electrically connected to the second GPIO pin 93 of the main control chip U4 through the seventeenth resistor R197.
[0126] In one possible implementation, adapter 110 is also electrically connected to battery 120;
[0127] The adapter 110 is also used to charge the battery 120 when it is electrically connected to an external power source.
[0128] Specifically, the implementation logic of the power supply switching circuit is roughly as follows:
[0129] When the adapter is detected to be plugged in, the switching circuit outputs high via pin 93 of U4 and low via pin 95 of U4, thereby shutting down the battery-powered system and powering the entire system by the adapter.
[0130] When no adapter is detected, the logic switching circuit controls the output to go low via pin U4 93 and high via pin U4 95, shutting down the adapter power supply system and powering the entire system from the battery.
[0131] If the logic becomes disordered, i.e., when pins 93 and 95 of U4 output high at the same time, U10 can play a protective role. Specifically, pin 4 of U10 outputs a low level to prevent the battery and adapter from simultaneously powering the entire system, causing a short circuit and triggering a safety accident.
[0132] The above description is only a preferred embodiment of the present utility model, but the protection scope of the present utility model is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present utility model should be included within the protection scope of the present utility model.
Claims
1. A logic switching circuit for a power supply system, characterized by, The application relates to an adapter, a battery and a functional circuit for providing power for a label printer. A power supply switching circuit is electrically connected with the adapter and the battery, and is used for switching on the adapter to supply power to the functional circuit based on a first control signal, switching on the adapter to charge the battery based on the first control signal, and cutting off the power supply of the battery to the functional circuit. A main control circuit is electrically connected with the power supply switching circuit, and is used for sending a first control signal to the power supply switching circuit when it is detected that the adapter is inserted into the label printer before starting printing or the adapter is inserted into the label printer during printing and the current printing page is completed. An adapter detection circuit is electrically connected with the main control circuit, and is used for detecting whether the adapter is inserted into the label printer before starting printing and detecting whether the adapter is inserted into or pulled out of the label printer during printing, and sending the detection result to the main control circuit. The main control circuit is further used for sending a second control signal to the power supply switching circuit when it is detected that the adapter is not inserted into the label printer before starting printing or the adapter is pulled out of the label printer during printing, so that the power supply switching circuit supplies power to the functional circuit based on the second control signal and cuts off the power supply of the adapter to the functional circuit. The main control circuit comprises a main control chip, a crystal oscillator, a first resistor and a first capacitor, wherein the main control chip comprises a reset pin, a crystal oscillator input pin, a crystal oscillator output pin and at least three GPIO pins.
2. The power supply system logic switching circuit of claim 1, wherein, The crystal oscillator input pin and the crystal oscillator output pin of the main control chip are electrically connected with the crystal oscillator. The reset pin is electrically connected with one end of the first resistor and one end of the first capacitor. The other end of the first resistor is electrically connected with an external power supply, and the other end of the first capacitor is grounded. The adapter detection circuit comprises a second resistor, a third resistor and a fourth resistor.
3. The power supply system logic switching circuit of claim 2, wherein, One end of the second resistor is electrically connected with an external power supply, and the other end is electrically connected with one end of the third resistor and one end of the fourth resistor. The other end of the third resistor is grounded. The other end of the fourth resistor is electrically connected with the main control circuit. The other end of the fourth resistor is electrically connected with the first GPIO pin of the main control chip.
4. The power supply system logic switching circuit of claim 3, wherein, The power supply switching circuit comprises a switching circuit and a protection circuit which are electrically connected with each other.
5. The power supply system logic switching circuit of claim 2, wherein, The switching circuit and the protection circuit are further electrically connected with the main control chip. The switching circuit is used for switching on the adapter to supply power to the label printer based on the first control signal and cutting off the battery, or switching on the battery to supply power to the label printer based on the second control signal and cutting off the adapter. The protection circuit is used for cutting off the switching circuit when the switching circuit switches abnormally. The switching circuit comprises a first PMOS tube, a second PMOS tube, a third PMOS tube, a fourth PMOS tube, a first triode and a second triode.
6. The power supply system logic switching circuit of claim 5, wherein, The drain of the first PMOS tube is electrically connected with the battery, the source is electrically connected with the source of the second PMOS tube, and the gate is electrically connected with the gate of the second PMOS tube. The drain of the second PMOS tube is electrically connected with the label printer, and the gate is electrically connected with the collector of the first triode; The base of the first triode is electrically connected with the main control circuit, and the emitter is grounded; The drain of the third PMOS tube is electrically connected with the label printer, the source is electrically connected with the source of the fourth PMOS tube, and the gate is electrically connected with the gate of the fourth PMOS tube; The drain of the fourth PMOS tube is electrically connected with the adapter, and the gate is electrically connected with the collector of the second triode; The base of the second triode is electrically connected with the main control circuit, and the emitter is grounded.
7. The power supply system logic switching circuit of claim 6, wherein, The switching circuit further comprises a fifth resistor, a sixth resistor, a seventh resistor, an eighth resistor, a ninth resistor, a tenth resistor, an eleventh resistor, a twelfth resistor, a second capacitor and a third capacitor; The source and the gate of the first PMOS tube are respectively electrically connected with two ends of the fifth resistor; The gate of the second PMOS tube is electrically connected with the collector of the first triode through the sixth resistor; The base of the first triode is electrically connected with the main control circuit through the seventh resistor; The base and the emitter of the first triode are respectively electrically connected with two ends of the eighth resistor; One end of the second capacitor is electrically connected with the base of the first triode, and the other end is grounded; The source and the gate of the third PMOS tube are respectively electrically connected with two ends of the ninth resistor; The gate of the fourth PMOS tube is electrically connected with the collector of the second triode through the tenth resistor; The base of the second triode is electrically connected with the main control circuit through the eleventh resistor; The base and the emitter of the second triode are respectively electrically connected with two ends of the twelfth resistor; One end of the third capacitor is electrically connected with the base of the second triode, and the other end is grounded.
8. The power supply system logic switching circuit of claim 7, wherein, The model of the first to fourth PMOS tubes is WMS12P03T1.
9. The power supply system logic switching circuit of claim 7, wherein, The base of the first triode is electrically connected with the second GPIO pin of the main control chip through the seventh resistor; The base of the second triode is electrically connected with the third GPIO pin of the main control chip through the eleventh resistor.
10. The logic switching circuit of claim 6, wherein, The protection circuit comprises a protection chip and a third triode, wherein the protection chip comprises two input ends and an output end; The two input ends of the protection chip are electrically connected with the main control circuit, and the output end is electrically connected with the base of the third triode; The emitter of the third triode is grounded, and the collector is electrically connected with the base of the first PMOS tube.
11. The power supply system logic switching circuit of claim 10, wherein, The model of the protection chip is RS1G08XF5.
12. The power supply system logic switching circuit of claim 10, wherein, The protection circuit further comprises a thirteenth resistor, a fourteenth resistor, a fifteenth resistor, a sixteenth resistor and a seventeenth resistor; The base and the emitter of the third triode are respectively electrically connected with two ends of the thirteenth resistor; The collector of the third triode is electrically connected with the base of the first triode through the fourteenth resistor; The output end of the protection chip and the base of the third triode are respectively electrically connected with two ends of the fifteenth resistor; The first input end of the protection chip is electrically connected with the main control circuit through the sixteenth resistor; The second input end of the protection chip is electrically connected with the main control circuit through the seventeenth resistor.
13. The power supply system logic switching circuit of claim 12, wherein, The first input end of the protection chip is electrically connected with the second GPIO pin of the master control chip through the sixteenth resistor; The second input end of the protection chip is electrically connected with the third GPIO pin of the master control chip through the seventeenth resistor.
14. The logic switching circuit of claim 1, wherein, The adapter is also electrically connected with the battery; The adapter is also used for charging the battery when electrically connected with the external power supply.