A DIY Timer/Scheduler and temperature controller using PIC16F876A
Introduction
A timer is useful in any task that requires a specific time
or a duration that the target device will turn on and off. It is easily found at low price. For electronic hobbyists, a timer can easily be created using a typical timer IC NE555 with other dozen of components.
Here I design a timer using a small microcontroller - PIC16F876A. It's suitable to handle timing setting, displaying, controlling, and scheduling.
Main menu of this timer
This timer can handle the following tasks:
Main menu - displaying date/time, and temperature
Date/Time setting
Short 16 hours timer
Temperature setting for an output relay
Scheduling daily on time of timer relay
Day of Week Adjust
Time Adjust
Date Adjust
Short timer up to 16 hours
Temperature Adjusting for output relay
Daily On Time Adjusting
Design
Firmware
I use MicroC Pro PIC to program this device. The operation of this device become abnormal whenever I try to add more function in C source code. So I tried to optimize, reduce, and test this project as much as I can to make the operation more stable.
Listing below is the source code for v1.2 of this project.
#include "board.h"
void main(){
LCD_Set();
DS1307_Init();
T_Init();
TMR0_SETUP();
SCH_READ();
while(1){
Menu_Scan();
Selector();
SCH_RUN();
}
}
We can only see a dozen lines of code, as they are separated in different files. Click here to download firmware and design file.
Hardware
I designed this project using Proteus 8. This program also allow us to simulate.
Schematic
Circuit board is very simple. It can be made using toner transfer method.
No comments:
Post a Comment