One drawback from using this approach is it will not
stop the water flow if there is an irrigation valve failure.
Another approach would be to add an irrigation valve
that’s controlled by the Irrigation Watch’s relay that would
shut off all water to the system if there is an alarm
condition.
This project includes several interesting ideas such as
the control of a 16 character by two line LCD display, an
innovative approach to detecting three input key switches
with only two I/O pins, and the interfacing of four 24 VAC
signals from the irrigation control unit.
The project is built around the PIC16F1829,
programmed using their MPLAB X IDE, XC8 C language
complier in free mode and the MPLAB Code Configurator.
Source code, software listings, and Gerber files are all
available at the article link.
Hardware
The schematic for the Irrigation Watch is shown in
Figure 1. Port A of the PIC16F1829 is dedicated to in-circuit programming, reset and programming voltages,
Notice the use of opto-isolators to interface the
PIC16F1829 with the 24 VAC signals from the X-Core unit
to the irrigation system water valves. Port pins RB4
through RB7 are configured with weak pull-ups for the
open collectors of the LTV-814 opto-isolators. Using
available PIC16F1829 features like weak pull-ups reduces
the need for external resistor components, saving expense
and printed circuit board (PCB) real estate. Port C of the
PIC16F1829 provides control of the LCD display.
The LCD display and three user key switch inputs
provide all the needed user control of the Irrigation Watch
functions. The three user key switches provide ‘Left,’
‘Right,’ and ‘Enter’ inputs to the PIC16F1829. Port A pins
RA0 and RA1 are (like the port B inputs) configured as
inputs with weak pull-ups.
The Left switch is connected to pin RA0, while the
Right switch is connected to RA1. The Enter switch is
September 2017 19
Post comments on this article and find any associated files and/or downloads at
www.nutsvolts.com/magazine/issue/2017/09.
■ FIGURE 1.