Tag Archives: programmable relay


Programmable relay switch using PIC MCU (revised version)

PIC

Programmable relays are key elements in numerous automation applications such as automatic street light control, watering and pump control, HVAC, home automation, power plants automation in industries, etc. This article describes a DIY programmable relay switch using PIC16F1847 (PIC16F628A can also be used) microcontroller. It is a revised version of my previous PIC-based relay timer project with added features and some improvements in the circuit design part. Like my previous version, it also allows you to set both ON and OFF times. The maximum time interval that you can set for ON and OFF operations is 99 hours and 59 minutes. The new version features cyclic option, which means you can choose to run it in a continuous loop of ON and OFF cycles. The timer can be programmed through 4 push switches. The programming menu, relay status (ON or OFF), and number of cycles completed are displayed on a 16×2 character LCD. The timing resolution of this relay timer is 1 minute. The timer also saves the previously-set ON/OFF times and the cyclic option in its internal EEPROM so that it can retain these values after any power supply interrupt. The firmware for this project is provided for both PIC16F1847 and PIC16F628A microcontrollers.

PIC

Programmable relay timer switch

Here are the summary of the features that this programmable relay switch has:

  • On-board +5V voltage regulator (operates at 9-15V DC input)
  • OFF and ON time setup for the relay operation
  • Option for cyclic run (maximum 100 cycles, after which the timer stops automatically)
  • Stores ON/OFF times and Cyclic option from previous setup into internal EEPROM
  • ON/OFF timing range: 0 to 99 hours and 59 minutes with 1 min resolution
  • Interactive user interface using 4 tact switches and a character LCD
  • On-board buzzer alarm
Read more