Disclosure of Invention
The present invention has been made in view of the above problems. The invention provides an intelligent mobile device, a charging detection method thereof and a computer readable storage medium, which can judge whether an electrolysis fault occurs or not so as to ensure charging safety.
According to an aspect of the present invention, there is provided a charge detection method for a smart mobile device, including:
determining an input voltage value of the smart mobile device;
acquiring a standard voltage value of a micro control unit in the intelligent mobile equipment corresponding to the input voltage value;
detecting an actual voltage value of the micro control unit in the smart mobile device;
and comparing the standard voltage value with the actual voltage value, and determining whether an electrolytic fault exists according to the comparison result.
In an implementation manner of the present invention, the obtaining a standard voltage value of a micro control unit in the smart mobile device corresponding to the input voltage value includes:
acquiring the state of a switching tube in the intelligent mobile equipment;
and acquiring the standard voltage value of the micro control unit corresponding to the input voltage value and the state of the switch tube.
In one implementation of the invention:
if the input voltage value is 0V, the corresponding standard voltage value is 0V;
if the input voltage value is 4.2 volts and the state of the switching tube is on, the corresponding standard voltage value is 0.2 volts;
if the input voltage value is 4.2 volts and the state of the switching tube is off, the corresponding standard voltage value is 1.2 volts;
if the input voltage value is 20 volts and the state of the switching tube is on, the corresponding standard voltage value is 1.8 volts;
if the input voltage value is 20 volts and the state of the switch tube is off, the corresponding standard voltage value is 3.3 volts.
In one implementation manner of the present invention, the comparing the standard voltage value with the actual voltage value and determining whether there is an electrolytic fault according to the comparison result includes:
periodically comparing the standard voltage value with the actual voltage value to obtain comparison results of each time, wherein the comparison results are the same or different;
and if the comparison result is that the different times are more than N/3 in the continuous N times of comparisons, determining that the electrolytic fault exists, wherein N is a positive integer.
In one implementation of the invention, the period of the comparison is once every 100 ms.
In one implementation manner of the present invention, the method further includes: and if the electrolytic fault is determined to exist, controlling the intelligent mobile equipment to stop charging, trying to start charging again, and repeating the operation for starting charging again for a plurality of times.
In one implementation manner of the present invention, the method further includes: and if the plurality of times of restarting the charging step reaches a preset number of times, stopping the charging process and sending warning information.
According to another aspect of the present invention, there is provided a smart mobile device for implementing the method of the preceding aspect or any implementation manner, including:
the electric contact sheet is used for charging the intelligent mobile equipment when being connected with an electric contact head of the charging pile;
the micro control unit is electrically connected with the electric contact sheet;
and the switch tube is electrically connected with the micro control unit, and the state of the switch tube is on or off.
Illustratively, the switch tube is a metal-oxide-semiconductor MOS field effect transistor.
According to a further aspect of the present invention, there is provided a smart mobile device comprising a memory, a processor and a computer program stored on the memory and running on the processor, the processor implementing the steps of the method of the preceding aspect or any implementation when executing the computer program.
According to a further aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of the preceding aspect or any implementation.
Therefore, the embodiment of the invention can detect the voltage change condition within a period of time, and further judge whether the electrolytic fault exists. Therefore, charging safety can be guaranteed, and charging danger is prevented.
Detailed Description
In order that the objects, technical solutions and advantages of the present invention will become more apparent, exemplary embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It is to be understood that the described embodiments are merely a subset of embodiments of the invention and not all embodiments of the invention, with the understanding that the invention is not limited to the example embodiments described herein. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the invention described herein without inventive step, shall fall within the scope of protection of the invention.
The smart mobile device in the embodiment of the present invention may also be referred to as an automatic cleaning device, for example, an automatic cleaning robot. Fig. 1 is a schematic diagram of a smart mobile device 10 that includes electrical contacts 110. Illustratively, the electrical contact pads 110 may also be referred to as charging pads, and the number thereof may be two. Correspondingly, fig. 2 shows a schematic view of the charging post 20, which includes an electrical contact 210. Illustratively, the electrical contact 210 may also be referred to as a charging contact, and the number thereof may be two.
It can be appreciated that the embodiment of the present invention provides an automatic cleaning system, which may include the smart mobile device 10 illustrated in fig. 1 and the charging pile 20 illustrated in fig. 2. Illustratively, with respect to the charging post 20, the smart mobile device 10 may also be referred to as a host of the system. The electrical contact pads 110 and the electrical contacts 210 may be disposed correspondingly, and the number of the electrical contact pads and the number of the electrical contacts may be equal, such as 1 or 2 or more, which is not limited in the present invention.
The charging post 20 can be connected to a commercial power source, and when the electrical contact sheet 110 is sufficiently contacted with the electrical contact head 210, the intelligent mobile device 10 can be charged by the charging post 20.
For the charging post 20, the input voltage it takes is the mains voltage, i.e. 220 volts (V). The charging post 20 can convert the input voltage into three forms of output voltages, 0V, 4.2V, and 20V, respectively. Specifically, when the charging pile 20 is in an idle state, that is, the smart mobile device 10 is not in contact with the charging pile 20, the output voltage of the charging pile 20 is 0V. When the smart mobile device 10 is just in contact with the charging pile 20, the output voltage of the charging pile 20 is 4.2V. Under the condition that the smart mobile device 10 is stably in contact with the charging pile 20, the output voltage of the charging pile 20 is 20V. It should be understood that the contact referred to herein refers to a contact between the electrical contact pads 110 of the smart mobile device 10 and the electrical contact heads 210 of the charging post 20.
As shown in fig. 3, during the charging process, the smart mobile device 10 may store power in the battery 120. In addition, the smart mobile device 10 may further include a peripheral circuit 130, a switch tube 140, and a Micro Control Unit (MCU) 150.
The switch tube 140 can have two states, i.e., on and off; or may also be referred to as off and on. As an example, the switch tube 140 may be a metal-oxide-semiconductor (MOS) field effect transistor, or simply a MOS tube.
Fig. 4 is a schematic flowchart of a charging detection method of the smart mobile device 10 according to an embodiment of the present invention. The method shown in fig. 4 may include:
s110, determining an input voltage value of the intelligent mobile equipment;
s120, acquiring a standard voltage value of a micro control unit in the intelligent mobile equipment corresponding to the input voltage value;
s130, detecting an actual voltage value of the micro control unit in the intelligent mobile equipment;
s140, comparing the standard voltage value with the actual voltage value, and determining whether an electrolytic fault exists according to the comparison result.
For example, the input voltage value of the smart mobile device 10 in S110 is the output voltage value of the charging pile 20, and as can be seen from the above description, the input voltage value of the smart mobile device 10 may be 0V, 4.2V, or 20V.
Exemplarily, S120 may include: acquiring the state of a switching tube in the intelligent mobile equipment; and acquiring the standard voltage value of the micro control unit corresponding to the input voltage value and the state of the switch tube.
That is, the standard voltage value of the MCU is related not only to the input voltage value of S110 but also to the state of the switching tube. Specifically, if the input voltage value is 0v, the corresponding standard voltage value is 0 v; if the input voltage value is 4.2 volts and the state of the switching tube is on, the corresponding standard voltage value is 0.2 volts; if the input voltage value is 4.2 volts and the state of the switching tube is off, the corresponding standard voltage value is 1.2 volts; if the input voltage value is 20 volts and the state of the switching tube is on, the corresponding standard voltage value is 1.8 volts; if the input voltage value is 20 volts and the state of the switch tube is off, the corresponding standard voltage value is 3.3 volts. This can be represented by the following table 1:
TABLE 1
Input voltage value (V)
|
State of the switching tube
|
Standard voltage value (V) of MCU
|
0
|
Opening device
|
0
|
0
|
Closing device
|
0
|
4.2
|
Opening device
|
0.2
|
4.2
|
Closing device
|
1.2
|
20
|
Opening device
|
1.8
|
20
|
Closing device
|
3.3 |
It is understood that the standard voltage value of the MCU described in S120 may represent a voltage value that the MCU of the smart mobile device 10 should detect in a normal state (i.e., in a no-fault state). When the input voltage value is 0V, correspondingly, the contact state between the smart mobile device 10 and the charging pile 20 is the condition that the smart mobile device 10 is far away from the charging pile 20; when the input voltage is 4.2V, correspondingly, the contact state of the smart mobile device 10 and the charging pile 20 is the condition that the electrical contact sheet 110 of the smart mobile device 10 contacts the electrical contact head 210 of the charging pile 20; when the input voltage is 20V, correspondingly, the contact state between the smart mobile device 10 and the charging pile 20 is the condition that the smart mobile device 10 stably abuts against the charging pile 20. Illustratively, the contact state between the smart mobile device 10 and the charging pile 20 may be one of contactless, initial contact, and stable contact.
Illustratively, in an actual case, in S130, an actual voltage value of the MCU may be detected. Specifically, after the smart mobile device 10 acquires the input voltage value, the input voltage value is converted into an actual voltage value of the MCU through the peripheral circuit 130 and the switching tube 140.
Exemplarily, S140 may include: periodically comparing the standard voltage value with the actual voltage value to obtain comparison results of each time, wherein the comparison results are the same or different; and if the comparison result shows that the different times are greater than a preset value (such as N/3) in the continuous N times of comparison, determining that the electrolytic fault exists, wherein N is a positive integer.
Wherein, the same comparison result means that: the absolute value of the difference between the actual voltage value and the standard voltage value is less than or equal to the minimum error. The different comparison results refer to that: the absolute value of the difference between the actual voltage value and the standard voltage value is greater than the minimum error. For example, the minimum error may be 0.1V or the minimum error may be another value, which is not limited herein.
Alternatively, the MCU 150 may include a storage module and a polling module. The storage module may be configured to store the corresponding relationship shown in table 1, so that the standard voltage value corresponding to the input voltage value may be obtained from the storage module. The polling module may be used to periodically detect the actual voltage value of the MCU 150 and compare the actual voltage value to the stored standard voltage value.
Considering some uncertain other factors, the result misjudgment caused by other factors is prevented, and the polling module can continuously compare for N times to obtain N comparison results. If the different numbers of the N comparison results are larger than the preset value (such as N/3 or N/4), the existence of the electrolysis fault can be determined.
Alternatively, N may be selected according to actual situations, for example, N is 50 or 500. Alternatively, the polling period may be selected according to actual situations, for example, the period is 100ms or 50 ms. As an example, it may be assumed that N is 50 and the comparison period is 100ms, i.e., once every 100 ms. It is possible to compare 50 times for a continuous period of 5 seconds and judge whether there is a possibility of electrolytic failure based on the comparison results of 50 times.
It can be seen that, by polling the method shown in fig. 4 by the polling module of the MCU, the input voltage value can be detected N times, the standard voltage value can be determined N times accordingly, and the actual voltage value can be detected N times. The N times of polling can obtain N standard voltage values, each standard voltage value is one of 0V, 0.2V, 1.2V, 1.8V and 3.3V, that is, the standard voltage values obtained by different times of polling can be the same value. Wherein, N times of polling can obtain N actual voltage values, and the N actual voltage values can be partially equal or close, and the specific value is related to the actual situation. And obtaining N comparison results by comparing the N standard voltage values with the corresponding N actual voltage values, and further judging whether an electrolysis fault possibly exists according to the N comparison results.
In addition, the contact state between the smart mobile device 10 and the charging pile 20 can be determined according to the N input voltage values, wherein the contact state is one of the above-mentioned non-contact state, initial contact state and stable contact state. Specifically, it is possible to determine whether the input voltage value reaches 20V and is always maintained at a stable 20V to determine whether the contact state is in a stable contact.
To more accurately determine the value of the input voltage, an example is provided below in conjunction with FIG. 5. Fig. 5 shows a simple schematic diagram of the connection of the peripheral circuit 130 to the switching tube 140. Where GND denotes ground. Therein, a resistor R21 within the charging post 20 is shown, as well as resistors R11, R12, and R13 within the smart mobile device 10. Illustratively, the resistances of these resistors may be: r21 ═ 5.1K ohms (Ω), R11 ═ 4.7K Ω, R12 ═ 0.47K Ω, and R13 ═ 3.3K Ω.
It is assumed that the charging process does not have any faults, i.e. under ideal conditions. When the switching tube is in an off state, if the input voltage value is 20V, the voltage value input to the MCU (i.e., the voltage value at point a in fig. 5) is about 8.9V, but the actual voltage value detected by the MCU is 3.3V. When the switching tube is in an off state, if the input voltage value is 19V, although the voltage value input to the MCU (i.e., the voltage value at point a in fig. 5) is about 7.7V, the actual voltage value detected by the MCU is still 3.3V. It can be seen that the MCU cannot determine at this time what the input voltage is, and may be any value between 17V and 20V. At this time, in order to determine the value of the input voltage, the state of the switching tube may be adjusted. When the state of the switching tube is on, the voltage value at the point A is equal to the actual voltage value detected by the MCU. Specifically, if the detected actual voltage value is 1.8V, it may be determined that the input voltage value is 20V, instead of 19V, 17V, or the like.
Illustratively, if it is determined in S140 that there is an electrolysis fault, the smart mobile device 10 may be further controlled to stop charging. An attempt may then be made to initiate charging again and repeated several times until normal charging. Thus, misjudgment can be avoided, and successful charging can be ensured as much as possible.
Specifically, if it is determined in S140 that there is an electrolysis fault, the smart mobile device 10 may be controlled to leave the charging pile 20. The smart mobile device 10 may then retry the staking and repeat the method of fig. 4, leaving the charging post again if it is determined again that an electrolytic fault exists after the next staking. Then again, the staking may be retried again and the above process repeated until the smart mobile device 10 is able to charge properly, i.e., it is determined that there is no electrolytic fault. Alternatively, as another embodiment, if the number of times of restarting the charging reaches a preset number (e.g., 3 or 5), the charging process may be stopped and an alarm message may be sent. Therefore, charging can be stopped in time when a fault is determined, charging accidents are prevented, and safety is guaranteed.
Specifically, assume that the preset number of times is 3 times. If it is determined in S140 that an electrolytic fault exists, the smart mobile device 10 leaves the charging pile 20, and performs pile charging again for the first time, and leaves the charging pile 20 again if it is still determined that an electrolytic fault exists, and performs pile charging again for the second time, and leaves the charging pile 20 for the third time and performs pile charging again if it is still determined that an electrolytic fault exists, and controls the smart mobile device 10 to leave the charging pile 20 to stop charging and send out warning information if it is still determined that an electrolytic fault exists. Alternatively, an acoustic alarm message or a light alarm message or the like may be issued. For example, a "beep" may be sounded and/or a location-specific light may blink to indicate the alert. So that the user can clear the obstacle based on the alarm information.
Therefore, the embodiment of the invention can detect the voltage change condition within a period of time, and further judge whether the electrolytic fault exists. When the electrolytic fault is determined, the user can be reminded of clearing the fault in time so as to avoid charging danger.
Referring to fig. 3, the smart mobile device 10 may include an electrical contact pad 110, a Micro Control Unit (MCU)150, and a switching tube 140.
An electrical contact pad 110 for charging the smart mobile device 10 when connected with the electrical contact head 210 of the charging post 20. And a micro control unit 150 electrically connected to the electrical contact pads 110. The switch tube 140 is electrically connected to the mcu 150, and the state of the switch tube 140 is on or off.
Illustratively, the switching tube 140 may be a MOS tube.
Fig. 6 is a schematic block diagram of an intelligent mobile device of an embodiment of the present invention. The smart mobile device 10 shown in fig. 6 may include a determination module 610, an acquisition module 620, a detection module 630, and a comparison module 640.
The determining module 610 may be configured to determine an input voltage value of the smart mobile device;
the obtaining module 620 may be configured to obtain a standard voltage value of a micro control unit in the smart mobile device corresponding to the input voltage value;
the detection module 630 may be used to detect the actual voltage value of the micro control unit in the smart mobile device;
the comparison module 640 may be configured to compare the standard voltage value with the actual voltage value and determine whether an electrolysis fault exists according to the comparison result.
Illustratively, the obtaining module 620 may be specifically configured to: acquiring the state of a switching tube in the intelligent mobile equipment; and acquiring the standard voltage value of the micro control unit corresponding to the input voltage value and the state of the switch tube.
Illustratively, the comparing module 640 may be specifically configured to: periodically comparing the standard voltage value with the actual voltage value to obtain comparison results of each time, wherein the comparison results are the same or different; and if the comparison result is that the different times are more than N/3 in the continuous N times of comparisons, determining that the electrolytic fault exists, wherein N is a positive integer.
Illustratively, the smart mobile device 10 may further include a retry module for: and if the electrolytic fault is determined to exist, controlling the intelligent mobile equipment to stop charging, trying to start charging again, and repeating the operation for starting charging again for a plurality of times.
Illustratively, the smart mobile device 10 may further include an alert module for: and if the plurality of times of restarting the charging step reaches the preset times, stopping the charging process and sending warning information.
Illustratively, the smart mobile device 10 shown in fig. 6 can be used to implement the aforementioned charging detection method shown in fig. 4 to determine charging safety, and for avoiding repetition, the detailed description is omitted here.
Fig. 7 is a schematic block diagram of an intelligent mobile device of an embodiment of the present invention. The smart mobile device 10 shown in fig. 7 may include a memory 11, a processor 12, and a computer program stored on the memory 11 and running on the processor 12, wherein the processor 12 implements the steps of the method of charge detection shown in fig. 4 when executing the program.
In addition, the embodiment of the invention also provides a computer storage medium, and the computer storage medium is stored with the computer program. The steps of the method of charge detection illustrated in fig. 4 may be implemented as described above when the computer program is executed by a processor. For example, the computer storage medium is a computer-readable storage medium.
Therefore, the embodiment of the invention can detect the voltage change condition within a period of time, and further judge whether the electrolytic fault exists. When the electrolytic fault is determined, several times of recharging can be tried so as to avoid misjudgment and ensure successful charging as much as possible. If the electrolytic fault still exists after the preset times, the user can be reminded of clearing the fault in time so as to avoid charging danger.
Although the illustrative embodiments have been described herein with reference to the accompanying drawings, it is to be understood that the foregoing illustrative embodiments are merely exemplary and are not intended to limit the scope of the invention thereto. Various changes and modifications may be effected therein by one of ordinary skill in the pertinent art without departing from the scope or spirit of the present invention. All such changes and modifications are intended to be included within the scope of the present invention as set forth in the appended claims.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
The above description is only for the specific embodiment of the present invention or the description thereof, and the protection scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and the changes or substitutions should be covered within the protection scope of the present invention. The protection scope of the present invention shall be subject to the protection scope of the claims.