Sie sind auf Seite 1von 5

JORGE MARTINEZ, Electronic Engineer and Freelancer,

Dialog Semiconductor

Build Your Own


IR Windshield
Rain Sensor
This system can monitor when a sheet of glass has either water or ice on its surface, and then
generate a PWM signal to control a motor that wipes away the liquid from the glass surface.

I
n this article, we implement a rain and ice sensor by analyz- of reflection. As the distance between emitter and receiver
ing the reflection of an infrared (IR) light source. This proj- lengthens, the detection method becomes more effective.
ect uses proven techniques based on multiple reflections In addition, as the distance between emitter and receiver
of IR light in the internal walls of the target glass. It will grows, the light’s power loss increases as the light travels
aim to increase the capabilities of standard components by through the glass. For the best detection, given increasing
adding technical advantages offered by the LED device, such distance, either a more efficient sensing/light emission device
as increasing the power emission using
pulsed energy applied 10 times using Barrier for
demonstration
high current strikes at a 1% duty cycle.

Direct for adjust Direct for adjust


APPLICATION
The most common practice in the
Emitter Receiver
detection of raindrops on a windshield
involves sensing infrared light conducted Glass Glass
through the internal walls of the
windshield glass (Fig. 1). In some cases,
these reflections are enhanced by adding Encapsulating
other physical components to the glass. material

When raindrops are present on the


external surface of the glass, a refraction Windshield
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).
LED Photodiode
In order to acquire the majority of the
Raindrop
luminous emissions, the light beam is
injected to the glass at a 45-deg. angle.
The receiver at the other end of the glass
also has a 45-deg. angle. This technique
depends on the statistical probability
that when it’s raining, the surface of the
glass will have raindrops in the path 1. Internal reflection principle used in the most common rain sensors.1

1 ELECTRONICDESIGN..COM
12 V

Glass
3. IR LED driv- R2
ing circuit. 15
IR light
IR light receiver
Pulse
LED1 emitter generator

R3 DC level
1k to PWM
Q2
Pulse input Pulse to
TIP121
GreenPAK device DC-level
R4 conversion
1k

PWM for
GND GND
DC motor

12 V
4. IR LED driving cir- 2. General block diagram of GreenPAK design.
cuit with decoupling
R2
capacitor to avoid 15
dc levels.

LED1

AC
capacitor
Q2
Pulse input
TIP121
R3
1k R4
1k

GND GND

3.3 V

Q1
LTR-306
R3
100k
To PWM
+ C1
R2
Cap Pol1
120k
1 µF

GND GND

5. IR receiver circuit plus low-pass filter.

must be developed, or more power must


be obtained from the current IR light
source.
This application suggests a method to
wring the most out of the LED. A constant
light could be used for measuring, but 6. Array to create a PWM based in a dc level.
it’s not mandatory because the time
constant isn’t our priority (rather, it’s measuring the intensity GREENPAK DESIGN
of the beam). Fortunately, LED manufacturers supply the peak Pulse generator for IR emitter
forward current2 (IFP) or the forward surge current3 (IFSM) of For the pulse generator in the block diagram of the
the LED in their datasheets. GreenPAK design (Fig. 2), we’ll use 10 μs with a 1% duty cycle.

2 ELECTRONICDESIGN..COM
100% Light sensing

The complete period is given by:


T min = (MaxPulseH/MaxDCycle) = (10 µs/1%)
T min = 1 ms
That results in a maximum frequency of:
F_max = (1/T) = 1 kHz
Thus, a HIGH pulse is set for 10 μs with the
complementary LOW level to achieve a 1-ms total (a)
Voltage drop in R2: 3 V peak, 2.05 V avg Filtered voltage in C1: 2.00 V
period. To generate this pulse, we’ll use CNT5/DLY5
75% Light sensing
and CNT2/DLY2.
CNT5/DLY5 provides the complete period of 1
ms. It’s set as a counter using the internal clock at 25
kHz (configured in OSC). CNT2 provides the 10-μs
HIGH level pulse.
IR LED emitter driver
A basic configuration (Fig. 3) is used to drive the
IR LED—it employs TIP121 transistors and takes
into consideration the power-supply conditions of a
car, where +12 V is the main voltage source. (b)

Based on experience, the TIP121 Darlington


transistor is a good option for this application. This 50% Light sensing

device will allow us to drive a high current load with


a low base current.
Therefore, R1 can be calculated from:
IF = (VDD – VF – VCEsat)/R1
R1 = (12 V – 2 V – 2 V)/0.5 A
R1 = 16 Ω

The average power calculation for R1 is calculated


(c)
as follows:
Voltage drop in R2: 1.5 V peak Voltage drop in R2: 1 V peak
PR1 = IR12 × R1 × DutyCycle
PR1−16Ω = 0.5 A2 × 16 Ω × 1% = 40 mW 25% Light sensing

In order to be aware of the worst-case conditions,


there’s a possibility that the signal in the base of
Q1 could be a constant dc level. If so, the power
dissipated by R1 is as follows:
PR1−15Ω = 500 mA2 × 16 Ω × 100% = 4 W
The power dissipated by the Darlington transistor
must be observed (to take care of the device’s
lifespan) by calculating the device temperature
(d)
through its thermal resistance parameters.
Filtered voltage in C1: 434 mV Voltage drop in R2: 0 V peak
At 25°C, with no additional heat sink:
TQ1−amb25 = PQ1 × RθJA + Tamb 0% Light sensing

TQ1−amb25 = 40 mW × 62.5°C/W + 25°C


TQ1−amb25 = 27.5°C
This does not seem like a big issue. However, in
the case when current driven is 100%:

7. Voltage drop in R2: 3 V peak, 2.05 V avg, and filtered


voltage in C1: 2.00 V (a); TK (b); voltage drop in R2: 1.5 V
peak, and filtered voltage in C1: 653 mV (c); voltage drop in
(e)
R2: 1 V peak, and filtered voltage in C1: 434 mV (d); voltage
drop in R2: 0 V peak, and filtered voltage in C1: 164 mV (e). Filtered voltage in C1: 164 mV Filtered voltage in C1: 653 mV

3 ELECTRONICDESIGN..COM
3.3 V

Q1
LTR-306
R3
100k
To PWM

R2
(a) (b) 120k + C1
Duty Cycle 99.3% @ 1.95 V Duty Cycle 77.1% @ 991 mV
Cap Pol1
1 µF
R4

9. R4 is added to avoid high current drain from Q1.

VOLTAGE-CONTROLLED PWM
To achieve the intended goal of this article, we’ll
refer to the AN-1056 Macro circuit design ADC
(c) (d) PWM application note to translate a dc level into a
Duty Cycle 58.4% @ 788 mV Duty Cycle 29.1% @ 478 mV
pulse-width-modulation (PWM) signal (Fig. 6).

MEASUREMENTS
IR light emitter vs. IR receiver
Figure 7 reveals results from testing the IR light
emitter versus IR receiver. The oscilloscope screen
captures depict the IR LED pulses (CH1) versus
the voltage drop in R2 directly from the IR receiver
(CH2). In Fig. 7a, one can see R2’s voltage (CH2)
versus the filtered dc level in C1 (CH1).
(e)
Figure 8 provides screen captures that show dc level
Duty Cycle 2.91% @ 253 mV
vs. PWM.
8. Duty cycle 99.3% @ 1.95 V (a); duty cycle 77.1% @ 991 mV (b); duty cycle 58.4%
@ 788 mV (c); duty cycle 29.1% @ 478 mV (d); duty cycle 2.91% @ 253 mV (e). ICE-SENSING APPLICATIONS
During this exercise, we found that sensing ice
TQ1−amb25 = 4 W × 62.5°C/W + 25°C is somewhat challenging using the techniques described so
TQ1−amb25 = 275°C far. The changes in refraction due to the presence of ice are
This means it would be beneficial to avoid a constant level different than changes due to the presence of water. However,
in the base of Q1. it’s possible to detect both.
One simple option is to have a series capacitor in the base We recommend that the emitter and receiver be immersed
(Fig. 4). in a clear encapsulating material so that the light emitted and
IR light receiver received isn’t lost due to material changes. This helps avoid
The receiver is configured as a common collector that simply unintended attenuation, and helps prevent a false positive in
converts the input light pulses into a voltage in R2 (Fig. 5). The which condensation on the inside of the car sets off the rain
voltage drop in R2 will typically be in the form of pulses. For sensor.
our purposes, these need to be translated into a dc level. We can account for the added challenge of detecting ice by
The easiest way to do this is to filter the signal using an RC adding a barrier to the center and adjusting the angle of the
low-pass filter, with a cutoff frequency two decades before 1 emitter and receiver.
kHz (therefore, 1 Hz) to ensure the 1-kHz rejection. The cutoff
frequency is calculated as: CIRCUIT ENHANCEMENT
FC = [1/(2 × πRC)] This section discusses how to enhance the receiver to deal
If a 100-kΩ resistor is used: with the challenge posed by an icy windshield. The previous
C = [1/(2 × π × 100 kΩ × 1 Hz)] receiver design was shown in Fig. 5. The low-pass filter with
C = 0.795 µF R3 and C1 was optimized for water-only sensing.
We can try for 1 μF, resulting in a cut-off frequency of: To account for the change in the angle of reflection and the
FC = 1.59 Hz presence of encapsulating material, we can change the value

4 ELECTRONICDESIGN..COM
of R2. The gain of the circuit is directly
proportional to R2’s value. For practical
(a) Duty Cycle 30.7% @ 715 mV in C1. Initial state
purposes, a 500-kΩ potentiometer
would be ideal to select the proper
value for the circuit. Figure 9 shows an
updated topology with the potentiometer
included.
The waveforms in Figure 10 show the
different behaviors of the circuit with
varying conditions.

CONCLUSION
In this article, we were able to create (b)
Duty Cycle 31.5% @ 585 mV Water applied
a rain and ice sensor using a Silego
GreenPAK SLG46620, a configurable
mixed-signal IC (CMIC), 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 wipes away the
liquid from the glass surface.

Tuning and Troubleshooting Notes: (c)


Duty Cycle 16.6% @ 585 mV Ice applied to sensors
If the output of the voltage is low for
the circuit in Fig. 5, increase R2.
If the light emitted by the circuit in Fig.
4 is not as powerful as expected, check
the connections between R2, LED1, and
Q2. You can verify the voltage drops for
each component.

JORGE MARTINEZ, born in September


1973, graduated from ITSLP (Mexico) in (d)
Duty Cycle 53.3% @ 644 mV Condensation after Ice
1995 as an Industrial Engineer on Electron-
ics. His experience involves 13 years in 10 Duty cycle 30.7% @ 715 mV in C1 (initial state) (a); duty cycle 31.5% @ 585 mV with water
hardware electronics development cover- applied (b); duty cycle 16.6% @ 585 mV with ice applied to sensors (c); duty cycle 53.3% @ 644
ing telecommunications, power metering, mV with condensation after ice (d).
appliances, and motor control, performing
component selection, electronics design, REFERENCES:
and leading on PCB layout oriented to EMC. Jorge also has seven 1. https://en.wikipedia.org/wiki/Rain_sensor
years of experience in the automotive and aerospace industries as 2. h
 ttp://www.everlight.com/file/ProductFile/HIR928-
a test process engineer and project manager. 6C-F.pdf
His design focus is oriented toward simplicity, a similar phi- 3. http://www.vishay.com/docs/83751/cny70.pdf
losophy of those like the late National Instruments engineer Bob
Pease. Jorge has interacted and worked in joint projects with in- FOR FURTHER INFORMATION:
terdisciplinary teams in the U.S., China, Germany, Switzerland, https://en.wikipedia.org/wiki/Rain_sensor
Poland, and Hungary. http://www.everlight.com/file/ProductFile/HIR928-6C-F.pdf
He enjoys the musical arts of singing and playing Latin-Ameri- http://www.vishay.com/docs/83751/cny70.pdf
can folk guitar. http://www.silego.com/products/363/312/AN-1056.html

5 ELECTRONICDESIGN..COM

Das könnte Ihnen auch gefallen