Disclosure of Invention
The present invention is directed to a sliding waterproof touch device, which solves the above problems.
In order to solve the technical problems, the invention provides the following technical scheme:
the utility model provides a waterproof touch device of slidingtype, includes shell and circuit board, the circuit board is inside the shell, the circuit board includes MCU treater unit, touch unit, information acquisition unit, memory cell and supporting circuit unit, MCU treater unit includes control chip U1, touch unit includes the touch spring, the inner wall of shell is hugged closely to the touch spring, the part that touch spring and shell were hugged closely is the touch medium, memory cell includes flash memory, MCU treater unit, touch unit, information acquisition unit, memory cell and supporting circuit unit are the electricity and connect its characterized in that: the method comprises the following steps:
and S1, initializing the MCU, entering a user information entry interface, guiding a user to operate, completing setting, entering two parameters which are a point contact area S, a point contact force n and a point contact temperature t, completing operation by the user according to guidance, and entering the acquired data into a flash memory of the storage unit.
S2, the touch medium is provided with an initial value, the MCU processor unit judges whether an object touches the touch medium or not by taking whether the initial value of the touch medium changes or not as a judgment basis, if the touch value changes, the MCU processor unit judges that the object touches the touch screen at the moment, the information acquisition unit acquires object information, the acquired information comprises point touch time, actual point touch times, point touch shape, actual point touch area, actual point touch force, actual point touch temperature and actual point touch position number, a touch key effective area is set, when the object touches the effective area, the MCU processor unit judges that the operation request is effective and carries out next judgment, otherwise, the MCU processor unit shields the point touch operation request.
Thepin 1 and thepin 8 of the control chip U1 are positive and negative pin positions respectively, thepin 1 of the control chip U1 is connected with a power supply VDD, thepin 8 of the control chip U1 is grounded, thepin 7 of the control chip U1 is connected with the first end of a resistor R4, the second end of the resistor R4 is connected with the first end of a capacitor C8, the second end of the capacitor C8 is grounded, thepin 6 of the control chip U1 is connected with the first end of a resistor R5, the second end of the resistor R5 is connected with a touch spring P1, thepin 5 of the control chip U1 is connected with the first end of a resistor R6, the second end of the resistor R6 is connected with a touch spring P2, thepin 1 of the control chip U1 is connected with the first end of a capacitor C7, the second end of the capacitor C7 is grounded, the first end of the capacitor C7 is connected with the first end of a capacitor C1, the second end of the capacitor C1 is grounded, and thepin 4 of the control chip U1 is connected with the first end of a resistor R4, the second end of the resistor R4 is connected with the anode of the diode LED1, the cathode of the diode LED1 is grounded, thepin 2, thepin 3 and thepin 4 of the control chip U1 can be used as keys to output control pins, the control chip U1 drives an LED lamp by using thepin 4, the LED lamp is turned on and off by pressing a key once, and the like, thepin 5 and thepin 6 are spring-connected pins for touch, a resistor is added to prevent the chip U1 from being killed by static electricity when the spring is directly touched, thepin 7 is a sampling pin for touch, and the sampling pin is connected with a resistor and a capacitor, wherein the capacitor is related to sensitivity and is adjusted according to actual conditions.
The step S2 includes the following steps:
and S21, storing a point contact position number threshold value into the flash memory of the storage unit, setting the point contact position threshold value as 1, intercepting a point contact time point by the MCU processor unit, judging the point contact position number in the effective area of the touch key at the point contact time point, setting the actual point contact position number as x, if x is more than 1 or x is less than 1, judging that the current time is non-manual key operation or no-key operation by the MCU processor unit, shielding the operation request by the MCU processor unit, and if x is equal to 1, entering the next judgment process by the MCU processor unit.
And S22, storing a 1S-inner-point-touch time threshold value in the flash memory of the storage unit, setting the point-touch time threshold value as 1, intercepting a 1S-point-touch time period by the MCU processor unit, setting the actual point-touch time as y, if y is 1, entering the next judgment by the MCU processor unit, and otherwise, shielding the point-touch operation request.
S23, when the point touch position is located in the effective area of the touch key:
if the point contact positions are all located in the effective area of the touch key, comparing the actual point contact area acquired by the information acquisition unit with the point contact area s, and when the actual point contact area is larger than or equal to the point contact area s, the MCU processor unit enters the next step of judgment, otherwise, the point contact operation request is shielded;
if the point contact position part is located in the effective area of the touch key, the point contact shape collected by the information collection unit is judged, if the edge of the point contact shape is irregular, the MCU processor unit shields the point contact operation request, if the edge of the point contact shape is regular arc, the MCU processor unit performs the next judgment step, otherwise, the point contact operation request is shielded.
And S24, comparing the actual point contact force collected by the information collection unit with the point contact force n recorded into the flash memory:
if the actual point contact force is larger than or equal to the point contact force n, the MCU processor unit enters the next judgment, otherwise, the point contact operation request is shielded;
if the actual point contact force is less than the point contact force n, the MCU processor unit judges the actual point contact force and the actual point contact area, if the actual point contact force accords with the positive correlation relationship between the point contact force and the point contact area, the MCU processor unit judges the next step, otherwise, the point contact operation request is shielded.
S25, storing a temperature threshold value in the flash memory of the storage unit, wherein the temperature threshold value is set to be 30 ℃, and if the actual point touch temperature t acquired by the information acquisition unit is more than or equal to 30 ℃, the MCU processor unit responds to the point touch operation request correspondingly; and if the actual touch temperature t is less than 30 ℃, the MCU processor unit shields the touch operation request.
The value of the point contact area s is the minimum area of the finger of the user contacting with the screen in the effective area of the touch key, the point contact force n is the force of the point contact mobile phone screen which is usually used by the user, and the functional relation corresponds to the minimum area.
The numerical value of the number of touch positions is equal to the number of times of change of the touch value at the point of time of touch intercepted by the MCU processor unit.
Compared with the prior art, the invention has the following beneficial effects: the invention improves the anti-false touch performance of the touch screen, can autonomously distinguish whether the button is a manual button or a water drop is mistakenly touched in a rainy day environment, reduces unnecessary electric quantity consumption, and simultaneously eliminates the potential safety hazard of driver distraction caused by the mistaken touch of the water drop when the electric vehicle is driven in a rainy day.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-2, the present invention provides the following technical solutions:
the utility model provides a waterproof touch device of slidingtype, includes shell and circuit board, and the circuit board is inside the shell, and the circuit board includes MCU processor unit, touch unit, information acquisition unit, memory cell and supporting circuit unit, and MCU processor unit includes control chip U1:
pin 1 andpin 8 of the control chip U1 are respectively a positive pin and a negative pin,pin 1 of the control chip U1 is connected to the power supply VDD,pin 8 of the control chip U1 is grounded,pin 7 of the control chip U1 is connected to a first end of a resistor R4, a second end of the resistor R4 is connected to a first end of a capacitor C8, a second end of the capacitor C8 is grounded,pin 6 of the control chip U1 is connected to a first end of a resistor R5, a second end of the resistor R5 is connected to a touch spring P1,pin 5 of the control chip U1 is connected to a first end of a resistor R6, a second end of the resistor R6 is connected to the touch spring P2,pin 1 of the control chip U1 is connected to a first end of a capacitor C7, a second end of the capacitor C7 is grounded, a first end of the capacitor C7 is connected to a first end of the capacitor C7, a second end of the capacitor C7 is grounded,pin 4 of the control chip U7 is connected to the first end of the resistor R7, a negative electrode of theLED 7 is connected to thediode 7,pin 2,pin 3 andpin 4 of the control chip U1 can all be used as a key to output a control pin position, the control chip U1 of the invention usespin 4 to drive an LED lamp, a key is pressed once to turn on, a key is pressed once to turn off, and so on,pin 5 andpin 6 are touch spring-connected pin positions, a resistor is added to prevent the chip U1 from being hit by static electricity when the spring is directly touched,pin 7 is a touch sampling pin position and is connected with a resistor and a capacitor, and the capacitor is related to sensitivity and is adjusted according to actual conditions.
The touch unit includes the touch spring, and the inner wall of shell is hugged closely to the touch spring, and the part that the touch spring hugs closely with the shell is the touch medium, and the memory cell includes flash memory, and MCU treater unit, touch unit, information acquisition unit, memory cell and supporting circuit unit are the electricity and connect its characterized in that: the method comprises the following steps:
and S1, initializing the MCU, entering a user information input interface, guiding a user to operate, completing the setting, inputting two parameters which are a point contact area S, a point contact force n and a point contact temperature t respectively, completing the operation by the user according to the guidance, and inputting the acquired data into a flash memory of the storage unit.
S2, the touch medium is set with an initial value, the MCU processor unit judges whether there is an object touching the touch medium by the change of the initial value of the touch medium, if there is an object touching the touch medium, the MCU processor unit judges that there is an object touching the touch screen by the object, and the information collecting unit collects the object information, the collected information includes point touching time, actual point touching times, point touching shape, actual point touching area, actual point touching force, actual point touching temperature and actual point touching position number, the point touching area S collected by the information collecting unit and the point touching force n are in positive correlation, the value of the point touching area S is the minimum area of the user 'S finger contacting the screen in the effective area of the touch key, the point touching force n is the force of the user' S usual touch mobile phone screen, the function relation is corresponding to the minimum area, and a touch key effective area is set, when the object touches the effective area, the MCU processor unit judges that the operation request is effective and proceeds to the next judgment, otherwise, the point touch operation request is shielded.
Step S2 includes the following steps:
and S21, storing a point contact position number threshold value in a flash memory of a storage unit, setting the point contact position threshold value as 1, intercepting a point contact time point by an MCU (microprogrammed control unit), judging the point contact position number in an effective area of a touch key at the point contact time point, wherein the numerical value of the point contact position number is equal to the change times of a touch value on the point contact time point intercepted by the MCU, setting the actual point contact position number as x, if x is greater than 1 or x is less than 1, judging that the current time is non-artificial key operation or no-key operation by the MCU processor unit, shielding the operation request by the MCU processor unit, and if x is equal to 1, entering the next judgment process by the MCU processor unit.
And S22, storing a 1S-inner-point-touch time threshold value in the flash memory of the storage unit, setting the point-touch time threshold value as 1, intercepting a 1S-point-touch time period by the MCU processor unit, setting the actual point-touch time as y, if y is 1, the MCU processor unit enters the next step of judgment, and otherwise, the point-touch operation request is shielded.
S23, when the point touch position is located in the effective area of the touch key:
if the point contact positions are all located in the effective area of the touch key, comparing the actual point contact area acquired by the information acquisition unit with the point contact area s, and when the actual point contact area is larger than or equal to the point contact area s, the MCU processor unit enters the next step of judgment, otherwise, the point contact operation request is shielded;
if the point contact position part is located in the effective area of the touch key, the point contact shape collected by the information collection unit is judged, if the edge of the point contact shape is irregular, the MCU processor unit shields the point contact operation request, if the edge of the point contact shape is regular arc, the MCU processor unit performs the next judgment step, otherwise, the point contact operation request is shielded.
And S24, comparing the actual point contact force collected by the information collection unit with the point contact force n recorded into the flash memory:
if the actual point contact force is larger than or equal to the point contact force n, the MCU processor unit enters the next judgment, otherwise, the point contact operation request is shielded;
if the actual point contact force is smaller than the point contact force n, the MCU processor unit judges the actual point contact force and the actual point contact area, if the actual point contact force and the actual point contact area are in positive correlation, the MCU processor unit judges the next step, otherwise, the point contact operation request is shielded.
S25, storing a temperature threshold value in a flash memory of a storage unit, wherein the temperature threshold value is set to be 30 ℃, and if the actual point touch temperature t acquired by an information acquisition unit is more than or equal to 30 ℃, the MCU processor unit correspondingly responds to the point touch operation request; and if the actual touch temperature t is less than 30 ℃, the MCU processor unit shields the touch operation request.
The working principle of the invention is as follows: the MCU processor unit initializes first, type in user information, including point contact area s, point contact amount n and point contact temperature t, information acquisition unit gathers point contact operation information, including point contact time, the number of times of actual point contact, the point contact shape, the actual point contact area, the actual point contact amount, actual point contact temperature and actual point contact position number, through setting up initial value on touching the medium, whether change with the initial value judges whether there is object point contact touch-sensitive screen, further through setting up point contact position number threshold value and point contact number threshold value and touch key effective area, judge the validity of this point contact operation request, if satisfy above-mentioned condition, then carry out judgement on next step, specifically include following several parts:
1. judging the size of the actual point contact area and the point contact area s stored in the flash memory, if the actual point contact area is larger than or equal to the point contact area s, judging the next step, if the actual point contact area is smaller than the point contact area s, judging the point contact shape of the point contact action, if the edge of the point contact shape is a regular arc, judging the next step, otherwise, shielding the point contact operation request by the MCU processor unit;
2. judging the magnitude of the actual point contact force and the point contact force n stored in a flash memory, if the actual point contact force is larger than or equal to the point contact force n, carrying out next judgment, if the actual point contact force is smaller than the point contact force n, judging the relation between the actual point contact force and the point contact area, if the actual point contact force and the point contact area satisfy the positive correlation relation, entering next judgment, otherwise, shielding the point contact operation request by the MCU processor unit;
3. the temperature threshold is set to be 30 ℃, under the normal condition, the body surface temperature of a human body is more than 30 ℃, the temperature of rainwater is far lower than 30 ℃, the temperature threshold is used as the temperature threshold to judge whether the point touch operation is artificial key pressing or water drop error touch, when the actual point touch temperature is more than 30 ℃, the MCU processor unit correspondingly responds to the point touch operation request, and if the point touch temperature is less than 30 ℃, the MCU processor unit shields the point touch operation request.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that changes may be made in the embodiments and/or equivalents thereof without departing from the spirit and scope of the invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.