2 or 4 digit timer

Discussion in 'The Projects Forum' started by brmarcum01, Nov 1, 2011.

  1. brmarcum01

    Thread Starter New Member

    Oct 19, 2011
    4
    0
    Is there any way to make a 4 digit (mm:ss) countdown timer w/o using a PIC? I need to countdown 60-90 mins and have a buzzer go off when it reaches 0 and I would be happy for 2 digit (mm) display. I have no experience w/ PICs nor do I have the money to invest in learning at this time. Unfortunately, all of the designs I have seen either use a PIC or they use some type of 555 circuit but w/o a display. Any ideas?
     
  2. crutschow

    Expert

    Mar 14, 2008
    12,977
    3,220
    You can use a decade up/down counter that can directly drive a 7-segment display such as a CD40110 (one counter for each digit).

    A two digit (minute) display is relatively simple. You just need two counters and a 1 minute clock generator.

    For four digits you need to automatically load the seconds counter with a 59 each time it rolls over from zero (so it counts 60 seconds). For that you would need a 1 second clock generator.

    You also need a way to parallel load the desired number of minutes into the counter before the countdown starts. How do you plan on entering the number?
     
  3. MMcLaren

    Well-Known Member

    Feb 14, 2010
    759
    116
    Money shouldn't be a deterrent now days when you can get a complete TI MSP430 LaunchPad development system and software for a modest investment of $4.30 (plus shipping). We've got to get Bill into one of these so that he no longer has an excuse for not learning about microcontrollers (grin)...

    There are plenty of chaps here who can help you get over some of the hurdles you're likely to encounter.

    Cheerful regards, Mike

    [​IMG]
     
  4. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    I just did a 60 second countdown timer using only discrete logic (no microcontroler).

    If you need a countdown timer, you can use the CD40110, but as crutschow eluded to, there is no real good way to preset the CD40110. You could add buttons and set it manually everytime like you would with a bedside alarm clock. This can be tedious and then you'd probably want to add an auto-counter so you could hold the button down and have it increment automatically, but this requires an additional circuit.

    I'd recommend using a CD4510 and CD4511. The CD4510 can be preset using a DIP switch or if you want to make it easy you can use a BCD rotary switch (cost more though). You need a pair of these for each digit, thus two pairs for two digit or four pairs for four digit. You preset each digit individually. The nice thing about these ICs is the preset feature allows you to reset to that value any time you want. Let's say you want to countdown from 60 multiple times. Set the presets using a DIP or BCD switch once and press the reset button going to the CD4510. Once you've set the preset values, the display will return to 60 everytime you press the reset button, even in the middle of a countdown if you choose.

    The fun comes in when you want to stop the counter from counting. I did this by feeding the outputs of all the CD4510s into a NOR gate. Once all the outputs were zero, the NOR gate outputs a high signal which I used to stop the clock signal. That way, when 00 is reached, the clock is disabled and the display remains locked on zero until reset is pressed. You can also use the output from the NOR gate to turn a buzzer on. You can use a CD4078 NOR gate which accepts up to 8 inputs. One CD4078 is needed per pair of digits. Thus, for two digits, you need one CD4078. For three or more digits, you need a CD4078 per pair of digits plus an AND gate with enough inputs to match the total number of CD4078s used. The output of the AND gate is then fed to the clock reset and buzzer.

    I used the top half of Bill's one-second clock generator to feed my timer: http://forum.allaboutcircuits.com/showpost.php?p=374112&postcount=12.

    If you need to pause the timer or you want to reset the timer but don't want it to start counting down immediately, you can add a toggle or latching push button switch between the clock output and the CD4510 input.

    If you're going to make or use a large display (bigger than say 0.8" high digits), you'll also need transistors or MOSFETs to handle the current requirements. They go between the CD4511 output and the 7-segment digits.

    Good luck!
     
  5. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234
  6. crutschow

    Expert

    Mar 14, 2008
    12,977
    3,220
    Don't understand why you say you need a pair of BCD rotary switches for each digit(?). You only need one. BCD goes from 0 through 9.
     
  7. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Carl, I meant a pair of CD4510 and CD4511 ICs, not a pair of BCD switches, although I can see where my wording might infer otherwise.
     
  8. brmarcum01

    Thread Starter New Member

    Oct 19, 2011
    4
    0
    I don't have any specific plans for inputting the numbers. elec_mech mentioned a BCD rotary switch? Would this be like dialing in the number, which would show on the display, and then I hit start?
     
  9. brmarcum01

    Thread Starter New Member

    Oct 19, 2011
    4
    0
    Also, I assume a clock generator sends a pulse/signal at the desired time interval (1 min or 1 sec). How are they built?
     
  10. Wendy

    Moderator

    Mar 24, 2008
    20,764
    2,534
    I'm thinking of designing a similar project, only 2 or 3 minutes count down. I would be using chips similar to a 74192 or their CMOS equivalents. Unless it has to be finisned in the next week I have something drawn in a month or so.

    Ideas for something like Crystal Oscillators can be lifted from here...

    Digital clocks
     
  11. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Yes and no. BCD counters with preset have four inputs, A-D, that represent the binary-coded decimal equivalent of the number you want. Hence,

    #-DCBA
    0-0000
    1-0001
    2-0010
    3-0011
    4-0100
    5-0101
    6-0110
    7-0111
    8-1000
    9-1001

    So, ideally, you put a pull-down resistor on each of these four inputs and a switch connected to Vcc. In this way, if the switch is flipped on, that bit is high or 1. If the switch is flipped off, that bit is low or 0.

    You can add a DIP switch which is fairly inexpensive, typically under a $1 for a 4-position switch, but then you need to know BCD code to set each digit as shown above. Alternately, you can use a rotary BCD switch, a quick search yields about $4 or more for one, which has a dial from 0 to 9 and sets all four bits simultaneously.

    Now, whether you go with a DIP or rotary BCD switch, the digits will not automatically be displayed. After you select your value, you have to briefly toggle a load input on the IC, usually done with a momentary switch. This tells the IC to "load" and hence display the selected value. If you want, you can add a toggle or sliding switch (any latching switch) and have the user flip this switch first, then enter the desired value so it will be displayed as the user sets it. Or stick with a momentary and have the user press and hold it down while entering values to display them in real time.

    Check out post #12 of Bill's link. I used the top half of his schematic for my 1 Hz/1 second clock signal.
     
Loading...