Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a wireless data acquisition device which can be powered off suddenly to provide a temporary power supply for supplying power under the condition that a standby power supply is not equipped.
In order to achieve the purpose, the invention provides the following technical scheme: a wireless data acquisition device comprises a control circuit and a wireless communication circuit connected with the control circuit, wherein the wireless communication circuit comprises a power-off backup circuit; the power-off backup circuit comprises a power storage group, a charging switch K1, a charging switch K2, a discharging switch K3, a discharging switch K4, a first feedback detection circuit, a second feedback detection circuit, a voltage stabilizing circuit and a power supply detection circuit; the charging switch K1, the charging switch K2, the discharging switch K3 and the discharging switch K4 are sequentially connected in series, the other end of the charging switch K1, which is opposite to the charging switch K2, is connected with a power supply, and the other end of the switch K4 is connected with a current limiting resistor R1 in series and then is connected with a control circuit and a wireless communication circuit; the node of the charging switch K1 connected with the charging switch K2 is connected with a first feedback detection circuit, and the first feedback detection circuit is also connected with a control circuit; the node of the charging switch K2 connected with the discharging switch K3 is connected with the power storage group; the node of the discharge switch K3 connected with the discharge switch K4 is connected with a second feedback detection circuit, and the second feedback detection circuit is connected with the control circuit; the node of the current limiting resistor R1 connected with the control circuit is connected with the voltage stabilizing circuit; the power supply detection circuit is connected with an external power supply and is also connected with the control circuit so as to provide temporary power supply for the control circuit.
As a further improvement of the present invention, the first feedback detection circuit includes a resistor R2 and a resistor R3 connected in series with each other; the other end of the resistor R2 opposite to the resistor R3 is connected to a node where the charging switch K1 and the charging switch K2 are connected; the other end of the resistor R3 opposite to the resistor R2 is grounded; the node of the resistor R2 connected with the resistor R3 is connected with the control circuit.
As a further improvement of the invention, the electric storage group comprises a plurality of capacitors connected in parallel, the positive poles of the capacitors are connected to the node where the charge switch K2 and the discharge switch K3 are connected, and the negative poles of the capacitors are grounded.
As a further improvement of the invention, the voltage stabilizing circuit comprises a voltage stabilizing diode, the cathode of the voltage stabilizing diode is connected to the current limiting resistor R1, and the other end of the voltage stabilizing diode is grounded.
As a further improvement of the present invention, the power detection circuit includes a current-limiting resistor R4, a light emitting diode D1, a resistor R5 and a resistor R6 connected in series with each other, one end of the resistor R5 is connected to a power supply, the other end is connected to a resistor R6, the other end of the resistor R6 opposite to the resistor R5 is grounded, and a node at which the resistor R6 is connected to the resistor R5 is connected to the control circuit; one end of the current limiting resistor R4 is connected to an external power supply, the other end is connected to the anode of the light emitting diode D1, and the cathode of the light emitting diode D1 is connected to the control circuit.
As a further improvement of the invention, the anti-interference device further comprises a can communication circuit, wherein the can communication circuit comprises a communication chip 82C250, a signal output end of the communication chip is connected to the control circuit, an input end of the communication chip comprises a high-level input end and a low-level input end, the high-level input end and the low-level input end are both connected with an external output interface, and a matching resistor R36 is further connected between the high-level input end and the low-level input end.
As a further improvement of the present invention, the WIFI circuit further includes a WIFI circuit, the WIFI circuit includes a WIFI integrated chip ESP8266, a control pin of the WIFI integrated chip is connected to a transistor Q1, a base of the transistor Q1 is connected to the control pin of the WIFI integrated chip, a collector of the transistor Q1 is connected to a capacitor C1 and then grounded, a collector of the transistor Q1 is connected to a resistor R7 and then connected to a transistor Q2, an emitter of the transistor Q2 is connected to a resistor R7 and then connected to an external power supply, a base of the transistor Q2 is connected to another control pin of the WIFI integrated chip, an emitter of the transistor Q1 is connected to an inverter and then connected to a reset pin of the WIFI integrated chip, and a reset pin of the WIFI integrated chip is connected to a resistor R13 and then connected to a power supply.
The charging switch K1 is matched with the resistor R2 and the resistor R3 to detect the stability of the power supply before charging, compared with the case that the charging switch K1 is not provided, the scheme can reduce the consumption of the power supply and avoid the instability of the power supply caused by excessive circuits driven by the power supply, and the scheme has the load of the resistor R2 and the resistor R3 only after the charging switch K1 is switched on; the charging switch K2 is switched on after the control circuit detects that the power supply is stable, and the charging of the electric storage group is safer; the discharging switch K3 is matched with the resistor R11 and the resistor R12, the resistor R11 and the resistor R12 can divide the voltage of the feedback voltage signal to the control circuit only after the discharging switch K3 is switched on, the resistor R11 and the resistor R12 can be isolated from the capacitor of the power storage group by the discharging switch K3, the electric quantity of the capacitor of the power storage group is prevented from being always consumed by the resistor R11 and the resistor R12 in the voltage dividing process, and the charging efficiency can be increased; the arranged discharge switch K4 can send out the electric quantity on the capacitor of the electric storage group after being conducted; the current-limiting resistor R1 who sets up is used for the current-limiting, protection control circuit, and the zener diode that sets up can carry out the steady voltage with the power, and the voltage value at control circuit work is stabilized to the voltage that emits on the electric capacity that will hold the electricity group, can also let the circuit operation more stable when protection control circuit.
Detailed Description
The invention will be further described in detail with reference to the following examples, which are given in the accompanying drawings.
Referring to fig. 1-3, a wireless data acquisition device of this embodiment includes a control circuit 2 and a wireless communication circuit connected to the control circuit 2, including a power-off backup circuit; the power-off backup circuit comprises an electricity storage group 1, a charging switch K1, a charging switch K2, a discharging switch K3, a discharging switch K4, a first feedback detection circuit 51, a second feedback detection circuit 52, a voltage stabilizing circuit and a power supply detection circuit; the charging switch K1, the charging switch K2, the discharging switch K3 and the discharging switch K4 are sequentially connected in series, the other end of the charging switch K1, which is opposite to the charging switch K2, is connected with a power supply, and the other end of the switch K4 is connected with a current limiting resistor R1 in series and then is connected to the control circuit 2 and the wireless communication circuit; the node of the charging switch K1 and the charging switch K2 is connected with a first feedback detection circuit 51, and the first feedback detection circuit 51 is also connected with the control circuit 2; the node of the charging switch K2 connected with the discharging switch K3 is connected with the power storage group 1; the node of the discharge switch K3 connected with the discharge switch K4 is connected with the second feedback detection circuit 52, and the second feedback detection circuit 52 is connected with the control circuit 2; the node of the current limiting resistor R1 connected with the control circuit 2 is connected with the voltage stabilizing circuit; the power detection circuit is connected to an external power source and also to the control circuit 2 to supply a temporary power source to the control circuit 2.
The first feedback detection circuit 51 comprises a resistor R2 and a resistor R3 which are connected in series with each other; the other end of the resistor R2 opposite to the resistor R3 is connected to a node where the charging switch K1 and the charging switch K2 are connected; the other end of the resistor R3 opposite to the resistor R2 is grounded; the node connecting the resistor R2 and the resistor R3 is connected to the control circuit 2.
The electricity storage group 1 comprises a plurality of capacitors connected in parallel, the anodes of the capacitors are connected to the node where the charge switch K2 and the discharge switch K3 are connected, and the cathodes of the capacitors are grounded.
The voltage stabilizing circuit comprises a voltage stabilizing diode 6, wherein the cathode of the voltage stabilizing diode 6 is connected to a current limiting resistor R1, and the other end of the voltage stabilizing diode is grounded.
The charging switch K1, the charging switch K2, the discharging switch K3 and the discharging switch K4 are all 8050 models, capacitors of the electricity storage group 1 are electrolytic capacitors, the capacity of the electricity storage group is set according to user target power supply time, the voltage stabilizing diode 6 can be any model (such as 1N4728) capable of stabilizing and outputting 3.3V voltage, the control circuit 2 can be a circuit with a control function, which is formed by an STM32F103C8T6 and peripheral circuits of the circuit, the second feedback detection circuit 52 is the same as the first feedback detection circuit 51 in circuit structure, and the resistor R11 and the resistor R12 are connected.
Through the technical scheme, when the circuit is in a power-on state, as shown in fig. 1, the control circuit 2 may control the charging switch K1 to be turned on first, at this time, the resistor R2 and the resistor R3 divide the voltage of the power supply, and feed back a divided voltage signal to the control circuit 2 through a node where the resistor R2 and the resistor R3 are connected, the control circuit 2 detects a voltage value of the voltage signal to detect whether the power supply is in a stable state, after the detection is completed, the control circuit 2 controls the charging switch K2 to be turned on, at this time, the power supply charges a plurality of capacitors in the power storage group 1 after flowing through the charging switch K2, the control circuit 2 controls the discharging switch K3 to be turned on in the process of charging the capacitors, at this time, the resistor R11 and the resistor R12 divide the voltage, and simultaneously feed back the divided voltage signal to the control circuit 2 through the nodes where the resistors are connected with each other, the control circuit 2 determines the degree of charging the capacitors, when the control circuit 2 detects that the charging of the capacitor of the power storage pack 1 is completed, the control circuit controls the charging switch K1, the charging switch K2 and the discharging switch K3 to be turned off, and at this time, the capacitor in the power storage pack 1 stores the electric quantity. A capacitor C2 is arranged in the figure 1, the capacitor C2 is used for supplying power for a short time, the power supply time is very short, when power is cut off suddenly, the capacitor C2 supplies power for an emergency, the capacitor C is only used for providing the control circuit 2 to control the discharge switch K3 and the discharge switch K4 to be conducted for a short time, after the discharge switch K3 and the discharge switch K4 are conducted, the electric quantity stored in the capacitor of the power storage group 1 is limited through the current limiting resistor R1 after passing through the discharge switch K3 and the discharge switch K4, voltage stabilization is carried out through the voltage stabilizing diode 6, power is supplied to the control circuit 2 as a temporary power supply at the moment, and the power supply time of the temporary power supply can be adjusted by a user through adjusting the number and the capacity. The charging switch K1 that sets up cooperates with resistance R2 and resistance R3 can detect the stability of power before charging, compare and do not have charging switch K1, this scheme can reduce the consumption of power, avoid the power driven circuit too much to lead to the power unstability, this scheme only has resistance R2 and resistance R3 load after charging switch K1 switches on; the charging switch K2 is switched on after the control circuit 2 detects that the power supply is stable, and the charging of the power storage group 1 is safer; the discharging switch K3 is matched with the resistor R11 and the resistor R12, the resistor R11 and the resistor R12 divide the voltage of the feedback voltage signal to the control circuit 2 only after the discharging switch K3 is turned on, and the discharging switch K3 arranged at this time can isolate the resistor R11 and the resistor R12 from the capacitor of the power storage group 1, so that the resistor R11 and the resistor R12 are prevented from always consuming the electric quantity of the capacitor of the power storage group 1 in the voltage dividing process, and the charging efficiency can be increased; the arranged discharge switch K4 can send out the electric quantity on the capacitor of the electricity storage group 1 after being conducted; the current-limiting resistance R1 who sets up is used for the current-limiting, protection control circuit 2, and zener diode 6 that sets up can carry out the steady voltage with the power, and the voltage value at control circuit 2 work is stabilized to the voltage that emits on the electric capacity that will hold electric group 1, can also let the circuit operation more stable when protection control circuit 2.
As an improved specific embodiment, the power detection circuit includes a current-limiting resistor R4, a light emitting diode D1, a resistor R5 and a resistor R6 connected in series, one end of the resistor R5 is connected to a power supply, the other end of the resistor R5 is connected to a resistor R6, the other end of the resistor R6 opposite to the resistor R5 is grounded, and a node at which the resistor R6 is connected to the resistor R5 is connected to the control circuit 2; one end of the current limiting resistor R4 is connected to an external power supply, the other end is connected to the anode of the light emitting diode D1, and the cathode of the light emitting diode D1 is connected to the control circuit 2.
Through the technical scheme, the voltage of the power supply can be fed back to the control circuit 2 through the voltage division of the resistor R5 and the resistor R6, and whether the power supply is in a power-off state is detected through the detection of the control circuit 2; once the power supply is detected to be in a power-off state, the capacitor C2 starts to supply power to the control circuit 2, and at this time, the control circuit 2 controls the discharge switch K3 and the discharge switch K4 to be switched on, and the control circuit 2 is switched to the power storage group 1 to supply power to the control circuit 2, so that the circuit is more intelligent; meanwhile, when the power supply is powered off, the light emitting diode D1 can be extinguished and can be used as a prompt.
As a modified specific implementation, the can communication circuit 4 is further included, the can communication circuit 4 includes a communication chip 82C250, a signal output end of the communication chip is connected to the control circuit 2, an input end of the communication chip includes a high-level input end and a low-level input end, both the high-level input end and the low-level input end are connected to an external output interface, and a matching resistor R36 is further connected between the high-level input end and the low-level input end.
Through the technical scheme, the arranged can communication circuit 4 can enable multiple machines to be physically connected, so that the acquisition devices which are close to each other are physically connected, excessive wireless communication resources are prevented from being occupied, and data accumulation is avoided; meanwhile, the matching resistor R35 is connected between the high-level input unit and the low-level input terminal, so that the communication between multiple units is more stable, and the anti-interference capability is improved.
As an improved specific embodiment, the WIFI circuit further includes a WIFI circuit, the WIFI circuit includes a WIFI integrated chip 3ESP8266, a control pin of the WIFI integrated chip 3 is connected with a transistor Q1, a base of the transistor Q1 is connected with the control pin of the WIFI integrated chip 3, a collector of the transistor Q1 is connected with a capacitor C1 and then grounded, a collector of the transistor Q1 is connected with a resistor R7 and then connected with a transistor Q2, an emitter of the transistor Q2 is connected with a resistor R7, a collector of the transistor Q2 is connected with another control pin of the WIFI integrated chip 3, an emitter of the transistor Q1 is connected with an inverter 31 and then connected with a reset pin of the WIFI integrated chip 3, and a reset pin of the WIFI integrated chip 3 is connected with a resistor R13 and then connected to a power supply.
The transistor Q1 and the transistor Q2 are both 8050 types.
Through the technical scheme, the reset pin of the ESP8266 is reset at a low level, when a user needs to reset software, the transistor Q2 can be controlled to be conducted through the WIFI integrated chip 3, at the moment, a power supply flows through the transistor Q2, then the current is limited through the resistor R7, and enters the capacitor C1 to be charged, the transistor Q2 is disconnected after a certain time threshold is charged, when the software needs to be reset, the WIFI integrated chip 3 can control the transistor Q1 to be conducted, at the moment, the capacitor C1 discharges, the voltage is reversed by the inverter 31 after passing through the transistor Q1, at the moment, the level of the reset pin is reduced, the low level output through the inverter 31 is more stable compared with the level of the reset pin directly reduced through the WIFI control pin, the circuit is more stable when the reset pin is discharged through the capacitor C1 and matched; compared with a battery, the battery has lower cost and can be charged and discharged repeatedly, and when the triode Q2 and the triode Q1 are both disconnected, the electric quantity in the capacitor C1 is well preserved, so that electric quantity leakage is avoided; this scheme is compared traditional direct control pin control triode of utilizing and is switched on and draw the power down this circuit's of saying stability higher simultaneously, and phase inverter 31 can assist in this scheme to draw high reset pin level, avoids the power shake to lead to unexpected the reseing.
The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments, and all technical solutions belonging to the idea of the present invention belong to the protection scope of the present invention. It should be noted that modifications and embellishments within the scope of the invention may occur to those skilled in the art without departing from the principle of the invention, and are considered to be within the scope of the invention.