Method and device for identifying on-off state of speed regulation switch and electric appliance

文档序号:1830132 发布日期:2021-11-12 浏览:8次 中文

阅读说明:本技术 一种调速开关的开关状态识别方法、装置及电器 (Method and device for identifying on-off state of speed regulation switch and electric appliance ) 是由 谭小川 于 2021-07-08 设计创作,主要内容包括:本发明涉及一种调速开关的开关状态识别方法、装置及电器。该方法包括下述步骤:S1、获取调速开关的后端电压和调速开关中滑动变阻器的AD值;S2、根据后端电压和AD值确定开关状态。本发明通过检测调速开关的后端电压及开关滑动变阻器AD值来确定开关状态,可以准确识别多种工况,同时提高系统可靠性。(The invention relates to a method and a device for identifying the on-off state of a speed regulation switch and an electric appliance. The method comprises the following steps: s1, acquiring the rear end voltage of the speed regulating switch and the AD value of the slide rheostat in the speed regulating switch; and S2, determining the switch state according to the back end voltage and the AD value. The invention determines the switch state by detecting the rear end voltage of the speed regulating switch and the AD value of the switch slide rheostat, can accurately identify various working conditions and simultaneously improves the reliability of the system.)

1. A method for identifying the on-off state of a speed regulation switch is characterized by comprising the following steps:

s1, acquiring the rear end voltage of the speed regulating switch and the AD value of the slide rheostat in the speed regulating switch;

and S2, determining the switch state according to the back end voltage and the AD value.

2. The method for identifying the on-off state of the speed regulating switch according to claim 1, wherein the step S2 comprises:

and S21, if the rear end voltage is greater than a first preset voltage and the AD value is greater than a first preset AD value, the switch state is a switch closing state.

3. The method for identifying the on-off state of the speed regulating switch according to claim 2, wherein the step S2 further comprises:

s22, if the rear end voltage is smaller than a second preset voltage and the AD value is smaller than a second preset AD value, the switch state is a switch off state, the first preset voltage is larger than the second preset voltage, and the first preset AD value is smaller than the second preset AD value.

4. The method for identifying the switching state of the speed regulating switch according to claim 3, wherein after the step S21, the method comprises the following steps:

s231, when the switch state is judged to be the switch closing state, the controller continuously obtains the rear end voltage of the speed regulating switch and the AD value of the slide rheostat in the speed regulating switch;

and S232, if the rear end voltage is not less than the second preset voltage, the switch state is a switch closing state.

5. The method for identifying the on-off state of the speed regulating switch according to claim 3, wherein after the step S231, the method comprises:

and S233, if the AD value is not less than the second preset AD value, the switch state is a switch closing state.

6. A switch state recognition device of a speed regulation switch is characterized by comprising:

the device comprises a first acquisition unit, a second acquisition unit and a control unit, wherein the first acquisition unit is used for acquiring the back end voltage of a speed regulation switch and the AD value of a slide rheostat in the speed regulation switch;

and the judging module is used for determining the switch state according to the rear end voltage and the AD value.

7. The switch state recognition device of a speed regulation switch of claim 6, wherein the judgment module comprises:

and the first judgment unit is used for judging that the switch state is the switch closing state if the rear end voltage is greater than a first preset voltage and the AD value is greater than a first preset AD value.

8. The switch state recognition device of a speed regulation switch of claim 7, wherein the judgment module comprises:

the second judgment unit is used for judging that the switching state is the switching off state if the rear end voltage is smaller than a second preset voltage and the AD value is smaller than a second preset AD value, wherein the first preset voltage is larger than the second preset voltage, and the first preset AD value is smaller than the second preset AD value.

9. The switching state identifying device of a speed regulating switch according to claim 8, further comprising:

the second acquisition unit is used for continuously acquiring the rear end voltage of the speed regulating switch and the AD value of the slide rheostat in the speed regulating switch by the controller when the switch state is judged to be the switch closing state;

the third judging unit is used for judging that the switch state is the switch closing state if the rear end voltage is not less than the second preset voltage;

and the fourth judging unit is used for judging that the switch state is the switch closing state if the AD value is not less than the second preset AD value.

10. An electric appliance is characterized by comprising a speed regulation switch, a processor and a memory, wherein the processor is respectively connected with the speed regulation switch and the memory; the memory is used for storing a computer program, and the processor is used for executing the computer program stored in the memory to realize the switch state identification method of the speed regulating switch according to any one of claims 1 to 5; or

The electrical appliance comprises a switch state recognition device of a speed regulation switch according to any one of claims 6 to 9.

Technical Field

The invention relates to the field of speed regulation switches, in particular to a method and a device for identifying the on-off state of a speed regulation switch and an electric appliance.

Background

The speed regulating switch is a common electric appliance switch, some speed regulating switches are provided with signal ports, the signal of the signal ports can be directly utilized to control the starting and stopping states of an electric appliance, and the operation is simple. For a speed regulation switch without a signal port, the start-stop state of an electric appliance is controlled by detecting voltage or an AD value of a slide rheostat in the prior art, but misjudgment can occur due to the voltage residue of a bus and the accuracy problem of the slide rheostat, and certain safety risk exists.

Disclosure of Invention

The present invention provides a method and an apparatus for identifying a switch state of a speed regulation switch, and an electrical appliance, aiming at the above-mentioned defects in the prior art.

The technical scheme adopted by the invention for solving the technical problems is as follows: a method for identifying the switch state of a speed regulation switch is constructed, and comprises the following steps:

s1, acquiring the rear end voltage of the speed regulating switch and the AD value of the slide rheostat in the speed regulating switch;

and S2, determining the switch state according to the back end voltage and the AD value.

Further, in the method for identifying a switching state of a speed regulation switch according to the present invention, the step S2 includes:

and S21, if the rear end voltage is greater than a first preset voltage and the AD value is greater than a first preset AD value, the switch state is a switch closing state.

Further, in the method for identifying a switch state of a speed regulation switch according to the present invention, the step S2 further includes:

s22, if the rear end voltage is smaller than a second preset voltage and the AD value is smaller than a second preset AD value, the switch state is a switch off state, the first preset voltage is larger than the second preset voltage, and the first preset AD value is smaller than the second preset AD value.

Further, in the method for identifying a switching state of a speed regulation switch according to the present invention, after the step S21, the method includes:

s231, when the switch state is judged to be the switch closing state, the controller continuously obtains the rear end voltage of the speed regulating switch and the AD value of the slide rheostat in the speed regulating switch;

and S232, if the rear end voltage is not less than the second preset voltage, the switch state is a switch closing state.

Further, in the method for identifying the on-off state of the speed regulation switch according to the present invention, after the step S231, the method includes:

and S233, if the AD value is not less than the second preset AD value, the switch state is a switch closing state.

In addition, the present invention also provides a switching state recognition device for a speed regulation switch, comprising:

the device comprises a first acquisition unit, a second acquisition unit and a control unit, wherein the first acquisition unit is used for acquiring the back end voltage of a speed regulation switch and the AD value of a slide rheostat in the speed regulation switch;

and the judging module is used for determining the switch state according to the rear end voltage and the AD value.

Further, in the device for identifying a switch state of a speed regulation switch according to the present invention, the judging module includes:

and the first judgment unit is used for judging that the switch state is the switch closing state if the rear end voltage is greater than a first preset voltage and the AD value is greater than a first preset AD value.

Further, in the device for identifying a switch state of a speed regulation switch according to the present invention, the judging module includes:

the second judgment unit is used for judging that the switching state is the switching off state if the rear end voltage is smaller than a second preset voltage and the AD value is smaller than a second preset AD value, wherein the first preset voltage is larger than the second preset voltage, and the first preset AD value is smaller than the second preset AD value.

Further, the switch state recognition device of the speed regulation switch of the present invention further comprises:

the second acquisition unit is used for continuously acquiring the rear end voltage of the speed regulating switch and the AD value of the slide rheostat in the speed regulating switch by the controller when the switch state is judged to be the switch closing state;

the third judging unit is used for judging that the switch state is the switch closing state if the rear end voltage is not less than the second preset voltage;

and the fourth judging unit is used for judging that the switch state is the switch closing state if the AD value is not less than the second preset AD value.

In addition, the invention also provides an electric appliance which comprises a speed regulating switch, a processor and a memory, wherein the processor is respectively connected with the speed regulating switch and the memory; the memory is used for storing a computer program, and the processor is used for executing the computer program stored in the memory to realize the switching state identification method of the speed regulation switch; or

The electric appliance comprises a switch state identification device of the speed regulating switch.

The implementation of the method, the device and the electric appliance for identifying the on-off state of the speed regulation switch has the following beneficial effects: the invention determines the switch state by detecting the rear end voltage of the speed regulating switch and the AD value of the switch slide rheostat, can accurately identify various working conditions and simultaneously improves the reliability of the system.

Drawings

The invention will be further described with reference to the accompanying drawings and examples, in which:

FIG. 1a is a schematic circuit diagram of a speed regulating switch according to an embodiment of the present invention;

fig. 1b is a schematic diagram of a stroke of a slide rheostat of the speed regulation switch according to an embodiment of the present invention;

fig. 2 is a flowchart of a method for identifying a switch state of a speed regulation switch according to an embodiment of the present invention;

FIG. 3 is a diagram of a relationship between back-end preset voltages according to an embodiment of the present invention;

fig. 4 is a graph illustrating a variation trend of the AD value according to an embodiment of the present invention.

Detailed Description

For a more clear understanding of the technical features, objects and effects of the present invention, embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

In a preferred embodiment, referring to fig. 1a, 1b and 2, the method for identifying the switch state of the speed regulation switch of the present embodiment is applied to the speed regulation switch, and the speed regulation switch has no signal port for detecting the switch state and cannot directly detect the switch state. The circuit schematic diagram of the speed regulation switch is shown in fig. 1a, a pin 1 is a VCC pin, a pin 3 is a WSH pin, a pin 2 is a GND pin, and a pin 4 is connected with a power supply terminal, such as a power supply battery; pin 5 is an output for connection to a controller input. The switch SW1 is linked with the slide rheostat, and the depth of the switch SW1 key corresponds to the triggering stroke of the slide rheostat; referring to fig. 1b, the abscissa of the graph is the trigger stroke of the sliding rheostat, the ordinate is the resistance value of the sliding rheostat, the stroke a is the main switch conducting point, the stroke b is the starting point of the sliding rheostat, the stroke c is the end point of the sliding rheostat, and the stroke d is the total stroke. When the pin 1 and the pin 2 of the speed regulation switch are in normal power supply, the output voltage of the pin 3 of the speed regulation switch changes along with the depth of the switch key of the speed regulation switch, and the rule of the output voltage accords with the rule shown in the figure 1 b. The internal structure and the working principle of the speed regulation switch can refer to the prior art, and are not described in detail. Specifically, the method for identifying the on-off state of the speed regulation switch comprises the following steps:

and S1, acquiring the rear end voltage of the speed regulating switch and the AD value of the slide rheostat in the speed regulating switch. Specifically, the rear end voltage of the speed regulation switch refers to the voltage of the power supply end passing through the speed regulation switch, that is, the output voltage of the speed regulation switch. Alternatively, a voltage acquisition circuit can be used for acquiring the back end voltage of the speed regulation switch, and the controller is connected with the output end of the speed regulation switch through the voltage acquisition circuit and acquires the output voltage as the back end voltage of the speed regulation switch. The controller is connected with the WSH pin of the speed regulation switch through the AD acquisition circuit, the AD acquisition circuit is used for acquiring the voltage value of the WSH pin of the sliding rheostat, converting the voltage value of the WSH pin into an AD value and transmitting the acquired AD value to the controller.

And S2, determining the switch state according to the back end voltage and the AD value. Specifically, the corresponding relationship between the back-end voltage and the AD value and the switch state is preset, and the corresponding relationship between the back-end voltage and the AD value and the switch state is stored in the processor or the memory. And after the rear end voltage and the AD value are obtained, the switching state of the speed regulating switch can be obtained according to the corresponding relation between the rear end voltage and the AD value and the switching state.

The embodiment determines the switch state by detecting the rear end voltage of the speed regulating switch and the AD value of the switch slide rheostat, can accurately identify various working conditions, and simultaneously improves the reliability of the system.

In the method for identifying the switching state of the speed regulation switch according to some embodiments, referring to fig. 3 and 4, where the first preset voltage is greater than the second preset voltage, and the first preset AD value is smaller than the second preset AD value, the back-end voltage is compared with the first preset voltage and the second preset voltage, and the AD value is compared with the first preset AD value and the second preset AD value, and the switching state is determined according to the comparison result. And presetting the corresponding relation between each comparison result and the switch state, and searching the corresponding relation between the comparison result and the switch state according to the comparison result to obtain the switch state corresponding to each comparison result. Specifically, the determination of the switch state according to the back-end voltage and the AD value includes the following operating conditions.

And S21, if the rear end voltage is greater than the first preset voltage and the AD value is greater than the first preset AD value, the switch state is a switch closing state.

And S22, if the rear end voltage is smaller than a second preset voltage and the AD value is smaller than a second preset AD value, the switch state is a switch off state, the first preset voltage is larger than the second preset voltage, and the first preset AD value is smaller than the second preset AD value.

S231, when the switch state is judged to be the switch closing state, the controller continuously obtains the rear end voltage of the speed regulation switch and the AD value of the slide rheostat in the speed regulation switch;

and S232, if the rear end voltage is not less than the second preset voltage, the switch state is a switch closing state.

And S233, if the AD value is not less than the second preset AD value, the switch state is a switch closing state.

The embodiment determines the switch state by detecting the rear end voltage of the speed regulating switch and the AD value of the switch slide rheostat, can accurately identify various working conditions, and simultaneously improves the reliability of the system.

In a preferred embodiment, referring to fig. 1a, 1b and 2, the switch state identification device of the speed regulating switch of the present embodiment is applied to the speed regulating switch, and the speed regulating switch has no signal port for detecting the switch state and cannot directly detect the switch state. The circuit schematic diagram of the speed regulation switch is shown in fig. 1a, a pin 1 is a VCC pin, a pin 3 is a WSH pin, a pin 2 is a GND pin, and a pin 4 is connected with a power supply terminal, such as a power supply battery; the pin 5 is connected with the input end of the controller; the switch SW1 is linked with the slide rheostat, and the depth of the switch SW1 key corresponds to the triggering stroke of the slide rheostat; referring to fig. 1b, the abscissa of the graph is the trigger stroke of the sliding rheostat, the ordinate is the resistance value of the sliding rheostat, the stroke a is the main switch conducting point, the stroke b is the starting point of the sliding rheostat, the stroke c is the end point of the sliding rheostat, and the stroke d is the total stroke. Under the condition that the pins 1 and 2 of the speed regulation switch are normally powered, the output voltage of the pin 3 of the speed regulation switch changes along with the depth of the switch key, and the rule of the output voltage accords with the rule shown in the figure 1 b. Specifically, the switching state recognition device of the speed regulation switch comprises:

the first acquisition unit is used for acquiring the back end voltage of the speed regulation switch and the AD value of the slide rheostat in the speed regulation switch. The rear end voltage of the speed regulating switch refers to the voltage of the power supply end passing through the speed regulating switch, namely the output voltage of the speed regulating switch. Alternatively, a voltage acquisition circuit can be used for acquiring the back end voltage of the speed regulation switch, and the controller is connected with the output end of the speed regulation switch through the voltage acquisition circuit and acquires the output voltage as the back end voltage of the speed regulation switch. The controller is connected with the WSH pin of the speed regulation switch through the AD acquisition circuit, the AD acquisition circuit is used for acquiring the voltage value of the WSH pin of the sliding rheostat, converting the voltage value of the WSH pin into an AD value and transmitting the acquired AD value to the controller.

And the judging module is used for determining the switch state according to the rear end voltage and the AD value. And presetting the corresponding relation between the back end voltage and the AD value and the switching state, and obtaining the switching state of the speed regulating switch according to the corresponding relation between the back end voltage and the AD value and the switching state after obtaining the back end voltage and the AD value.

The embodiment determines the switch state by detecting the rear end voltage of the speed regulating switch and the AD value of the switch slide rheostat, can accurately identify various working conditions, and simultaneously improves the reliability of the system.

In the switching state recognition apparatus of the speed regulation switch according to some embodiments, referring to fig. 3 and 4, where the first preset voltage is greater than the second preset voltage, and the first preset AD value is smaller than the second preset AD value, the back end voltage is compared with the first preset voltage and the second preset voltage, and the AD value is compared with the first preset AD value and the second preset AD value, and the switching state is determined according to the comparison result. And presetting the corresponding relation between each comparison result and the switch state, and searching the corresponding relation between the comparison result and the switch state according to the comparison result to obtain the switch state corresponding to each comparison result. Specifically, the switch state is determined according to the rear end voltage and the AD value and comprises the following working conditions, namely the judgment module comprises:

and the first judgment unit is used for judging that the switch state is the switch closing state if the rear end voltage is greater than the first preset voltage and the AD value is greater than the first preset AD value.

And the second judgment unit is used for judging that the switch state is the switch off state if the rear end voltage is less than a second preset voltage and the AD value is less than a second preset AD value, the first preset voltage is greater than the second preset voltage, and the first preset AD value is less than the second preset AD value.

The second acquisition unit is used for continuously acquiring the back end voltage of the speed regulating switch and the AD value of the slide rheostat in the speed regulating switch by the controller when the switch state is judged to be the switch closing state;

and the third judging unit is used for judging that the switch state is the switch closing state if the rear end voltage is not less than the second preset voltage.

And the fourth judging unit is used for judging that the switch state is the switch closing state if the AD value is not less than the second preset AD value.

The embodiment determines the switch state by detecting the rear end voltage of the speed regulating switch and the AD value of the switch slide rheostat, can accurately identify various working conditions, and simultaneously improves the reliability of the system.

In a preferred embodiment, the electrical appliance of the present embodiment includes a speed regulation switch, a processor and a memory, wherein the processor is connected to the speed regulation switch and the memory respectively; the memory is used for storing a computer program, and the processor is used for executing the computer program stored in the memory to realize the switch state identification method of the speed regulating switch as the above embodiment.

In a preferred embodiment, the electric appliance of the present embodiment includes a switch state recognition device of the speed regulation switch as described in the above embodiments.

The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.

Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

The above embodiments are merely illustrative of the technical ideas and features of the present invention, and are intended to enable those skilled in the art to understand the contents of the present invention and implement the present invention, and not to limit the scope of the present invention. All equivalent changes and modifications made within the scope of the claims of the present invention should be covered by the claims of the present invention.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于确定开关故障类型的方法、装置、处理器及配电设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类