A low-power remote wake-up device based on 4G communication and its control method
By using a low-power remote wake-up device based on 4G communication, the power supply of the main control MCU is managed by a power control module and an independent GPIO channel. This solves the contradiction between wake-up delay and power consumption in the low-power standby state of remote controlled devices, realizes zero-power standby of the main control MCU and wake-up confirmation at the hardware level, and ensures power supply flexibility and reliability.
Patent Information
- Application Number
- CN202611562317.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-10
- Publication Date
- 2026-11-06
AI Technical Summary
Existing remotely controlled devices suffer from an irreconcilable problem of wake-up delay and power consumption in low-power standby mode, and lack a hardware-level power status confirmation mechanism independent of the control link, making it impossible to detect abnormal power status of the device in a timely manner.
A low-power remote wake-up device based on 4G communication is adopted. The power control module is controlled by the 4G communication module to manage the power supply of the main control MCU. Combined with an independent GPIO channel for power status detection, the remote wake-up and sleep of the main control MCU are realized. The hierarchical power supply architecture distinguishes between constant power and controlled power input.
It achieves zero power consumption for the main control MCU in low-power standby mode, provides a hardware-level wake-up confirmation mechanism, ensures flexible power supply control, and improves wake-up reliability and real-time monitoring of device power status.
Smart Images

Figure CN123047426A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of remote device control technology, specifically to a low-power remote wake-up device based on 4G communication and its control method. Background Technology
[0002] In typical application scenarios, remote devices are idle most of the time and do not require the main control MCU to run. However, the devices need to maintain real-time responsiveness to remote wake-up commands. Traditional solutions put the MCU in a low-power sleep mode and periodically wake it up to check network messages. While this reduces average power consumption, the MCU still experiences leakage current during sleep, and there is an irreconcilable contradiction between wake-up latency and power consumption; the deeper the sleep mode, the slower the wake-up.
[0003] Existing remotely controlled devices employ a single MCU + 4G communication module architecture, requiring the MCU to remain running or be frequently woken up to maintain network connectivity. Even with software hibernation or bus suspension solutions, the main controller still maintains a standby power consumption of tens to hundreds of milliwatts, severely limiting battery life in battery-powered scenarios. Existing solutions lack a hardware-level power status confirmation mechanism independent of the control link after sending a remote wake-up command. The server can only assume that the wake-up was successful and cannot obtain real feedback on the power status of the controlled device, thus failing to detect situations such as GPIO failures or power anomalies in a timely manner. The existing solution uses a uniform on / off control strategy for all power output ports, which cannot distinguish between power circuits that need to be kept constantly on and power circuits that need to be controlled to switch on and off, resulting in normally powered devices also being constrained by the wake-up state. Summary of the Invention
[0004] The purpose of this invention is to provide a low-power remote wake-up device and its control method based on 4G communication, so as to solve the problems mentioned in the prior art.
[0005] A low-power remote wake-up device based on 4G communication is provided, comprising: a 4G communication module, a main control MCU, and a power control module; the 4G communication module is connected to the main control MCU. The 4G communication module receives TCP command frames to receive remote wake-up or sleep commands. The 4G communication module is connected to the control terminal of the power control module, and the output terminal of the power control module is connected to the power supply terminal of the main control MCU. The 4G communication module controls the power control module to be turned on or off by outputting high-level or low-level control signals, thereby controlling the power supply to the main control MCU.
[0006] As a further aspect of the present invention, it also includes a power input terminal, which includes a constant power input terminal and a controlled power input terminal. The constant power input terminal is directly connected to the power output terminal. A relay module is also connected in series between the controlled power input terminal and the power output terminal.
[0007] As a further aspect of the present invention: the main control MCU is used to control the relay module to close or open according to the relay control command forwarded by the 4G communication module after being remotely woken up and confirmed to be powered on by the 4G communication module.
[0008] As a further aspect of the present invention: the 4G communication module is provided with a first GPIO pin and a second GPIO pin. The first GPIO pin is connected to the control terminal of the power control module as a wake-up IO. The output terminal of the power control module is connected to the power supply terminal of the main control MCU. The 4G communication module outputs a high-level or low-level control signal through the first GPIO pin to control the power control module to be turned on or off, thereby controlling the power supply of the main control MCU. The second GPIO pin is connected to the power status detection terminal of the main control MCU as a detection IO, and is used to independently detect the actual changes in the power supply status of the main control MCU. The first GPIO pin and the second GPIO pin are physically independent GPIO channels.
[0009] As a further aspect of the present invention, it also includes a public network TCP server, which is deployed on a cloud server with a fixed public IP address and has independent device TCP ports and user TCP ports. The 4G communication module is connected to the device TCP port, and the remote control terminal is connected to the user TCP port. The public network TCP server is used to transparently forward TCP data received by the device TCP port to the user TCP port, and to transparently forward TCP data received by the user TCP port to the device TCP port.
[0010] As a further aspect of the present invention: the 4G communication module has both a built-in eSIM chip and an external SIM card slot.
[0011] As a further aspect of the present invention: the ADC voltage acquisition module is connected to the controlled electrical input terminal and the power output terminal respectively, so as to acquire the voltage of the controlled electrical input terminal and the power output terminal and feed it back to the main control MCU, so that the main control MCU can determine the actual conduction state of the relay module according to the actual voltage relationship between the controlled electrical input terminal and the power output terminal.
[0012] As a further aspect of the present invention: the ADC voltage acquisition module includes three single-ended analog input channels, the AIN0 channel acquires the voltage of the controlled power input terminal, the AIN1 channel acquires the voltage of the constant power input terminal, and the AIN2 channel acquires the voltage of the power output terminal.
[0013] As a further aspect of the present invention, it also includes a user host computer, which is connected to a user TCP port. The user host computer is used to generate TCP instruction frames containing wake-up instructions or sleep instructions, and to determine the wake-up or sleep result of the main control MCU based on the received TCPACK response.
[0014] As a further aspect of the present invention: a low-power remote wake-up control method based on 4G communication includes: step S1: the 4G communication module receives a remote wake-up or sleep command; Step S2: The 4G communication module controls the main control MCU power supply to be turned on or off according to the instruction; Step S3: The 4G communication module detects the actual power supply status of the MCU to confirm whether the wake-up or sleep mode is successful; Step S4: The 4G communication module sends the wake-up or sleep control result back to the remote control terminal based on the detection result.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. Low power standby problem: Provide a remote wake-up device architecture that allows the main control MCU to be completely physically powered off. The 4G communication module is used as an independent constant power-on unit. The main control MCU is only woken up by the 4G communication module through hardware signals when it needs to work, realizing zero power consumption of the MCU in standby mode.
[0016] 2. Wake-up reliability verification: A hardware detection mechanism for power status based on an independent GPIO channel is provided. After the 4G communication module issues a wake-up or sleep command, it polls the MCU power status through an independent detection pin to verify the actual change, forming a hardware-level wake-up closed-loop verification.
[0017] 3. Flexible Power Supply Control: A hierarchical power supply architecture is provided, dividing the device's power input into two paths: constant power input and controlled power input. The constant power input is output directly without any control, meeting the power supply needs of equipment requiring long-term power supply; the controlled power input is connected to the output terminal via a relay, requiring remote activation of the MCU and closure of the relay before output can be achieved, realizing on-demand power supply. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0019] Figure 1 A schematic diagram of the system structure of a remote device control device based on 4G communication provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating the wake-up and status feedback process between the 4G communication module and the main control MCU, as provided in an embodiment of the present invention. Figure 3 A flowchart of relay control and output voltage detection provided in an embodiment of the present invention; Figure 4 A flowchart of a remote device control method based on 4G communication provided in an embodiment of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0021] Obviously, the accompanying drawings described below are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, any changes to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.
[0022] However, there may be instances where unnecessary detailed descriptions are omitted. For example, detailed descriptions of well-known matters or repetitive descriptions of essentially the same structures may be omitted. This is to avoid unnecessarily lengthy descriptions and to facilitate understanding by those skilled in the art. Furthermore, the accompanying drawings and the following description are provided to enable those skilled in the art to fully understand this application and are not intended to limit the subject matter of the claims.
[0023] Please see Figure 1-4As shown in the embodiment of the present invention, a low-power remote wake-up device based on 4G communication includes a 4G communication module, a main control MCU, and a power control module. The 4G communication module is connected to the main control MCU. The 4G communication module receives TCP command frames to receive remote wake-up or sleep commands. The 4G communication module is connected to the control terminal of the power control module, and the output terminal of the power control module is connected to the power supply terminal of the main control MCU. The 4G communication module outputs high-level or low-level control signals to control the power control module to be turned on or off, thereby controlling the power supply to the main control MCU. The 4G communication module, the main control MCU, and the power control module together constitute the remote power supply control structure of the main control MCU. The 4G communication module is used to receive remote control commands, and the power control module is used to control the power supply to the main control MCU according to the control signals output by the 4G communication module. The 4G communication module is always powered on and in working state to receive TCP command frames sent by the remote control terminal. When the 4G communication module receives a remote wake-up command, it outputs a high-level control signal to the power control module's control terminal, turning on the power control module and supplying power to the main control MCU, enabling the MCU to power on and run. When the 4G communication module receives a remote sleep command, it outputs a low-level control signal to the power control module's control terminal, turning off the power control module and cutting off the power supply to the main control MCU, causing it to stop running. Thus, by receiving remote TCP commands through the 4G communication module and controlling the power supply to the main control MCU through the power control module, a hierarchical working mode is established between the 4G communication module and the main control MCU. The 4G communication module maintains network communication, while the main control MCU powers on or off according to remote commands.
[0024] In practice, the 4G communication module is connected to the main control MCU and simultaneously to the control terminal of the power control module. The output terminal of the power control module is connected to the power supply terminal of the main control MCU. When the device is in sleep mode, the 4G communication module maintains power supply and is in network monitoring mode, while the main control MCU is powered off. When the remote control terminal needs to wake up the main control MCU, it constructs a TCP command frame containing a wake-up command and sends this TCP command frame to the 4G communication module. After receiving the TCP command frame, the 4G communication module parses it. When it recognizes the received command as a remote wake-up command, the 4G communication module outputs a high-level control signal to the control terminal of the power control module. Under the action of the high-level control signal, the power control module conducts, allowing power to be output to the power supply terminal of the main control MCU. After receiving power, the main control MCU starts running. When the main control MCU needs to enter sleep mode, the remote control terminal sends a TCP command frame containing a sleep command to the 4G communication module. The 4G communication module receives and parses the TCP command frame. Upon recognizing the sleep command, it outputs a low-level control signal to the control terminal of the power control module, causing the power control module to disconnect, thereby cutting off the power supply to the main control MCU and stopping its operation. In this way, the 4G communication module can continue to operate and receive remote TCP commands even when the main control MCU is powered off. Based on the received wake-up or sleep commands, it controls the power control module to turn on or off, thus achieving remote wake-up and remote sleep mode for the main control MCU.
[0025] This application receives remote TCP commands via a 4G communication module and outputs high-level or low-level control signals from the 4G communication module to control the power control module to turn on or off, thereby controlling the power supply to the main control MCU and enabling the main control MCU to power on or shut down according to remote commands.
[0026] Since the power supply control of the 4G communication module is independent of that of the main control MCU, the 4G communication module can still work and receive remote control commands after the main control MCU is powered off. Therefore, it can be remotely woken up when the main control MCU is powered off. At the same time, when the main control MCU does not need to work, its power supply can be cut off by remote sleep command, thereby reducing the power consumption of the main control MCU when it is not working and realizing low-power remote control.
[0027] In one embodiment, see Figure 1It also includes a power input terminal, which comprises a constant power input terminal and a controlled power input terminal. The constant power input terminal is directly connected to the power output terminal. A relay module is connected in series between the controlled power input terminal and the power output terminal. Since the constant power input terminal is directly connected to the power output terminal without a switching control structure between them, the power input at the constant power input terminal can be directly transmitted to the power output terminal. Therefore, whether the device is in sleep or wake-up mode, the constant power input terminal can provide power to the power output terminal to meet the power supply needs of loads requiring continuous power.
[0028] A relay module is connected in series between the controlled electrical input terminal and the power output terminal. The relay module controls the connection between the controlled electrical input terminal and the power output terminal. When the relay module is in the open state, the electrical connection between the controlled electrical input terminal and the power output terminal is broken, and power cannot be transmitted from the controlled electrical input terminal to the power output terminal; therefore, there is no output from this controlled electrical input terminal. When the relay module is in the closed state, an electrical connection is formed between the controlled electrical input terminal and the power output terminal, allowing power to be transmitted from the controlled electrical input terminal to the power output terminal via the relay module, thus enabling power output from the controlled electrical input terminal. In specific operation, when the device is in sleep mode, the main control MCU is powered off, the relay module remains open, and the connection between the controlled electrical input terminal and the power output terminal is disconnected. At this time, the constant power input terminal still directly supplies power to the power output terminal, while the controlled electrical input terminal does not supply power to the power output terminal. When power is needed from the controlled electrical input terminal, the main control MCU is first remotely woken up via a 4G communication module, allowing the main control MCU to receive power and enter operating mode. After the main control MCU powers on, it controls the relay module to close via GPIO according to the received relay control command, connecting the controlled electrical input terminal to the power output terminal. At this time, the controlled electrical input terminal can provide power to the power output terminal. When it is necessary to stop the power supply to the controlled electrical input terminal, the main control MCU controls the relay module to open via GPIO, cutting off the electrical connection between the controlled electrical input terminal and the power output terminal, thereby stopping the power output from that controlled electrical input terminal. Through this structure, the power input terminal forms two power supply modes: constant power input and controlled power input. The constant power input terminal outputs directly to meet continuous power supply requirements; the controlled power input terminal is controlled by the relay module and only supplies power to the power output terminal after the main control MCU is remotely woken up and controls the relay module to close, thus realizing on-demand output of controlled power.
[0029] In this embodiment, the power control module is located between the constant power supply branch and the power supply terminal of the main control MCU, and includes at least a control interface circuit and a power on / off circuit. The input terminal of the control interface circuit is connected to the first GPIO pin of the 4G communication module, and the power on / off circuit is connected in series between the power input terminal and the power supply terminal of the main control MCU. The control interface circuit is used to receive the wake-up control signal output from the first GPIO pin, and drive the power on / off circuit to be turned on or off according to the wake-up control signal, thereby converting the logic level control signal output by the 4G communication module into the actual on / off state of the main control MCU power supply circuit.
[0030] The 4G communication module and power control module are continuously powered by a constant power branch, while the main control MCU and its peripheral service circuits are powered by a controlled power supply branch formed by the power control module. During device initialization or when no wake-up command is received, the first GPIO pin remains low, the power on / off circuit is off, and the main control MCU's power supply terminal is disconnected from the power input terminal, causing the main control MCU and its peripheral service circuits to stop consuming power. Meanwhile, the 4G communication module continues to maintain network connectivity and receive remote control commands. When the 4G communication module receives a remote wake-up command, the first GPIO pin outputs a high level, the control interface circuit drives the power on / off circuit to conduct, connecting the power input terminal to the main control MCU's power supply terminal, allowing the main control MCU to obtain operating power and start operation.
[0031] When the 4G communication module receives a sleep command, it first sends a sleep notification to the main control MCU via UART, enabling the main control MCU to complete data saving, relay disconnection, and necessary shutdown procedures. Subsequently, the first GPIO pin outputs a low level, shutting down the power supply circuit and cutting off the power supply to the main control MCU. This process prevents the main control MCU from being directly powered off while processing services or while the controlled power supply is still on, ensuring the device enters a low-power standby state.
[0032] The on / off state of the power control module is not directly used to determine whether the main control MCU is actually powered on or off. The main control MCU power supply side is also connected to the second GPIO pin of the 4G communication module via an independent power status detection path. When the main control MCU is powered on and the status detection signal reaches a valid high level, the 4G communication module determines that the main control MCU is actually powered on; when the power control module is off and the status detection signal goes low, it determines that the main control MCU is actually powered off. The second GPIO pin can be configured as a pull-down input to prevent the detection terminal from being left floating when the main control MCU is powered off. Thus, the first GPIO pin forms a power supply control channel, and the second GPIO pin forms a power supply status feedback channel. The two channels are independent of each other, thereby achieving closed-loop confirmation of remote power-on and power-off of the main control MCU.
[0033] Please see Figure 1 and Figure 2The main control MCU, after being remotely woken up and powered on via the 4G communication module, controls the relay module to close or open according to the relay control commands forwarded by the 4G communication module. The relay module is located between the controlled electrical input terminal and the power output terminal, and its closing or opening is controlled by the main control MCU. The relay module is normally open and remains open during device sleep to ensure the power output terminal is in a zero-power output state. When the main control MCU is remotely woken up and powered on, it controls the relay module to close or open according to the relay control commands sent by the server, realizing remote switching control of the power output terminal.
[0034] The specific control process is as follows: Step S1: The user constructs and sends a wake-up or sleep TCP protocol frame through the host computer. The TCP protocol frame includes a frame header of 0x5AA5, frame length, protocol version of 0x10, message type of 0x01, data value and CRC16 check information, and is transparently forwarded to the 4G communication module by the public network TCP server.
[0035] Step S2: The TCP receiving thread of the 4G communication module appends the received data to the frame buffer and calls the frame parsing function to scan the frame buffer. The frame parsing function first locates the frame header 0x5AA5, then reads the frame length field, and checks whether enough data bytes have been received in the frame buffer; when a complete frame has arrived, it performs CRC16-CCITT verification on the complete frame. After the verification passes, it extracts the message type and data value, and distributes instructions according to the message type.
[0036] Step S3: When the message type is 0x01 (device wake-up control) and the data value is 1 (wake-up), the 4G communication module creates an independent asynchronous task to handle the wake-up operation. In the asynchronous task, the 4G communication module first sets the wake-up IO to a high level, powering on the main control MCU.
[0037] Step S4: After the main control MCU is powered on, the 4G communication module polls the level status of the IO pin every 50ms to detect whether the main control MCU has been powered on normally. A high level IO indicates that the main control MCU is powered on normally, and a total timeout of 2000ms is set.
[0038] Step S5: If the detection IO is detected to go high within 2000ms, the remote wake-up is determined to be successful. The 4G communication module sets the internally recorded MCU status variable to the RUN running state and turns off the fault indicator light. Then, a TCPACK frame is constructed. The message type of the TCPACK frame is 0x81 and the result byte is 0x55. The result byte 0x55 indicates that the wake-up was successful, and the TCPACK frame is sent to the public network TCP server.
[0039] Step S6: If the IO does not go high after a 2000ms timeout, the remote wake-up is determined to have failed. The 4G communication module marks the MCU status as FAULT and lights up the fault indicator light. Then, a TCPACK frame is constructed. The message type of the TCPACK frame is 0x81 and the result byte is 0xAA. The result byte 0xAA indicates that the wake-up has failed. The TCPACK frame is then sent to the public network TCP server.
[0040] Step S7: After receiving the TCPACK frame, the public network TCP server transparently forwards the TCPACK frame to the user's host computer. The user's host computer determines whether the remote wake-up operation was successful based on the received TCPACK frame.
[0041] Step S8: When executing sleep control, the sleep control process is symmetrical to the wake-up control process described above. When a sleep control command is received, i.e., the message type is 0x01 and the data value is 0, the 4G communication module will output a low level on the wake-up IO to power down the main control MCU; at the same time, the 4G communication module will poll every 50ms to wait for the detection IO to turn low, and use the same total timeout of 2000ms as the wake-up control to determine whether the main control MCU has completed the power-down.
[0042] After the main control MCU is remotely woken up and confirmed to be powered on, the 4G communication module can also receive relay control commands from the server and forward them to the main control MCU. Upon receiving the relay control command, the main control MCU directly drives the relay module via GPIO. When the data value of the relay control command is 1, the main control MCU controls the relay module to close, connecting the controlled electrical input terminal to the power output terminal, allowing the controlled electrical input terminal to supply power to the power output terminal. When the data value of the relay control command is 0, the main control MCU controls the relay module to open, disconnecting the controlled electrical input terminal from the power output terminal and stopping the controlled electrical output.
[0043] In this embodiment, the 4G communication module receives TCP wake-up or sleep protocol frames sent by the user's host computer. After frame header positioning, length judgment, and CRC16-CCITT verification, the module distributes the command. When a wake-up command is received, the 4G communication module outputs a high level through the wake-up IO to power on the main control MCU. The module also detects the actual power supply status of the main control MCU through the detection IO. After confirming that the detection IO has turned high within a set 2000ms time, the module determines that the main control MCU has been successfully woken up and sends the wake-up result back to the user's host computer via a TCPACK frame.
[0044] When a sleep command is received, the 4G communication module outputs a low level through the wake-up IO to power off the main control MCU. It then waits for the main control MCU's power supply status to turn low through the detection IO, thus completing the sleep control of the main control MCU.
[0045] After the main control MCU powers on normally, the 4G communication module forwards the relay control commands sent by the server to the main control MCU, which then controls the relay module to close or open via GPIO. Since the relay module is connected in series between the controlled electrical input terminal and the power output terminal, closing the relay connects the controlled electrical input terminal and the power output terminal, while opening the relay disconnects the power supply between them.
[0046] Please see Figure 1 The 4G communication module has a first GPIO pin and a second GPIO pin. The first GPIO pin serves as a wake-up IO and is connected to the control terminal of the power control module. The output terminal of the power control module is connected to the power supply terminal of the main control MCU. The 4G communication module outputs a high-level or low-level control signal through the first GPIO pin to control the power control module to turn on or off, thereby controlling the power supply to the main control MCU. The second GPIO pin serves as a detection IO and is connected to the power status detection terminal of the main control MCU. It is used to independently detect the actual changes in the power supply status of the main control MCU. The first GPIO pin and the second GPIO pin are physically independent GPIO channels. The first GPIO pin is connected to the control terminal of the power control module and is used as a wake-up IO; the second GPIO pin is connected to the power status detection terminal of the main control MCU and is used as a detection IO. The first GPIO pin and the second GPIO pin respectively undertake the functions of main control MCU power supply control and power supply status detection, and the two GPIO pins are physically independent GPIO channels.
[0047] The first GPIO pin is used to control the power supply status of the main control MCU. When the 4G communication module needs to wake up the main control MCU, it outputs a high-level control signal through the first GPIO pin to turn on the power control module, which then supplies power to the main control MCU, powering it on. When the main control MCU needs to go into sleep mode, it outputs a low-level control signal through the first GPIO pin to turn off the power control module, thereby cutting off the power supply to the main control MCU.
[0048] The second GPIO pin is used to detect actual changes in the power supply status of the main control MCU. It does not participate in power control but independently acquires the power supply status of the main control MCU. When the first GPIO pin outputs a control signal, the 4G communication module detects whether the power supply status of the main control MCU has changed accordingly through the second GPIO pin, thereby determining whether the main control MCU is actually powered on or off.
[0049] By setting the first GPIO pin and the second GPIO pin as physically independent GPIO channels, the power supply control and power supply status detection of the main control MCU are made independent of each other, avoiding the use of the control signal itself as the basis for judging the actual power supply status of the main control MCU.
[0050] In specific implementation, the 4G communication module is equipped with a first GPIO pin and a second GPIO pin. The first GPIO pin is used as a wake-up IO and is connected to the control terminal of the power control module. The output terminal of the power control module is connected to the power supply terminal of the main control MCU. The second GPIO pin is used as a detection IO and is connected to the power status detection terminal of the main control MCU.
[0051] When the main control MCU is in a power-off state and needs to be remotely woken up, the 4G communication module outputs a high-level control signal to the control terminal of the power control module through the first GPIO pin according to the received remote wake-up command, so that the power control module is turned on and provides power to the power supply terminal of the main control MCU, so that the main control MCU is powered on.
[0052] After the first GPIO pin outputs a high-level control signal, the 4G communication module detects the power status of the main control MCU through the second GPIO pin. When the second GPIO pin detects a high-level state corresponding to the normal power supply of the main control MCU, it indicates that the power supply status of the main control MCU has actually changed, that is, the main control MCU has been powered on normally.
[0053] When the main control MCU needs to be powered down, the 4G communication module outputs a low-level control signal through the first GPIO pin, causing the power control module to disconnect and thus cutting off the power supply to the main control MCU. Simultaneously, the 4G communication module detects the power status of the main control MCU through the second GPIO pin. When the second GPIO pin changes to a low level corresponding to the power-down state, it indicates that the main control MCU has been effectively powered down.
[0054] In the above process, the first GPIO pin is only used to output control signals to the power control module, and the second GPIO pin is only used to detect the actual power supply status of the main control MCU. The two GPIO pins are connected to different control and detection paths and are physically independent of each other. This achieves independence between control and detection. The first GPIO pin acts as a wake-up IO to control the power control module, and the second GPIO pin acts as a detection IO to detect the actual power supply status of the main control MCU, making the control channel and the detection channel independent. This allows for the determination of the actual power supply status of the main control MCU. After the first GPIO pin outputs a control signal, the determination of whether the main control MCU has been powered on or off is not based directly on the output status of the first GPIO pin, but rather on the actual change in the power supply status of the main control MCU detected by the second GPIO pin, thereby improving the accuracy of the power supply status determination. This facilitates remote wake-up result confirmation. When the first GPIO pin controls the power control module to conduct, the power supply status of the main control MCU is detected by the second GPIO pin. Upon detecting a corresponding level change, it can be confirmed that the main control MCU has actually been powered on.
[0055] This facilitates remote sleep status confirmation. When the first GPIO pin controls the power control module to disconnect, the second GPIO pin detects whether the main MCU's power supply status has changed to a power-off state, thus confirming that the main MCU has actually completed the power-off process. This improves the reliability of remote power supply control. By setting independent wake-up and detection IOs, the 4G communication module simultaneously possesses the ability to control and provide feedback on the main MCU's power supply status, thus forming a control method that combines power supply control with actual status detection.
[0056] Specifically, this includes a public network TCP server deployed on a cloud server with a fixed public IP address, and equipped with independent device TCP ports and user TCP ports. A 4G communication module connects to the device TCP port, and the remote control terminal connects to the user TCP port. The public network TCP server transparently forwards TCP data received by the device TCP port to the user TCP port and vice versa. The 4G communication module acts as a TCP client, actively connecting to the device TCP port, and the remote control terminal acts as a TCP client, actively connecting to the user TCP port.
[0057] The public network TCP server itself does not participate in the protocol parsing between the 4G communication module and the remote control terminal, but acts as a data relay node. When the device's TCP port receives TCP data sent by the 4G communication module, the server preserves the original content of the data and transparently forwards it to the connected client on the user's TCP port; conversely, when the user's TCP port receives TCP data sent by the remote control terminal, the server also forwards the data to the connected client on the device's TCP port as is.
[0058] In practice, the public network TCP server is deployed on a cloud server with a fixed public IP address and listens on two independent TCP ports simultaneously. The device TCP port is used to connect to the 4G communication module. After the 4G communication module powers on, it actively initiates a TCP connection to the device TCP port of the public network TCP server, acting as a TCP client. Upon receiving the connection request, the public network TCP server establishes the corresponding TCP connection and records the 4G communication module in the device-side connected client list for subsequent reception and forwarding of data sent by the 4G communication module. The user TCP port is used to connect to the remote control terminal. The remote control terminal actively initiates a TCP connection to the user TCP port of the public network TCP server via the internet, acting as a TCP client. After establishing the corresponding connection, the public network TCP server records the remote control terminal in the user-side connected client list. When the remote control terminal needs to send remote wake-up, hibernation, or other control commands to the 4G communication module, it sends the corresponding TCP data to the user TCP port. Upon receiving this TCP data, the public network TCP server does not perform protocol parsing or modify the data content; instead, it forwards the received TCP data as is to the 4G communication module corresponding to the device TCP port. After receiving the forwarded TCP data, the 4G communication module parses the data according to its own communication protocol and executes corresponding operations based on the control commands in the data. For example, during remote wake-up, the remote control terminal sends a TCP protocol frame containing wake-up control commands. This protocol frame enters the public network TCP server through the user's TCP port, and is then transparently forwarded by the public network TCP server to the device's TCP port. The device's TCP port then forwards it to the corresponding 4G communication module, thereby enabling the remote control terminal to remotely control the 4G communication module.
[0059] When the 4G communication module needs to return data to the remote control terminal, such as returning a TCP response frame indicating successful or failed remote wake-up, the 4G communication module sends the response data to the device's TCP port. Upon receiving this data, the public network TCP server does not perform protocol parsing or content modification; instead, it forwards the data as is to the connected client on the user's TCP port. The remote control terminal, upon receiving the response data, can determine the corresponding control result based on the response content. In this process, the public network TCP server only handles TCP connection management and transparent data forwarding. The specific protocol frame parsing, control command identification, and control result determination are all handled by the 4G communication module and the remote control terminal, thus maintaining the independence between the device-side communication protocol and the server forwarding layer.
[0060] Specifically, the 4G communication module features both a built-in eSIM chip and an external SIM card slot. It primarily utilizes the built-in eSIM chip and external SIM card slot to form a dual-SIM communication configuration, and combines software commands to achieve automatic switching between the two SIM cards. This ensures the 4G communication module can register with the network while meeting both factory-pre-configured, out-of-the-box requirements and allowing for flexible switching of carrier SIM cards based on actual usage environments. It provides a physical eSIM + external SIM card dual-slot hardware design, with one-click software activation for automatic switching. The external SIM card takes priority, and the eSIM automatically falls back. In the event of a hardware failure in one slot, the other automatically takes over, balancing factory-configurable requirements with the user's need for flexible carrier switching.
[0061] Please see Figure 2 As shown, the ADC voltage acquisition module is connected to both the controlled input terminal and the power output terminal to acquire the voltages at these terminals and feed them back to the main control MCU. The main control MCU then uses the actual voltage relationship between the controlled input terminal and the power output terminal to determine the actual conduction state of the relay module. The ADC voltage acquisition module is connected to the main control MCU and is connected to both the controlled electrical input terminal and the power output terminal. The ADC voltage acquisition module acquires the voltage from the controlled electrical input terminal and the power output terminal according to a predetermined sampling channel.
[0062] The relay control process is as follows.
[0063] Step 1: Receive relay control commands.
[0064] After receiving the relay control command from the remote control terminal, the 4G communication module forwards the command to the main control MCU via UART. The main control MCU receives the command via UART, identifies the message type as 0x02, and further parses the data value fields within it.
[0065] Step 2: Execute the relay closure.
[0066] When the parsed data value is 1, the main control MCU controls the relay to output a high level via the GPIO, energizing the relay coil and closing the relay contacts, thus connecting the controlled input terminal to the power output terminal. At this point, the relay has received the closing control signal, but the main control MCU still needs to further confirm whether the relay has actually conducted.
[0067] Step 3: Delay stabilization.
[0068] After the relay is closed, the main control MCU delays for 100ms to wait for the relay contact bounce to subside and for the power output voltage to stabilize, thus avoiding misjudgment caused by immediately judging the voltage at the moment the relay is closed.
[0069] Step 4: Collect the input and output voltages.
[0070] After the delay ends, the main control MCU collects the voltage at the two locations through the ADC sampling chip.
[0071] First, switch to channel AIN0, which corresponds to the controlled input voltage. The main control MCU writes to the CONFIG0 register by sending the WREG command to switch the ADC's MUX channel, and then sends the START command to start a single conversion; after the DRDY pin of the ADC sampling chip goes low, the main control MCU reads the corresponding 16-bit raw ADC value.
[0072] Subsequently, the main control MCU switches the ADC sampling channel to the AIN2 channel, which corresponds to the power output voltage, and re-executes the ADC conversion, waits for DRDY, and reads the 16-bit raw ADC value in the same way.
[0073] This yields the original ADC sample values at the controlled input terminal and the power output terminal, respectively.
[0074] Step 5: Convert to actual voltage.
[0075] The main control MCU converts the acquired raw ADC values into the corresponding actual voltages, and the calculation relationship is as follows: V_actual=(raw_code×Vref) / (FS_CODE×ratio) Where raw_code is the 16-bit raw ADC value acquired by the ADC, Vref is the internal reference voltage of the ADC, and ratio is the voltage division ratio of the resistors.
[0076] After conversion, the actual voltage at the controlled input terminal and the actual voltage at the power output terminal are obtained respectively.
[0077] Step 6: Determine the actual closed state of the relay.
[0078] The main control MCU calculates the absolute difference between the voltage at the controlled input terminal and the voltage at the power supply output terminal: ΔV=|VAIN0 VAIN2∣ When the voltage difference ΔV ≤ 5.0V, it indicates that the voltage at the power supply output terminal is basically the same as the voltage at the controlled power input terminal. This confirms that the relay has closed normally, and the voltage at the controlled power input terminal can be transmitted normally to the power supply output terminal. At this time, the main control MCU replies with an ACK success message to the 4G communication module via UART, with the result field being 0x55.
[0079] When the voltage difference ΔV > 5.0V, it indicates that the actual voltage difference between the controlled input terminal and the power output terminal is large. This indicates that the relay is not closing properly or there is poor contact in the relay contacts. At this time, the main control MCU sends an ACK failure message to the 4G communication module via UART, and the result field is 0xAA.
[0080] Therefore, this judgment process is not based on the relay GPIO control signal itself, but on the actual input and output voltage relationship after the relay is closed to confirm whether the relay is truly conducting.
[0081] When the data value parsed by the main control MCU is 0, a relay disconnection operation is performed. The main control MCU directly controls the relay GPIO output to a low level, de-energizing the relay coil and opening the relay contacts, thereby disconnecting the electrical connection between the controlled input terminal and the power output terminal. After completing the disconnection control, the main control MCU replies with an ACK success message to the 4G communication module via UART.
[0082] Compared to judging the relay status solely by the GPIO level output by the MCU, this structure can further determine the actual power supply situation after the relay contacts are closed. When the relay control signal has been output, but the relay is not actually closed or the contacts are not making good contact, a large voltage difference will still be generated between the controlled input terminal and the power output terminal. The main control MCU can output a 0xAA failure result based on this voltage difference; only when the voltages at both ends are basically the same will a 0x55 success result be output, thereby confirming the actual conduction state of the relay.
[0083] Table 1. Meaning and Units of Parameters
[0084] The conversion relationship between the ADC raw code value and the actual voltage is as follows: The first step is to convert the raw code value into a voltage on the ADC input pin: V_adc_pin=(raw_code / FS_CODE)×Vref The second step is to convert the ADC pin voltage to the actual voltage at the measured point (considering the resistor divider network): V_actual=V_adc_pin / ratio Combining the two steps, the complete voltage conversion relationship is as follows: V_actual=(raw_code×Vref) / (FS_CODE×ratio) Where raw_code is a 16-bit signed integer, Vref=3.3V, FS_CODE = 32768, and ratio=0.022.
[0085] Example: If raw_code=5000 is read, then: V_adc_pin=(5000 / 32768)×3.3≈0.503V V_actual = 0.503 / 0.022 ≈ 22.86V In addition, when the converted V_actual is less than 5V, it is directly zeroed (V_actual = 0) to filter out noise misreading when the input terminal is not connected to power.
[0086] The voltage verification logic after the relay is closed can be described in words as follows: delta_V = |V_ain0 - V_ain2| If delta_V≤delta_thr, then the relay operation is considered successful (ACK0x55 is received). If delta_V > delta_thr, then the relay operation is deemed to have failed (responding with ACK0xAA).
[0087] Where V_ain0 is the actual voltage at the controlled input terminal, V_ain2 is the actual voltage at the power output terminal, and delta_thr = 5.0V.
[0088] Table 2: Meaning and Values of Parameters
[0089] Please see Figure 3 Specifically, the ADC voltage acquisition module includes three single-ended analog input channels: AIN0 acquires the voltage at the controlled power input terminal, AIN1 acquires the voltage at the constant power input terminal, and AIN2 acquires the voltage at the power output terminal. During voltage detection, the main control MCU sequentially selects AIN0, AIN1, and AIN2 channels of the ADC for sampling. The ADC converts the analog voltage at the three detection locations into corresponding sampled data and feeds it back to the main control MCU. When it is necessary to determine whether the controlled power supply is outputting normally, the main control MCU acquires the sampling results from AIN0 and AIN2. Since AIN0 corresponds to the controlled electrical input terminal and AIN2 corresponds to the power output terminal, when the relay is normally closed, the voltage at the controlled electrical input terminal can be transmitted to the power output terminal, and the voltages detected by the two channels are basically the same. If the relay is not normally closed, normal voltage transmission cannot be formed between the controlled electrical input terminal and the power output terminal, and the voltages detected by the two channels will differ. This allows for the determination of the actual conduction status of the relay. At the same time, the main control MCU obtains the voltage at the constant power input terminal through AIN1, thereby obtaining the controlled electrical input voltage, constant power input voltage, and power output voltage of the device, providing data for power status monitoring and remote voltage query of the device.
[0090] Specifically, this also includes a user host computer connected to a user TCP port. The user host computer generates TCP command frames containing wake-up or sleep commands and determines the wake-up or sleep result of the main control MCU based on the received TCPACK response. The user host computer connects to the user TCP port of the public network TCP server, acting as a TCP client to send control data to the public network TCP server. When the user needs to remotely wake up the main control MCU, the user host computer generates a TCP command frame containing a wake-up command and sends it to the user TCP port. After receiving the TCP command frame, the public network TCP server transparently forwards it to the device TCP port, which then forwards it to the 4G communication module. Upon receiving the TCP command frame, the 4G communication module parses the command. When a wake-up command is detected, it controls the power supply to the main control MCU via the first GPIO, enabling the main control MCU to power on and run. Simultaneously, the 4G communication module detects the actual power supply status of the main control MCU via the second GPIO. After confirming that the main control MCU has completed wake-up, the 4G communication module generates a corresponding TCPACK response and returns it to the user host computer via the public network TCP server. After receiving the TCPACK response, the user's host computer determines whether the wake-up operation was successful based on the result information in the ACK. The hibernation control process corresponds to the above process: the user's host computer generates a TCP instruction frame containing hibernation instructions, which is transparently forwarded to the 4G communication module via a public network TCP server; the 4G communication module controls the main control MCU to power off, and confirms that the main control MCU has actually entered the power-off state by detecting IO, and then returns a TCPACK response. The user's host computer determines the hibernation result based on the ACK response.
[0091] Please see Figure 4 A low-power remote wake-up control method based on 4G communication is described, comprising the following steps: Step S1: The 4G communication module receives a remote wake-up or sleep command; Step S2: The 4G communication module controls the power supply terminal of the main control MCU to be turned on or off according to the command; Step S3: The 4G communication module detects the actual power supply status of the MCU to confirm that the wake-up or sleep is successful; Step S4: The 4G communication module feeds back the wake-up or sleep control result to the remote control terminal according to the detection result. Receive remote control commands.
[0092] The 4G communication module receives wake-up or sleep commands sent by the remote control terminal and identifies the received commands to determine whether the main control MCU needs to be woken up or put into sleep mode.
[0093] Controls the power supply to the main control MCU.
[0094] The 4G communication module controls the power supply terminal of the main control MCU to be turned on or off according to the control command obtained by recognition. When a wake-up command is received, the 4G communication module controls the first GPIO to output a high level, so that the power supply terminal of the main control MCU is turned on, and the main control MCU obtains working power and starts running. When a sleep command is received, the 4G communication module controls the first GPIO to output a low level, so that the power supply terminal of the main control MCU is turned off, and the main control MCU stops supplying power.
[0095] Detect the actual power supply status.
[0096] The 4G communication module detects the actual power supply status of the main control MCU through a second GPIO that is physically independent of the first GPIO. When performing a wake-up operation, if the actual power supply of the main control MCU is detected to be normal, the main control MCU is confirmed to have woken up successfully. When performing a sleep operation, if the actual power supply of the main control MCU is detected to be disconnected, the main control MCU is confirmed to have gone into sleep successfully. Thus, the actual execution result of power supply control is confirmed through an independent detection channel.
[0097] The 4G communication module sends the wake-up or sleep control result back to the remote control terminal based on the detection results.
[0098] The 4G communication module determines the wake-up or sleep result based on the actual power supply status of the main control MCU detected by the second GPIO, and feeds back the corresponding control result to the remote control terminal through TCP communication, thereby completing a complete closed-loop control process of remote command reception, main control MCU power supply control, actual power supply status detection and control result feedback.
[0099] It should be noted that this application is not limited to the above-described embodiments. The above embodiments are merely examples, and any embodiments with the same structure and effect as the technical concept within the scope of this application are included in the technical scope of this application. Furthermore, various modifications that can be conceived by those skilled in the art to the embodiments, and other ways of constructing by combining some of the constituent elements of the embodiments, without departing from the spirit of this application, are also included in the scope of this application.
Claims
1. A low power remote wake-up device based on 4G communication, characterized in that, It includes a 4G communication module, a main control MCU, and a power control module; the 4G communication module is connected to the main control MCU. The 4G communication module receives TCP command frames to receive remote wake-up or sleep commands. The 4G communication module is connected to the control terminal of the power control module, and the output terminal of the power control module is connected to the power supply terminal of the main control MCU. The 4G communication module controls the power control module to be turned on or off by outputting high-level or low-level control signals, thereby controlling the power supply to the main control MCU. The 4G communication module is equipped with a first GPIO pin and a second GPIO pin. The first GPIO pin serves as a wake-up IO and is connected to the control terminal of the power control module. The output terminal of the power control module is connected to the power supply terminal of the main control MCU. The 4G communication module outputs a high-level or low-level control signal through the first GPIO pin to control the power control module to turn on or off, thereby controlling the power supply to the main control MCU. The second GPIO pin serves as a detection IO and is connected to the power status detection terminal of the main control MCU to independently detect the actual changes in the power supply status of the main control MCU. The first GPIO pin and the second GPIO pin are physically independent GPIO channels.
2. The low power remote wake-up device based on 4G communication according to claim 1, wherein, It also includes a power input terminal, which includes a constant power input terminal and a controlled power input terminal. The constant power input terminal is directly connected to the power output terminal. A relay module is also connected in series between the controlled power input terminal and the power output terminal.
3. The low power remote wake-up device based on 4G communication according to claim 2, characterized in that, The main control MCU is used to control the relay module to close or open according to the relay control command forwarded by the 4G communication module after being remotely woken up and confirmed to be powered on by the 4G communication module.
4. A low-power remote wake-up device based on 4G communication according to claim 1, characterized in that, It also includes a public network TCP server, which is deployed on a cloud server with a fixed public IP address and has independent device TCP ports and user TCP ports. The 4G communication module is connected to the device TCP port, and the remote control terminal is connected to the user TCP port. The public network TCP server is used to transparently forward TCP data received by the device TCP port to the user TCP port, and to transparently forward TCP data received by the user TCP port to the device TCP port.
5. A low-power remote wake-up device based on 4G communication according to claim 1, characterized in that, The 4G communication module has both a built-in eSIM chip and an external SIM card slot.
6. A low-power remote wake-up device based on 4G communication according to claim 2, characterized in that, It also includes an ADC voltage acquisition module, which is connected to the controlled electrical input terminal and the power output terminal respectively, to acquire the voltage of the controlled electrical input terminal and the power output terminal and feed it back to the main control MCU, so that the main control MCU can determine the actual conduction state of the relay module based on the actual voltage relationship between the controlled electrical input terminal and the power output terminal.
7. A low-power remote wake-up device based on 4G communication according to claim 6, characterized in that, The ADC voltage acquisition module includes three single-ended analog input channels: the AIN0 channel acquires the voltage of the controlled power input terminal, the AIN1 channel acquires the voltage of the constant power input terminal, and the AIN2 channel acquires the voltage of the power output terminal.
8. A low-power remote wake-up device based on 4G communication according to claim 4, characterized in that, It also includes a user host computer, which is connected to the user TCP port. The user host computer is used to generate TCP instruction frames containing wake-up instructions or sleep instructions, and to determine the wake-up or sleep result of the main control MCU based on the received TCPACK response.
9. A low-power remote wake-up control method based on 4G communication, applied to the low-power remote wake-up device based on 4G communication as described in any one of claims 1-8, characterized in that, The method includes: Step S1: The 4G communication module receives a remote wake-up or sleep command; Step S2: The 4G communication module controls the main control MCU power supply to be turned on or off according to the instruction; Step S3: The 4G communication module detects the actual power supply status of the MCU to confirm whether the wake-up or sleep mode is successful; Step S4: The 4G communication module sends the wake-up or sleep control result back to the remote control terminal based on the detection result.
