Mode control method and system, and electronic device, and storage medium
AssigneeZhejiang Sanhua Intelligent Controls Co., Ltd.
InventorShuang Li
Life of this patent
Estimating the term…
Abstract
Provided is a mode control method that includes obtaining a PWM signal; obtaining a duty cycle of the PWM signal; obtaining a target rotational speed of an electric pump based on the duty cycle of the PWM signal; in response to determining that the target rotational speed of the electric pump is equal to 0 and the target rotational speed of the electric pump remains equal to 0 for the set duration, entering the sleep mode by the microcontroller; and in response to determining that the target rotational speed of the electric pump is not equal to 0 or the target rotational speed of the electric pump does not remain equal to 0 for the set duration, entering the working mode by the microcontroller. Further provided are a mode control system, an electronic device and a storage medium.
Claims17
A mode control method, applied to a microcontroller configured to control an electric pump, the mode control method comprising:
- obtaining a pulse-width modulation (PWM) signal;
- obtaining a duty cycle of the PWM signal;
- obtaining a target rotational speed of the electric pump based on the duty cycle of the PWM signal;
- determining whether the target rotational speed of the electric pump is equal to 0 and whether that the target rotational speed of the electric pump remains equal to 0 for a set duration;
- in response to determining that the target rotational speed of the electric pump is equal to 0 and that the target rotational speed of the electric pump remains equal to 0 for the set duration, entering a sleep mode by the microcontroller;
- and
- in response to determining that the target rotational speed of the electric pump is not equal to 0 or the target rotational speed of the electric pump does not remain equal to 0 for the set duration, entering a working mode by the microcontroller;
- wherein after the microcontroller enters the sleep mode, the mode control method further comprises:
- determining whether the duty cycle of the PWM signal is 0% after a predetermined interval of time;
- in response to determining that the duty cycle of the PWM signal is 0%, remaining in the sleep mode by the microcontroller;
- in response to determining that the duty cycle of the PWM signal is not 0%, determining whether the duty cycle of the PWM signal falls in a preset duty cycle interval;
- and
- in response to determining that the duty cycle of the PWM signal does not fall in the preset duty cycle interval, entering the working mode by the microcontroller.
A mode control method, applied to a microcontroller configured to control an electric pump, the method comprising:
- S1. determining whether a duty cycle of a pulse-width modulation (PWM) signal is 0;
- in response to determining that the duty cycle of the PWM signal is 0, performing S2;
- and in response to determining that the duty cycle of the PWM signal is not 0, performing S3;
- S2. determining whether the duty cycle of the PWM signal remains 0 for a preset duration;
- in response to determining that the duty cycle of the PWM signal remains 0 for the preset duration, entering a first sleep mode and controlling the electric pump not to rotate or to stop rotating by the microcontroller;
- and in response to determining that the duty cycle of the PWM signal does not remain 0 for the preset duration, entering a working mode or remaining in the working mode and controlling the electric pump to rotate at a determined target rotational speed by the microcontroller;
- and
- S3. determining whether the duty cycle of the PWM signal falls in a preset duty cycle interval;
- in response to determining that the duty cycle of the PWM signal falls in the preset duty cycle interval, entering a second sleep mode by the microcontroller;
- and in response to determining that the duty cycle of the PWM signal does not fall in the preset duty cycle interval, entering the working mode or remaining in the working mode and controlling the electric pump to rotate at the determined target rotational speed by the microcontroller.
A mode control system, configured for controlling an electric pump and, the mode control system comprising:
- a host computer, comprising a pulse-width modulation (PWM) controller configured to issue a PWM signal;
- and
- a microcontroller, electrically connected to the host computer and configured to receive and parse the PWM signal to obtain a duty cycle of the PWM signal and obtain a target rotational speed of the electric pump based on the duty cycle of the PWM signal, wherein
- the microcontroller is further configured to:
- determine whether the target rotational speed of the electric pump is equal to 0 and determine whether the target rotational speed of the electric pump remains equal to 0 for a set duration;
- enter a sleep mode in response to determining that the target rotational speed of the electric pump is equal to 0 and the target rotational speed of the electric pump remains equal to 0 for the set duration;
- and enter a working mode in response to determining that the target rotational speed of the electric pump is not equal to 0 or the target rotational speed of the electric pump does not remain equal to 0 for the set duration;
- wherein after the microcontroller enters the sleep mode, the microcontroller is further configured to:
- determine whether the duty cycle of the PWM signal is 0% after a predetermined interval of time;
- remain in the sleep mode in response to determining that the duty cycle of the PWM signal is 0%;
- determine whether the duty cycle of the PWM signal falls in a preset duty cycle interval;
- and
- enter the working mode in response to determining that the duty cycle of the PWM signal does not fall in the preset duty cycle interval.
Dependencies are inferred from the claim text.