Download our free GreenPAK Designer software  to open the .gp files  and view the proposed circuit design. Use the GreenPAK development tools  to freeze the design into your own customized IC in a matter of minutes. Dialog Semiconductor provides a complete library of application notes  featuring design examples as well as explanations of features and blocks within the Dialog IC.
- GreenPAK Designer Software, Software Download and User Guide, Dialog Semiconductor
- AN-CM-219 IR Windshield Rain Sensor.gp, GreenPAK Design File, Dialog Semiconductor
- GreenPAK Development Tools, GreenPAK Development Tools Webpage, Dialog Semiconductor
- GreenPAK Application Notes, GreenPAK Application Notes Webpage, Dialog Semiconductor
- Rain Sensor, Article, Wikipedia
- IR928-6C-F, Datasheet, Everlight Electronics
- CNY70, Datasheet, Vishay Semiconductors
This project will use proven techniques based on multiple reflections of IR light in the internal walls of the target glass. It will aim to increase the capabilities of standard components by adding technical advantages offered by the LED device, such as increasing the power emission using pulsed energy applied ten times using high current strikes at one percent duty cycle.
The most common practice in the detection of raindrops on a windshield involves sensing infrared light conducted through the internal walls of the windshield glass, and in some cases enhancing these reflections by adding other physical components to the glass.
When raindrops are present on the external surface of the glass, a refraction of light happens and takes away part of the initial light stream. This results in an attenuated beam of IR light as compared to the original conditions (without the presence of water).
In order to acquire the majority of the luminous emissions, the light beam is injected to the glass at a 45° angle. The receiver at the other end of the glass also has a 45° angle. This technique depends on the statistical probability that when it is raining, the surface of the glass will have raindrops in the path of reflection. The longer the distance between emitter and receiver, the more effective this detection method will be.
As the distance between emitter and receiver gets bigger, the light’s power loss increases as the light travels through the glass. For the best detection given increasing distance, either a more efficient sensing/light emission device must be developed, or more power must be obtained from the current IR light source.
This application suggests a method to get the most out of the LED. A constant light could be used for measuring, but this is not mandatory as the time constant is not the priority (measuring the intensity of the beam is). LED manufacturers supply the Peak Forward Current  (IFP) or the Forward Surge Current  (IFSM) of the LED in their datasheets.
For the pulse generator, the case of a 10 μs with a one percent duty cycle will be taken. The complete period is given by:
Which results in a maximum frequency of:
Thus, a high pulse is set for 10 μs with the complementary low level to achieve a 1 ms total period.
To generate this pulse, CNT5/DLY5 and CNT2/DLY2 are used.
CNT5/DLY5 provides the complete period of 1 ms. It is set as a counter using the internal clock at 25 kHz (configured in OSC). CNT2 provides the 10 μs high level pulse.
A basic configuration (Figure 3) is used to drive the IR LED, using TIP121 transistors and considering the power supply conditions of a car where we have +12 V as our main voltage source.
Based on experience, the TIP121 Darlington transistor is a good option for this application. This device will allow us to drive a high current load with a low base current.
Therefore, R1 can be calculated from:
The average power calculation for R1 is calculated as follows:
At 25 °C, with no additional heat sink:
This does not seem like a big issue. However, in the case when current driven is 100%:
This means it would be beneficial to avoid a constant level in the base of Q1.
One simple option is to have a series capacitor in the base (Figure 4):
The receiver is configured as a common collector to simply convert the input light pulses into a voltage in R2.
The voltage drop in R2 will typically be pulses. For our purposes, these need to be translated into a DC level.
The easiest way to do this is to filter the signal using an RC low pass filter, with a cut off frequency two decades before 1 kHz (therefore, 1 Hz) to ensure the 1 kHz rejection.
The cut-off frequency is calculated:
We can try for 1 μF, resulting in a cut-off frequency of:
The previous application note AN-1056 Macro circuit design ADC PWM is used to translate a DC level into a PWM signal.
The following oscilloscope screen captures depict the IR LED pulses (CH1) vs the voltage drop in R2 directly from the IR receiver (CH2). In Figure 8, one can see R2’s voltage (CH2) vs. the filtered DC level in C1 (CH1).
100% Light sensing
75% Light Sensing
50% Light Sensing
25% Light Sensing
0% Light Sensing
During this exercise, it was found that sensing ice is somewhat challenging using the techniques described so far. The changes in refraction due to the presence of ice are different than the changes due to the presence of water. However, it is possible to detect both.
We recommend that the emitter and receiver be immersed in a clear encapsulating material so that the light emitted and received is not lost due to material changes. This helps avoid unintended attenuation, and also helps prevent a false positive where condensation on the inside of the car sets off the rain sensor.
We can account for the added challenge of detecting ice by adding a barrier to the center and adjusting the angle of the emitter and receiver.
This section will discuss how to enhance the receiver to deal with the challenge posed by an icy windshield.
The previous receiver design was shown in Figure 5. The low-pass filter with R3 and C1 was optimized for water only sensing.
To account for the change in the angle of reflection and the presence of encapsulating material, we can change the value of R2. The gain of the circuit is directly proportional to R2’s value. For practical purposes, a 500 kΩ potentiometer would be ideal to select the proper value for the circuit. Figure 23 shows an updated topology with the potentiometer included.
Figure 24, Figure 25, Figure 27 and Figure 29 show the different behavior of the circuit with varying conditions.
In this application note a rain and ice sensor has been created using a Dialog GreenPAK SLG46620V and a few external components. This system is able to monitor when a sheet of glass has either water or ice on its surface. The system can then generate a PWM signal to control a motor that can wipe away the liquid from the glass surface.
Tuning and Troubleshooting Notes:
If the output of the voltage in Figure 5 is low, increase R2.
If the light emitted by Figure 4 is not as powerful as expected, check the connections between R2, Led1, and Q2. You can verify the voltage drops for each component.