Skip to main content

Water alarm

 

Sometimes a water alarm may come in handy around the house, to notify you of leaks so you can do something about it before the mess grows beyond control.

I designed and manufactured a rudimentary alarm that senses water through a simple conductive probe, and compains about it.

It made for a perfect excuse to get back up to speed with KiCad and LTSpice, to recover from MicroSIM (1996 edition, ever heard of it? me neither) which they make us use at school. Beeing able to pan and zoom using the mouse is definitely something I've missed.

Here is the schematic: A couple of transistors form an SCR-like circuit that latches on if water is detected. This powers a two transistor oscillator than in turn drives the buzzer. Almost zero power consumption on standby.

Most values are non-critical, and timings are difficult to predict in this kind of circuits, as transistors have to be driven with certain base current to turn the buzzer on and this interferes with the time constants of the RC sections that determine oscilation period. So final values for C3 and C4 were chosen experimentally.

One thing to note though, as this circuit is powered from 9 V and transistor bases are momentarily driven to -VCC, BE breakdown (about 6 V) has to be taken into account, as it can damage the transistors.  Diodes D3 and D4 limit V_BE to -0.6 V. I haven't seen this in similar circuits, even powered from 12 V.


Note from the future: I ended up removing D1 so it only goes off when the "probe" is wet. This prevents the nice positive-feedback switching, but still works. I also changed R2 for a potentiometer so the "threshold" can be adjusted. Sometimes the residual water in the probe is enough to trigger the thing, even separating the wires a couple cm.

A better implementation would be as follows: Same circuit as before, on a hair trigger, but instead of switching the buzzer directly, it turns on a comparator circuit that can more acurately determine the presence of water. You could even make it shut up on its own after, say, 10 or 20 s. Or at this stage you could throw in a microcontroller...

Here is a screenshot of an LTSpice simulation to verify part of the design:
PCB layout in KiCad, using wide tracks for easier manufacturing:

And the 3D view: (The keen-eyed will notice this is a different version)
I used FlatCAM to generate the G-Code for my CNC mill. It's nice and all, yet online documentation seems to be out of date with the actual program one can download online, and for the life of me I cannot find a way to do internal board cuttouts (i.e a wide slot or similar). So for the slot near the battery and mounting holes I just drew toolpaths manually in FlatCAM.
For sending G-Code I use UGS. I like its simple interface, though it has its quirks. In order to use the auto-leveling function (surface probing) one has to do a search "G01 F" replace with "F" on the G-Code. Aside from this it works fine. I had to add a capacitor in parallel with the contact probe so as to eliminate some glitches. Now it works well.
Isolation routing:
I used two passes with depth around 0.2 mm with a 30ยบ 0.2 mm engraving bit. One pass down 0.1 mm seems more than adequate. I've found feeding around 250 mm/min works for my purposes.
Drilling:
I drilled all holes with a 1 mm drill, though components with thin leads certainly do benefit from 0.8 mm holes when soldering, which I'll do next time.
Routing:
A 1.7 mm PCB endmill makes quick work of cutting the board out.
Finished board:
All components fitted:
An old 9V battery finds its contacts repurposed as a battery clip.

This is the underside of the board. Note the obligatory bodge wires as someone messed up during schematic entry.

Comments

Popular posts from this blog

Split-ring compound epicyclic/planetary gearboxes

A while ago, I came across this strange thing called ‘split-ring compound epicyclic/planetary gearboxes’. They seemed really nice, extremely high gear ratios in compact, stackable modules. But the already existing models were not enough. I wanted to be able to design my own, and due to the lack of information on the subject, I had to do a little research and some math. Here is most of what I would have liked to find on the first place: 1. What is a planetary gearbox? Planetary gearboxes, as their name says, resemble planets orbiting around a “sun”. They are composed of a sun gear, in the center, two or more planet gears around it -and often fitted to a carrier- and a ring/annulus gear on the outside. As an image is worth a thousand words: Source Their main feature is a high reduction ratio in a small, flat space, and also, it is easy to couple the output of one gearbox to the input of another one, getting a two or more stage gearbox with such a high reduction ratio. But where is the i

Arduino Based Electronic Load

I have had some problems with my "lab power supply" and I wanted to build another one, so I thought a DC load may be handy to have around. The design is based around Dave Jone's design shown in this video , but with a couple more features, including:     -Arduino controlled.     -Voltage, current, power and temperature monitoring.     -CC and external in hardware modes and CP, Cr software modes.     -Over temperature, over power and over current protection (software) It can handle around 4 amps and 24 volts, limited by the mosfet. It's divided in two main boards. * UI Board: houses the 7 segment displays (I know one is bigger that the others, just what I had aroud...) and the keyboard. The display is multiplexed using a shift register. In addition, the four buttons are read taking advantage of the transistors switching the comon anodes, requiring only one additional pin. Only the first digit had decimal point, so one led was added for the second dig

Linear lab power supply

This is a dual channel linear lab power supply I have spent recent months building, much thanks to the help received in  this EEVBlog thread . All design files are available in this  GitHub repository . I will attempt to go over the general progress of the project, but please refer to the said thread for more information. Design requirements: Dual isolated channels. Adjustable voltage and current  30 V , 500 mA per channel. Digital voltage and current displays. Build stages: First, the case was made out of a wooden board and 3d printed front and back panels. Heatsinks were taken from old computers. One side of a 2x 10Vac and a 15 Vac transformer power each channel, plus a 12 Vac smaller transformer for the displays, fan and microcontroller. Ac voltages are rectified and filtered on a separate board. Here are some photos of the early development, initial circuit was based on the one found  here . Then came perfboard prototypes, testing and throubleshooting: