Electronic rain gauges are nice weather instruments to own. The problem is that some are not built quite well enough to work reliably.
The style rain gauge I'm describing is the very simple type using a mechanical rain accumulating toggle bucket. As the bucket fills with water, it reaches a point where it toggles on its axis, dumping the water and bringing an alternate bucket under the spout. As the bucket toggles, a magnet attached to the bucket passes a reed switch, causing it to close for an instant, sending an electrical pulse to a mechanical counter.
The problem isn't all that obvious on inspection, but lies in the fact that the driving pulse sent to the mechanical counter is dependent on the mechanics of the rain accumulating toggle bucket. As it turns out, the pulse is occasionally too short in duration to cause the mechanical counter to cycle fully, and thus the count is lost.
This problem is easy to correct with an electronic circuit. This circuit must meet a couple of requirements:
The following circuit gets the job done:
The circuit works as follows:
When the rain bucket toggles, a reed switch closes for an instant. This causes Vcc to be applied to one end of resistor R1, which drives transistor Q1 into saturation. Q1's collector goes to near ground potential, applying full power to the solenoid.
It also pulls one end of resistor R4 to near ground. Because R4 is a low value, it has little voltage drop as it pulls the negative end of capacitor C2 to ground. The positive end of C2 draws base current from transistor Q2, driving it into saturation. Q2 supplies current via resistor R7 to the base of transistor Q1, keeping it driven, even if the original current from R1 disappears.
The circuit remains in this positive feedback locked mode while capacitor C2 slowly charges up via current limited by resistor R6. It takes around 55 msec for C2 to charge up enough such that the base current into Q2 diminishes enough to cause it to turn off. When it does, the lack of drive to Q1 also causes it to turn off, robbing the solenoid of power.
With no drive current, the magnetic field in the solenoid collapses, causing the collector of Q1 to rise to above Vcc, dissipating energy in resistor R4 via diode D3. It also drives the negative end of C2 above Vcc, causing it to discharge into resistor R5 (via diode D4) and resistor R6 (via diode D5). It also drives Q2 further into cutoff. The time required to fully discharge C2 is substantially faster than the pulse rate from the rain sensor, so it is fully discharged before the next rain pulse comes along. In the mean time, both Q1 and Q2 are fully off, causing the circuit to draw no power from Vcc.
Optional LED D2 and resistor R3 form a pulse indicator that flashes every time the solenoid is activated. Capacitor C1, resistor R2, and diode D1 protect transistor Q1 from noise spikes coming down the cable from the sensor, avoiding false counts.
I have used this circuit for several years now, and have yet to replace the six AA batteries making up the 9 volt Vcc supply.