1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Electronics 7-segment LED Clock

Discussion in 'Modding' started by Explicit, 27 Sep 2004.

  1. kazawolf

    kazawolf New Member

    Joined:
    27 Oct 2006
    Posts:
    4
    Likes Received:
    0
    Sorry, I didn't explain my project very well....actually there are 12 leds, one for each hour or minute. With some simple logic gates I have figured out how the clock chip will power a specific one at any given time of day. I think a series of 555 timers in a monostable formation can do the pulse sequencing. The design isn't very elegant, but I figure I can't mess up too bad....!

    Thanks again.

    Roger K
     
  2. foxx

    foxx New Member

    Joined:
    5 Sep 2004
    Posts:
    785
    Likes Received:
    0
    Hehehe, I see a mistake I did which probibly threw you off. I keapt calling my NOR gate an OR gate. Thank you for catching that, and to clarify it IS a NOR gate.

    As for it being funny, the only NOR gate in my circuit design software has 8 inputs, and the one left open is supposed to also be pulled to ground but I must have missed it somehow when redrawing my circuit.

    --

    Hmm, I never thought of limiting the current INTO the 7447, that should work fine. :duh:

    --

    I need to go at the moment, so tomarow Ill draw up version 2.2 with what I think your saying about the OR gate and see if it works.

    --

    Thanks.
     
  3. foxx

    foxx New Member

    Joined:
    5 Sep 2004
    Posts:
    785
    Likes Received:
    0
    The OR gate like you said didnt work (it would count to 1 to 3 then continue on like normal) I tried as many different ways I could think of, so I decided to look back on one of your previous ideas. And so I give you v2.2.

    [​IMG]

    I have no way of testing it to see if it will work (I had to paste two different circuites together in paint). Im still working on the resistor values and capacitor values. Also, what about reset? On some sites it sais to leave it high, others it sais to leave it low, and others sais leave it disconnected. Anything else you see which might cause a problem?

    Thanks.

    P.S. I havnt changed it to 7447's and CA's yet but I will soon.
     
  4. Xiachunyi

    Xiachunyi New Member

    Joined:
    3 Nov 2003
    Posts:
    1,404
    Likes Received:
    0
    Let MR1 and 2 be your pins to receive the reset signal. Set them low to normally count or pulse in a high to reset counter. Set your other pins, MS1 and 2 to low.

    Here is a simpler solution that is digital.

    As for making the counter go to 1 after being 12:59, let's us do it the logical way instead of just looking at it.

    Since the counter will naturally go to 00:00:00, we need to find a way to force it to 01:00. To do this, we need to create a signal that will tell us when the clock is at 00:00:00 to correct. Since we are concerned with the hours, we can declare the minutes and seconds as don't cares.

    Now we have 00 or in BCD, 0000-0000. Since the highest we go to in the tens place is 1, we can declare all the bits except the LSB of the tens as don't cares. Now we have 0-0000. Our target is: 0-0001.

    The equation we have so far in our present state, when we want to generate a signal for the next second count is the following.

    Boolean equation assuming the first bit, from right to left is a, second is b, and so on.
    "Sig Out = !a!b!c!d!e" <= This is the logic function we need to create to get our signal to let the counter increment by 1 automatically when the hours are 00.

    Since you have that, just feed the Sig Out into an OR gate that has the other signal from your 2x1 MUX that carries in the ripple from the previous counters and the set time signal. The OR gate will go into the first counter of your hours section because you are only playing around with the one's in the hour section.

    Feeding in this signal works at 00:00:00 because not only does the counter advance to the next state after 1 clock cycle, the hours can not possibly be in the format 00. Doing so would correct itself to be 01.

    This way, as I have shown you, leads you to something called a self-correcting counter or "a counter that is able to correct itself".
     
  5. foxx

    foxx New Member

    Joined:
    5 Sep 2004
    Posts:
    785
    Likes Received:
    0
    I understood pritty much everything untill about here...

    (P.S. If you want to skip how I (sorta) figured it out, scroll to bottom)

    Are you saying that its is e-dcba? (0-0000)

    By "have that" do you mean my 8-in NOR gate acting as the Sig Out?

    If Im following, your saying that this should work. (I found some other NOR gates ;) )
    [​IMG]
    It wont work because in order for the 7490 to increment 1 it has to have CP0 pulse low then high and then go low again. The NOR gate goes from low to high and then keaps it at high.

    So I started googling around, and found this web site
    http://www.du.edu/~etuttle/electron/elect48.htm
    It has an error correcting logic circuit so I decided to try it.
    [​IMG]
    Well it succeded in giving me a 1 but after that it stayed high again.

    I had an idea.
    [​IMG]
    Well that works perfect...really?...no. It counts now but goes 1,3,5,6,7,9,11 and then starts over. What I think is happening is that the switch between the normal ripple and the one I made with NOR gates is to fast for the 7490 to calculate (It is only 32mhz).

    Hmm, how can I slow it down? Wait...no...I realized I was looking at it wrong, and this came up.
    [​IMG]
    Ahh, so close. It starts at 1 and then counts like normal but once it resets it resets to 0 not 1.

    Do you think Im heading in the right direction?

    If not, then I propose this.
    [​IMG]

    For 1 second of my life, I wont know the time, but if what I have been trying isnt going to work, this wouldnt be a bad choice would it?
    (Hint, the green line is the clock signal for the seconds.)

    Thanks.
     
    Last edited: 9 Nov 2006
  6. Xiachunyi

    Xiachunyi New Member

    Joined:
    3 Nov 2003
    Posts:
    1,404
    Likes Received:
    0
    The boolean equation I gave you does not use NOR gates at all, it is an AND gate with inverting inputs. You can try using a NOR gate but you have to convert the equation over utilizing DeMorgan's.

    The inputs are Q0 of the tens place of the hour and Q3,2,1,0 of the ones in the hour. What is e-dcba?
     
  7. foxx

    foxx New Member

    Joined:
    5 Sep 2004
    Posts:
    785
    Likes Received:
    0
    Oh, I think I get what your saying, the three AND gates I have is whats producing the signal (I thought you where talking about the 8 input NOR gate, just a bit of confusion on my side).

    And what your wanting me to do is this.
    [​IMG]
    It verks! Except when you first start up the circuit, it displays 00:00:00. But once it gets to 12 it resets to 1 and acts like a normal clock.

    So I have one circuit that waits a second and counts normaly. One circuit that starts a 00:00:00 but once resets counts normaly. Finaly one circuit that starts at 1 but wont count....wait. :idea:

    Put the last two together and one will get.
    [​IMG]
    Which works when simulated. Will it work in real life?

    (Ill post a full schematic with 7447's and resistors and all that jazz hopefully tonight)
    Thanks.
     
  8. Xiachunyi

    Xiachunyi New Member

    Joined:
    3 Nov 2003
    Posts:
    1,404
    Likes Received:
    0
    If it works, it works. :D

    One thing though, are you pushing the compliments of Q's through the pins of the AND gate? It looks like you are not inverting them to obtain the signal generated when hours are at 00.
     
  9. foxx

    foxx New Member

    Joined:
    5 Sep 2004
    Posts:
    785
    Likes Received:
    0
    EDIT: I posted this, and then saw your comment.

    Yay for me to sound like a n00b again! Compliments of the Q's? I have to invert the output? Perhaps its the cut-out of my circuit your seeing which is confusing, if my rough draft below doesnt clear anything up, please re-explain your question. Thanks.

    --

    I give you the rough draft, v5.
    [​IMG]
    Notes:

    The displays are standered (2.1v,20mA) LED's, in pairs of three's like so.
    [​IMG]
    (After the resistors is where the digit would connect to the 7447, not ground)

    R3 is just one of the resistors, there will be one for each digit's segment.

    Ill probibly be getting everything from Jameco (they seem to be the cheapest)

    --

    I still need a way to power it, I was thinking just a wallwort (small and simple). After a bit of math, the MAX I will need is 5v with 2520mA. (Right?) One small problem, the max I can find that is out on the market (that is easy to get) is 2100mA( I dont really want to under power it). Any suggestions?

    And for mounting all the components, yes this going to sound crazy, but Im thinking of using pc board (Like this.) Only I need to find it cheaper somewhere. This is the part where your saying "Make your own!" I would love to, except I dont have any idea how, where to get parts (especialy a board that is 4 inch by 18ish inch), what processes to use to get the etch, etc. But if I can get a guide, and find cheap enough parts than Im willing to try it. :D

    --

    The price Im seeing is,
    (135) LED's * $0.079 = $10.665
    (6) 7447 * .83 = 4.98 (I may be able to get some cheaper elswhere)
    (6) 74ls90 * .83 = 4.98 (see above)
    (1) 4078 * .39 = .39
    (1) 74ls21 * .21 = .21
    (1) 7425 * .80 = .80
    (2) 7432 * .81 = 1.62
    (1) 74ls08 * .37 = .37
    (1) 74ls04 * .41 = .41
    (100) resistors * .01 = 1.00
    (2) caps * .20 = .40
    wire/solder/buttons/etc = 5ish
    Total = $30.825+shipping/power supply=$35-40ish

    Im thinking of just buying enough Ic's to build the seconds section of the clock, and if all goes well Ill finish off the rest. That is, if my circuit has no more problems?

    Thank you!
     
    Last edited: 10 Nov 2006
  10. Xiachunyi

    Xiachunyi New Member

    Joined:
    3 Nov 2003
    Posts:
    1,404
    Likes Received:
    0
    Take, Q0 for example, you will need to feed that through an inverter and then feed it to the AND gate.

    Take a look at this website if you have the time. It will teach you about boolean logic functions and how to implement them.

    Note that for the nomenclature utilized, the compliment of A is A' or !A or ~A or A_0.

    As for building it, utilizing a proto board is fine with me, I personally favor it to actually making your own boards. Try this website for a source of electronics as well.

    For the size of the board suggested above in my post, it certainly is possible to put the amount of components you have all on one and have room to spare.

    As for power draw, you will have to give me some time to actually think about that. :hehe:
     
  11. foxx

    foxx New Member

    Joined:
    5 Sep 2004
    Posts:
    785
    Likes Received:
    0
    Thank you for the link, hopefully we will be able to comunicate better after I read it. If you want to know how much I knew about boolean BEFORE this whole ordeal, this is what I read.
     
  12. Explicit

    Explicit New Member

    Joined:
    23 Dec 2002
    Posts:
    172
    Likes Received:
    0
    This thread has become so huge, I can't even believe it.
    Whats new guys?
     
  13. foxx

    foxx New Member

    Joined:
    5 Sep 2004
    Posts:
    785
    Likes Received:
    0
    Hmm, after reviewing my circuit again, and simulating it in steps, I realized my NOR gate was causin the hour's 1 to go high whenever the circuit was first booting up because of a bug in the software. So I think I am going to stick with your idea of how it has to count to 12 and reset before it will reset to 1.

    As for whether or not I should have some NOT gates there or not, I give you a couple of if and only if statments.

    What your wanting is for me to do this, yes?
    [​IMG]
    Sig out if and only if a,b,c,d, and e are low. Which sends a sig out when the displays show 00. Well when you first start the clock its sending out a constant high on CP0 therefor a pulse from the minutes wont get through. Even if you press the S3 (which not the one in that screenshot) would set the clock, nothing would happen. Even if you replace the OR gate with an NOR, or XNOR, etc.

    Another problem I now see with my solution (Sig out if and only if a,b,c,d, and e are high) is that the software has another bug (I should really stop using software :p) which doesnt calculate that there is a delay between when you reset the 7490 and when you send a pulse.

    Im thinking of going back to a previous idea of having it be. Add one digit to the clock (by pressing S3 for 1 second) if and only if a,b,c,d, and e are low. Also included is. Reset the clock if and only if a,b, and e are high (display showing 13).
    [​IMG]
    You might notice I am missing the pull up resistor from the 555. After reading a couple of PDF's Im wondering if I need it. Because (with my 555 setup) the 555's output will pulse high and HOLD it high for .5 seconds and then (once the capacitor is charged) the output will pulse low and HOLD it low for .5 seconds. Therefor I wont need a pull up resistor, right?

    Thanks.
     
  14. Xiachunyi

    Xiachunyi New Member

    Joined:
    3 Nov 2003
    Posts:
    1,404
    Likes Received:
    0
    For signal out, you don't have all the required inputs given by the boolean equation for correct implementation.

    You will not need a pull-up/down resistor if what you use, for the 555 IC timer, does not let the output pin float and the voltage levels are within tolerance of the family you are utilizing.

    I know, from my past experience, that I can not directly interface a 555 IC timer to my logic chips because it will occasionally cause either a missed pulse or too many pulses in a given time.
     
  15. Turbokeu

    Turbokeu Member

    Joined:
    30 Jul 2002
    Posts:
    347
    Likes Received:
    2
    Hi Explicit!
    Long time no see.
    How are you?

    I just finished the PIC software for a 9-digit DCF clock with a IW-18 VFD tube, and also 90% of the software for my 2.1" blue 5x7 dot matrix LED clock.
    I also found 4.0" white LED displays in the Netherlands but they are quite expensive (22.00 Euro/piece + shipping).
    I also have some troubles finding a PCB manufacturer that is able to manufacture the 27"x5.5" display boards in one piece for a competitive price (they cost me already about 40 Euro when I etch them myself!).

    After a period of one year of very low income the business of my company is going finally well now since July 2006 (big contract with the belgian buildings agency).

    Take care,
    Chris
     
  16. foxx

    foxx New Member

    Joined:
    5 Sep 2004
    Posts:
    785
    Likes Received:
    0
    Oh, :duh: silly me for looking at it mathmaticaly, but not implamenting it.
    [​IMG]
    But wouldnt the same thing happen as before? (it staying high and not letting the minute's pulse through?)

    Ah, I see, I should place it there to prevent unwanted signals, even if what I have attached to the output doesnt necessarily need it.
     
  17. Xiachunyi

    Xiachunyi New Member

    Joined:
    3 Nov 2003
    Posts:
    1,404
    Likes Received:
    0
    It should only be high when all the outputs are low because of the inverters. If one should become high, the inverter will flip the logic to low and the AND gate should go low. The output would then go low as well and that should let any other signals pass through.

    The only time this signal generator becomes high is when your hours are displayed as 00 or when the outputs: Q0-Q3-Q2-Q1-Q0 are low. If any of the outputs become high, the signal generator is low.

    Can you post a picture of your clock schematic when the hours display is not at 00?
     
  18. foxx

    foxx New Member

    Joined:
    5 Sep 2004
    Posts:
    785
    Likes Received:
    0

    Sure,
    [​IMG]
    What your saying is happening, it is letting the minutes through when its displaying anything but 00, BUT when it does displays 00 (after it resets from 13), it does not let the minutes through because the AND gate is staying high.

    I would have to pull CP0 low (the 7490 will add 1 if and only if CP0 starts low goes high and then goes low again) in order for it to count to 13 again but once it resets to 00 I will have to repull it low.

    Any ideas?

    Thanks.
     
  19. Xiachunyi

    Xiachunyi New Member

    Joined:
    3 Nov 2003
    Posts:
    1,404
    Likes Received:
    0
    Oh my mistake, I now understand what you have been trying to say. Input CP0 is falling edge triggered and not level triggered.

    We will need something that change the output of the signal into a pulse generator. Something that will change itself but itself will need to change, simulate a pulse, in order to change itself in the first place. A riddle. :hehe:

    This is, fortunately, an easy one to solve. You will need to attach a 2-input AND gate to the output of your signal generator. The other input will be the clock signal you are generating from the 555 IC timer. The output of this AND gate will be to the MUX that is feeding into CP0.

    The logic here is the following: If all considered outputs are low, the signal generator will output a high. If the clock is currently low, the input to CP0 will be low, but if clock becomes high, the input to CP0 will be high. The clock will continue, in its period, to become low and bring input CP0 to low.

    Once CP0 is low, the output will change and one of the states of the output will become high. The signal generator will then output a low and because an AND gate is anding the signal output and the clock, it should lock out the clock and will not activate again until the conditions for the signal generator are met again.
     
  20. foxx

    foxx New Member

    Joined:
    5 Sep 2004
    Posts:
    785
    Likes Received:
    0
    Something like this?

    :D

    Full schematic.
    [​IMG]
    The resistors are missing for the 555 because my circuit software only allows 50 items; there WILL be a pull up resistor and two resistors which generate the signal for the 555.

    --

    Also, that All Electronics (that was what that site is called right?) isnt cheaper for any of the TTL's or anything, but it does have a nice 3 amp wallwart I have my eye on :thumb: . I plan on buying the LED's and TTL still from jameco.

    Speaking of buying, hopefully if my circuit has no more errors, within the next week I will order parts (Ill rewrite the parts list), and perhaps write a full on guide/journal.

    --

    Thank you.
     

Share This Page