Binary clock

Thread Starter

arthur92710

Joined Jun 25, 2007
307
Oh yes, no alarm programmed yet... well, give it time - this project could become quite complex, and eat up all the ICs on the planet ... ;)
Ha! that would be cool. $8 for a few parts is a lot. I have most of them except the crystal and cap pot.

I like the idea about using the 60Hz form the outlet. Then I wouldn't have to buy new battery's as well.
 

SgtWookie

Joined Jul 17, 2007
22,230
OK, here's a link to an E-bay auction that's just for a couple of crystals:
http://cgi.ebay.com/2-097152-MHz-HC...NameZWDVWQQrdZ1QQcmdZViewItem#ShippingPayment

I HAVE done business with this seller, and he's straight-up honest, as well as being a Veteran. As a matter of fact, I used to work for the company that made the crystals, too. ;) Not in that department, though.

The seller combines shipping very favorably, which will substantially reduce your cost per item if he has other items you need.

Crystals are fragile, and can be knocked out of their mountings. You should be careful to not drop them on hard surfaces from more than a foot or so distance, as they will likely be destroyed. This becomes much less of a problem once the crystal has been mounted in a circuit that adds mass, but is still a consideration.

A crystal is sort of like an RC circuit that has an extremely narrow frequency response. If the frequency response of an RC circuit was laid out on a football field, it's response would be like the goal posts, and the crystals' response would be like the 50 yard line.

No, not from the 45 yard line to the 55 yard line - the width of the 50 yard line by itself.
 

SgtWookie

Joined Jul 17, 2007
22,230
OK, that's fine.

You needed to decide on a timebase; apparently you have. ;)

Now you will need to build a power supply for your project, as the accurate timebase depends upon it, as do your ICs.

Your challenge of the moment will be to design a supply that will provide adequate power for all of the ICs, LEDs, etc. that are in your circuit, with not much left over. Well, maybe enough to charge the NiMH batteries that will power the clock when the power goes out. But I digress...

This is not a trivial exercise, as over-capacity will draw lots of current, which will not be "green friendly"; ie: will waste power, and cost a lot of money to operate over a long period of time. You must plan for everything in the circuit.

Bon appetit! :)
 

Thread Starter

arthur92710

Joined Jun 25, 2007
307
So i was looking for a 7457 but the sn74ls57 is obsolete, and I could not find a sub. So can I use a counter to count 6 from the 60 then count 1 from the 10.
 

SgtWookie

Joined Jul 17, 2007
22,230
See the attached schematic.

It's a 1 Hz clock that uses the output of a low-voltage transformer as a clock input.

R1 limits the current from the transformer to the circuit.
D1 and D2 are "clamping diodes"; they limit the maximum input voltage to the 4093.

The 4093 is a Schottkey-input NAND gate; it's only function here is to "square up" the raw sinewave input to prevent glitches.

The 4024 is a divide-by-128 counter. When Q2, Q3, Q4, and Q5 are all high, the count is 60, and then U2A gives a high output. This enables U2B to gate the clock pulse through to reset the counter to all lows.

I know you've been using TTL, but you really should consider using CMOS. The power consumption for CMOS is far lower than TTL. CMOS is much more tolerant to variations in power than TTL is. Both of these features are really helpful when you're running from batteries.
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
Oh, some of those 4024 7-stage /128 counters have wave shaping for the clock input; in that case you wouldn't need the 4093 for that purpose, but the 4093 is a very handy IC to have around; a few NAND gates can be used to make AND, OR, NOT gates and more, and can also be used as monostable or astable multivibrators, or even for PWM control circuits (see my "Simple PWM Driver" in the Projects Collection)

I've used Mouser Electronics a number of times.
http://www.mouser.com
Big company. Lots of parts. Reasonable prices.

I've used Electronic Goldmine:
http://www.goldmine-elec.com
They have some hard-to-find stuff.

Digi-key, another big-name company:
http://www.digikey.com/

Future Electronics:
http://www.componentsuperstore.com/Store/Default.aspx

There's lots of suppliers out there. You could also try shopping on E-bay, but watch out for shipping costs - you can wind up paying through the nose for stuff that way.
 

Thread Starter

arthur92710

Joined Jun 25, 2007
307
iv bought stuff on both ebay and mouser. With ebay you will end up paying alot for shipping. And at mouser you have to buy like 2000 units to get a good price.(Im looking into how i can do that.)

Ill look at the others you posted.
 

SgtWookie

Joined Jul 17, 2007
22,230
Well, the cost per item goes down when buying in quantity because it takes the same amount of time to take the order of 1 thing and pack it up as it does to take the order of 1,000 of the same thing and pack them up.

They're actually pretty reasonable. You might find them for less elsewhere.
 

SgtWookie

Joined Jul 17, 2007
22,230
While you're looking at stuff to order, consider picking up a few 4518 counters.

These are dual decade counters. You could use one for hours, one for minutes, and one for seconds. They would save you some wiring hassles. You could use 4520's, but they're dual binary - you'd have to add more logic to reset them.

Here's a helpful site for 4000 series CMOS ICs:
http://www.kpsec.freeuk.com/components/cmos.htm

Now, about driving those LED's - you could use a lot of different methods and devices, but you wouldn't want to drive them straight from the CMOS outputs - they won't sink or source that much current.

One possibility is the 2N7000 or 2N7002 Enhancement Mode FETs. They're TO92-cased critters that would work very well with your CMOS outputs to sink over 100mA of current (actually, they can sink up to 200mA continuously.) You'd just connect each source to ground, the gates to each of your CMOS outputs, and the drain to the cathode of each LED. On the anode of the LED, you'd connect an appropriate current-limiting resistor between it and Vcc.

There are also a number of FET array ICs available. You'd want a quad or octal IC, with N-channel Enhancement mode FET or MOSFET. There's also the good old standby, ULN2804 IC, which is eight Darlington transistor pairs, but they drop a minimum of 0.6V from their open-collector outputs - which mean they generate more waste heat than the FETS/MOSFETS would. However, they would require the least amount of space and wiring to hook up, and are the least expensive solution.

You can get resistors in networks, both in SIP (single row of inline pins) and DIP (dual inline pins) packages. For your application, 9-pin SIPs would probably be the most convenient. You might want to hold off on ordering the stuff though, so you have some more time to plan everything out.

After all, you don't have a way to SET the clock yet, right? (this would be easy to do using the 1Hz clock circuit I posted previously, plus a couple of switches and capacitors)

What if you want to make the LEDs darker at night, but brighter when the room is bright? (this could be accomplished using a simple PWM circuit and a photoresistor)

How about running on batteries if the power goes out?

Do you want it to be able to recharge the batteries?

What about an alarm? Does that matter to you? (you would need an additional set of counters, and a means of comparing all of the outputs)

Are you going to use it as a 24 hour clock, or 12 hours with AM/PM indication, or switch-selectable display? (either of the former is easy, the latter may be more difficult)
 

Thread Starter

arthur92710

Joined Jun 25, 2007
307
Thats a lot to reply to! thanks! but it late and I have to go. I have read your whole post and will think about it tomorrow while im in school, then when I get home Ill post a reply.
 

Thread Starter

arthur92710

Joined Jun 25, 2007
307
You wont believe it!
We had last week off from school for regents testing, but we also had Monday and Tuesday off as well! But I was not told and they did not give out a notice. I did not go to school on Monday because I had to go to the doctor(she says i have an unknown desises, she said the name but it was long, she also said it is unknown how it is caused and how to treat it. She says ill Have it for 4 to 8 weeks, Its just a rash on my "upper trunk", chest,neck chin, arms, Its kind of itchy but i barely notice it.)
So while I was at the bus stop this morning I saw my science teacher and she asked me "what are you doing here? Theres no school until Wednesday for students."
I was speechless! But she was happy to see me! She said I helped he with something because she saw me.
Long story sorry if you don't like it. :)

Im trying to use the 4518 in EW and there are pins called EN CP and MR
MR must be master reset which i think should be low.
CP must be clock pulse
and EN is enable which should be high
Am I right?
It works but it stops at 7 or 0111 what do I do? (FIXED the led was not connected to the transister)
 

Thread Starter

arthur92710

Joined Jun 25, 2007
307
Well I got a clock!
Check this out..


sorry for the ^white space^ but it will be colored soon.

What do you think? can it tell time?
 

Thread Starter

arthur92710

Joined Jun 25, 2007
307
The 4518 could not work here. It only counts to 9 so when it should show 10 it is 10000 which is 16. So the counter that goes from 0 to 15 would work better.:confused: Im confused can some one set me straight?


This one counts from 0 to 63 I just have to add a and gate to make it 0-59
 
Top