Peter's electronic projects

Electronic period timer based on PIC

version 1, 2001/07/06
designed by Peter JAKAB

NOTE for beginners: PICs are general purpose microcontrollers which have to be programmed before you can use them in the actual circuit! Check out this link to learn more.

description

This is a simple one-valve irrigation controller made for our greenhouse. The code contains a software real-time clock (RTC) and a multiplexed 8-digit LED display and keyboard you can use in other projects.

software, operation

The operating software is simple, it contains a real-time clock and a day counter. The valve is turned on in regular intervals in the same time. Day setting specifies the number of days between the activations, time setting specifies the time of the day when to start. Duration is the time after which the valve will be turned off.

The source code is freely downloadable. This is written for the PIC16F84, but you can easily adapt it to newer controllers like the 16F628 or OTP versions.

schematic diagram

click to zoom

components

namevalue
DIS0-DIS7common-anode 8x1-digit or 4x2-digit 7-segment LED display
TR1mains transformer, 1x220VAC, 2x12VAC
-24VAC irrigation valve
K112VDC relay. Contacts: >=1A
Q1-Q1010xBC547A or similar NPN bipolar transistor
IC1CD4017N
IC2PIC16F84 or PIC16F84A microcontroller, programmed
IC37805 voltage regulator with heatsink
AC1diode bridge at least 80V/1A
X14MHz crystal
R1, R172x10k
R181k
R19S14K275 varistor
C1, C22x15pF
C3, C42x100nF
C51000uF/25VDC
D1-D44x1N4148
S1-S44xpush buttons
CN1-CN4connector
F1fuse 0.1A T
miscPCB, housing