Page 1
User Manual Intelligent Rain Detection Module User Manual...
Page 2
User Manual 1. Introduction This intelligent rain detection module is mainly intended for automatic wiper control of security cameras. When installed inside a camera windshield, the module is capable of sensing precise rainfall status on glass surface of the windshield and feeds back information(no rain, light rain, moderate rain, or heavy rain) to a host by UART, then the host can control the wiper get rid of the raindrops on the windshield to ensure a clear view for the camera in rainy conditions.
User Manual 1.2 Detailed Functions The module communicates with the camera host via UART, and the camera host uses all the functions of the module through UART commands. For example, the module sends the rainfall status to the camera host via UART; the camera host configures the module's rain detection sensitivity and other parameters via UART.
Page 4
User Manual Table 1.4 Definition of Frame Flag & Frame Data Frame Flag[7]: Frame Data Read & Data Frame Flag[6:0]: Data Number Description Write Property [15:0]: Data Value Frame Data [15:8] major version 0 (Firmware Version) number, Frame data [7:0] backup version number No rain Light rain...
Page 5
User Manual Continued Frame Flag[7]: Frame Flag[6:0]: Data Description Data Read & Data Number [15:0]: Write Property Data Value Rainfall status output frequency, default is 1, representing 50ms; it can be 5 (Rainfall status output changed. Increasing reducing frequency or represents an increase or decrease of enable/disable) 50ms (output is disabled when it's 0)
Page 6
User Manual mode) Table 1.5 FCS Definition FCS[7:0] Polynomial (HEX) Data Initial Value XOR Value (HEX) Reverse (HEX) x8+x5+x4+1 (0x31) CRC-8 MSB First 0xFF 0x00 The module or the host has to go through a CRC-8 check when transmitting and receiving a frame of data.
Page 7
User Manual Program List 1.1 CRC-8 Check Function Source Code /******************************************************************************************* ** Function name: xCal_crc ** Descriptions: CRC-8 Check. Polynomial: 0x31; Data Reverse: MSB First;Initial Value: 0xFF; XOR Value: 0x00 ** input parameters: ptr: pointer to the data to be checked len: byte number of the data to be checked ** Returned value: CRC-8 Check Value...
Page 8
User Manual again. 1.2.2 Firmware Version Query Function Query the firmware version of the module. For the specific commands see Table 1.6. Table 1.6 Firmware Version Command Query Command Command Content (HEX) Command Description Direction Host→Slave 3A The host queries the firmware version of the module.
Page 9
User Manual 1.2.3 Rainfall Detection Function When the module detects the rain and the rainfall status output is enabled, it will feed back the rain status immediately, and it sends nothing for no rain; when the rainfall status output is disabled, the rainfall status can only be obtained by sending commands from host, and the module will send it to the host.
Page 10
User Manual The module sends system status to the host: Host←Slave optical system parameter writing failure The module sends system status to the host: Host←Slave received serial data check error BC The module sends system status to the host: Host←Slave the current voltage is too low 1.2.5 Optical System Calibration Function Due to the optical path asymmetry of the system caused by processing, installation, etc.,...
Page 11
User Manual Table 1.9 Optical System Calibration Commands Command Command Content (HEX) Command Description Direction Host→Slave The host commands module to perform optical system calibration Host→Slave The host reads the optical system calibration value from the module Host←Slave The module sends the optical system calibration value to the host 1.2.6 Set Rainfall Status Output Frequency When it's rainy, the module will output the corresponding rainfall status after it...
Page 12
User Manual heavy rain, while by decreasing it, the output may change to light rain . Note: Parameters V, S, N, frequency and calibration will be saved to internal Flash during configuration, so it is necessary to ensure a stable power supply. Table 1.11 Commands Related to Rain Detection Sensitivity Parameter Command Command Content (HEX)
Page 13
User Manual 续上表 Command Command Content (HEX) Command Description Direction Host→Slave The host sets light-rain/moderate-rain threshold S2 of the module Host→Slave The host reads light-rain/moderate-rain threshold S2 from module Host←Slave The module sends light-rain/moderate-rain threshold S2 to the host Host→Slave The host sets moderate-rain/heavy-rain threshold S3 of the module Host→Slave 3A...
Page 14
User Manual threshold to adjust the rainfall detection sensitivity. Parameter V: the active degree of the dynamic raindrop flowing on the glass surface, the faster the raindrop flow, the larger the parameter V. Parameter S: the "unevenness" of the static raindrop distributed on the glass surface, the higher the unevenness degree, the larger the parameter S.
Page 15
User Manual Table 1.12 Real-time Rainfall Mode Commands Command Command Content (HEX) Command Description Direction Host→Slave 3A 43 The host commands the module to enter real- time rainfall mode Host→Slave 3A B7 The host commands the module to exit real- time rainfall mode Host←Slave 3A The module sends raw rainfall values to the...
User Manual Figure 1.2 Temperature Detection Linearity Analysis Table 1.14 Temperature Detection Commands Command Command Content (HEX) Command Description Direction Host→Slave 3A EF The host reads chip temperature from the module Host←Slave 3A The module sends chip temperature to the host 1.5 Sleep Function The module supports low-power sleep mode.
User Manual 2. Operation Description 2.1Interface Description The module uses a 0.8mm wire-to-board socket to lead out the power supply and communication pins for easy use, as shown in Figure 2.1. The communication pins are 2-wire serial ports that can communicate with the host directly and send rainfall status data, and the pin definition is shown in Table 2.1.
Page 18
User Manual Figure 2.2 Dimensions on the Front Side First, fix the module on the host mechanic structure with the front side (the side with the IR emitter) facing the glass; then, place the flexible transparent optical material on the front side of the module; finally, put the glass lid on and the installation is done.
Page 19
There are two requirements during installation: 1. The flexible transparent optical material needs to wrap tight the "IR emitter", "photoelectric receiver", and be pressed against the "inner surface of the glass". Give appropriate pressure to eliminate air to avoid air bubbles. 2.
Page 20
2.2.3 Perform Optical Calibration After the first installation, it is required to perform optical system calibration for the module to ensure the accuracy of rain detection. Calibration steps: 1. Ensure the external surface of the glass is clean, dry and free from foreign matters, and it is recommended to calibrate in a dark room to keep the calibration free from interference of light.
3. System Failures 3.1 Command Failures The module will automatically monitor the system status during operation, and if there is any system error, the module will send the system error to the host. The descriptions of various abnormal phenomena are shown in Table 3.1. Table 3.1 Descriptions of Abnormal Phenomena Abnormal Phenomena Description...
Page 22
4. FAQ 1. Q1: How much does the sunlight in night-time and day-time environments affect the rain detection sensitivity and accuracy? What’s the purpose of optical calibration? A1: There is no effect, because the module uses HALIOS®-SD patented technology that can reduce the influence of sunlight on the module;...
Need help?
Do you have a question about the SEN0545 and is the answer not in the manual?
Questions and answers