Power management method of cross-platform Internet of things embedded system
Technical Field
The invention relates to the technical field of power management of wireless communication products of the Internet of things, in particular to a power management method of a cross-platform Internet of things embedded system.
Background
With the continuous development of communication technology, the application of communication energy storage products is widely popularized, most of the communication energy storage products adopt lithium ion battery packs, and the service life of the lithium ion battery packs is easily shortened and damaged under the extreme conditions of overcharge protection, overdischarge protection, overcurrent protection, over-temperature protection, short circuit protection and the like. Particularly, for an embedded system of the internet of things, the internet of things relates to various fields, and has certain requirements on power consumption, so that each product of the internet of things needs to be provided with a set of relatively perfect power management system, the current consumption state of the product during switching among various modes can be perfectly solved, and the power consumption in the switching process of the working modes of the product is improved, so that the requirement of low power consumption of a power system is met.
Disclosure of Invention
The invention aims to provide a power management method of a cross-platform Internet of things embedded system, aiming at the defects in the prior art, the power consumption state of the Internet of things system is timely converted according to the working mode of an Internet of things product, the energy consumption of a battery is saved, the running cost of the Internet of things system is effectively reduced, and the service life of the battery in the Internet of things system is prolonged.
In order to achieve the purpose, the invention adopts the technical scheme that: a power management method of a cross-platform Internet of things embedded system is characterized by comprising the following steps:
step 01, judging the current working mode of the Internet of things embedded system, and detecting an event trigger signal according to the current working mode of the Internet of things embedded system;
step 02, according to the detection result of the event trigger signal, the power supply control processor adjusts the power supply state of the system power supply and switches the working mode of the power supply equipment;
step 03, whether the interrupt signal is triggered or not;
and step 04, switching the working mode of the Internet of things embedded system according to the result triggered by the interrupt signal.
Further, the operation mode includes: a normal operating mode, a standby mode and a silent mode.
Further, step 01 further comprises:
if the current working mode of the Internet of things embedded system is a normal working mode, detecting a standby signal, if the standby signal is not detected, continuing to maintain the normal working mode, and if the standby signal is detected, entering step 02;
and if the current working mode of the Internet of things embedded system is the standby mode, performing interrupt detection within the preset standby time of the system, and entering step 02 according to the detection result.
Further, the step 02 of adjusting the power supply state of the system power supply by the power supply control processor includes:
the power supply control processor controls the starting or closing state of the power supply logic interface;
the power supply control processor controls the starting or closing state of the power supply equipment;
the power control processor controls the on or off state of the communication network interface.
Further, the step 02 further includes that the power control processor adjusts the working mode of the processor according to the working mode of the internet of things embedded system.
Further, the operation mode of the power control processor comprises: a startup mode and a sleep mode.
Further, when the embedded system of the internet of things detects an interrupt signal, the working mode of the power supply control processor is immediately switched to the starting mode; after the embedded system of the internet of things finishes the switching of the working modes and does not detect the triggering period of the interrupt signal, the working mode of the power supply control processor is a sleep mode.
Further, step 04 includes:
when the interrupt signal triggering result is that there is an interrupt, the power control processor wakes up and starts the Internet of things embedded system, and the system is switched to a normal working mode;
and if the triggering result of the interrupt signal is no interrupt, continuing to perform the trigger detection of the interrupt signal without switching the working mode of the embedded system of the Internet of things.
Further, after the standby signal is detected, the power supply equipment is switched to a standby mode, if the trigger of the interrupt signal is not detected within the preset standby time of the system in the standby mode, the power supply control processor controls the power supply equipment to enter deep dormancy, and at the moment, the embedded system of the internet of things enters a silent mode.
Furthermore, the internet of things embedded system is in a transportation mode before entering a working mode for the first time, in the transportation mode, the power supply control processor controls the power supply logic interface to be in a closed state, controls the power supply equipment to be in a closed state, controls the communication network interface to be in a closed state, and enters a sleep mode.
The invention has the advantages that:
according to the invention, the working state of the power supply equipment is controlled according to different working modes of the embedded system of the Internet of things, so that the consumption of the battery of the system in a non-running state is reduced, the operation cost of the Internet of things and the power supply use cost of products of the Internet of things are saved, the use loss of the battery is improved, and the service life of the battery is prolonged.
Drawings
For a more complete understanding of the objects, features and advantages of the present invention, reference is now made to the following detailed description of the preferred embodiments of the invention, taken in conjunction with the accompanying drawings, in which:
FIG. 1 is a schematic flow diagram of the process of the present invention;
fig. 2 is a schematic flow chart of the internet of things embedded system switching from a normal operating mode to a standby mode;
FIG. 3 is a schematic view of a process of switching between other modes of an embedded system of the Internet of things in a standby mode
Fig. 4 is a schematic diagram of a work flow of an internet-of-things embedded power control processor in a transportation mode.
Detailed Description
The embedded system of the internet of things enters a working stage from a factory production stage to power-on use, and the working stage comprises a factory mode, a transportation mode, a normal working mode, a standby mode and a silent mode. As shown in fig. 1, after the embedded system of the internet of things enters a working stage, the power control processor controls the power supply state of the power supply according to the working state of the system, so that the system is automatically switched among a normal working mode, a standby mode and a silent mode, and the purpose of reducing power consumption is achieved.
Because some internet of things products are provided with built-in batteries, the products can carry out battery charging and discharging detection in a factory mode, so that the batteries are in a working state, and a factory transportation mode is required to be added for preventing the built-in batteries from continuing to consume power after leaving a factory. In this mode, the system can only start to enter a normal operating state when the system platform is powered on again after being installed. The shutdown current is 0mA in the transportation mode, and the service life of the built-in battery is ensured. The embedded system of the internet of things is subjected to functional detection and battery charging and discharging detection in the factory production stage, and whether all functions can be normally used or not is detected, so that the system can enter a factory production mode in the factory production stage, and a system power supply normally supplies power for system detection in the mode. For the internet of things embedded system equipment which is qualified for detection, a transportation mode is entered. As shown in fig. 4, after the internet of things embedded system is detected to be qualified, the power control processor enters a work flow of a transportation mode from a factory production mode: after the Internet of things embedded system in the factory production mode is detected to be qualified, the external power supply is firstly turned off and switched to the built-in battery for supplying power, and the use state and the function detection of the standby battery are detected. At the moment, the power control processor waits for receiving a shutdown signal instruction, if the shutdown signal instruction is not received, the built-in battery continuously supplies power, if the system functions are completely detected and the function detection is normal, the shutdown signal and the instruction are sent to the power control processor, the power control processor turns off the power supply of the interrupt logic circuit, and at the moment, the system can not receive the interrupt signal any more. And then the power supply control processor closes the internal voltage boosting and reducing circuit, the external power supply switching circuit in the system is blocked, and only the internal power supply supplies power. And finally, the power supply control processor closes the built-in battery power supply circuit, the embedded system of the Internet of things is shut down to keep the system current to be 0mA, and the embedded system of the Internet of things enters a transportation mode, so that unnecessary energy loss caused by battery leakage in the transportation mode is avoided.
The internet of things embedded system in the transportation mode CAN enter a normal working mode after being installed and powered on again, and in the mode, the internet of things embedded system CAN normally perform network communication with other internet of things platforms, such as CAN communication, USB communication and the like, Ethernet, wireless communication such as 2G/3G/4G/WIFI/BT/BLE and the like, UART, RS-485, RS-232, LIN bus, K line, PCI-E, PCI and the like. The average power consumption of the Internet of things embedded system in the working state of the mode is 1W-10W.
Referring to fig. 2, initially, it is determined that the current operating mode of the internet of things embedded system is a normal operating mode, and the operating mode of the power control processor in this mode is a start mode. And if the standby signal is detected, the power control processor closes part of power equipment and interface power supply logic, controls related part of equipment to enter a low-power consumption standby mode, so that the embedded system of the Internet of things enters the standby mode, and the power control processor enters the sleep mode. In the standby mode, circuits such as a communication network, an interface communication and the like of the Internet of things embedded system completely enter the standby mode, and only part of power supply and an interrupt network are in a normal working state. The system can receive various preset interrupts to ensure that the system can be awakened normally. The average power consumption in the working state of the mode is 40-100 mW, and the low power consumption requirement of the Internet of things is completely met. In the standby mode, when the system detects the trigger of an interrupt signal, the power control processor enters a starting mode from a sleep mode to control related power equipment to start again, and wakes up the embedded system of the Internet of things to enter a normal working mode again.
After the system enters the standby mode for a period of time, if no communication exists for a long time (exceeding the preset standby time T0 of the system), no interrupt source is needed to wake up, and in order to reduce the further power consumption of the system, the system enters the silent mode. Referring to fig. 3, in a standby mode of the internet of things embedded system, a standby time T0 is preset in the system, and within a standby time T0 preset in the system, the internet of things embedded system is woken up to enter a normal operating mode once detecting an interrupt, and if no interrupt signal is always present over a preset standby time T0 of the system, the power control processor is triggered to enter a start mode, and actively turns off power supply circuits of all power supply logics such as a power device interface and a communication network interface. Further, the power control processor closes the power supply circuit of the battery in the system and closes the power supply circuit of the main power supply of the system to enable the system to be in deep sleep, and the embedded system of the internet of things is switched to a silent mode. When the embedded system of the internet of things is in a silent mode, the power supply control processor controls the mobile communication network and other interface circuits to be in a closed state, and only the interrupt processing source is in a normal working state. After the system enters the silent mode, the average power consumption is 1mW-3 mW. The system power consumption is greatly reduced. The internet of things embedded system under the silent mode is characterized in that an interrupt processing source is in a normal working state, the system continuously performs trigger detection on an interrupt signal, and after the interrupt is triggered, a power supply control processor enters a starting mode from a sleep mode to control related power supply equipment to start again, wakes up the internet of things embedded system to enter the normal working mode again.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and additions can be made without departing from the method of the present invention, and these modifications and additions should also be regarded as the protection scope of the present invention.