Automobile atmosphere lamp control method of piezoelectric rain sensor
Through the combination of piezoelectric rain sensor and microcontroller, the display effect of the car ambient light is controlled, and the color and brightness of the light is adjusted according to the changes in rainfall and vehicle speed are solved, and the problem of single display effect of the existing ambient light is achieved more efficiently Personalized display and energy savings.
Patent Information
- Application Number
- CN202411430882.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2024-12-10
AI Technical Summary
The existing car ambient light display effect is single, and cannot be significantly different in different weather, and cannot meet the personalized needs of users.
The piezoelectric rain sensor is used to measure the rainfall, and the display effect of the ambient light is controlled through the microcontroller and PWM channel. The combination of different frequencies and colors is displayed using RGB-LED, and the lighting effect is adjusted according to the changes in rainfall and vehicle speed.
The personalized performance of ambient lights is added. Through the combination of piezoelectric components and microcontrollers, better display effects and energy efficiency are achieved, meeting users' diverse needs for in-car ambient lights.
Smart Images

Figure CN119099480A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of automobile electronics, and in particular to a method for controlling automobile atmosphere lights of a piezoelectric rain sensor. Background Art
[0002] With the development of automobile intelligence and automotive electronic technology, people's demand for automobile ambient lights is also increasing in today's smart cockpits. However, the existing automobile ambient lights have a single display effect, and there is no obvious difference in the brightness of the ambient lights even in different weather conditions, which cannot meet the personalized requirements of users. Summary of the invention
[0003] In order to solve the technical problems existing in the prior art, the present invention provides a method for controlling an automobile atmosphere light of a piezoelectric rain sensor.
[0004] To achieve the above object, the technical solution of the present invention is as follows:
[0005] A method for controlling a car atmosphere light using a piezoelectric rain sensor comprises the following steps:
[0006] Step 1: The power management module of the car distributes the power supply;
[0007] Step 2, measuring rainfall using a piezoelectric rain sensor;
[0008] Step 3, amplifying the voltage signal generated by the piezoelectric rainfall sensor using a voltage amplifier module;
[0009] Step 4, collecting and identifying voltage signals through a microcontroller;
[0010] Step 5: The microcontroller controls the ambient light to display different frequencies through the PWM channel.
[0011] As a preferred technical solution, the atmosphere light adopts RGB-LED.
[0012] As a preferred technical solution, in step 2, the piezoelectric rain sensor can convert the force generated by the raindrop impact into a voltage signal, and then calculate the rainfall through circuit and algorithm processing. The calculation process is:
[0013] The amount of charge Q generated by a piezoelectric material when a force is applied is proportional to the force F applied to it:
[0014] Q = d*F, where d is the piezoelectric constant of the material, in coulombs / newton (C / N);
[0015] The relationship between the charge Q and the generated voltage V is expressed by the capacitance C:
[0016]
[0017] Where C is the capacitance of the sensor in Farads (F);
[0018] The force F on each raindrop is calculated from the momentum of the raindrop:
[0019]
[0020] Where m is the mass of the raindrop, v is the speed at which the raindrop hits the sensor surface, and △t is the time it takes for the raindrop to hit;
[0021] The rainfall R is calculated by integrating the number of raindrops N detected per unit time and the volume Vdrop of each raindrop:
[0022]
[0023] Where A is the effective area of the sensor.
[0024] As a preferred technical solution, in step three, the voltage amplification module amplifies the voltage of the piezoelectric rainfall sensor, and an operational amplifier is used to construct the voltage amplification module, so as to keep the phase of the input signal unchanged and amplify the signal.
[0025] As a preferred technical solution, in step four, the voltage value collected by the analog-to-digital converter in the microcontroller is obtained at a regular interval through a timer interrupt. The analog-to-digital converter module of the microcontroller collects the voltage signal generated by the amplified piezoelectric rain sensor to calculate the current precipitation amount, and then uses the precipitation amount to make the analog-to-digital converter generate a PWM wave of corresponding size to control the display effect of the RGB-LED.
[0026] As a preferred technical solution, in step five, when using a microcontroller, three independent PWM signal channels are generated through the built-in pulse width modulation module to control the brightness and switching status of the red, green and blue colors of the RGB-LED respectively. By adjusting the duty cycle of each PWM signal, different combinations and brightness of the red, green and blue colors of the RGB-LED are controlled to display different effects.
[0027] As a preferred technical solution, the output duty ratios of the three PWM signals satisfy the following model:
[0028]
[0029] Among them, pwm1, pwm2, and pwm3 are the duty cycles of the three PWM signals respectively, and R is the amount of precipitation. Different duty cycles are output by the three PWM signals to control the RGB-LED to display the display effect under the corresponding precipitation amount.
[0030] As a preferred technical solution, when the precipitation is less than 0mm, the RGB-LED does not emit light; when the precipitation is greater than 0mm and less than 15mm, the RGB-LED emits green light and gradually becomes brighter as the precipitation increases; when the precipitation is higher than 15mm and lower than 30mm, the RGB-LED emits blue light and gradually becomes darker as the vehicle speed increases; when the precipitation is higher than 30mm and lower than 50mm, the RGB-LED emits blue light and gradually becomes brighter as the precipitation increases; when the speed is higher than 50mm and lower than 70mm, the RGB-LED emits blue light and slowly becomes darker as the vehicle speed increases; when the precipitation is higher than 70mm and lower than 90mm, the RGB-LED emits red light and slowly becomes brighter as the vehicle speed increases; when the precipitation is higher than 90mm, the RGB-LED emits red light and the brightness remains unchanged.
[0031] Compared with the prior art, the present invention has the following beneficial effects:
[0032] The piezoelectric rain sensor car atmosphere light control method of the present invention increases the utilization rate of the piezoelectric rain sensor in the car. In addition to enabling it to control the wiper, it also becomes a part of controlling the car atmosphere light, which meets people's development needs for the car atmosphere light and gives the car atmosphere light more personalization. At the same time, because of the stability, low energy consumption and good display effect of RGB-LED, it can be used in the car atmosphere light circuit to present a better display effect.
[0033] The circuit structure of the present invention is simple. It utilizes the charge released by the piezoelectric element of the piezoelectric rain sensor. While controlling the wiper, the analog-to-digital converter of the microcontroller collects the charge size. According to a preset model, the microcontroller controls the RGB-LED to make corresponding changes according to the model, thereby displaying an atmosphere effect based on the change in rainfall. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a structural diagram of the automobile atmosphere light circuit system of the piezoelectric rain sensor of the present invention;
[0035] Figure 2 It is a schematic diagram of a power management module in the automotive atmosphere light circuit system of the piezoelectric rain sensor of the present invention;
[0036] Figure 3 It is a schematic diagram of a voltage amplification module in a car atmosphere light circuit system of a piezoelectric rain sensor of the present invention;
[0037] Figure 4 It is a schematic diagram of a microcontroller in a car atmosphere light circuit system of a piezoelectric rain sensor of the present invention;
[0038] Figure 5 The present invention is a schematic diagram of the program operation logic of a microcontroller in the automobile atmosphere light circuit system of the piezoelectric rain sensor. DETAILED DESCRIPTION
[0039] The technical solution of the present invention is further described below in conjunction with specific implementation methods:
[0040] like Figure 1 As shown, a method for controlling a car atmosphere light using a piezoelectric rain sensor comprises the following steps:
[0041] Step 1: The power management module of the car distributes the power supply;
[0042] like Figure 2 As shown in the figure, the power management module converts the 12V power supply of the car itself into 5V through the 7805 three-terminal regulator, and then converts 5V into 3.3V through TPS736. Among them, Vout1 is the converted 5V power supply, and Vout2 is the converted 3.3V power supply. These converted power supplies are used to power the piezoelectric rain sensor, voltage amplifier module, microcontroller and atmosphere light, and the atmosphere light uses RGB-LED. Figure 2 C1 is 0.33uF, C2 is 0.1uF, which plays the role of DC isolation, decoupling, filtering, etc. C3 is 10uF, C4 is 100nF, and C5 is a tantalum capacitor of 22uF / 6.3V, which plays the role of filtering and voltage stabilization.
[0043] Step 2, measuring rainfall using a piezoelectric rain sensor;
[0044] Piezoelectric rain sensors usually measure rainfall by detecting the electrical signals generated by raindrops hitting the sensor surface. Their working principle is based on the piezoelectric effect, that is, when piezoelectric materials are subjected to mechanical stress, they will generate charges, which can be converted into voltage signals. Specifically, when raindrops fall on the rain-sensing surface of the sensor, they will exert a certain impact force on the rain-sensing surface, causing the rain-sensing surface to deform. Since the rain-sensing surface uses piezoelectric materials (such as piezoelectric ceramics or PVDF piezoelectric films), this deformation will be converted into electrical signals. After the electrical signal is processed by the signal processing circuit, it can output information such as the intensity and time of rainfall.
[0045] The amount of charge Q generated by a piezoelectric material when a force is applied is proportional to the force F applied to it:
[0046] Q=d*F
[0047] Where d is the piezoelectric constant of the material in coulombs per newton (C / N).
[0048] The relationship between the charge Q and the generated voltage V is expressed by the capacitance C:
[0049]
[0050] Where C is the capacitance of the sensor in Farads (F).
[0051] The force F on each raindrop can be calculated from the momentum of the raindrop:
[0052]
[0053] Where m is the mass of the raindrop, v is the velocity of the raindrop hitting the sensor surface, and △t is the time it takes for the raindrop to hit.
[0054] The rainfall R is usually calculated by integrating the number of raindrops N detected per unit time and the volume Vdrop of each raindrop:
[0055]
[0056] Where A is the effective area of the sensor.
[0057] Through the above formula, the piezoelectric rain sensor can convert the force generated by the impact of raindrops into a voltage signal, and then process it through appropriate circuits and algorithms to finally calculate the rainfall.
[0058] Step three, using a voltage amplifier module to amplify the voltage signal generated by the piezoelectric rainfall sensor.
[0059] To meet the voltage amplification requirements of automotive piezoelectric rain sensors, a voltage amplification module built with an operational amplifier (Op-Amp) can be used. A common choice is to use a non-inverting amplifier circuit because it has a high input impedance and is very suitable for use with piezoelectric sensors.
[0060] The non-inverting amplifier circuit is based on the circuit design of the operational amplifier, which can amplify the input signal without changing the polarity of the signal. A low-noise, high-input impedance operational amplifier is selected to match the high impedance characteristics of the piezoelectric sensor.
[0061] The input voltage signal Vin is connected to the non-inverting input terminal (+) of the operational amplifier, and the output terminal of the operational amplifier is connected to the inverting input terminal (-) through a resistor R1, and then connected to the ground from the inverting input terminal through a resistor R2.
[0062] The voltage gain G calculation formula and output voltage calculation formula of the non-inverting amplifier are:
[0063]
[0064] V OUT =G=V IN
[0065] Where VOUT is the output voltage, VIN is the input voltage (the voltage output by the piezoelectric rain sensor), and the required voltage gain can be set by adjusting the ratio of R1 and R2.
[0066] Voltage amplifier module such as Figure 3 As shown in the figure, it is an amplifier circuit with linearly adjustable gain positive and negative values. This circuit can easily and quickly change the phase relationship between the output and input voltages, that is, change the positive and negative signs of the voltage amplification factor, and can also linearly adjust the size of the voltage amplification factor within a large range.
[0067] Step 4: Collect and identify voltage signals through the microcontroller; obtain the voltage value collected by the analog-to-digital converter in the microcontroller at regular intervals through timer interrupts; the analog-to-digital converter module of the microcontroller collects the voltage signal generated by the amplified piezoelectric rain sensor to calculate the current amount of precipitation, and then uses the amount of precipitation to make the analog-to-digital converter generate a PWM wave of corresponding size to control the display effect of the RGB-LED.
[0068] like Figure 1 As shown, the self-powered wheel speed intelligent display circuit system consists of a generator motor part, a power management module, a microcontroller part and an RGB-LED. Figure 4 The microcontroller part, in which the voltage Vin output by the piezoelectric rain sensor enters channel 1 of the ADC, and the voltage input to ADC channel 1 is one sixth of Vin. Figure 5 The program shown runs the logic to calculate and obtain the duty cycle of the three PWM signals, and then outputs the three PWM signals to control the RGB-LED to display different colors and brightness, showing different effects.
[0069] Car rain sensors can usually detect rainfall in the range of 0 to 100 mm / minute. This range can cover a variety of rainfall conditions in daily life, from light rain to heavy rain.
[0070] When a raindrop hits the surface of a piezoelectric sensor, a short voltage signal is generated. The amplitude of this signal is related to the momentum of the raindrop, which in turn is related to the mass and velocity of the raindrop. The mass m of the raindrop can be estimated by empirical formulas or by sensor measurements. In general, the relationship between the mass m of a raindrop and its diameter d can be approximated by the following formula:
[0071]
[0072] Among them, ρ is the density of water, which is about 1000 kg / m3·d is the diameter of the raindrop, in meters (m).
[0073] The momentum p of a raindrop when it hits the sensor is determined by the mass m and velocity v of the raindrop:
[0074] p=m×v
[0075] The force F is calculated from the rate of change of momentum:
[0076]
[0077] Where △t is the raindrop impact time.
[0078] The piezoelectric sensor converts the force F generated by the raindrop impact into a voltage signal V. Assuming the sensor has a linear response (i.e. the output voltage is proportional to the force), we can write:
[0079] V=k×F
[0080] Where k is a proportionality constant related to the sensor characteristics.
[0081] The total rainfall per unit time can be estimated by the voltage signal accumulated over a period of time.
[0082] Signal integration: Integrate the voltage signal over a certain period of time to obtain a value related to the sum of the momentum of the raindrops.
[0083]
[0084] Where T is the measurement period.
[0085] Conversion from momentum to rainfall: By knowing the relationship between the momentum of raindrops and rainfall, the integration result is converted into total rainfall.
[0086]
[0087] Where A is the effective sensing area of the sensor and ρ is the density of water.
[0088] Step 5: When using a microcontroller, three independent PWM signal channels are generated through the built-in pulse width modulation module to control the brightness and switch status of the red, green and blue colors of the RGB-LED respectively. After the program in the microcontroller starts running, the analog-to-digital converter module and the pulse width modulation module (PWM) peripherals are initialized first, including setting the sampling frequency and sampling channel number of the analog-to-digital converter, setting the frequency and duty cycle of the PWM signal output. Then, the voltage values of the ADC channels are obtained 10 times and the average value is taken. According to the calculation formula of the piezoelectric rain sensor, the precipitation amount is calculated, and the pulse width modulation module is controlled to output three PWM signals with different duty cycles to control the different combinations and brightness of the red, green and blue colors of the RGB-LED to display different effects.
[0089] The output duty cycle of the three PWM signals satisfies the following model:
[0090]
[0091] Among them, pwm1, pwm2, and pwm3 are the duty cycles of the three PWM signals respectively, and R is the amount of precipitation. Different duty cycles are output by the three PWM signals to control the RGB-LED to display the display effect under the corresponding precipitation amount.
[0092] When the precipitation is less than 0mm, the RGB-LED does not emit light; when the precipitation is greater than 0mm and less than 15mm, the RGB-LED emits green light and gradually becomes brighter as the precipitation increases; when the precipitation is higher than 15mm and lower than 30mm, the RGB-LED emits blue light and gradually becomes dimmer as the vehicle speed increases; when the precipitation is higher than 30mm and lower than 50mm, the RGB-LED emits blue light and gradually becomes brighter as the precipitation increases; when the speed is higher than 50mm and lower than 70mm, the RGB-LED emits blue light and slowly becomes dimmer as the vehicle speed increases; when the precipitation is higher than 70mm and lower than 90mm, the RGB-LED emits red light and slowly becomes brighter as the vehicle speed increases; when the precipitation is higher than 90mm, the RGB-LED emits red light and the brightness remains unchanged.
[0093] This embodiment is only a further explanation of the invention rather than a limitation of the invention. After reading this specification, those skilled in the art may make non-creative modifications to this embodiment as needed. However, as long as they are within the scope of the claims of the invention, they are protected by the patent law.
Claims
1. A method for controlling a car atmosphere light using a piezoelectric rain sensor, characterized in that: The following steps are involved: Step 1: The power management module of the car distributes the power supply; Step 2, measuring rainfall using a piezoelectric rain sensor; Step 3, amplifying the voltage signal generated by the piezoelectric rainfall sensor using a voltage amplifier module; Step 4, collecting and identifying voltage signals through a microcontroller; Step 5: The microcontroller controls the ambient light to display effects of different frequencies through the PWM channel.
2. The method for controlling the car atmosphere light of the piezoelectric rain sensor according to claim 1, characterized in that: The atmosphere light adopts RGB-LED.
3. The method for controlling the automotive atmosphere light of the piezoelectric rain sensor according to claim 1, characterized in that: In step 2, the piezoelectric rain sensor can convert the force generated by the raindrop impact into a voltage signal, and then calculate the rainfall through circuit and algorithm processing. The calculation process is: The amount of charge Q generated by a piezoelectric material when it is subjected to force is proportional to the force F applied to it: Qd*F Where d is the piezoelectric constant of the material, expressed in coulombs / newton (C / N); The relationship between the charge Q and the generated voltage V is expressed by the capacitance C: Where C is the capacitance of the sensor in Farads (F); The force F on each raindrop is calculated from the momentum of the raindrop: Where m is the mass of the raindrop, v is the speed at which the raindrop hits the sensor surface, and △t is the time it takes for the raindrop to hit; The rainfall R is calculated by integrating the number of raindrops N detected per unit time and the volume Vdrop of each raindrop: Where A is the effective area of the sensor.
4. The method for controlling the automotive atmosphere light of the piezoelectric rain sensor according to claim 1, characterized in that: In the step three, the voltage amplification module amplifies the voltage of the piezoelectric rainfall sensor, and uses an operational amplifier to construct the voltage amplification module, keeps the phase of the input signal unchanged, and amplifies the signal.
5. The method for controlling the automotive atmosphere light of the piezoelectric rain sensor according to claim 1, characterized in that: In step 4, the voltage value collected by the analog-to-digital converter in the microcontroller is obtained at a regular interval through a timer interrupt. The analog-to-digital converter module of the microcontroller collects the voltage signal generated by the amplified piezoelectric rain sensor to calculate the current precipitation amount. The precipitation amount is then used to cause the analog-to-digital converter to generate a PWM wave of corresponding size to control the display effect of the RGB-LED.
6. The method for controlling the automotive atmosphere light of the piezoelectric rain sensor according to claim 2, characterized in that: In step five, when using a microcontroller, three independent PWM signal channels are generated through the built-in pulse width modulation module to control the brightness and switching state of the red, green and blue colors of the RGB-LED respectively. By adjusting the duty cycle of each PWM signal, different combinations and brightness of the red, green and blue colors of the RGB-LED are controlled to display different effects.
7. The method for controlling the automotive atmosphere light of the piezoelectric rain sensor according to claim 6, characterized in that: The output duty cycle of the three PWM signals satisfies the following model: Among them, pwm1, pwm2, and pwm3 are the duty cycles of the three PWM signals respectively, and R is the amount of precipitation. Different duty cycles are output by the three PWM signals to control the RGB-LED to display the display effect under the corresponding precipitation amount.
8. The method for controlling the automotive atmosphere light of the piezoelectric rain sensor according to claim 7, characterized in that:When the precipitation is less than 0mm, the RGB-LED does not emit light; when the precipitation is greater than 0mm and less than 15mm, the RGB-LED emits green light and gradually becomes brighter as the precipitation increases; when the precipitation is higher than 15mm and lower than 30mm, the RGB-LED emits blue light and gradually becomes dimmer as the vehicle speed increases; when the precipitation is higher than 30mm and lower than 50mm, the RGB-LED emits blue light and gradually becomes brighter as the precipitation increases; when the speed is higher than 50mm and lower than 70mm, the RGB-LED emits blue light and slowly becomes dimmer as the vehicle speed increases; when the precipitation is higher than 70mm and lower than 90mm, the RGB-LED emits red light and slowly becomes brighter as the vehicle speed increases; when the precipitation is higher than 90mm, the RGB-LED emits red light and the brightness remains unchanged.
