Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Digital Clock Project

  1. May 6, 2013 #1

    So my current project is to make a digital clock using primarily the 7490 IC. Which, (to those not familiar) is just a decade counter that outputs a 4 bit binary number.

    I am having a very strange problem. I made a video that explains everything. (Since it just seemed easier to make a video and SHOW you what is happening.)

  2. jcsd
  3. May 6, 2013 #2


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    Perhaps a circuit diagram would help. You would only need to check for practical faults if the functional circuit is right but you get the wrong output. Then you need to look at your power supply lines and uncommitted inputs. Your movie just shows a jumble of wires which may mean a lot to you but, to anyone else it's '???'.
  4. May 6, 2013 #3


    User Avatar
    Science Advisor

    You could be getting very short "glitch" pulses which can be caused by timing errors. These would not show on LEDs but would be visible on any good oscilloscope.

    It is not necessary to have any additional circuitry between 7490s.
    They are intended to be cascaded .

    You feed an input to pin 14, bridge pin 12 to pin 1, then take an output from pin 11 for BCD counting.

    This then goes to pin 14 of the next chip.

    The next digit will need to count to 5, though, and you will need circuitry to stop it counting to 6.

    To avoid reinventing the wheel, you could look in the "stickies" at the top of this Forum page to see how this has been done before. Many clock circuits have been published.
  5. May 7, 2013 #4
    Thank you! I got rid of all the logic gates and now I an no longer getting that problem. Also, I believe what you said about the glitch is definitely what was going on. I was putting through so many logic gates (10!) that the delay was bound to present a slight timing error. Although now I am getting another weird problem.

    I set the second 7490 modulus to 6, but is is doing something very strange. It is counting like this...


    In other words, instead of resetting after 5, it goes back to 4, then 5 then 4, etc. But it doesn't ALWAYS do this, only sometimes. And eventually it will reset.

    Also I very much don't want to just copy a circuit. I really am more interested in the learning aspect of designing my own project and making it come into fruition, rather than just blindly copying a circuit. (Which I have done before) I have found that I learn much, MUCH more by going through the design process myself. (Of course I cannot do this with EVERY project, but I chose to do it with this one.)
  6. May 7, 2013 #5


    User Avatar
    Science Advisor

    Yes, that sort of thing can happen. Although you are using this chip with very slow pulses, it can switch at 15 MHz so you have to be really careful with time delays, bypassing etc.

    All power lines should ALWAYS be bypassed to ground with a 0.1 μF capacitor with short leads, not just when you are having trouble.

    Breadboards are not really capable of proper bypassing either. You might be lucky or you might get an unstable monster.

    So, if you don't have an oscilloscope, you will have a lot of trouble developing your own circuits.

    Have a read of the following page to see if you are doing what the author is doing with his divide by 6 circuit.

  7. May 7, 2013 #6


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    This is such a slowwwwww operating circuit that it really should be behaving itself unless you are doing something really dodgy with it. Power supply is the most likely culprit because the chips are designed to look after themselves. There isn't even any significant amount of 'knock back' between parts of the circuit (except the modulo 6 count and that's only around a single chip). Highly complex prototype circuits used to be made with hand wire wrap or 'Verowire' (which weren't that different from that breadboard stuff you're using) and they would work at many tens of MHz +. Give yourself a good pair of Vcc and Ground conductors, joining all the ICs together (daisy chain) and with decoupling capacitors on each IC. Make sure that every pin is connected to 'something'. You could even slug all the logic outputs with small capacitors to slow all the edges down a bit.
    Synchronous logic circuits, which change state only on a clock edge could eliminate all your possible hazards but that's used only when the delays are significant parts of a clock cycle.

    I do remember a friend of mine who made a (mains frequency operated) electric clock with discrete TTL and he had some problems getting his (steam age) counters to work right - glitches gave him severe problems. He sorted it in the end and it allowed him to get into work on time!
  8. May 7, 2013 #7
    Thanks for the replies!!

    I put decoupling capacitors on all the IC power feeds and it fixed the problem!

    Lesson learned.
    Last edited: May 7, 2013
  9. May 21, 2013 #8
    So I have run into another problem. I want to be able to run this clock off of power from the outlet. So I bought a wall transformer that converts the 120V AC into 12V DC and then I used a voltage divider to bring it down to 5V so it can power all my IC's. The problem is, when I looked at the waveform on my scope, I am getting a distinct square wave pattern.

    I know the AC to DC conversion is not 100% perfect, but I think this power fluctuation is effecting the performance of my IC's in much the same way it did in my previous problem on this post. The counter is counting like, "1, 2, 3, 4, 5, 4, 5, 4, 5, ... 6, 7 ,8."

    Last time when I had this problem (when I used a battery to power the circuit instead of outlet power), I put capacitors on the powerfeed to smooth it out and it worked, but this time it doesn't seem to be working, even when I put a MUCH bigger capacitor on it. (100 microfarads)

    Would anyone have any solutions to this problem??
  10. May 21, 2013 #9


    User Avatar
    Science Advisor

    Your power supply may not be filtered or not filtered enough.

    100 uF is not a very big capacitor for power supply filtering. You would need something like 2200 uF rated at about 25 volts or more.

    Since you have an oscilloscope, check the output waveform of the power supply before the regulator. It should be of only one polarity (ie DC) although it may be pulsing at double the mains frequency.

    A large capacitor should give a steady non-pulsing output at about the peak value of the input. In this case about 17 volts.
  11. May 21, 2013 #10


    User Avatar
    Science Advisor
    Gold Member

    I would put a 5V voltage regulator in there, dividing down 12V to 5V using resistors for a PS is rarely a good idea.

    Get a 7805 or something similar, this will also clean up the waveform.
  12. May 21, 2013 #11


    User Avatar
    Science Advisor
    Gold Member

    Such a nice chip. :approve:
  13. May 21, 2013 #12
    Put a 7805 in there and it worked like a charm! Thanks for the help again guys! Hopefully this will be the last of my problems. (Yeah right :] )
  14. May 28, 2013 #13
    Hey guys, I have another problem. The last thing I need to do for this project is to make the clock reset after 12:59:59.

    I really cannot think of a way I can do this. I tried sending signals from the 7-segment display to various AND gates (When the hours reach 13) and then having the output of the gates reset the 7490s, but it didn't seem to work. (I think it is because the input impedance of the gates are so high compared to the LED on the 7 segment display, that the voltage took the path of least resistance and didn't get sent to the gates.)

    If anyone can help me come up with a solution, I would very much appreciate it!!

    EDIT: Also, simply resetting the chips isn't enough, I need to make it start at 01 and not 00
    Last edited: May 28, 2013
  15. May 28, 2013 #14


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    You need to be aware of 'fan-out' (how many gates one gate can feed) which is included in the spec of circuits. You need to use buffers and drivers to overcome this.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook