Binary Clock: First Timer, need Help & look-over!

Discussion in 'The Projects Forum' started by Adrastos, Jan 5, 2009.

  1. Adrastos

    Thread Starter Member

    Jan 5, 2009
    17
    0
    Hello everyone, I'm new here! Besides being new *here*, I also happen to be new to electronics. Brand spankin' new. Still in kindergarten new. Anyways, I decided a good, fun project to get to know things a little better, and test the water, would be an LED binary clock. I'm a mechanical engineer, and have been a hobbyist programmer for 8ish years, so thinking technically is no problem for me, so the logic behind the clock should be good. The only problem is, I don't know much about electronics. I still can't figure out how exactly a transistor is used, though I keep hearing it's a switch or an amplifier. Weird. Anyways, not my question.

    What it all boils down to is this: I've designed a schematic for a binary clock, and I would really, really, really appreciate it if someone could give it a once or twice over, to see if thing will actually work, or the whole deal will go boom in my face. Attached is the schematic.

    Originally I was going to do a battery-powered crystal oscillator. But, when I touched that iceberg, I realized that the batteries wouldn't last anywhere near long enough to consistently power 20 LEDs, and to top if off, I couldn't figure out the funky circuits required for it. (Here I was thinking you just threw one in in series and watch it go!). As such, I "borrowed" the 60Hz wall plug idea and schematic from http://www.gimpfaq.org/tutorials/binclock/, as I had no idea how to calculate C1 & C2, the resistor in there, and to use a schotty & zenode thinger. So that goes to that dude, but the rest is from my battery design!

    So once again, please, can someone tell me if I'm doing it right? Or wrong? Or am completely nuts? I don't want to just sit around and solder in kits. Those are boring. Plus, I already have one in the mail, but I'm impatient. Also, I can't get this project out of my head. I want to start it right away, and see it through completion. The schematic is in the included pdf.

    (I'm using DipTrace free for this, because I found it incredibly easy to use, and the autorouter in it is pretty sweet) (And couldn't find EagleCAD, or any of those other so called "awesome" programs).

    Thanks!
     
    Last edited: Jan 5, 2009
  2. italo

    New Member

    Nov 20, 2005
    205
    1
    I use expresspcb eagle is hard to navigate but does more i guess. both are free at least mine is. Anyhow the problem that you will encounter is in my opinion is the timing. Sure ages ago i did built one of those clock and i and using a 19.xxx crystal very big in size i could have used smaller xtal and more counters it is a trade off. I can now buy china made clock with dates and so forth for $1 . BY the way my clock was LED but it was 12" hi discreet LED display. You can use 7447 series to do that and 7490 counters but i forgot the detail. hope this help.
     
  3. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
    7447 and 7490's are getting hard to get, so I hear. Question for OP, you designed this? Are you wanting us to go over it before building it?

    If you haven't been introduced to it there are gadgets called protoboards, which allow you to prototype circuits before you build them permanent. Here is a simplistic picture of another project. Do yourself a favor if you go this route, take the time to cut the wires to size and bend them neatly (with the insulation throughout).

    [​IMG]

    In our Experiments volume of All About Circuits (online or PDF download) their is a description.

    Radio Shack sells them, though you can do better from almost any other dealer.

    [​IMG]

    Here is something more in line what I'm talking about...

    [​IMG]

    Turns out Wikipedia has a good article on the subject.
     
    Last edited: Jan 5, 2009
  4. Adrastos

    Thread Starter Member

    Jan 5, 2009
    17
    0
    Oh, I have a protoboard, and know what they're all about. I also have etched some pcb, and made a small circuit with that as well. I guess I'm not that green. I would just like confirmation on whether or not I will burn out the cmos chips, or if I need transistors, or more resistors, or capacitors anyware to make it work / better. Do I really need debouncing stuff for the switches? And if so, how? The only electronics shop near me (that I've been able to find) really sucks for components, and I want to waste as little as possible.

    Also, am I correct in assuming the AC transformer is a voltage source, and when it says it outputs 9V AC at 500mA, that means it can supply *up to* 500mA, but can supply less if the load is less? Cuz from what I've read, the cmos ic's have a maximum input current of 10mA, and my money is on some smoke if 500mA are sent through one.

    Also, the frequency of the power in my area is a *very* steady 60Hz (I worked for a power company this summer, so I know just how strictly they control it), so a simple divide by 60 gives me a straight up 1Hz pulse. Thanks for the suggestions, but I briefly looked at RTCs, and they seemed both way too complicated for me at this point, and overkill for what I want.

    Yes, I designed this (apart from the +5V power, and the clock signal, which are both derived from the wall power, and taken from the link I posted above). And yes, I would strongly appreciate it if someone looked it over for me so that I don't waste time and money putting it together (even on a breadboard) if it just fries itself..

    Thanks!
     
  5. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
    You probably ought to have something to drive the LEDs, similar to so...

    [​IMG]

    The AC, when converted, will be 1.4X greater. If you have a 9VAC transformer you will have 12.6VDC. 500ma is probably overkill, but that isn't an issue. With electronics it is usually better to overdesign, the parts last longer. Parts only pull what they need, overkill isn't a problem as long as you don't have a wiring error.

    Debouncing is also easy. Something similar to this...

    [​IMG]

    A capacitor across the switch will do in many cases.

    Nice schematic. That is extremely rare around here.
     
  6. Adrastos

    Thread Starter Member

    Jan 5, 2009
    17
    0
    Thank you, very kindly. Do I have to put a transistor for each single LED? 'Cuz that seems like it would be a lot of overkill..

    Also, adding a capacitor across the switch, wouldn't that charge and then discharge, continually triggering the set function?
     
  7. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
    The transistors decrease the loading from the CMOS by their beta, figure 100 as a minimum. So while you are drawing 10ma for the LED the CMOS is providing 100µa or less. CMOS can provide 10ma, you might get by with it, but you did mention you didn't want to smoke the chips. You are definately pushing the spec limits using the parts to light the LEDs in a way that could blow them out. For what it's worth, I've done it too, but I understood I was risking the part. You will need to adjust the resistor shown, your original values would work pretty well I would think.

    One transistor per LED isn't that bad, actually it is pretty typical. You can even buy 15 part NPN packs from Radio Shack, the exact transistor isn't too critical.

    Why would the capacitor charge/discharge? They only respond to the stimulas you give them, which is the point.

    On a related subject you want to add a high value resistor (say 100KΩ to 1MΩ) to ground on the chip to give it a pull down, you would need that anyhow. You never want CMOS inputs floating, they are so high impedance they will respond to random static charge, in other words, an unpredictable condition. You need to do this to any inputs that are floating.
     
  8. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
    Do you mean to have the output of U4.2 connected to the enable of U5.2, along with a switch that goes to Vcc? That is a recipe for smoke.
     
  9. Adrastos

    Thread Starter Member

    Jan 5, 2009
    17
    0
    Ok, I've updated the schematic with what you've told me..

    Further questions, however:

    • Would the transistors displayed here: http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=P2N2222AGOS-ND be suitable enough? Do they even need base resistors if I'm calculating it the base resistor needing to be 1ohm?
    • What value of resistors and capacitors should I connect to the switches? (My guess would be something like 0.1uF caps
    • Do I need to add a resistor to each and every chip ground, for itself? (Including the 7805?) (I also think the Hex Inverter would need a different resistor as well, as it's not cmos..)
    Also, yes, that diode for the output of 4.2 was supposed to be a bit further up, it's been fixed now. (Is that how to do things? Or do I need larger capacity diodes in there?)

    Again, thank you so much for taking your time to help me here, it's very much appreciated :)
     
  10. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
    R24, 23, and 22 are in the wrong place, they need to drag the input (enable) to a low state.

    This picture has pull up resistors, you need pull down resistors. Think the schematic with polarity reverse.

    [​IMG]

    Visualize the third schematic with the resistor going to ground, and the switch going to Vcc.
     
  11. Adrastos

    Thread Starter Member

    Jan 5, 2009
    17
    0
    Ok, sorry I took so long to update - first week back at school, and things are getting hectic again. I've attached the latest schematic, taking (hopefully correctly) everything you've mentioned to me into account. I've added in values of everything.

    For the switch debouncing, I looked up and found that RC should be greater than the time for the switch to cool down. From what I read, I guestimated about 10ms would be good. Picking a 1uF capacitor (cheap, easy, keeps R lower), I got I needed R to be 10K ohm. Does this sound logical?

    Using 2.5V, 20mA LEDs, with a 5V supply, the LED resistors should be 150 ohm.

    You told me to use at least 100K for grounding resistors, I've scattered them all over.. is this appropriate?

    I reconfigured the switches, so that they should be "pull down". (I can't seem to grasp the concept of "pull up" and "pull down"..)

    I added in transistors, and from what I could make of the datasheets, they'll work fine. Plus, these ones are cheap!

    So, any further comments, concerns, suggestions, anything?

    Thankee kindly!
     
  12. Adrastos

    Thread Starter Member

    Jan 5, 2009
    17
    0
    *bump*..

    Anyone?
     
  13. ehud42

    New Member

    Feb 16, 2009
    1
    0
    Interesting discussion. I too have started a binary clock (nearly a year ago). I had some surplus 7490 and 838 decade counters. These are TTL I believe and seem to have no problem driving LEDs through 150ohm resistors. I have a divide by 60 circuit that takes the 60Hz AC and produces a 1Hz clock. This feeds another 838 which is connected to a 7447 that is driving a single 7-segment LED. My last 7490 is in place to drive the 4 LEDs that will display the 0-9 minutes.

    I ran out of parts :-( Here's how far I got:

    [​IMG]

    Since then I received a bunch of 74C90 - CMOS variety chips. I cannot seem to get these to play nicely. I have discovered that CMOS inputs require pull up resistors, and now I am hearing that they cannot (or should not) be used to drive LEDs directly as the current is too much for them. Hmmm.. Would like to keep the part count down if I can.

    Anyone willing to trade 74C90's for TTL 7490s??

    I'm trying to have 2 x 74C90s count 0-59 (in binary). I have a clock line coming off my circuit board to the prototype board. I can get one 74C90N to count 0-9, however, the second 74C90N does not want to count to 5 consistently. If it does anything, it counts 0,1,2,3,4,5,4,5,4,5,4,5.....

    It appears that the QC bit is turning off then back on very quickly during the reset because if I use the QC bit to drive the first 74C90, that one counts even though QC looks like it stays high.

    This is my prototype mess:

    [​IMG]


    (Hmm... just had a thought - I have some 4050 buffers - would they be more suited to driving LEDs???)

    Any advice would be appreciated! Thanks!
     
  14. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
    [​IMG]

    I'll get back with you when I can Adrastos.
     
  15. Wendy

    Moderator

    Mar 24, 2008
    20,765
    2,536
    Looking at it, I can't see anything. Doesn't mean there isn't problems, I would definately protoboard it to test the logic out.

    The schematic is OK, but a little hard to read. One of the reasons you see me and others shortcutting Vcc and ground is it makes the logic easier to follow. However, a complete schematic is much better than none at all.

    Started building it yet?
     
  16. Adrastos

    Thread Starter Member

    Jan 5, 2009
    17
    0
    Thanks for the replies.. I too got super busy (school, yet again...)

    I haven't started building it yet - I'm low on funds at the moment, as well as time. Hopefully those will clear up soon though. I'll be sure to inform you of any progress. Thanks again!
     
Loading...