Wednesday, November 18, 2015

Programmable Digital Seven Segment Timer Circuit - 16F628

Programmable Digital Timer Circuit
Seven Segment Timer


A timer is a specialized type of clock for measuring time intervals. By function, timers can be categorized to two main types. Those are Counts upwards and counts downward.

Timers originally designed to fulfill a need in industry for a means of keeping time on certain devices. Originally, these timers were mechanical devices and used clockwork mechanisms as a means of keeping a regular time. The invention of two electromechanical timer designs allowed for more precise time measurement. The first uses the principle of heat expansion to increase the temperature of a metal finger made of two different metals with differing rates of thermal expansion. As electric current flows through the metal, it begins to heat and one side expands more quickly than the other does, which in turn, moves the electrical contact away from an electrical switch contact. The second uses a small AC motor, which turns at a predetermined rate due to the application of an alternating current.

Finally, digital timers invented. Digital logic circuits are now so cheap that it has become a better investment to buy a digital timer than a mechanical or electromechanical timer. Individual timers implemented with single chip circuits.

This is a very simple adjustable digital timer circuit based on the PIC16F628A microcontroller and it can be programmed to schedule the on and off operation of an electrical appliance. This timer consists of three parts: power supply, control circuit and display. Working voltage of the circuit is 5v - 12v. It depends on the relay voltage. If you use 5v relay then you can omitted the LM7805 regulator IC and apply 5v directly. Otherwise, you have to use regulator IC and apply suitable voltage according to the relay voltage. The schematic is very simple and accurate of the circuit is very good. PIC use its internal oscillator.

Programmable Digital SSD Timer Circuit - PIC16F628A
Programmable Digital Timer Schematic


There are two versions of hex file are available. Those are "4dg_tmr_min.hex" and "4dg_tmr_hr.hex". The first file for the minute timer. It display minutes and seconds. Adjustable time is 1 second to 60 minutes. Other hex file for hourly timer and its adjustable time is 1 minute to 24 hours. This will display hours and minutes on the seven segments.

Configuration

If the time runs too fast or too slow, you can able to adjust the speed by changing the value of Eeprom address 0. Default value is 44 (0x2c). Typical value is 59 (0x3B). Maximum is 255 (0xFF). In repeat mode delay time before restart the timer, determine by value of Eeprom address 3. Default value is 10 (0x0A). Maximum is 255 (0xFF). See below picture for more details.

Programmable Digital Timer Circuit configuration
Eeprom Configuration

Operation of the timer

This circuit uses 5 push buttons to control the their functions.
  • START/PAUSE: When the timer is on, the device is in pause condition even the switch was in closed position. Pressing this button, you can switch between the start and pause timer.
  • FOR/BACKWARD: This allows you to select counter mode. Either upwards or count down.
  • REPEAT: When the timer reaches 00:00, it starts again from previous value you set.
  • LEFT/RIGHT: This allows you to change values on display. The selected digit is incremented by pressing those buttons and values on the display are stored to the Eeprom.

Now connect device you want to operate, through the relay. Set the desired time using left and right buttons and press start. When the timer reaches 00:00, relay will activate.

Posted By :

Please Note: All contents provided on this blog are for non-commercial purposes only.
Any question..? Feel Free to Ask!

Drop your Comments below. Please report broken links to here
  1. Had sir how to download in hex fil

    ReplyDelete
    Replies
    1. hai sir how to configer bit in pic16f628 pls help me

      Delete
    2. You do not need to set configuration bits. It is already configured. just open hex file and write it to the PIC.

      Delete
  2. Download button not active. Please sand hex file to my email : sugganda1970@gmail.com

    ReplyDelete
  3. Hello,Do you have this project in C code

    ReplyDelete
  4. He sir thank for this project I love to build it can you please send me the whole files thank you hope to hear from you son

    ReplyDelete
  5. Thank you sir please answer this question forme so this circuit can be repeated over and over if i set the time?

    ReplyDelete
    Replies
    1. Yes, you can use 'repeat' switch for that

      Delete
    2. Please send me 4dg.tmr-min-hex
      My gmail is vilavanal@gmail.com

      Delete
  6. Thank you sir for replayd me but one I'm confused this pic16f628 you did not put crystal in the circuit can I put a crystal or not if yes plz what crystal it should be using or I should build it as it is and leave the crystal? Thank you hope to hear from you soon

    ReplyDelete
    Replies
    1. PIC use it's internal oscillator. so you can build it as it is and leave the crystal

      Delete
  7. OK thank you sir I'm glad for your assistance

    ReplyDelete
  8. Hi sir plz I have build the circuit but it not working nothing is displayed in the 4digits 7segment please help because I really need your circuit thank you hope to hear from you soon

    ReplyDelete
  9. Hi sir plz I have build the circuit but it not working nothing is displayed in the 4digits 7segment please help because I really need your circuit thank you hope to hear from you soon

    ReplyDelete
  10. Hi sir plz I have build the circuit but it not working nothing is displayed in the 4digits 7segment please help because I really need your circuit thank you hope to hear from you soon

    ReplyDelete
  11. Hi sir plz I have build the circuit but it not working nothing is displayed in the 4digits 7segment please help because I really need your circuit thank you hope to hear from you soon

    ReplyDelete
    Replies
    1. Connect LED between SSD a (pin 6) and collector of transistor (Q2) if it is on then Check the polarity of SSD. you need common cathode type.

      Delete
  12. Please what is the number of the ic u2 u3 u4 and u5?

    ReplyDelete
  13. Please what is the number of the ic u2 u3 u4 and u5?

    ReplyDelete
    Replies
    1. Its only for Proteus simulation and should replace with transistors. Please refer diagram

      Delete
  14. Hello sir plz this circuit is working circuit have tested because I tried but it didn't work I can't see ssd what is this pin number in the circuit?

    ReplyDelete

  15. Hello sir plz this circuit is working circuit have tested because I tried but it didn't work I can't see ssd what is this pin number in the circuit?

    ReplyDelete

  16. Hello sir plz this circuit is working circuit have tested because I tried but it didn't work I can't see ssd what is this pin number in the circuit?

    ReplyDelete
  17. very nice blog by you!
    I need it with some modification. Hope you will help me.
    Second I need a circuit which will need the following paramters.

    1. Run the motor/load after specific interval e.g after each hour.
    2. Motor should run off when there motor is not supplying water in upper tank (means dry run protection in upper tank.)
    3. If upper tank is full,motor should not run.
    4. If there is high or low voltages from a certain voltages than motor should not run.
    5. If there is power failure during startup, than motor should start after delaying some certain time when power restores(delay startup).

    ReplyDelete
    Replies
    1. It is difficult to modified this, but you can use power guard circuit along with this and water level circuit.

      Delete
    2. Very nice ckt. But i cant dowen lod hex file. Please send to me

      Delete
    3. Visit this link to download >> http://tiny.cc/4ssd_prg_tmr

      Delete
  18. proteous file not opening
    give the pcb layout

    ReplyDelete
    Replies
    1. Try downloading latest proteus setup. Pcb not designed for this.

      Delete
  19. Can I use a PIC16F628 insted of pic16F628A

    ReplyDelete
    Replies
    1. I think so. But please refer device datasheet first.

      Delete
  20. This circuit does not work as explained,,

    The Timer only can count down or up , there is no way to program it to switch on and then of,, and visa versa..

    So this is just a basic count own timer,

    What a wast of time...

    ReplyDelete
  21. First read the description and then run and look at proteus simulation. your time will be saved.

    ReplyDelete
  22. What do you mean , how do I let the timer program on for (x) minutes and off for (y) minutes .. I buildt the circuit and does work but not to how it is suppose to work..

    ReplyDelete
    Replies
    1. It is not that kind of timer.

      "Now connect device you want to operate, through the relay. Set the desired time using left and right buttons and press start. When the timer reaches 00:00, relay will activate."

      You need on and off timer. If you already build this circuit, then I can send new code for you. Send your email address to me.

      Delete
  23. Hi Thanks Yes I want on / off Timer...
    I already build the circuit and works but I need on/off

    My Email address is shaargerber@gmail.com

    Thanks

    ReplyDelete
  24. Can you please send me the Code.? For the Timer to be programmed for on/off operation..

    ReplyDelete
  25. pleas send me source code.mail- bithine@gmail.com

    ReplyDelete
  26. pleas sir i want source code for practice

    ReplyDelete
    Replies
    1. I will send it, if found. Because it's very old project

      Delete
  27. Prosím pšlete hex Děkuji
    ok2plc@seznam.cz

    ReplyDelete
  28. Yours is a very nice construction, I would like to make it but the program does not download.. if you can send it danykas69@gmail.com thank you..

    ReplyDelete

 

on line

Labels

Recent comment

Visitors

Free counters!
Copyright © 2012 - Scorpionz™.,All rights reserved | Powered by Blogger