Presettable Countdown Timer

Discussion in 'Digital Circuit Design' started by ryan.schweitzer, Nov 11, 2017.

  1. ryan.schweitzer

    Thread Starter New Member

    Nov 11, 2017
    14
    0
    Hello All, I am currently working on a countdown timer circuit that is two digits and counts down every second from 30 to 0 using two 7 segment displays. I am going to use a 555 timer to make it send pulses every second. Along with a BCD to display the numbers onto the displays. The hardest part is finding a circuit layout that will decrement down instead of increment along with being able to preset the value it starts at to 30.

    It has to be completely digital so no PIC chips. I wanted to use jk flip flops but am not sure how to make them count down, but do know how to make them count up. Any help will be much appreciated as I am stumped on how to make this work.
     
  2. dl324

    AAC Fanatic!

    Mar 30, 2015
    7,412
    1,749
    Welcome to AAC!

    Is this homework?
     
  3. ryan.schweitzer

    Thread Starter New Member

    Nov 11, 2017
    14
    0
    This is a project I am working on in a group. My section was to make a counter circuit which I have made, and now to have a 30 second timer count down. I mainly just need to know how to preset a value and how to make it countdown instead of up.
     
  4. dl324

    AAC Fanatic!

    Mar 30, 2015
    7,412
    1,749
    If this is a project for which you will be graded, forum guidelines discourage just giving answers (i.e. cheating).

    Show your work and describe where you're having difficulty and we can try to guide you to a solution.

    You say you've designed the counter circuit, but indicate you need to make it count down. Count up designs aren't necessarily easily converted to down counters.

    You mentioned wanting to use JK flip flops. What restrictions are placed on how you implement the down counter?
     
  5. ryan.schweitzer

    Thread Starter New Member

    Nov 11, 2017
    14
    0
    I understand I cannot just be given answers, I apologize if it came off that way.

    I wanted to use jk flip flops because in my counter circuit I use 4 of them to act like a counter and have the outputs go into a BCD which goes to a 7 seg display. Everytime I hit a pulse it increments by 1 until it reaches 9. I then have the resets tied to a reset circuit with "and" and "nand" gates which will reset the circuit once it gets passed 9. I do not have an issue with this circuit, it counts up into two digits and works like I want it to.

    Sorry for the confusion, but i have two different circuits that I had to make, and the counter circuit was not an issue, it is the countdown. I am not concerned about the timing aspect because I will just use a 555 with the proper resistor and cap values to make it give out pulses every second. I am concerned about how to make a countdown circuit.

    My idea is to use a 4510 bcd up/down counter to preset the values and make it count down. Tell me if I am mistaken, but I was going to use one of these into each 7 seg display (two displays) and preset the binary code 0011 into the first display for the number 3 and 0000 into the second display for the number 0.

    I believe I am just confusing myself thinking about my jk flip flop reset circuit which is when the number gets to 9 to reset that value to 0 because it is the opposite. I am trying to go from 0 back to 9 (9 being the starting spot from the reset). I know I should set up a reset circuit also for this countdown, I am just lost on the right route to take. I appreciate the quick feedback
     
  6. dl324

    AAC Fanatic!

    Mar 30, 2015
    7,412
    1,749
    Should be straightforward with CD4510.

    If you're not using a CMOS version of the 555, you should read the datasheets to see if you'll have any problems with bipolar driving CMOS.
     
    ryan.schweitzer likes this.
  7. 128ITSH

    Member

    Jul 20, 2017
    100
    16
    The CD4510 is the good direction for you, But if you will look closely at the timing diagram in its datasheet you will understand why a reset circuit is redundent here.
     
    ryan.schweitzer likes this.
  8. ryan.schweitzer

    Thread Starter New Member

    Nov 11, 2017
    14
    0
    So I have the countdown working but it goes from 9-0. For the CD4510 it shows that if you have LD=1 you can have a manual input of a binary number for the initial start, but no matter the input I put in, it starts at 9 and counts down to 0. I can upload a screenshot of my circuit so you could see where maybe I went wrong.

    Also, with the reset pin on the CD4510, it states that when the pin reads 1( or voltage) that it will reset, but using the reset circuit I have made when the BCD output is equivalent to 0000 which through the reset circuit I designed will have an output of 1 it will not reset. I have even tried using a pushbutton to give it the high it needs. I appreciate the help, ive already gotten further than pulling my hair out earlier
     
  9. ryan.schweitzer

    Thread Starter New Member

    Nov 11, 2017
    14
    0
    That is my mistake then on the reset of this, I should always look at the datasheet first. Thank you!
     
  10. dl324

    AAC Fanatic!

    Mar 30, 2015
    7,412
    1,749
    Schematics and a description of the problem are required for us to be able to help.
     
  11. ryan.schweitzer

    Thread Starter New Member

    Nov 11, 2017
    14
    0
    So in this schematic, I have it set up so that the reset will see 1 when all outputs are 0's from the 4510. I also have the inputs into the 4510 hooked up so it sees 0011 (3) but it starts at nine everytime. I want it to start at 3 and then count down and once it gets to 0 it will reset back to 3 and go again.
     
  12. dl324

    AAC Fanatic!

    Mar 30, 2015
    7,412
    1,749
    You seem to have posted 3 copies of the same schematic...

    First off, what number are you presetting into the counter? How is the counter supposed to preset to 3 at start up?
     
  13. ryan.schweitzer

    Thread Starter New Member

    Nov 11, 2017
    14
    0
    I am presetting the number 3 into the counter. I am doing that by putting the binary number of 3 (0011) into P1, P2, P3 and P4, ground to the first two inputs and power to the last two to represent that number. Am I doing that wrong?
     
  14. dl324

    AAC Fanatic!

    Mar 30, 2015
    7,412
    1,749
    P1 is the LSB and P4 is the MSB. You're loading 12.
     
  15. ryan.schweitzer

    Thread Starter New Member

    Nov 11, 2017
    14
    0
    I changed the inputs and it still starts at the number 9 no matter the inputs I enter. Is it perhaps the reset tied to the wrong line?
     
  16. dl324

    AAC Fanatic!

    Mar 30, 2015
    7,412
    1,749
    I assume you're doing all of this in Multisim. When I've used that simulator in the past, I had problems with things looking connected, but not actually being connected. I used to have to resort to grabbing components and moving them around to make sure the wires were actually connected.

    Measure the voltages on PE and Reset and compare that with what the datasheet says the counter should do.

    Your circuit will be easier for you and others to troubleshoot if you do a neater schematic. You have a lot of unnecessary wire crossings and jogs on the inverter inputs going to the AND gates.
     
  17. 128ITSH

    Member

    Jul 20, 2017
    100
    16
    Have a read at the first page of the datasheet, It will get you some understanding of how exactly this counter operates.
    For my understanding you want to do the following:
    1.Load 30 to the counter (0011). oh wait - for counting down from 30 you need more than one counter. one counter is only capable of counting from 9 to 0. If you will use two counters you will not need this reset circuit.
    2.Start counting down
    3.when the counters reaches 0, do something.
    Think of how you can implement this with two counters and their carry in/carry out signals. Also check what signal the preset enable will get in your current configuration.
     
    absf likes this.
  18. absf

    Senior Member

    Dec 29, 2010
    1,865
    509
    I follow exactly your same circuit and I got a racing condition (the simulation couldn't start).
    CO only changes from H to L when the counter overflows (9) or underflows (1).

    So I remove your logic for detect output="0000" and tie MR directly to GND and it works displaying 3,2,1,3,2,1,3,2,1....
    Is that what you want?

    4510 count down#2.PNG
     
    dl324 likes this.
  19. ryan.schweitzer

    Thread Starter New Member

    Nov 11, 2017
    14
    0
    Hi so yes essentially that was what I was trying to get. I was making sure I had inputting numbers correct before I added in another counter, because I want it to start at the number 30 and count down to zero. This is my new schematic I have drawn, but no matter the inputs for presets, it starts them both at 9. As you can see, for the first digit, I have 0011 going in so it will output 3. And for the second digit, I have 0000 going in so the output will be 0, hence start at 30. Is something hooked up where its not supposed to be?
     
  20. ryan.schweitzer

    Thread Starter New Member

    Nov 11, 2017
    14
    0
    Hi, so the reason I only had one counter and display was that I was making sure I had inputting numbers correct before I added in another counter, because I want it to start at the number 30 and count down to zero. This is my new schematic I have drawn, but no matter the inputs for presets, it starts them both at 9. As you can see, for the first digit, I have 0011 going in so it will output 3. And for the second digit, I have 0000 going in so the output will be 0, hence start at 30. Is something hooked up where its not supposed to be?
     
Loading...