Wet floor siren

We fill buckets of water for the fish tank and it takes a long time so I leave the water running and do something else.   There's always a risk of water on the floor.   I built a simple alarm to detect that.   The "sensor" is basically two wires laying on the floor, and it detects a few microamps of current between them.  Dry floors don't conduct.   Wet floor (our hard water)  conducts a little.

My first attempt was a failure.  I used an aspirin tablet clamped between two thumbtacks, connected to a buzzer.   It worked, but you have to replace the aspirin every time and it's not as water soluble as I had hoped.   And when the buzzer was drawing current, the chemical reaction destroyed the thumbtacks amazingly fast.   Clearly, a system with no consumable parts was needed.

Design requirements, completely arbitrary:

  • Use parts on hand only. It's a one-off, for fun, not a consumer product.
  • Loud, distinctive alarm, you can hear it over the TV or stereo.
  • Very low idle current.  Months or years of unattended battery life.
  • Cutoff switch.
  • Built in battery tester.
  • Output for altering DIY home automation Raspberry Pi or Arduino


The "sensor" is a couple of uninsulated wires laying on the floor near each other, or a couple of pins clipped to the top of the fish water bucket.

I built the thing on an ugly perf board in a box from some Maker Faire project that happened to have a speaker hole.   It worked for a couple of years then got flaky and corroded.   Time to build it better, on a printed circuit board.  

It's a weird hybrid of analog and digital techniques.    When the floor is wet, the electrical resistance  "sensor" develops a voltage across a resistor (R6) which switches a MOSFET (Q1) on.   The MOSFET powers a set of three oscillators implemented in a CMOS hex inverter with hysteresis.   The hex inverter, six logical inverters in a package, is a vintage device from the 1970s, still in production, CD40106.   The first two oscillators modulate the third by periodically grounding its RC node through a diode.   The result is a pulse train representing a strange honking sound.   The "audio" signal drives a higher power MOSFET that drives a speaker.   In the idle state, the oscillators are not running and the big MOSFET is off, so battery drain is in the nanoamperes.   In the active state, it's loud and drains its rechargeable 9V battery in about half an hour.   

Schematic PDF 

Front view of the board design as rendered by KiCad.   Since this was a one-off, I decided to see if rendering a photo in "silk screen" paint (on the "legend" layer) would work.


Rear view.  The QR code image was generated by a "footprint wizard" that's part of the Pcbnew package in KiCad.







Comments

Popular posts from this blog

Software product web sites suck.

Broke a pin off my ATmega328-PU. Should I buy one with bootloader pre-burnt?