Simple Dual State Pressure Alarm Monitors Water and Air 

 

I have a shallow drain in my laundry room that is shared by the kitchen.

A laundry tub somewhat regulates the flow from the washer but periodically the drain gets jammed up with stuff from either the kitchen disposal or laundry discharge ‘goop’.

Either way you know you’re in trouble when the water backs up onto the laundry room floor.

 

While water monitors can be simple things I wanted to be able to provide a bit more warning. Following a rather unpleasant laundry room crisis, I wanted to build something that gave me a clue that the drain was ‘getting’ clogged, before I got to the ‘water all over the place’ situation.

 

This application uses an inexpensive sensor and minimal parts and footprint to provide a 2 point,  settable, pressure alarm, at a total cost of under 12$. In this application, a sensor tube would be inserted through the floor drain plug and the trip settings to be set for ~1 and 5 inches of water.

 

Referring to the schematic, the FreeScale, MPCX2010 sensor, is a differential, ported, gauge sensor. The scaling amplifiers use a LM324 quad op-amp and the detector is a LM1541.  Although all the active parts, including the regulator, are available in surface mount I have used socketed 8 and 14 pin dual in-line ICs and the more traditional TO-92 parts. Assemblied on a common .1” center perf with solder pads on a single side passive resistors pots and caps are also through hole mounted.

 

Schematic Figure 1

In the past I had published an alarm controller, EDN, Design Ideas, January 15, 1998, which modulated a pies-ceramic wafer.

I have modified it for this application to provide both a periodic chirp for that first level, 1 inch, trip and a continuous warble for a second, 5 inch, alarm trip. The newly coded alarm controller was then re-compiled for Microchip’s 10F200 controller. Several Microchip controllers can be used including the 10F204 and 12F508. These are small and inexpensive controllers. The code, provided below, should run in any of these.

 

I have used a 1.45 psi sensor, scaled in half to detect, full scale, 5 inches of water. Similarly packaged sensors, from FreeScale, for this application include a 7.25, 14.5 and 29 pK sensor. Conversion between pK, PSI and inches of water can be simply done, on-line at:        

 

                                                   http://www.sensotec.com/convert.shtml

                                                                                                                                       

Shown below, the circuit card was mounted in a small plastic box.

 

                     

 

 

The alarm and sensor were mounted on 1 side while the socketed ICs and discrete parts were mounted on the other side.

 

 

                       

 

 

Layout is not particularly critical. Referring to the figures and schematic above, the assembled gadget uses 2 inexpensive PC mounted pots to set both the first and second level trips. 

Diodes D1 and D2 provide isolation and the battery, B1, backup and a common 9 volt, wall based supply, PWin. The hardware consumes ~4ma.

 

                

                                                                         

 

As shown in the figure, I modified a drain plug to accommodate a ¼” tube. The inside diameter had to be large enough to prohibit a water-drop from sealing the tube. This tube is then routed to the circuit and interfaced to the smaller tube which then fits over the pressure sensor port. Shown the figure these interfaces must be air tight. In my application I used a small 3/16th OD plastic tube at the sensor and inserted that into about a 5 foot length of 1/4 OD plastic tube.

            

                                        

Sensor Alarm with Modified Drain Plug

 

The procedure, to set the alarm, begins by applying power and inserting the open end of the tube into a jar or container with the maximum depth of water to be alarmed. The 100 ohm pot, shown in the figure, is then adjusted until it warbles. The tube is then completely pulled out of the water and then returned to the level of water desired for the second alarm trip. The 2nd pot, 10K ohms, is then adjusted until it chirps. The trip repeatability is pretty good although I found that hot water with reduced the trip depth about half an inch.

 

This works well for monitoring that laundry room drain, although the same assembly could be used for other water related applications, such as tub or hot tub level alarms.  

 

Using a pressure based alarm allows the same gadget to be used for other applications.

 

 

By tying off the end of the tube and setting the trips to monitor to the pressure in this sealed tube, this application will alarm when the tube is compressed, when stepped on or driven over, like might be used for a garage parking or security sensor.

 

By connecting the open tube to a funnel I was also able to alarm for air speed collected in the funnel’s open end.

 

 

 

 

 

 

 

 

 

 

Two point alarm of wind speed

 

The included controller code can be compiled into a 12F509 or 10F200, 10F 202, 10F 204 or 10F 206 controllers. These controllers need their WDT disabled, operation for 4MHz, configured as an undedicated pin and for internal reset.

 

 

; alarmT_pressure.asm     

Gadget Freaks;

GPIO      equ 6  ;

STATUS    equ 3  ; Last mod 07-16-07 *

PC        equ 2

#define   ZERO    STATUS,2

#define   outa    GPIO,0 ;

#define   outb    GPIO,1 ;

#define   modea   GPIO,2 ;

#define   modeb   GPIO,3 ;  input only for F2xx

bits      equ 12

temp      equ 13

dwell     equ 14 ; cycles

count     equ 15 ; delay

steps     equ 16 ; dwell

cnth      equ 17

cntl      equ 10

temp1     equ 11

#define   timeout .50

#define   flag     bits,1

resetvec  org 0

  movlw   0D0    ; 1101 0000

  OPTION

  movlw   0xF7

  movwf   7     ; compare disabled

  movlw   0xC   ; 1100

  movwf   GPIO  ; set I/O direction

  tris    GPIO

; qualify enables and re-test mode inputs

top1

  bcf     flag

  clrf    cntl 

  clrf    cnth

;

top

mode           ; evaluate mode

  rrf     GPIO,w

  movwf   temp1

  rrf     temp1,w

  andlw   3

  addwf   PC

  goto    mode3 ; siren

  goto    mode1 ; dual chirp

  goto    modeother   ; disable via mode pins

;

; ******************** siren *****************

modeother

  movlw   0xC

  movwf   GPIO

  goto    top

mode3     ; (init) siren

i1

  movlw   37

  movwf   count

  movlw   6

  movwf   steps

i2

  movlw   .64

  movwf   dwell

alarm1

  call    alarm1_set

  call    alarm1_clr

out1

  decfsz  dwell

  goto    alarm1

  movlw   .5

  subwf   count

  decfsz  steps

  goto    i2        ; reload dwell

  movlw   0xFC

  andwf   GPIO

  goto    top1

; ************************ Duel chirp ***********

modeLh

  decfsz  temp 

  goto    modeLh

modeLg

  movlw   timeout

  movwf   temp

  decfsz  cntl   ; shooting for 7-10 seconds

  goto    modeLh

  decfsz  cnth 

  goto    modeLh

  bcf     flag

  goto    top

;

mode1     ; init chirp *

  btfsc   flag

  goto    modeLh

  clrf    cnth ; init delay

  clrf    cntl

mode1e

  movlw   timeout

  movwf   temp

  bsf     flag

  movlw   35   ; schedule 2 chirps

  movwf   count

  movlw   1

  movwf   cnth

  clrf    cntl

mode1a

  call    alarm1_set  ; set 1st pulse

  call    alarm1_clr

  decfsz  cntl

  goto    mode1a

  decfsz  cnth

  goto    mode1a

  movlw   .200         ; begin pause

  movwf   cnth         ; ~6*199*255us

  clrf    cntl

mode1b

  nop

  nop

  nop

  decfsz  cntl

  goto    mode1b

  decfsz  cnth

  goto    mode1b

  movlw   1            ; set second pulse

  movwf   cnth

mode1c

  call    alarm1_set

  call    alarm1_clr

  decfsz  cntl

  goto    mode1c

  decfsz  cnth

  goto    mode1c

  movlw   0xFC

  andwf   GPIO

  goto    top

; *******************************************

alarm1_set

  movlw   0xE      ; 1110

  movwf   GPIO

alarm1_clr

  movfw   count   ; set for *4 to define pulse frequency

  movwf   temp

dec2              ; 4*temp*1us=240us or ~2Khz

  nop

  decfsz  temp

  goto    dec2

  movlw   0xD         ; 1101

  movwf   GPIO  

  retlw   0

; **************************************

  end