BCD (Binary Coded Decimal) Clock

takao21203

Joined Apr 28, 2012
3,702
This is how my binary clock looks like. I do not have a schematic as I do not need one for myself.

If you have any more questions about the 74xx logic circuits, I can help you with that, I know these flip flops and counters.

You said you already consulted all these datasheets.

So is it basically you want to use Bill's circuit, but modify it to have a 4060 crystal time base? Kind of putting two circuits together into a new circuit.

You should make yourself as much familiar with the datasheets as to understand all circuit elements properly.

Building a circuit from instructions is one thing, but as the designer you should know about the details. It is OK just to take the circuit sections as is if you have a basic idea what they are doing.
 

Attachments

takao21203

Joined Apr 28, 2012
3,702
The second reason it looks messy is because I couldn't find the 74HC390 in my simulation program so had to use a generic 16pin DIL and the pin layout of course isn't the same!

There's one slight problem... it doesn't seem to work.
This one made me alert when I did read the posts again.
How do you expect it to work when you don't use an actual 74hc390??

This is unclear to me.
 

takao21203

Joined Apr 28, 2012
3,702
Pretty much similar to Don Lancaster's PI network circuit.

In my design I did not use 4060, but individual counters to divide down.

4060 is equally good of course.

As a state of the art question, I'd not really recommend to mix for instance 40xx and 74xx. If any possible, only use one technology.

If you just use the 4060 of course an exception- special function.

Getting a design working and to produce a well formulated design can be quite different.
 

Attachments

oladiladio

Joined Dec 2, 2008
3
1. You can use a CD4060 with a 32,768Hz watch crystal to get a 2-second pulse. Divide that by 2 with a FF to get a 1-second count for the input to the 1-second counter.
Dividing a 2-second pulse by 2 would result in a 4-second pulse. You better rebuild your circuit to get a 1-second pulse out of your 32,768kHZ crystal.
 

Thread Starter

edwardholmes91

Joined Feb 25, 2013
210
I should still be able to see the 1Hz pulse. the fact that I can't simulate the 74HC390 doesn't really concern me because I'm fairly confident that bit will work. The bit that I'm not sure about is the 1Hz input which I'm trying to slide in place of the old mains bit.
 

Thread Starter

edwardholmes91

Joined Feb 25, 2013
210
I've actually found some other really good websites... but I bought all the parts for prototyping the other day, so I'm a little relunctant to start considering different designs, but these look interesting:

http://idesign.calpoly.edu/projects/LEDclock/

http://www.hanssummers.com/binary.html

The Hans Summers link actually shows how to make a 1Hz signal using a crystal too... little annoyed that I didn't stumble on this site sooner! There's also some nice pictures of peoples projects on there too.
 

takao21203

Joined Apr 28, 2012
3,702
If you are going to make a PCB, many 74xx and even some 40xx are available as SOIC (1.27mm spacing).

They are actually super easy to solder if you know how.

All you really need is a broad tip. Then you can use the capillary effect and pull the solder ball over all the pins.

You'd save PCB space, and they also look nice.

Or are you going to use IC sockets?

Against all odds, small SOICs are also easy to remove again with a soldering iron.

Most 74HC actually can work from 2.4 volts, not sure about the 4060. It is worth trying if your proto circuit can run from 2x AA batteries- saving you the 7805 etc.

If you use super bright LEDs, you can still use 2.2K and get decent brightness. Blue LEDs are just on the margin at 2.4V.

I wasn't so far off suggesting 2x 27pF- http://www.hanssummers.com/lcdfreq.html
2x 22pF are used here for the 4060 oscillator.
 

Thread Starter

edwardholmes91

Joined Feb 25, 2013
210
I think I am going to leave the surface mount ones... I can probably solder them, but I'm not sure if the students will be able to or not. It's looking like it will be two boards, a 4" x 4" output board and also the same size control board, mounted on top of each other and something like a d-type to connect the two boards together. I will use spacers too, on each corner, so it has some mechanical strength and isn't stressing the d-type.

With regards to the power, I am going to put a B-type USB socket on the board and power it from that because it is 5V and with the low current LEDs that I've ordered it will only be a little over 100mA tops.

I'm really in a bit of a predicament now, because Hans circuit does look a little simpler to make and also explain, but I have ordered all of the parts for the other one now :rolleyes: If worst comes to worst then I can just put the components into stock and use them on other projects. I went a little crazy and bought enough for two circuits... along with a spare or two just in case! :D
 

Thread Starter

edwardholmes91

Joined Feb 25, 2013
210
Right, I have just realised that I have ordered a load of the wrong parts anyway for some reason!

So I am going to have to buy some more bits anyway. I think I would like to go for this circuit by Hans Summers and use the crystal circuit on his website because his circuit does 24 hour clock which is what I want.

I have attached the circuit and highlighted a few things. The two diode that have a cross on them aren't on the original hand drawing and Hans mentions that it's a mistake on schematic. I don't need the transformer etc. and I don't want the frequency indicator so I have circled them and I'm going to remove them. Will it still work when it has 1Hz put into it or have I taken something out I shouldn't of?

Where do I put the new 1Hz input into the circuit... and finally why are there no Schmitt triggers? I thought they were needed to ensure a clean signal? If so where do I put them and can I used NAND gates and 1 Schmitt trigger instead of 2 Schmitt triggers and an AND gate. Or even better is there such thing as a Schmitt NAND?
 

Attachments

takao21203

Joined Apr 28, 2012
3,702
I see problems in the schematic. You need to test in a simulator software, or you need a wire prototype (large spaced phenol PCB using wires for the connections not stripboard).

Some diodes seem to be in the wrong place.

On the left clearly this is a wired OR.

Why not use a real OR gate??

I'd really design the circuit myself from TTL gates according to my understanding.

There are issues with that of course:

-Having the design selection limited because not all original 74xx ICs are available anymore or you can not simulate them
-Ordering wrong chips and then having piles of chips around.

Myself I have boxes here with such chips, intended for projects but then it was done differently.

Inflexibility is the big drawback of TTL.

Did you consider to recreate some chips with PALs or GALs?

You do not have to cram everything into 2 or 3 GALs.

You can really program the fuses so they behave like a TTL IC from a datasheet. Even change a polarity, add an input or two.

This is still considered 74xx TTL, not true GAL circuit.

If I'd volunteer to draw the circuit for you, I'd have to use whatever is available in WinCupl.

What you lined out in red of course does not contribute to the functionality.

Schmitt triggers?

I have no idea why they should be neccessary or beneficiary here.

You need of course a debounce for the key.

Properly done, you need an OR for each carry over. Either you use the carry from the counter, OR the input from a key (debounced).

Teaching a circuit to children, you should use logic gates straightforward, not employing tricks like wired OR. Later about that...

I am not suggesting to build it with a controller (as you do not wish to do so per post #1).

I am offering help but take my criticism.

Have you yet created a WinCupl simulation?

You can in the meanwhile forget about the 4060 and use something else, any kind of oscillator will do. WinCupl should have some kind of oscillator or generator (like LTSpice).

When I made my CMOS LCD clock, I had no internet, no simulation software.
 

takao21203

Joined Apr 28, 2012
3,702
Deboucing a key is easy, you need an inverter buffer.

Let's say 10K to Vcc, and 2.2K to GND with the key. Then you also have a 22uF capacitor in parallel from the 10K resistors.

Change to 4.7K eventually for LS TTL.

That's it. Prooven circuit. Then you use an OR gate with the carry from the counter.

It is not so much a sophisticated circuit, since there is no display decoding or driving neccessary.

Doing the counters reset & carry also is easy, you need 4bit comperator IC here.

It is really quite intuitive you should be able to construct something from my explanation.

Many web circuits indeed suffer from bugs. This is not always intentionally, sometimes a preliminary version from testing was used for the drawing, then things were changed during testing, but no new schematic was drawn.
 

Thread Starter

edwardholmes91

Joined Feb 25, 2013
210
Sorry you have completely lost me with OR gates... I can't see any OR gates. And what is a PAL or GAL? I have plenty of breadboard to test circuits out with. This is the clock circuit that I was going to use for the 1Hz clock:

http://www.hanssummers.com/images/stories/binary/crystal.gif

From what I can see from Hans website, lots of people have built this design of his without problem. I was just a little sceptical with the lack of de-bounce on the switches. And also unsure as to the segments that needed removing and where to input my new 1Hz signal.
 

takao21203

Joined Apr 28, 2012
3,702
Well if you have your oscillator working, good.

This is what I would use, not a hardwired OR with diodes, but a logic gate.

Also a 4-bit comperator for each digit.

Let's not talk about GAL then but I can explain in a line, these are programable arrays. They can be programmed with a pattern, so they behave exactly like any 74xx.

The idea is you only need to stockpile one type of GALs.

They cost about $1 each but are no longer manufactured, though to be around as old stock for a decade or two to come.

Lack of debounce will cause difficulties like the clock jumping forward 2 minutes sometimes.

I guess this is the reason for the schmitt triggers and capacitors. It is a bit hard to follow how this works.

Some of the diodes are not in the correct direction I'd say.

Mr. Summers still would be accepting your circuit if you change it- one guy even used a controller, and it is shown on the webpage.

Do you have any design files yet for simulation software?
 

Thread Starter

edwardholmes91

Joined Feb 25, 2013
210
I don't know if the oscillator works because the simulation software I have doesn't have the chip on that I need.

So you are saying where there are two diodes it is instead of an OR gate?

From what I can see on Hans circuit there is no switch de-bounce, would it be difficult to implement? Those 3 switches are only ever used to increment the minutes and hours at a 1Hz rate to set the clock and zero the seconds.

My simulation software doesn't have the 74HC393 either. So I can't simulate the circuit on the computer. I will be using all 74HCXX instead of 74LSXX appart from the ocsillator circuit which I can only get in 4521b CMOS.

I can test the circuit using breadboard, but I need to know what else needs adding etc. before I place another order for parts. Surely his circuit can't be all that incorrect if so many have built it and got it working?
 

takao21203

Joined Apr 28, 2012
3,702
No it is of course largely functional.

But be prepared- just taking a schematic from the web + order a PCB from that- you are in for nasty surprises.

One time I saw an old linear regulator with LM723- it would oscillate if build 1:1 like shown.

Yes it is the same as to use a real OR gate, it is called "hardwired".

By the way, for educational purposes, there is nothing wrong taking PIC 16f54, and to program them in a way they behave like a 74xx.

It can be done. You can even get a brother label printer, and put labels on them: 74393, 7408 etc.

You can really use one PIC for one logic IC. For educational purpose.

The schematic will be the same, and it will behave the same.

You are then no longer bound to stockpile real 74xx ICs.

It is a super-low speed circuit, so it is easy for PICs to test their I/O on the input side, and quickly write to the output from a table.

It is not a waste, since it is for educational purposes.

Mistakes are not changed in hardware, but in software...

I mean you can route to different pins like compared to original 74xx if you wanted to.

I can help you getting PICs started for this purpose within a day.

I mean treat 74xx as black box, no matter if it is a real TTL IC, or a small controller.

You'd learn a lot and so your students. It is a modern approach.
 

takao21203

Joined Apr 28, 2012
3,702
I don't know if the oscillator works because the simulation software I have doesn't have the chip on that I need.

So you are saying where there are two diodes it is instead of an OR gate?

From what I can see on Hans circuit there is no switch de-bounce, would it be difficult to implement? Those 3 switches are only ever used to increment the minutes and hours at a 1Hz rate to set the clock and zero the seconds.

My simulation software doesn't have the 74HC393 either. So I can't simulate the circuit on the computer. I will be using all 74HCXX instead of 74LSXX appart from the ocsillator circuit which I can only get in 4521b CMOS.

I can test the circuit using breadboard, but I need to know what else needs adding etc. before I place another order for parts. Surely his circuit can't be all that incorrect if so many have built it and got it working?
What you describe is one of the main problems with these ICs. Difficult to do a proper design with these availability problems.

If you don't have 74393, you have to use something else similar to that in the simulation. Get the simulation started somehow.

There are many kinds of 4bit counters. Use a proper 4-bit comperator for the carry over. I mean try this in the simulation software.

Designing circuits is always hard work, no matter if you are a beginner or an expert with 10 years experience.
 
Top