Connect with us

countdown timer

Discussion in 'General Electronics Discussion' started by Jimbob96, Feb 2, 2015.

Scroll to continue with content
  1. Jimbob96

    Jimbob96

    13
    3
    Nov 27, 2014
    I have built a countdown timer using 4510 chips that counts down from 30 - 0 when a button is pressed. The only problem is that the countdown starts on 0 and goes to 30 when the button is pressed. I need it to start on 30 and then when the button is pressed I need it to start counting down. I have attached a picture of my circuit diagram so far. Any suggestions?
     

    Attached Files:

  2. Merlin3189

    Merlin3189

    250
    69
    Aug 4, 2011
    I'm looking at this, but I can't quite make out the pin designations on your diagram.
     
  3. Jimbob96

    Jimbob96

    13
    3
    Nov 27, 2014
    don't know if that is any better
     

    Attached Files:

  4. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,270
    Nov 28, 2011
    You need to use the preset inputs. That's what they're there for. Set them for 30 and put an RC circuit on the preset enable input (pin 1) to preset the counters at power-up or on reset.
     
  5. Jimbob96

    Jimbob96

    13
    3
    Nov 27, 2014
    are you able to draw me a circuit diagram as i am not sure what you mean
     
  6. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,270
    Nov 28, 2011
    OK. Can you repost your schematic with higher resolution, with pin numbers shown on the ICs, and a white background, so I can annotate it.
     
  7. Jimbob96

    Jimbob96

    13
    3
    Nov 27, 2014
    this is as best as i can get it
     

    Attached Files:

    • 2.pdf
      File size:
      169.9 KB
      Views:
      100
  8. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,270
    Nov 28, 2011
    OK, try this.
    • Change R13 from 220Ω to 100kΩ
    • Add a 0.1 µF capacitor across SW1
     
  9. Jimbob96

    Jimbob96

    13
    3
    Nov 27, 2014
    I've tried your solution and it starts on 30 when the power supply is turned on, but does not wait for the button to be pressed before counting down
     
  10. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,270
    Nov 28, 2011
    Yes, you're right. So can you confirm that the behaviour you want is:
    • On power-up the count indicates 30 but does not count down
    • When the button is pressed, the countdown starts
    • When the count reaches 00, it stops
    That's not an easy change; it will probably require another IC.

    I will draw up a new schematic once you've confirmed the behaviour you want.
     
  11. Jimbob96

    Jimbob96

    13
    3
    Nov 27, 2014
    yes thats what it to do, sorry if i was unclear before
     
  12. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,270
    Nov 28, 2011
    OK, here's my redesign. A lot of it is the same but I've changed how the preset and clear inputs of the 4510s are driven. IC6, the 4081 (or is it IC7, the 74LS08?) is no longer needed, and I've added a 4013 dual D flip-flop.

    272533.001.GIF

    I'll only describe the changes here. On power-up, CR and RR produce a positive pulse to the SET input of IC6A so it starts up with its Q output high. This holds IC6B reset and holds the preset enable inputs (pin 1) of the counters active, forcing them to load 30 into their counters.

    While IC6A is high, its Q-bar output is low; D5 keeps C1 discharged. This is an optional feature, to ensure that the oscillator starts counting after a fixed time relative to when the START button is pressed. If you don't want that feature, omit DS; in that case, the oscillator will run all the time, and depending on when you push the START button in relation to the oscillator cycle, the first down-count will occur between zero and one second after you press the button.

    When you press SW1, the START button, a low level (from the D input) is clocked into IC6A so its Q output goes low. SW1 doesn't require debouncing because it doesn't matter if a low level is clocked into the flip-flop multiple times. When its Q output goes low, the counters are allowed to count downwards, which they do as originally designed; these counters have synchronous outputs and carry outputs which are designed for cascading. The count on the LED displays counts down from 30, and IC6B is no longer held reset.

    Once the count reaches 00, on the next clock pulse, IC3's output pattern changes from 0000 to 1001, i.e. Q3 goes high. This sets IC6B whose Q output goes high, holding IC2 and IC3 reset. IC6B's Q-bar output on pin 12 can be used as an external signal to indicate when the counter has stopped; it is high during counting and goes low at the end of the count (after 00 has been displayed and the next clock pulse occurs).

    The circuit remains in this state until the RESET button, SW2, is pressed. When this occurs, IC6A is set. This resets IC6B and removes the reset condition to IC2 and IC3, and asserts the preset condition, loading the count with 30 again and disabling the counter if DS is present. When the START button SW1 is pressed, counting starts again as described.

    I've done a mental walk-through of this logic but I don't have a logic simulator I can use to test it, so there may be a fault in the logic. If you can simulate it before you build it, please do, and let me know if you find any problems.

    As in your original schematic, the power pins and decoupling capacitors are not shown on the diagram, but are, of course, required.
     
  13. Jimbob96

    Jimbob96

    13
    3
    Nov 27, 2014
    Thank you very much, I simulated this circuit in a piece of software and at first it wasn't working, but after looking at the circuit for a while I took out the diode between the astable and IC6A and it now works perfectly!!! Thank you very much, I really appreciate the time and effort that you have put into finding a solution for me
     
  14. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,270
    Nov 28, 2011
    No problem :)

    When you build it, try adding that diode back in. I can't see why it wouldn't work in the simulation and I would like to know whether it works in the real world.
     
  15. Jimbob96

    Jimbob96

    13
    3
    Nov 27, 2014
    yeah okay i'll try it and let you know, thanks again
     
    KrisBlueNZ likes this.
  16. Jimbob96

    Jimbob96

    13
    3
    Nov 27, 2014
    Hi just thought id let you know that i built the circuit today and it worked perfectly. I actually added another countdown timer like this to count from 50 to 0. i made a logic system that starts this countdown when the first one finishes, after the second countdown timer finishes i then made another logic system that reset the while circuit. Again thank you so much for your help
     

    Attached Files:

    • 1.jpg
      1.jpg
      File size:
      327.6 KB
      Views:
      120
    KrisBlueNZ likes this.
  17. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,270
    Nov 28, 2011
    Very cool! Nice work :)
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-