The last project I wrote was about the function of detecting falling objects.
The waveform amplitude became smaller due to the change in the installation distance on site, so I had to use a voltage comparator on site to solve it. This time it was the same board, but
different problems were solved at different debugging sites. Customer feedback showed that the indoor device can well realize
infrared sensor-based falling object detection, but the device installed near or outside the outdoors will fail during the day.
As shown in the above figure, we verified it immediately based on customer feedback. The left and right figures were reproduced in different daylight environments . E is infrared emission, R is infrared reception,
and the waveform was checked using LOTO instruments' USB oscilloscope OSC802. Indeed, the infrared sensor waveforms measured under different light conditions in the left and right figures are very
different.
In the figure above, A represents the irradiation of the infrared receiving sensor by sunlight (outdoors or close to the outdoors) , and B represents the irradiation of the infrared transmitting head on the transmitting board to the infrared receiving sensor. The waveform collected by OSC802 shows that due to the irradiation , the DC component shown in C in the figure is superimposed on the pulse waveform generated by the irradiation of B. The figure below explains the basic principle of this problem
D is the waveform generated by the transmitter board, which we introduced in the last article and meets expectations. C is the waveform generated by unexpected
sunlight . Due to the appearance of C, the actual waveform changes from D to E, destroying
the judgment condition of the original system.
Moreover, the judgment condition cannot be simply changed to bypass this problem. Because the waveform of C has different amplitudes under different sunlight
intensities, it can change from 0V in a dim environment to about 4V outdoors. In the case of strong light
, it is enough to drown out the infrared pulse signal emitted by the transmitter board.
There are many ways to solve the problem of interference to infrared emitting boards in an environment with strong sunlight. For example, you can make
a carrier to distinguish between sunlight and emitting tube, or replace the infrared emitting tube with a specific frequency to eliminate sunlight interference, or add a sunshade or polarizing film. Here I use a quick and simple method, using a capacitor in series to remove the DC interference component generated by sunlight, and then use a voltage comparator to shape the output after obtaining the pulse signal of the infrared emitting tube.
The above idea can be realized by replacing a resistor at the front end of the comparator with a DC blocking capacitor C55. Different capacitor values
will produce different effects under the same lighting environment.
Finally, C55 was selected as a 0.1uF capacitor, and the problem was solved.
Hardware circuit design also needs to be continuously improved. There is a big gap
between . Many situations encountered in field applications were completely unexpected in advance. Many senior engineers rely on
rich experience to avoid detours and bypass potholes on the road. When we don’t have enough experience, we can only actively
use our brains to solve problems when we encounter them, and slowly we will accumulate rich experience. This is the purpose and significance of my article
. A short record is not enough to bring accurate and clear knowledge to the engineers who read it, but it will
reveal a little experience and a little bit of dry goods of ideas to a certain extent. I hope it can help everyone.