The LCD would show intermittently while a zone was
active that NO zone was active. After this happened a
while, it would go to the alarm condition as an indication
there was a water flow without an active zone. This was
caused by two things: one was the hardware; the other
was the software.
The hardware issue was spikes every 8. 3 ms from the
opto-isolators output transistors starting to turn off when
the 24 VAC inputs crossed zero volts. These spikes would
reach above the level for a logic low on the PIC16F1829
input and the software would see this as an inactive zone,
intermittently. The zero crossing AC voltage caused the
voltage across the LEDs inside the opto-isolators to drop
below the diode voltage of . 7 volts, causing the transistor
to begin turning off. The spikes are shown in Photo 7 and
eliminated with .1 µF capacitors on the opto-isolator
outputs in Photo 8.
The software issue was that anytime a zone input was
sampled at the same time one of the spikes occurred, it
was treated as flow with no active zone condition and an
alarm countdown counter was decremented. After this
happened several times, the alarm countdown counter
would reach zero causing an alarm condition. This was
corrected by resetting the alarm countdown counter to its
default beginning value whenever the software checked
September 2017 23
■ PHOTO 12.
Enclosure buttons
before filling with
epoxy, and after. I
used a drill bit by
hand to remove
some of the epoxy
until buttons
would activate
switches without
getting stuck.
■ PHOTO 13. Enclosure cutouts for connector wire
access. Be sure to avoid the tabs that hold the two
parts together.
■ PHOTO 11. View of the switch installation. The
switches should sit off the PCB and be of equal
height. Note the use of a socket for the relay in case
it must be replaced; this is optional. The Sonalert and
P3 terminal block are also mounted on the back of
the PCB.
■ PHOTO 9. Resistors and diodes installed, and a view
of the blank PCB.
■ PHOTO 10. Completed assembly except for the LCD
display. Note the trimmer pot is not correct. The pads
were not correct, so an alternate part was used for
testing. A revision to the PCB will be made to correct
for this, and the display will be moved down just a bit
for better location in the enclosure window.