The SPRD was design to ring an alarm as soon as rain is detected on a remote sensor (resistive button for instance). This device can be useful to put some stuff outdoor (clothes for instance) while the weather is uncertain.
Below is the functional block diagram of the board.
The Solar Powered Rain Detector HW1.0 is designed to operate with a solar cell. The power input is directly connected to a Shottky diode and a 5F supercapacitor which performs continuous energy storage. When the main switch (SW1) is placed on the ON position, the supercapacitor is connected to a DC–DC boost converter (U1) which steps–up the supercapacitor voltage to +3.3V, in order to power the board. The converter starts running as soon as the supercapacitor voltage reaches +700mV.
MCU and programming interfaces
The Solar Powered Rain Detector HW1.0 is based on an 8-bits PIC microcontroller (U2) developped by Microchip: the PIC12LF1571 in SOIC–8 package. It is clocked by its internal low frequency oscillator (31kHz).
The MCU is programmed through the ICSP interface (MCLR, ICSPCLK and ICSPDAT signals) on the P2 connector which follow the standard PICkit pinout.
Rain detection is performed with an external resistive sensor connected to an inverting hysteresis comparator.
Current drain figures are given under +3.3V supply.
|MCU sleep current (alarm off)||I (MCU,sleep)||30||nA|
|MCU active current (alarm on)||I (MCU,alarm)||5||µA|
|Hysteresis comparator circuit||I (comp)||10||µA|
|Status LEDs (BP2 released)||I (LEDs)||30||µA|
|Buzzer current (alarm on)||I (buz)||15||mA|
- The presence of the +3.3 V supply can be checked by pushing the Power Check button (BP1) and seeing the yellow LED shining.
- The status of the detector can be checked by pushing the Sensor Status button (BP3): the red LED indicates that rain has been detected, otherwise the green LED indicates that the sensor is ready.
- A dual-tone alarm rings as soon as rain is detected.
- The alarm stops automatically after un certain duration but can be stopped manually by pushing the Stop Alarm button (BP2).
The software embedded in the PIC12LF1571 was developped under MPLABX IDE and XC8 compiler. Project files and source code are available on GitHub @ https://github.com/Ludovic-Lesur/SPRD