Control method and control circuit of car window motor
By collecting the target port voltage value to control the window motor, the problem of wasting port resources in the window control circuit is solved, and the port resource saving and system simplification are achieved.
Patent Information
- Application Number
- CN202410960371.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-10-15
AI Technical Summary
The existing window control circuit occupies a large amount of microcontroller port resources, resulting in increased system complexity and cost, and fails to effectively save port resources.
By collecting the target voltage value of the target port, a port resource is used to control the lifting operation of the window motor, identify the status of multiple control switches, and realize manual raising, manual lowering and automatic raising and lowering operations according to the voltage range.
This achieves the effect of saving port resources, avoids the waste of each control switch occupying separate port resources, simplifies system design and reduces costs.
Smart Images

Figure CN118774530A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automotive electronic technology, and in particular to a control method and a control circuit for a vehicle window motor. Background Art
[0002] In automotive electronic control systems, window control is an important function. Traditional window control methods usually require a separate microcontroller port to be assigned to each control switch in order to identify the state of each switch and control the corresponding action of the window. However, with the continuous increase in automotive functions, the port resources of the microcontroller are becoming increasingly tight. At present, the common window control method is to connect multiple microcontroller ports to each control switch respectively, and then determine the conduction status of the switch by detecting the level state of each port. Although this method is simple and direct, it occupies a large amount of microcontroller port resources, which not only increases the complexity of the system, but also increases the cost. Therefore, how to save the port resources of the microcontroller and realize the effective control of the window at the same time has become a problem to be solved urgently. It can be seen that the window control circuit in the related art has the problem of port resource waste.
[0003] With respect to the technical problem of waste of port resources of the window control circuit existing in the related art, no effective solution has been proposed so far. Summary of the invention
[0004] The present application provides a control method and a control circuit for a vehicle window motor, so as to at least solve the technical problem of waste of port resources of a vehicle window control circuit existing in the related art.
[0005] In a first aspect, the present application provides a control method for a vehicle window motor, comprising: collecting a target voltage value of a target port, wherein a plurality of control switches of the vehicle window are electrically connected to the target port via a switch control circuit, the plurality of control switches comprising a manual raising switch, a manual lowering switch and an automatic raising and lowering switch; and controlling the vehicle window motor to perform a raising and lowering operation according to the target voltage value.
[0006] By adopting the above technical solution, multiple control switches of the vehicle window are electrically connected to the target port through the switch control circuit, that is, multiple control switches of the vehicle window are connected to the target port of the single-chip microcomputer through the switch control circuit, and the target voltage value of the target port is collected, and then the vehicle window motor is controlled to perform the lifting operation according to the target voltage value. That is, only one port resource is needed to achieve the purpose of controlling the lifting operation of the vehicle window motor, avoiding the problem in the related technology that each control switch needs to occupy a port resource, thereby causing a waste of port resources, and achieving the effect of saving port resources.
[0007] Optionally, controlling the window motor to perform a lifting or lowering operation according to the target voltage value includes at least one of the following: when the target voltage value is in a first voltage interval, controlling the window motor to perform a manual lifting operation; when the target voltage value is in a second voltage interval, controlling the window motor to perform a manual lowering operation.
[0008] By adopting the above technical solution, when the target voltage value is in the first voltage interval, the window motor is controlled to perform a manual raising operation, and when the target voltage value is in the second voltage interval, the window motor is controlled to perform a manual lowering operation, that is, when the target voltage value is different values, it respectively indicates that the manual raising switch and the manual lowering switch are in the on state.
[0009] Optionally, the target voltage value includes a first voltage value and a second voltage value, the first voltage value is used to represent the voltage value of the target port collected at a first moment, the second voltage value is used to represent the voltage value of the target port collected at a second moment, and the difference between the second moment and the first moment is less than or equal to a preset duration; controlling the window motor to perform a lifting operation according to the target voltage value includes: when the first voltage value and the second voltage value meet a first condition, controlling the window motor to perform an automatic lifting operation, wherein the first condition indicates that the first voltage value is within a first voltage interval and the second voltage value is within a third voltage interval; when the first voltage value and the second voltage value meet a second condition, controlling the window motor to perform an automatic lowering operation, wherein the second condition indicates that the first voltage value is within a second voltage interval and the second voltage value is within a third voltage interval.
[0010] By adopting the above technical solution, the target voltage value includes the first voltage value collected at the first moment and the second voltage value collected at the second moment. When the first voltage value and the second voltage value meet the first condition, the window motor is controlled to perform an automatic raising operation, which corresponds to the manual raising switch being turned on at the first moment and the automatic lifting switch being turned on at the second moment. At this time, the window motor is controlled to perform an automatic raising operation; when the first voltage value and the second voltage value meet the second condition, the window motor is controlled to perform an automatic lowering operation, which corresponds to the manual lowering switch being turned on at the first moment and the automatic lifting switch being turned on at the second moment. At this time, the window motor is controlled to perform an automatic lowering operation. Therefore, the target voltage values of the target port collected at the two moments before and after can achieve the purpose of controlling the window motor to perform an automatic raising operation or an automatic lowering operation.
[0011] Optionally, controlling the window motor to perform a lifting operation according to the target voltage value includes: identifying states of multiple control switches according to the target voltage value to obtain an identification result; and controlling the window motor to perform a lifting operation according to the identification result.
[0012] By adopting the above technical solution, the states of multiple control switches can be identified according to the target voltage value to obtain an identification result, which indicates whether the multiple control switches are in the on state, and then the window motor is controlled to perform the lifting operation according to the identification result.
[0013] Optionally, the states of multiple control switches are identified according to the target voltage value to obtain identification results, including: when the target voltage value is in a first voltage interval, a first result is obtained, wherein the first result indicates that the manual raising switch is in an on state, and the identification result includes the first result; when the target voltage value is in a second voltage interval, a second result is obtained, wherein the second result indicates that the manual lowering switch is in an on state, and the identification result includes the second result; when the target voltage value is in a third voltage interval, a third result is obtained, wherein the third result indicates that the automatic raising and lowering switch is in an on state, and the identification result includes the third result.
[0014] By adopting the above technical solution, when the target voltage value is in the first voltage interval, a first result is obtained, which indicates that the manual up switch is in the on state; when the target voltage value is in the second voltage interval, a second result is obtained, which indicates that the manual down switch is in the on state; when the target voltage value is in the third voltage interval, a third result is obtained, which indicates that the automatic up and down switch is in the on state. The purpose of identifying the state of each control switch according to the different target voltage values is achieved.
[0015] Optionally, the window motor is controlled to perform a raising or lowering operation according to the recognition result, including one of the following: when the recognition result is the first result, the window motor is controlled to perform a manual raising operation; when the recognition result is the second result, the window motor is controlled to perform a manual lowering operation; when the recognition result is the third result and the voltage value of the target port at the previous moment is in the first voltage interval, the window motor is controlled to perform an automatic raising operation, wherein the previous moment is used to represent a moment within a preset time period before the current moment, and the current moment is used to represent a moment corresponding to the target voltage value collected; when the recognition result is the third result and the voltage value of the target port at the previous moment is in the second voltage interval, the window motor is controlled to perform an automatic lowering operation, wherein the previous moment is used to represent a moment within a preset time period before the current moment, and the current moment is used to represent a moment corresponding to the target voltage value collected.
[0016] By adopting the above technical solution, when the recognition result is the first result, the window motor is controlled to perform a manual raising operation; when the recognition result is the second result, the window motor is controlled to perform a manual lowering operation; and if the recognition result at the current moment is the third result and the voltage value at the previous moment is in the first voltage interval, that is, the automatic raising and lowering switch is turned on at the current moment and the manual raising switch is turned on at the previous moment, the window motor is controlled to perform an automatic raising operation; and if the recognition result at the current moment is the third result and the voltage value at the previous moment is in the second voltage interval, that is, the automatic raising and lowering switch is turned on at the current moment and the manual lowering switch is turned on at the previous moment, the window motor is controlled to perform an automatic lowering operation. The purpose of controlling the window motor to perform manual raising, manual lowering, automatic raising, and automatic lowering operations according to the recognition results is achieved.
[0017] In the second aspect of the present application, a control circuit for a window motor is also provided, including: multiple control switches, a switch control circuit, and a single-chip microcomputer, wherein the multiple control switches are electrically connected to the target port of the single-chip microcomputer through the switch control circuit, wherein the multiple control switches include a manual raising switch, a manual lowering switch, and an automatic raising and lowering switch of the window; the single-chip microcomputer is used to collect the target voltage value of the target port, and control the window motor to perform the raising and lowering operation according to the target voltage value.
[0018] By adopting the above technical solution, multiple control switches are electrically connected to the target port through the switch control circuit, that is, multiple control switches of the vehicle window are connected to the target port of the single-chip microcomputer through the switch control circuit, and the target voltage value of the target port is collected by the single-chip microcomputer, and then the vehicle window motor is controlled to perform the lifting operation according to the target voltage value. That is, only one port resource is needed to achieve the purpose of controlling the lifting operation of the vehicle window motor, avoiding the problem in the related technology that each control switch needs to occupy a port resource, thereby causing a waste of port resources, and achieving the effect of saving port resources.
[0019] Optionally, the switch control circuit includes a first switch control branch, a second switch control branch, a third switch control branch and a reference voltage circuit, wherein the reference voltage circuit provides a fixed voltage value for the target port when multiple control switches are not turned on; the first switch control branch is connected between the manual up switch and the reference voltage circuit, the second switch control branch is connected between the automatic up and down switch and the reference voltage circuit, and the third switch control branch is connected between the manual down switch and the reference voltage circuit.
[0020] By adopting the above technical solution, each control switch corresponds to a switch control branch, and the first switch control branch, the second switch control branch, and the third switch control branch correspond to the manual raising switch, the automatic raising and lowering switch, and the manual lowering switch, respectively. When a control switch is turned on, the target port presents different target voltage values through the corresponding switch control branch and the reference voltage circuit. In this way, it is possible to identify whether each control switch is in the on state according to the target voltage value of the target port.
[0021] Optionally, the first switch control branch includes a first resistor and a first capacitor, the second switch control branch includes a target wire, the third switch control branch includes a second resistor and a second capacitor, and the reference voltage circuit includes a third resistor, a fourth resistor, a fifth resistor, a third capacitor and a fourth capacitor, wherein the first end of the third resistor is connected to the power supply end, the second end of the third resistor is electrically connected to the first end of the fourth resistor, the third capacitor is connected between the second end of the third resistor and the ground end, the second end of the fourth resistor is electrically connected to the target port, and the fifth resistor and the fourth capacitor are both connected between the second end of the fourth resistor and the ground end; the first end of the first resistor One end is electrically connected to the first end of the manual raising switch, the second end of the first resistor is electrically connected to the second end of the third resistor, the first capacitor is connected between the first end of the first resistor and the ground, and the second end of the manual raising switch is connected to the ground; the first end of the automatic raising and lowering switch is electrically connected to the second end of the third resistor through the target wire, and the second end of the automatic raising and lowering switch is connected to the ground; the first end of the second resistor is electrically connected to the first end of the manual lowering switch, the second end of the second resistor is electrically connected to the second end of the third resistor, the second capacitor is connected between the first end of the second resistor and the ground, and the second end of the manual lowering switch is connected to the ground.
[0022] By adopting the above technical solution, each switch control branch adopts a different resistance circuit, so that when different control switches are turned on, the target port presents different target voltage values, so that the conduction state of each control switch can be identified according to the different target voltage values of the target port.
[0023] Optionally, the single chip microcomputer is also used to identify the states of multiple control switches according to the target voltage value to obtain an identification result, and control the window motor to perform lifting operations according to the identification result.
[0024] By adopting the above technical solution, the single chip microcomputer can identify the states of multiple control switches according to the target voltage value to obtain an identification result, and control the vehicle window to perform lifting and lowering operations according to the identification result.
[0025] In a third aspect of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the program, any of the above method steps is implemented.
[0026] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed, any of the above method steps is performed.
[0027] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. Only one port resource is needed to achieve the purpose of controlling the lifting and lowering operation of the window motor, thus avoiding the problem in the related art that each control switch needs to occupy one port resource, thereby causing a waste of port resources, and achieving the effect of saving port resources.
[0028] 2. The purpose of the state of each control switch can be identified through the voltage value of a port. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a flow chart of a control method for a vehicle window motor provided in an embodiment of the present application; Figure 2 is a control circuit structure diagram of a window motor provided in an embodiment of the present application; Figure 3 is a schematic diagram of a door control switch provided in an embodiment of the present application; Figure 4 is a schematic diagram of a door controller circuit provided by an embodiment of the present application; Figure 5 This is a door controller circuit principle provided by the embodiment of the present application Figure 1 ; Figure 6 This is a door controller circuit principle provided by the embodiment of the present application Figure 2 ; Figure 7 This is a door controller circuit principle provided by the embodiment of the present application Figure 3 ; Figure 8 This is a door controller circuit principle provided by the embodiment of the present application Figure 4 ; Fig. 9 It is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application.
[0030] Description of reference numerals: S1-manual lifting switch; S2-automatic lifting switch; S3-manual lowering switch; R1-first resistor; R2-second resistor; R3-third resistor; R4-fourth resistor; R5-fifth resistor; C1-first capacitor; C2-second capacitor; C3-third capacitor; C4-fourth capacitor; AD_1-target port; 21-multiple control switches; 22-switch control circuit; 23-single-chip microcomputer; 900-electronic device; 901-processor; 902-communication bus; 903-user interface; 904-network interface; 905-memory. DETAILED DESCRIPTION
[0031] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0032] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.
[0033] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0034] The present application provides a control method for a vehicle window motor, referring to Figure 1 , Figure 1 This is a flow chart of a control method for a vehicle window motor provided in an embodiment of the present application, comprising the following steps: Step S101, collecting a target voltage value of a target port, wherein a plurality of control switches of the vehicle window are electrically connected to the target port through a switch control circuit, and the plurality of control switches include a manual raising switch, a manual lowering switch, and an automatic raising and lowering switch; Step S102, controlling the window motor to perform a lifting operation according to the target voltage value.
[0035] The execution subject of the above steps may be a single chip microcomputer or a controller, but is not limited thereto.
[0036] In the above embodiment, multiple control switches of the vehicle window are electrically connected to the target port through the switch control circuit, that is, the multiple control switches of the vehicle window are connected to the target port of the single-chip microcomputer through the switch control circuit, and the target voltage value of the target port is collected, and then the vehicle window motor is controlled to perform the lifting operation according to the target voltage value. For example, the target port is the AD port of the single-chip microcomputer, or the analog input port. When the target voltage value is different, it indicates that different control switches are in the on (or pressed) state, thereby controlling the vehicle window motor to perform different operations. That is, only one port resource is needed to achieve the purpose of controlling the lifting operation of the vehicle window motor, thereby avoiding the problem in the related technology that each control switch needs to occupy a port resource, thereby causing a waste of port resources, and achieving the effect of saving port resources.
[0037] In an optional embodiment, the window motor is controlled to perform a lifting operation according to the target voltage value, including at least one of the following: when the target voltage value is in a first voltage interval, the window motor is controlled to perform a manual lifting operation; when the target voltage value is in a second voltage interval, the window motor is controlled to perform a manual lowering operation.
[0038] In the above embodiment, when the target voltage value is in the first voltage interval, the window motor is controlled to perform a manual up operation, and when the target voltage value is in the second voltage interval, the window motor is controlled to perform a manual down operation, for example, the first voltage interval is [1.2V, 1.5V] (or others), and the second voltage interval is [1.8V, 2.1V] (or others). That is, when the target voltage value is different, it means that the manual up switch and the manual down switch are in the on state respectively.
[0039] In an optional embodiment, the target voltage value includes a first voltage value and a second voltage value, the first voltage value is used to represent the voltage value of the target port collected at a first moment, the second voltage value is used to represent the voltage value of the target port collected at a second moment, and the difference between the second moment and the first moment is less than or equal to a preset duration; the window motor is controlled to perform a lifting operation according to the target voltage value, including: when the first voltage value and the second voltage value meet a first condition, the window motor is controlled to perform an automatic lifting operation, wherein the first condition indicates that the first voltage value is in a first voltage interval and the second voltage value is in a third voltage interval; when the first voltage value and the second voltage value meet a second condition, the window motor is controlled to perform an automatic lowering operation, wherein the second condition indicates that the first voltage value is in a second voltage interval and the second voltage value is in a third voltage interval.
[0040] In the above embodiment, the target voltage value includes a first voltage value collected at the first moment and a second voltage value collected at the second moment. When the first voltage value and the second voltage value meet the first condition, the window motor is controlled to perform an automatic raising operation, which corresponds to the manual raising switch being turned on at the first moment and the automatic lifting switch being turned on at the second moment. At this time, the window motor is controlled to perform an automatic raising operation; when the first voltage value and the second voltage value meet the second condition, the window motor is controlled to perform an automatic lowering operation, which corresponds to the manual lowering switch being turned on at the first moment and the automatic lifting switch being turned on at the second moment. At this time, the window motor is controlled to perform an automatic lowering operation. For example, the first voltage interval is [1.2V, 1.5V] (or other), the second voltage interval is [1.8V, 2.1V] (or other), and the third voltage interval is [0V, 0.3V]. The time difference between the first moment and the second moment is less than the preset time length, for example, the preset time length is 1s (or 100ms, or other time length). Therefore, the purpose of controlling the window motor to perform an automatic raising operation or an automatic lowering operation can be achieved by the target voltage values of the target port collected at the two moments before and after.
[0041] In an optional embodiment, controlling the window motor to perform a lifting operation according to the target voltage value includes: identifying states of multiple control switches according to the target voltage value to obtain an identification result; and controlling the window motor to perform a lifting operation according to the identification result.
[0042] In the above embodiment, the states of the multiple control switches can be identified according to the target voltage value to obtain an identification result, which indicates whether the multiple control switches are in the on state, and then the window motor is controlled to perform the lifting operation according to the identification result. For example, when the target voltage value belongs to different voltage intervals, it can be determined whether each control switch is in the on state.
[0043] In an optional embodiment, the states of multiple control switches are identified according to the target voltage value to obtain an identification result, including: when the target voltage value is in a first voltage interval, a first result is obtained, wherein the first result indicates that the manual raising switch is in an on state, and the identification result includes the first result; when the target voltage value is in a second voltage interval, a second result is obtained, wherein the second result indicates that the manual lowering switch is in an on state, and the identification result includes the second result; when the target voltage value is in a third voltage interval, a third result is obtained, wherein the third result indicates that the automatic raising and lowering switch is in an on state, and the identification result includes the third result.
[0044] In the above embodiment, when the target voltage value is in the first voltage interval, a first result is obtained, and the first result indicates that the manual up switch is in the on state; when the target voltage value is in the second voltage interval, a second result is obtained, and the second result indicates that the manual down switch is in the on state; when the target voltage value is in the third voltage interval, a third result is obtained, and the third result indicates that the automatic up and down switch is in the on state. For example, when the target voltage value is 1.5V (or other voltage values), that is, in the first voltage interval, it indicates that the manual up switch is in the on state; when the target voltage value is 2.0V (or other voltage values), that is, in the second voltage interval, it indicates that the manual down switch is in the on state; when the target voltage value is 0V (or other voltage values), that is, in the third voltage interval, it indicates that the automatic up and down switch is in the on state. The purpose of identifying the state of each control switch according to the different target voltage values is achieved, that is, the target voltage value of a port can be used to identify that a switch among multiple control switches is turned on. If the target voltage value is not in the above-mentioned first voltage interval, second voltage interval and third voltage interval, it means that each of the multiple control switches is not turned on.
[0045] In an optional embodiment, the window motor is controlled to perform a raising or lowering operation according to the recognition result, including one of the following: when the recognition result is the first result, the window motor is controlled to perform a manual raising operation; when the recognition result is the second result, the window motor is controlled to perform a manual lowering operation; when the recognition result is the third result and the voltage value of the target port at the previous moment is in the first voltage interval, the window motor is controlled to perform an automatic raising operation, wherein the previous moment is used to represent a moment within a preset time period before the current moment, and the current moment is used to represent a moment corresponding to the target voltage value collected; when the recognition result is the third result and the voltage value of the target port at the previous moment is in the second voltage interval, the window motor is controlled to perform an automatic lowering operation, wherein the previous moment is used to represent a moment within a preset time period before the current moment, and the current moment is used to represent a moment corresponding to the target voltage value collected.
[0046] In the above embodiment, when the recognition result is the first result, it means that the manual lifting switch is in the on state, and the window motor is controlled to perform a manual lifting operation; when the recognition result is the second result, it means that the manual lowering switch is in the on state, and the window motor is controlled to perform a manual lowering operation; and if the recognition result at the current moment is the third result, and the voltage value at the previous moment is in the first voltage interval, that is, the automatic lifting switch is on at the current moment and the manual lifting switch is on at the previous moment, the window motor is controlled to perform an automatic lifting operation; and if the recognition result at the current moment is the third result, and the voltage value at the previous moment is in the second voltage interval, that is, the automatic lifting switch is on at the current moment and the manual lowering switch is on at the previous moment, the window motor is controlled to perform an automatic lowering operation. The purpose of controlling the window motor to perform manual lifting, manual lowering, automatic lifting, and automatic lowering operations according to the recognition result is achieved.
[0047] The embodiment of the present application also provides a control circuit for a window motor, such as Figure 2 As shown, Figure 2 1 is a control circuit structure diagram of a window motor provided by an embodiment of the present application, comprising: a plurality of control switches 21, a switch control circuit 22, and a single-chip microcomputer 23, wherein the plurality of control switches 21 are electrically connected to a target port of the single-chip microcomputer 23 through the switch control circuit 22, wherein the plurality of control switches 21 include a manual raising switch S1, a manual lowering switch S3, and an automatic raising and lowering switch S2 of the window, such as Figure 3 As shown; the single chip microcomputer 23 is used to collect the target voltage value of the target port, and control the window motor to perform the lifting operation according to the target voltage value.
[0048] In the above embodiment, multiple control switches 21 are electrically connected to the target port through the switch control circuit 22, that is, multiple control switches 21 of the vehicle window are connected to the target port of the single-chip microcomputer 23 through the switch control circuit 22, and the target voltage value of the target port is collected by the single-chip microcomputer 23, and then the vehicle window motor is controlled to perform the lifting operation according to the target voltage value. For example, the target port is the AD port of the single-chip microcomputer, or the analog input port. When the target voltage value is different, it indicates that different control switches are in the on (or pressed) state, and then the vehicle window motor is controlled to perform different operations. That is, only one port resource is needed to achieve the purpose of controlling the lifting operation of the vehicle window motor, thereby avoiding the problem that each control switch in the related technology needs to occupy a port resource, thereby causing a waste of port resources, and achieving the effect of saving port resources.
[0049] In an optional embodiment, the switch control circuit 22 includes a first switch control branch, a second switch control branch, a third switch control branch and a reference voltage circuit, wherein the reference voltage circuit provides a fixed voltage value for the target port when multiple control switches are not turned on; the first switch control branch is connected between the manual up switch S1 and the reference voltage circuit, the second switch control branch is connected between the automatic up and down switch S2 and the reference voltage circuit, and the third switch control branch is connected between the manual down switch S3 and the reference voltage circuit.
[0050] In the above embodiment, each control switch corresponds to a switch control branch, and the first switch control branch, the second switch control branch, and the third switch control branch correspond to the manual raising switch S1, the automatic raising and lowering switch S2, and the manual lowering switch S3, respectively. When a control switch is turned on, the target port presents different target voltage values through the corresponding switch control branch and the reference voltage circuit. In this way, it is possible to identify whether each control switch is in the on state according to the target voltage value of the target port.
[0051] In an optional embodiment, if Figure 4 As shown, the first switch control branch includes a first resistor R1 and a first capacitor C1, the second switch control branch includes a target wire, the third switch control branch includes a second resistor R2 and a second capacitor C2, and the reference voltage circuit includes a third resistor R3, a fourth resistor R4, a fifth resistor R5, a third capacitor C3 and a fourth capacitor C4, wherein a first end of the third resistor R3 is connected to a power supply end, a second end of the third resistor R3 is electrically connected to a first end of the fourth resistor R4, the third capacitor C3 is connected between a second end of the third resistor R3 and a ground end, a second end of the fourth resistor R4 is electrically connected to a target port AD_1, and the fifth resistor R5 and the fourth capacitor C4 are both connected between a second end of the fourth resistor R4 and a ground end; the first resistor The first end of R1 is electrically connected to the first end of the manual raising switch S1, the second end of the first resistor R1 is electrically connected to the second end of the third resistor R3, the first capacitor C1 is connected between the first end of the first resistor R1 and the ground, and the second end of the manual raising switch S1 is connected to the ground; the first end of the automatic raising and lowering switch S2 is electrically connected to the second end of the third resistor R3 through the target wire, and the second end of the automatic raising and lowering switch S2 is connected to the ground; the first end of the second resistor R2 is electrically connected to the first end of the manual lowering switch S3, the second end of the second resistor R2 is electrically connected to the second end of the third resistor R3, the second capacitor C2 is connected between the first end of the second resistor R2 and the ground, and the second end of the manual lowering switch S3 is connected to the ground.
[0052] In the above embodiment, each switch control branch adopts a different resistance circuit, so that when different control switches are turned on, the target port AD_1 presents different target voltage values, so that the on state of each control switch can be identified according to the different target voltage values of the target port AD_1. It should be noted that the above second switch control branch takes only the target wire as an example. In actual applications, the second switch circuit may also include one or more resistors, as long as it is ensured that when the automatic lifting switch S2 is turned on, the voltage value of the target port AD_1 is different from that when other switches are turned on.
[0053] Figure 3 It is a schematic diagram of a door control switch provided in an embodiment of the present application, including S1, S2 and S3. S1, S2 and S3 can represent a manual raising switch, an automatic raising and lowering switch, and a manual lowering switch, respectively. In the related art, it is generally necessary to connect to three IO ports of a single-chip microcomputer to identify the states of the three switches respectively to determine how the window moves. For example, if S1 is grounded, the window will be raised manually. If S1 and S2 are grounded at the same time, the window will be raised automatically, and the same applies to lowering. Automatic raising / lowering requires that two conditions are met at the same time. In the present application, three switches S1, S2 and S3 are integrated inside the window control switch, and one end of the three switches (such as pin 1) is grounded together. The switch structure can realize four states: S1 is turned on, S3 is turned on, S1 and S2 are turned on, and S3 and S2 are turned on. According to the switch structure, if the switch is pushed up once, S3 is turned on; if it is pushed up again (twice in total), S3 and S2 are turned on; if the switch is pushed down once, S1 is turned on; if it is pushed down again (twice in total), S1 and S2 are turned on. If two buttons are turned on, there must be a timing sequence to determine which one is turned on first and which one is turned on later.
[0054] The embodiment of the present application provides a method for reducing the number of external switches detecting IO ports, such as Figure 4 As shown, Figure 4 is a schematic diagram of a door controller circuit provided by an embodiment of the present application, which can be Figure 3 The corresponding three switches S1, S2, and S3 are connected to Figure 4 The UP (manual up), AUTO (automatic up / down), and DOWN (manual down) pins in the window. When S1 is turned on, the window is manually up, when S2 is turned on, the window automatically goes up / down, and when S3 is turned on, the window is manually down. Figure 4 In the circuit, the UP pin is connected to the other end of switch S1 (such as pin 2 of switch S1), the AUTO pin is connected to the other end of switch S2 (such as pin 2 of switch S2), and the DOWN pin is connected to the other end of switch S3 (such as pin 2 of switch S3). +12V is the pull-up power supply, and the target port AD_1 is connected to the AD port of the microcontroller to detect the voltage value. R1, R2, R3, R4, and R5 are voltage divider resistors, and C1, C2, C3, and C4 are filter capacitors.
[0055] In an optional embodiment, the single chip microcomputer is further used to identify the states of multiple control switches according to the target voltage value to obtain an identification result, and control the window motor to perform the lifting operation according to the identification result.
[0056] In the above embodiment, the single chip microcomputer can identify the states of multiple control switches according to the target voltage value to obtain an identification result, and control the window to perform the lifting operation according to the identification result. Specifically, the identification result can be obtained according to the method in the above method embodiment, and the window can be controlled to perform the lifting operation according to the identification result.
[0057] The above-mentioned switch control circuit in the embodiment of the present application is only an example, and other modifications made by those skilled in the art on this basis are within the protection scope of the present application.
[0058] Combine the following Figure 5 , Figure 6 , Figure 7 , Figure 8 The circuit principle of the door controller in the embodiment of the present application is explained.
[0059] like Figure 5 As shown, when switches S1, S2, and S3 are not turned on, the current flows as follows Figure 5 As shown by the arrow in the middle, AD_1 detects the voltage value after the resistors R3, R4, and R5 divide the voltage. That is, when all switches are not turned on, AD_1 detects a reference voltage value, such as 3V (or other voltage values). The software program determines that the switch is not closed.
[0060] like Figure 6 As shown, when switch S1 is turned on, the current flows as follows Figure 6 As shown by the arrow in the middle, AD_1 detects the voltage value after the resistors R3~R5 and R1 divide the voltage. For example, the voltage value is 1.5V (or other voltage values) at this time. The software program determines that the switch S1 is closed and drives the window to rise manually.
[0061] like Figure 7 As shown, when switch S3 is turned on, the current flows as follows Figure 7 As shown by the arrow in the middle, AD_1 detects the voltage value after the resistors R3~R5 and R2 divide the voltage. For example, the voltage value is 2.0V (or other voltage values) at this time. The software program determines that the switch S3 is closed and drives the window to manually go down.
[0062] like Figure 8 As shown, when switch S2 is turned on, the current flows as follows Figure 8As shown by the arrow in the middle, AD_1 detects GND; for example, the voltage is 0V at this time. Because of the structure of the switch itself, S2 must be turned on before S1 or S3 is turned on. If the microcontroller first detects the voltage value after the voltage division of R3 and R1 and then detects GND, it is determined that S1 is turned on first and then S2, and the window is driven to automatically rise; if the microcontroller first detects the voltage value after the voltage division of R3 and R2 and then detects GND, it is determined that S3 is turned on first and then S2, and the window is driven to automatically fall.
[0063] It should be noted that the voltage value detected by AD_1 when the above-mentioned different switches are turned on is only an example. In practical applications, appropriate adjustments can be made as long as AD_1 can detect different voltage values when different switches are turned on, so as to identify which specific switch is turned on.
[0064] In this embodiment, we change multiple IO ports into one AD port and connect different resistors respectively, so that different voltage values can be collected to judge rising and falling. When automatically rising / falling, the AD value of the switch is collected through the timing. If the manual rising is collected first and then the automatic rising / falling is collected, it is judged as automatic rising; if the manual falling is collected first and then the automatic rising / falling is collected, it is judged as automatic falling.
[0065] If there are switches in two or more directions, they can be combined together to synthesize an AD value plus the timing collected by the software to control the motor movement.
[0066] Through the embodiments of the present application, the purpose of reducing the external switch detection IO port is achieved, and the effect of saving the port resources of the single-chip microcomputer is achieved.
[0067] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0068] The present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed, any one of the method steps described above is executed.
[0069] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0070] The present application also discloses an electronic device. Fig. 9 As shown, Fig. 9 The electronic device 900 may include: at least one processor 901 , at least one network interface 904 , a user interface 903 , a memory 905 , and at least one communication bus 902 .
[0071] The communication bus 902 is used to realize the connection and communication between these components.
[0072] The user interface 903 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 903 may also include a standard wired interface and a wireless interface.
[0073] The network interface 904 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0074] Among them, the processor 901 may include one or more processing cores. The processor 901 uses various interfaces and lines to connect various parts of the entire electronic device (such as a server), and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 905, and calling data stored in the memory 905. Optionally, the processor 901 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 901 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 901, and it can be implemented separately through a chip.
[0075] Among them, the memory 905 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 905 includes a non-transitory computer-readable storage medium. The memory 905 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 905 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 905 may optionally also be at least one storage device located away from the aforementioned processor 901. Refer to Fig. 9 , the memory 905 as a computer storage medium may include an operating system, a network communication module, a user interface module and an application program of a control method for a vehicle window motor.
[0076] exist Fig. 9 In the electronic device 900 shown, the user interface 903 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 901 can be used to call an application program of a control method for a window motor stored in the memory 905. When executed by one or more processors 901, the electronic device 900 executes one or more of the methods described in the above embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described order of actions, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0077] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0078] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0079] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0080] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0081] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.
[0082] The above is only an exemplary embodiment of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.
[0083] This application is intended to cover any modifications, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the technical field not recorded in the present disclosure.
Claims
1. A control method for a vehicle window motor, characterized in that: include: Collecting a target voltage value of a target port, wherein a plurality of control switches of the vehicle window are electrically connected to the target port through a switch control circuit, and the plurality of control switches include a manual raising switch, a manual lowering switch, and an automatic raising and lowering switch; The window motor is controlled to perform a lifting operation according to the target voltage value.
2. The method according to claim 1, characterized in that Controlling the window motor to perform a lifting operation according to the target voltage value includes at least one of the following: When the target voltage value is within the first voltage interval, controlling the window motor to perform a manual lifting operation; When the target voltage value is within the second voltage interval, the window motor is controlled to perform a manual lowering operation.
3. The method according to claim 1, characterized in that The target voltage value includes a first voltage value and a second voltage value, the first voltage value is used to represent the voltage value of the target port collected at a first moment, the second voltage value is used to represent the voltage value of the target port collected at a second moment, and the difference between the second moment and the first moment is less than or equal to a preset duration; Controlling the window motor to perform a lifting operation according to the target voltage value includes: When the first voltage value and the second voltage value meet a first condition, controlling the window motor to perform an automatic lifting operation, wherein the first condition indicates that the first voltage value is within a first voltage interval and the second voltage value is within a third voltage interval; When the first voltage value and the second voltage value satisfy a second condition, the window motor is controlled to perform an automatic lowering operation, wherein the second condition indicates that the first voltage value is within a second voltage interval and the second voltage value is within a third voltage interval.
4. The method according to claim 1, characterized in that: Controlling the window motor to perform a lifting operation according to the target voltage value includes: Identify states of the plurality of control switches according to the target voltage value to obtain an identification result; The window motor is controlled to perform a lifting operation according to the recognition result.
5. The method according to claim 4, characterized in that Identifying states of the plurality of control switches according to the target voltage value to obtain an identification result includes: When the target voltage value is in the first voltage interval, a first result is obtained, wherein the first result indicates that the manual raising switch is in the on state, and the identification result includes the first result; When the target voltage value is in the second voltage interval, a second result is obtained, wherein the second result indicates that the manual lowering switch is in the on state, and the identification result includes the second result; When the target voltage value is in the third voltage interval, a third result is obtained, wherein the third result indicates that the automatic lifting switch is in the on state, and the identification result includes the third result.
6. The method according to claim 5, characterized in that Controlling the window motor to perform a lifting operation according to the recognition result includes one of the following: When the recognition result is the first result, controlling the window motor to perform a manual lifting operation; When the recognition result is the second result, controlling the window motor to perform a manual lowering operation; When the recognition result is the third result and the voltage value of the target port at the previous moment is within the first voltage interval, the window motor is controlled to perform an automatic raising operation, wherein the previous moment is used to indicate a moment within a preset time period before the current moment, and the current moment is used to indicate a moment corresponding to the target voltage value being collected; When the recognition result is the third result and the voltage value of the target port at the previous moment is within the second voltage range, the window motor is controlled to perform an automatic lowering operation, wherein the previous moment is used to represent a moment within a preset time period before the current moment, and the current moment is used to represent a moment corresponding to the target voltage value being collected.
7. A control circuit for a vehicle window motor, characterized in that: include: A plurality of control switches, a switch control circuit, and a single chip microcomputer, wherein: The plurality of control switches are electrically connected to the target port of the single chip microcomputer through the switch control circuit, wherein the plurality of control switches include a manual raising switch, a manual lowering switch and an automatic raising and lowering switch of the vehicle window; The single chip microcomputer is used to collect the target voltage value of the target port, and control the window motor to perform lifting and lowering operations according to the target voltage value.
8. The control circuit according to claim 7, characterized in that: The switch control circuit includes a first switch control branch, a second switch control branch, a third switch control branch and a reference voltage circuit, wherein: The reference voltage circuit provides a fixed voltage value for the target port when none of the multiple control switches are turned on; The first switch control branch is connected between the manual up switch and the reference voltage circuit, the second switch control branch is connected between the automatic up and down switch and the reference voltage circuit, and the third switch control branch is connected between the manual down switch and the reference voltage circuit.
9. The control circuit according to claim 8, characterized in that: The first switch control branch includes a first resistor and a first capacitor, the second switch control branch includes a target wire, the third switch control branch includes a second resistor and a second capacitor, and the reference voltage circuit includes a third resistor, a fourth resistor, a fifth resistor, a third capacitor, and a fourth capacitor, wherein: The first end of the third resistor is connected to the power supply terminal, the second end of the third resistor is electrically connected to the first end of the fourth resistor, the third capacitor is connected between the second end of the third resistor and the ground terminal, the second end of the fourth resistor is electrically connected to the target port, and the fifth resistor and the fourth capacitor are both connected between the second end of the fourth resistor and the ground terminal; The first end of the first resistor is electrically connected to the first end of the manual rising switch, the second end of the first resistor is electrically connected to the second end of the third resistor, the first capacitor is connected between the first end of the first resistor and the ground, and the second end of the manual rising switch is connected to the ground; The first end of the automatic lifting switch is electrically connected to the second end of the third resistor through the target wire, and the second end of the automatic lifting switch is connected to the ground end; The first end of the second resistor is electrically connected to the first end of the manual lowering switch, the second end of the second resistor is electrically connected to the second end of the third resistor, the second capacitor is connected between the first end of the second resistor and the ground, and the second end of the manual lowering switch is connected to the ground.
10. The control circuit according to claim 7, characterized in that: The single chip microcomputer is also used to identify the states of the plurality of control switches according to the target voltage value to obtain an identification result, and control the window motor to perform a lifting operation according to the identification result.
