Disclosure of Invention
In order to overcome the defects in the prior art, the invention provides a code scanning charging power supply which can detect the current input voltage, current and power.
The technical scheme adopted by the invention for solving the technical problems is that the code scanning charging power supply is improved in that the code scanning charging power supply comprises a power supply circuit, an MCU main control circuit, a relay detection and control circuit, a control key circuit, a MODULE circuit and a SIM card circuit;
The power supply circuit is respectively connected to the MCU main control circuit and the MODULE circuit and is used for providing electric energy required by work; the control key circuit is connected between the MCU main control circuit and the MODULE circuit, and the SIM card circuit is electrically connected to the MODULE circuit;
The MCU master control circuit comprises a chip U1 with operation processing capacity, the relay detection and control circuit is electrically connected to the chip U1 of the MCU master control circuit, the relay detection and control circuit comprises a power supply end, a relay control circuit, a current and voltage detection end and a relay detection circuit, the power supply end is electrically connected with the relay, the current and voltage detection end and the relay detection circuit respectively, the current and voltage detection end and the relay detection circuit are electrically connected to the relay, the relay control circuit, the current and voltage detection end and the relay detection circuit are electrically connected to the chip U1, and the relay control circuit is connected to the relay and is used for controlling the on-off of the relay according to the detection results of the relay detection circuit and the current and voltage detection end.
In the above structure, the current-voltage detection terminal includes a manganese copper resistor MT1, a resistor R6, a resistor R7, a capacitor C11, a capacitor C12, and two detection output ports;
The manganese copper resistor MT1 is connected in parallel between the power supply end and the detection port of the relay, and the two detection output ports are used for detecting the voltage and the current at the two ends of the manganese copper resistor MT 1;
A resistor R7 is arranged between one detection output port and the power supply end, and a capacitor C12 is arranged between the detection output port and the grounding end;
A resistor R6 is arranged between the other detection output port and the detection port of the relay, and a capacitor C11 is arranged between the detection output port and the ground terminal.
In the above structure, the relay control circuit includes a resistor R18, a resistor R17, an NPN transistor Q1, a diode D1, a resistor R16, a capacitor C20, and a control signal input terminal;
The resistor R18 is connected between the control signal input end and the base electrode of the NPN type triode Q1, the emitter electrode of the NPN type triode Q1 is grounded, and the resistor R17 is connected between the base electrode and the emitter electrode of the NPN type triode Q1;
The relay is provided with a first control port RA1 and a second control port RB1, the collector of the NPN triode Q1 is connected with the second control port RB1, the diode D1 is arranged between the first control port RA1 and the second control port RB1, and the positive terminal of the diode D1 is connected with the second control port RB 1;
The resistor R16 is disposed between the power supply terminal VDD and the first control port RA1, and a capacitor C20 is disposed between the power supply terminal VDD and the ground terminal.
In the above structure, the NPN transistor Q1 is LMBTA LT1G.
In the above structure, the relay detection circuit includes a photo coupler U4, a diode D4, a capacitor C33, a resistor R33, and a detection signal port;
the photoelectric coupler U4 is provided with two input ends and two output ends, wherein one input end is connected to the relay, the other input end is connected to the power supply end, and the diode D4 is connected between the two input ends;
One output end of the photoelectric coupler is grounded, a capacitor C33 is connected between the two output ends, the other output end of the photoelectric coupler is connected to the detection signal port, and a resistor R33 is arranged between the other output end of the photoelectric coupler U4 and the power supply end VCPU.
In the above structure, the model number of the photoelectric coupler is ORPC-817SC.
In the above structure, the model of the chip U1 is QS1211B.
In the above structure, the MODULE circuit includes a chip J3-A, and the model of the chip J3-A is L501.
In the above structure, the code scanning charging power supply further comprises an indicator light circuit, and the indicator light circuit is composed of a network indicator light circuit, an electric energy pulse indicator light circuit and a status indicator light circuit.
In the above structure, the network indicator circuit includes a light emitting diode L1, a resistor R52, a resistor R63, and an NPN transistor Q6;
the LED L1 and the resistor R52 are connected in series between the power supply end VCPU and the collector electrode of the NPN triode Q6, the base electrode of the NPN triode Q6 is a NETLIGHT port, the port is connected with a MODULE MODULE circuit, the resistor R63 is arranged between the base electrode of the NPN triode Q6 and the grounding end, and the emitter electrode of the NPN triode Q6 is grounded;
The electric energy pulse indicator lamp circuit comprises a resistor R50, a light emitting diode L2, a resistor R51 and a light emitting diode L3, wherein the resistor R50 and the light emitting diode L2 are connected in series between the chip U1 and the grounding end, and the resistor R51 and the light emitting diode L3 are connected in series between the chip U1 and the grounding end;
The STATUS indicator lamp circuit comprises a light emitting diode L4, a resistor R53, a resistor R59, a resistor R61, an NPN type triode Q7, a light emitting diode L5, a resistor R54, a resistor R60, a resistor R62 and an NPN type triode Q8, wherein the light emitting diode L4 and the resistor R53 are connected in series between a power supply end VCPU and a collector of the NPN type triode Q7, a chip U1 is provided with an LED-STATUS1 port, the resistor R59 is arranged between the LED-STATUS1 port and a base of the NPN type triode Q7, the resistor R61 is connected between the base of the NPN type triode Q7 and an emitter of the NPN type triode Q7, the emitter of the NPN type triode Q7 is grounded, the light emitting diode L5 and the resistor R54 are connected in series between the power supply end VCPU and a collector of the NPN type triode Q8, the chip U1 is provided with an LED-STATUS2 port, the resistor R60 is arranged between the LED-STATUS2 port and the base of the NPN type triode Q8, and the resistor R62 is connected between the base of the NPN type triode Q8 and the emitter of the NPN type triode Q8, and the emitter of the NPN type triode Q8 is grounded.
The method has the advantages that after a user scans and provides a specific two-dimensional code and contacts APP software to conduct data communication, the MCU main control circuit responds to instructions according to operation of the user, when the user provides instructions for opening the charging equipment, the MCU main control circuit provides signals to control the relay to open the charging equipment and instructs the circuit LEDs to provide instructions, and when the user uses the charging equipment, the MCU main control circuit automatically calculates current input voltage current and power according to voltage and current at two ends of the detected manganese copper resistor and displays the current input voltage current and power on the APP software of the mobile equipment. Thus, the code-scanning charging power supply can detect the current input voltage, current and power and display the detected current input voltage, current and power on the mobile device.
Detailed Description
The invention will be further described with reference to the drawings and examples.
The conception, specific structure, and technical effects produced by the present invention will be clearly and completely described below with reference to the embodiments and the drawings to fully understand the objects, features, and effects of the present invention. It is apparent that the described embodiments are only some embodiments of the present invention, but not all embodiments, and that other embodiments obtained by those skilled in the art without inventive effort are within the scope of the present invention based on the embodiments of the present invention. In addition, all the coupling/connection relationships referred to in the patent are not direct connection of the single-finger members, but rather, it means that a better coupling structure can be formed by adding or subtracting coupling aids depending on the specific implementation. The technical features in the invention can be interactively combined on the premise of no contradiction and conflict.
Referring to fig. 1, the invention discloses a code scanning charging power supply, which automatically turns on a power supply device through a relay after a user scans a provided two-dimensional code to supply power for charging, and can automatically display voltage, power, time and the like on software. Specifically, the code scanning charging power supply comprises a power supply circuit 10, an MCU main control circuit 50, a relay detection and control circuit 20, a control key circuit 60, a MODULE circuit 70 and a SIM card circuit 80, wherein the power supply circuit 10 is respectively connected to the MCU main control circuit 50 and the MODULE circuit 70 and is used for providing electric energy required by work, the control key circuit 60 is connected between the MCU main control circuit 50 and the MODULE circuit 70, the SIM card circuit 80 is electrically connected to the MODULE circuit 70, as shown in fig. 2, the MCU main control circuit 50 comprises a chip U1 with operation processing capability, the model of the chip U1 is a power chip, the structure and the working principle of the chip U1 are very mature in the prior art, the embodiment is not described in detail, and the chip U1 is matched with peripheral circuits to realize specific functions, but the structure also belongs to the very mature technology in the prior art, and the detailed embodiment is not described in the detail. The relay detection and control circuit 20 is electrically connected to the chip U1 of the MCU master control circuit 50, the power supply circuit 10 is used for supplying electric energy to each part of circuits during operation, the relay detection and control circuit 20 is used for detecting current and voltage of the relay operation, sending detection results into the chip U1 of the MCU master control circuit 50, carrying through logic of the chip U1, and sending signals into the relay detection and control circuit 20 to control the on-off of the relay. In this process, the MODULE circuit 70 communicates with the mobile network provider through the SIM circuit, and further displays the wireless network contact status and charging data on the established APP software of the mobile device. In addition, the control key circuit 60 is used for realizing control of the code scanning charging power supply, for example, realizing functions such as circuit reset, and the implementation manner thereof belongs to a common scheme in the prior art, so that the detailed description is omitted in this embodiment.
In this embodiment, the relay detection and control circuit 20 includes a power supply end 201, a relay 202, a relay control circuit 203, a current and voltage detection end 204, and a relay detection circuit 205, where the power supply end 201 includes devices such as an ac inlet and a socket, and the power supply end 201 is electrically connected to the relay 202, the current and voltage detection end 204, and the relay detection circuit 205, and the current and voltage detection end 204 and the relay detection circuit 205 are electrically connected to the relay 202, and the relay control circuit 203 is connected to the relay, and the relay control circuit 203 is configured to control on-off of the relay according to detection results of the relay detection circuit 205 and the current and voltage detection end 204. Note that the relay detection circuit 205 is configured to detect the voltage and the current of the relay, and the relay control circuit 203 and the relay detection circuit 205 are connected to the chip U1, and specific embodiments thereof will be described further below.
As shown in fig. 4, in the present embodiment, the relay control circuit 203, the current-voltage detection terminal 204, and the relay detection circuit 205 are provided with two groups, one group is the first relay 301, the first relay control circuit 302, the first current-voltage detection terminal 303, and the first relay detection circuit 304, and the other group is the second relay 401, the second relay control circuit 402, the second current-voltage detection terminal 403, and the second relay detection circuit 404, and since the two groups have substantially the same circuit structure, only one group will be described in detail in the present embodiment. In this embodiment, the first current-voltage detection end 303 includes a manganin resistor MT1, a resistor R6, a resistor R7, a capacitor C11, a capacitor C12, and two detection output ports, where the manganin resistor MT1 is connected in parallel between the power supply end 201 and the detection port of the relay, the two detection output ports are used for detecting the voltage and the current at two ends of the manganin resistor MT1, one detection output port and the power supply end 201 are provided with the resistor R7, the capacitor C12 is provided between the detection output port and the ground end, the resistor R6 is provided between the other detection output port and the detection port of the relay, and the capacitor C11 is provided between the detection output port and the ground end, and in this embodiment, the two detection output ports are I1P and I1N respectively.
With continued reference to fig. 4, for the first relay control circuit 302, the present invention provides a specific embodiment, where the relay control circuit includes a resistor R18, a resistor R17, an NPN transistor Q1, a diode D1, a resistor R16, a capacitor C20, and a control signal input end, where the resistor R18 is connected between the control signal input end and a base of the NPN transistor Q1, an emitter of the NPN transistor Q1 is grounded, the resistor R17 is connected between the base and the emitter of the NPN transistor Q1, the relay has a first control port RA1 and a second control port RB1, a collector of the NPN transistor Q1 is connected to the second control port RB1, the diode D1 is disposed between the first control port RA1 and the second control port RB1, a positive terminal of the diode D1 is connected to the second control port RB1, the resistor R16 is disposed between the power supply terminal and the first control port RA1, and a capacitor C20 is disposed between the power supply terminal and the ground terminal VDD. In this embodiment, the NPN transistor Q1 is LMBTA LT1G, and the control signal input terminal is rliy-OPEN 1. It should be noted that, the types of the first relay 301 and the second relay 401 in fig. 4 are HF115F-I, which are small-sized and high-power relays commonly used in the prior art, and the structure and the corresponding functions thereof are well known in the industry, so the detailed description of the structure thereof is not provided in this embodiment.
For the first relay detection circuit 304, as shown in fig. 2, the present invention provides a specific embodiment, where the relay detection circuit includes a photo coupler U4, a diode D4, a capacitor C33, a resistor R33, and a detection signal port, where the photo coupler U4 has two input terminals and two output terminals, one input terminal is connected to the relay, the other input terminal is connected to the power supply terminal 201, the diode D4 is connected between the two input terminals, one output terminal of the photo coupler is grounded, the capacitor C33 is connected between the two output terminals, the other output terminal is connected to the detection signal port, and the resistor R33 is disposed between the other output terminal of the photo coupler U4 and the power supply terminal VCPU. In this embodiment, a plurality of resistors connected in series are disposed between the power supply terminal 201 and the other input terminal of the photo coupler U4, and the model number of the photo coupler is ORPC-817SC. In addition, the detection signal port is RLY-CHK1.
In the above embodiment, as shown in fig. 4, the first relay control circuit 302, the first current-voltage detection terminal 303, and the first relay detection circuit 304 are all required to be connected to the same chip with output processing, and as shown in fig. 2, the chip U1 has pins connected to the detection output port I1P, the detection output port I1N, the control signal input terminal rle-OPEN 1, and the detection signal port rle-CHK 1, respectively.
Through the structure, the first relay detection circuit 304 is used for detecting the working voltage and current of the relay, transmitting the detection result to the chip U1, and the chip U1 sends a control signal to the first relay control circuit 302 according to the detection result to control the relay, when a user uses the charging equipment, the chip U1 automatically calculates the current input voltage, current and power according to the detected voltage and current at two ends of the manganese copper resistor MT1, and the current input voltage, current and power can be displayed on a display screen, so that the current input voltage, current and power can be detected and calculated, and the control of the relay is convenient to realize.
As shown in fig. 5, for the power supply circuit 10, the present invention provides a specific embodiment, which includes a voltage stabilizer MC7805K, a capacitor C18, a capacitor C19, a resistor R8, a resistor R15, a capacitor C16, and a capacitor C17, and the connection manner is as shown in fig. 5, and the voltage output terminal VBAT thereof is in the range of 3.3V to 5V, and generally directly uses 5V output. As shown in fig. 6, for the SIM card circuit 80, the present invention provides a specific embodiment, which includes a SIM card chip J1, wherein a VCC interface, a usim_rst interface, a usim_clk interface, a usim_data interface, and a usim_det interface are formed on the SIM card chip J1, and these interfaces are electrically connected to the MODULE circuit 70. The power supply circuit 10 and the SIM card circuit 80 are well-established in the art, and will not be described in detail in this embodiment.
As shown in fig. 7, for the MODULE circuit 70, the present invention provides a specific embodiment, where the MODULE circuit 70 includes a chip J3-a, and the model number of the MODULE circuit is L501, and L501 is a Cat1 MODULE with small package, stable and reliable performance, lcc+lga, and can well meet the application requirements of customers on high cost performance and low power consumption. The size of the L501 is only 30 x 2.9mm, so that the requirements of customers on small-size module products can be met, the customers can conveniently reduce the product size and optimize the product cost, and the adopted LCC+LGA package can realize the rapid production of the modules through standard SMT equipment, so that the LCC+LGA package can be widely applied in the field of IOT, such as intercom in public networks, mobile payment, security protection, vehicle-mounted, DTU, asset tracking, sharing economy and the like. The chip J3-A is provided with a USIM_RST pin, a USIM_CLK pin, a USIM_DET pin and a USIM_DATA pin which are connected with the SIM card chip J1, the chip J3-A is also provided with a UART1_RX pin, a UART1_TX pin, a PWRKEY pin, a RESET pin, a VBUS pin and a VDD_1V8 pin which are electrically connected with the control key circuit 60, and the chip J3-A is also provided with a NETLIGHT pin which is electrically connected with the indicator light circuit. Since the chip J3-A belongs to a well-established product in the prior art, the structure thereof is not described in detail in the present invention.
As shown in fig. 1, the code scanning charging power supply further includes an indicator light circuit 90, where the indicator light circuit 90 is electrically connected with the MCU master control circuit 50 and the MODULE circuit 70, as shown in fig. 8 to 10, in this embodiment, the indicator light circuit 90 is composed of a network indicator light circuit, an electric energy pulse indicator light circuit and a status indicator light circuit, as shown in fig. 8, where the network indicator light circuit includes a light emitting diode L1, a resistor R52, a resistor R63 and an NPN transistor Q6, the light emitting diode L1 and the resistor R52 are connected in series between the power supply end VCPU and the collector of the NPN transistor Q6, the base of the NPN transistor Q6 is a NETLIGHT port, the port is connected with the NETLIGHT pin of the MODULE circuit 70, the resistor R63 is disposed between the base of the NPN transistor Q6 and the ground end, and the emitter of the NPN transistor Q6 is grounded, as shown in fig. 8, and the indication of the network status is achieved by the light emitting diode L1.
As shown in fig. 9, the electric energy pulse indicator circuit includes a resistor R50, a light emitting diode L2, a resistor R51 and a light emitting diode L3, wherein the resistor R50 and the light emitting diode L2 are connected in series between the chip U1 and the ground terminal, the resistor R51 and the light emitting diode L3 are connected in series between the chip U1 and the ground terminal, and the light emitting diode L2 and the light emitting diode L3 are the electric energy pulse indicator.
As shown in FIG. 10, the STATUS indicator circuit comprises a light emitting diode L4, a resistor R53, a resistor R59, a resistor R61, an NPN type triode Q7, a light emitting diode L5, a resistor R54, a resistor R60, a resistor R62 and an NPN type triode Q8, wherein the light emitting diode L4 and the resistor R53 are connected in series between a power supply end VCPU and a collector of the NPN type triode Q7, a chip U1 is provided with an LED-STATUS1 port, the resistor R59 is arranged between the LED-STATUS1 port and a base of the NPN type triode Q7, the resistor R61 is connected between the base of the NPN type triode Q7 and an emitter of the NPN type triode Q7, the emitter of the NPN type triode Q7 is grounded, the light emitting diode L5 and the resistor R54 are connected in series between the power supply end VCPU and the collector of the NPN type triode Q8, the chip U1 is provided with an LED-STATUS2 port, the resistor R60 is arranged between the LED-STATUS2 port and the collector of the NPN type triode Q8, and the resistor R62 is connected between the base of the NPN type triode Q8 and the emitter of the NPN type triode Q8. The light emitting diode L4 and the light emitting diode L5 are status indicator lamps, and when the light emitting diode L4 and the light emitting diode L5 flash, faults are indicated, and the faults comprise overcurrent and abnormal relay.
Through the above circuit structure, after the external power is input, the voltage is reduced by the voltage stabilizer MC7805K of the power supply circuit 10, and then the power is supplied to the MCU master control circuit 50 and the MODULE circuit 70, the MCU master control circuit 50 and the MODULE circuit 70 start to reset, the indicator light circuit provides an indication, and the MODULE circuit 70 can communicate with the mobile network provider according to the SIM card chip to display the wireless network connection state and other data on the formulated mobile device APP software. After the user scans and provides a specific two-dimensional code and then contacts APP software to carry out data communication, the MCU main control circuit 50 responds to instructions according to the operation of the user, when the user provides an instruction for opening the charging equipment, the MCU main control circuit 50 provides a signal to control the relay to open the charging equipment and instructs the circuit LED to provide instructions, when the user uses the charging equipment, the MCU main control circuit 50 automatically calculates current input voltage current and power according to voltage and current at two ends of the detected manganese copper resistor and then displays the current input voltage current and power on the APP software of the mobile equipment. Thus, the code-scanning charging power supply can detect the current input voltage, current and power and display the detected current input voltage, current and power on the mobile device.
While the preferred embodiment of the present application has been described in detail, the present application is not limited to the embodiments, and those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present application, and the equivalent modifications or substitutions are included in the scope of the present application as defined in the appended claims.