Author Topic: EEVblog #801 - How To Design A Digital Clock  (Read 95628 times)

0 Members and 3 Guests are viewing this topic.

Offline hayatepilot

  • Frequent Contributor
  • **
  • Posts: 263
  • Country: ch
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #225 on: October 02, 2015, 09:27:25 pm »
I kept the tradition of shitty hand-drawn circuits, I hope you like it. ;D
WOW, thank you very much! That's exactly what I had in mind.  :-+
Now where can I find some vintage 4000 series CMOS chips....  :-/O :-DD

Greetings
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1356
  • Country: si
  • I like to measure things.
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #226 on: October 03, 2015, 06:43:45 am »
You're welcome. :)

The chips used in this clock are still readily available from most major distributors.
CD4026BE
CD4040BE
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline rdl

  • Super Contributor
  • ***
  • Posts: 3667
  • Country: us
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #227 on: October 03, 2015, 07:05:43 am »
The older chips get used a lot more than you would think. Here in the US, Mouser has a little over 15,000 of the 4026 stocked, in three different packages. I'm sure Digi-Key has them too.
 

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 38713
  • Country: au
    • EEVblog
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #228 on: October 03, 2015, 07:09:28 am »
Now where can I find some vintage 4000 series CMOS chips....  :-/O :-DD

Still common as mud, that's the great thing about discrete logic like this.
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #229 on: October 03, 2015, 07:40:06 am »
Now where can I find some vintage 4000 series CMOS chips....  :-/O :-DD

Still common as mud, that's the great thing about discrete logic like this.

All of them except 2 were available from Tayda electronics. All were cheaper than the major distributor quote.

I made a sharable project on Mouser for this.
http://www.mouser.com/tools/projectcartsharing.aspx
Access id: 52b77a006e

Feel free to correct errors, and use or misuse it to your heart's content :)

Very Cool.

I tried the same thing on Tayda. There were two parts they didn'thave.

Code: [Select]
Product Name Unit Price Qty Subtotal
1N5817 Diode Schottky 1A 20V $0.06 24 $1.44
CD4013 4013 IC CMOS DUAL D FLIP FLOP $0.26 2 $0.52
2N3904 NPN General Purpose Transistor $0.02 10 $0.20
CD4040BE CD4040 4040 Ripple-Carry Binary Counter/Divider IC $0.36 2 $0.72
CD4026 4026 IC CMOS Counters Decade/Divider $0.33 6 $1.98
CD4511BE CD4511 4511 BCD to 7 segment Latch Decoder IC $0.23 2 $0.46
LED Display 7 Segment 2 Digit 0.36 inch Common Cathode Hi Red $0.36 2 $0.72
LED Display 7 Segment 3 Digit 0.36 inch Common Cathode Hi Red $0.42 2 $0.42
LED 3mm Red $0.02 4 $0.08


They don't stock 4518's and did not have any single digit .40" 7 segment displays.  (And I didn't bother with the transformer)

But out of what I found, less than $7
« Last Edit: October 03, 2015, 07:41:46 am by Stonent »
The larger the government, the smaller the citizen.
 

Offline GK

  • Super Contributor
  • ***
  • Posts: 2607
  • Country: au
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #230 on: October 03, 2015, 11:42:30 am »
You need nothing but 4011s.
Bzzzzt. No longer care, over this forum shit.........ZZzzzzzzzzzzzzzzz
 

Offline AF6LJ

  • Supporter
  • ****
  • Posts: 2903
  • Country: us
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #231 on: October 04, 2015, 03:23:00 am »
You need nothing but 4011s.

Well if you are going to do that, you din't need anything more than a box of resistors, and diodes and a gross of 2N2222s.
Sue AF6LJ
 

Offline sbprojects

  • Contributor
  • Posts: 13
  • Country: nl
    • SB-Projects
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #232 on: October 05, 2015, 10:00:15 am »
You need nothing but 4011s.

Well if you are going to do that, you din't need anything more than a box of resistors, and diodes and a gross of 2N2222s.

That wouldn't make a CMOS clock. You would need a 2N7000 instead of the 2N2222.
 

Offline Godzil

  • Frequent Contributor
  • **
  • Posts: 458
  • Country: fr
    • My own blog
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #233 on: October 05, 2015, 10:17:33 am »
This videos (and some others from Dave) just remind me that I never ever made any power supply nor any clock, does that mean I failed my EE learning?  :-/O
When you make hardware without taking into account the needs of the eventual software developers, you end up with bloated hardware full of pointless excess. From the outset one must consider design from both a hardware and software perspective.
-- Yokoi Gunpei
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #234 on: October 05, 2015, 11:10:13 am »
This videos (and some others from Dave) just remind me that I never ever made any power supply nor any clock, does that mean I failed my EE learning?  :-/O
I think as long as you've made something with a 555 and/or 741 then you will be fine  :-/O
 

Offline AF6LJ

  • Supporter
  • ****
  • Posts: 2903
  • Country: us
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #235 on: October 05, 2015, 02:35:33 pm »
This videos (and some others from Dave) just remind me that I never ever made any power supply nor any clock, does that mean I failed my EE learning?  :-/O

In a word No.
Does having practical experience building stuff help? Yes.
Sue AF6LJ
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #236 on: October 05, 2015, 03:31:30 pm »
If Dave would have at the time the same cheap technology we have now (MCUs, LCD/OLED, CPLD, network time sources, etc), I doubt if he would still build the clock from discrete logic.

I also built a discrete logic clock (74xx, Nixies) but there was not much else to do at the time if you were not into audio and radio.
« Last Edit: October 05, 2015, 03:34:42 pm by zapta »
 

Offline AF6LJ

  • Supporter
  • ****
  • Posts: 2903
  • Country: us
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #237 on: October 05, 2015, 03:41:34 pm »
If Dave would have at the time the same cheap technology we have now (MCUs, LCD/OLED, CPLD, network time sources, etc), I doubt if he would still build the clock from discrete logic.

I also built a discrete logic clock (74xx, Nixies) but there was not much else to do at the time if you were not into audio and radio.
That's true, we could have combined radio with this project and synchronized the clock with WWVB or WWVL.
Sue AF6LJ
 

Offline Dave Turner

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #238 on: October 05, 2015, 09:59:11 pm »
I'm all for old school as a learning media it's fun and more importantly lays a foundation for true understanding.

In my view it is potentially (sic) dangerous for any engineer to focus only on the latest/greatest developments without having, at least, a basic understanding of where the technology came from.
 

Offline f4eru

  • Super Contributor
  • ***
  • Posts: 1114
  • Country: 00
    • Chargehanger
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #239 on: November 22, 2015, 08:17:50 pm »
That would drive the wife nuts!  ;D
I think we need a "wife compatible" electromagnetic clock done with low noise relays (e.g. reed relays or such)

Offline Brumby

  • Supporter
  • ****
  • Posts: 12383
  • Country: au
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #240 on: December 04, 2015, 09:01:40 am »
As I started reading through this thread, my mind went back to my very own attempt at designing and building a digital clock.  That was in the days of 7400 series ICs around the time the LS versions were appearing.  CMOS chips were some time later and looked rather magical with logic levels more relative to Vcc than absolute volts.  With my 5v TTL thinking, that was a real head spin.

It has been too long to remember the specific chips I used - but I'm sure there were some 7490s in there.

Like Dave, I also used the 50Hz mains as my clock reference, as this was the only low cost (i.e. free) frequency reference available.  Also, like Dave, it was constructed on Veroboard - but I didn't have a finished project in mind, I just wanted to know I could make something that worked - so everything was laid out on a single full-sized piece (very extravagant).  I went with a 24 hour clock format because I wanted hours, minutes and seconds and (at the time) didn't have any more displays for an AM/PM indicator.  It also felt more 'scientific'.

The display consisted of the regulation 7 segment red LED displays of the day, but I was intrigued with the idea of multiplexing them - so I went down that path.  With the multiplexing and generous number of Veroboard tracks available, most interconnects were simply tinned copper links, so I didn't have the mass of wires seen in Dave's project.  In my early days, this was probably for the best.

For the multiplexing, I needed something to provide a suitable clock speed so I went for an NE555 timer circuit, but made it with variable frequency so I could slow it down (to around 1Hz) and see it in action.  This worked really well and I spent far too much time twiddling that pot, fascinated by the magic.  Somewhere along the line, however, I killed one of the outputs from the digit select chip (forget what it was).  Since this chip cycled through more than 6 outputs, I simply used one of the free ones for the affected digit.  This changed the scanning sequence from 1-2-3-4-5-6-*-*-... to  1-2-7-4-5-6-*-*-... which was both annoying and satisfying.  While very obvious at slow scanning speeds, it soon became invisible as the speed was increased.  But I still knew it was there....

When it came to setting the clock, I took an easy path - just varying the clock pulse into the first counter. This was done with a 3 way switch.  In the 'Run' position, my mains derived pulse was connected.  Then there was the 'Stop' position where there were no pulses.  The idea of this was, if you overshot the fast forward, you could pause the clock until the world caught up and then you just flicked the switch to 'Run'.  For 'Fast forward', I just went for the obvious and tapped into the multiplexing circuitry.  Being variable frequency, it made it convenient for zipping forward quickly (up to 86,400 seconds) and then slowing down as the correct time approached.  Yes, slowing down the rate made the display a bit jittery to look at, but it was still quite readable and was only during the time set process.

So, there was my clock.  At last it was finished and working.  Over the next couple of hours my checks on its accuracy made me feel really chuffed, so I left it running overnight and went to sleep with that satisfying red glow over on my desk, silently ticking the seconds away.  It was a good night's sleep.

When I woke in the morning, I first checked my (wind-up) watch and then looked over at my clock, expecting to see a discrepancy of, maybe, a few seconds - but I was aghast to see my clock had gained something like 10-15 minutes!!!

What has happened here?!!  What's gone wrong?!!  I was devastated.  This shouldn't be!  Shock soon gave way to a determination.  I set out to check, re-check, test and re-test .... Did I have a dodgy solder joint?  Did my multiplexing signal get into the counter somehow?  Was it this?  Was it that?  After a couple of days, I was at a loss and I was just about over it.

However, late one evening, when I was just sitting there staring at it, I saw it jump into fast forward for a couple of seconds and then drop back to normal pace.  What the ...?  Then it happened again.  My first reaction was - is there some RF being picked up?  But how?  Where?  What can I do about it?  But then it happened a third time, which is when I noticed something else.... a faint buzz.  Over the next minute I saw the buzz and my clock's odd behaviour in perfect step.

The buzz did not come from my clock - it was part of the normal background noise of the home environment, often heard emanating from the odd electrical device at particular times of the day.  When I realised what was happening, it hit me like a piano dropped from the roof of the AMP building (the tallest building in Sydney at the time).  I was relieved - and miffed.

For those of you who haven't worked it out, it was the ripple control signals (off-peak switching tones) superimposed on the mains that run around the 1KHz mark which caused my problem.  Well that, and my all-too-simplistic circuit to produce my clock pulses.  It was picking these up and it would give me bursts of pulses 20 times too fast.  Once I worked this out, it was somewhat fascinating to watch and entirely annoying at the same time.

Having identified the problem, I had had enough and just put it aside.  Eventually, it ended up in a box in my garage marked "Electronics Assemblies" - a place where various circuit boards went to await reincarnation.  I had a bit of a clean up last year, but I don't think I would have ditched it.  I might see if I can dig it out.
« Last Edit: December 04, 2015, 09:07:42 am by Brumby »
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12383
  • Country: au
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #241 on: December 04, 2015, 09:11:10 am »
Interestingly enough, one of the things we got to do in the EE power lab was to synch generators up to the grid.  It's actually possible to do with three light bulbs, one for each phase.  When there is a difference in phase between your generator and the grid, the bulbs will illuminate proportionally to the phase difference.  As you bring your generator into sync, the bulbs go dark, and then you can transfer your generator onto the grid. 

Crude, to be sure, but it was a great visual introduction into phase synchronization.

I like it.  Beautifully simple.
« Last Edit: December 04, 2015, 09:18:44 am by Brumby »
 

Offline sean0118

  • Frequent Contributor
  • **
  • Posts: 461
  • Country: au
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #242 on: March 06, 2016, 04:56:33 am »
I'm just getting around to making my own version of this clock, but I have a few questions about the 4026B.

Are these really made to connect directly to 7 segment displays? The 4511B lists Ioh source current values of 0-25mA, however the CD4026B can only source 3.2mA (when Vdd is 5V). Or is the listed Ioh of the CD4026B only for 1 segment (giving 22.5mA total)?

In the applications section of the CD4026B datasheet they use a CA3082 to interface to the 7 segment display. However there is also a note saying buffers are only required for the A series... thoughts?  ;)




http://www.ti.com/lit/ds/symlink/cd4026b.pdf
« Last Edit: March 06, 2016, 04:58:27 am by sean0118 »
 

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 38713
  • Country: au
    • EEVblog
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #243 on: March 06, 2016, 07:58:13 am »
I'm just getting around to making my own version of this clock, but I have a few questions about the 4026B.

Are these really made to connect directly to 7 segment displays? The 4511B lists Ioh source current values of 0-25mA, however the CD4026B can only source 3.2mA (when Vdd is 5V). Or is the listed Ioh of the CD4026B only for 1 segment (giving 22.5mA total)?

It's per pin. You can source more for the entire power rail. IIRC it's speced in terms of maximum package dissipation.
 

Offline sean0118

  • Frequent Contributor
  • **
  • Posts: 461
  • Country: au
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #244 on: March 06, 2016, 08:25:01 am »
Thanks Dave! I'll post some pics when it's done.  ;)
 

Offline n3vti

  • Contributor
  • Posts: 32
  • Country: us
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #245 on: March 19, 2016, 05:01:01 am »
My first ever attempt at a clock was about 20 years ago, when I was just getting started with electronics. I didn't have any CMOS chips; instead I had TTL. (7490s for the counting and 7448s for the displays) For the timing part, I tried to use a 555 timer (this was before I knew about temperature drifts years later  :) ) At one point I had wanted to use some old TIL-311 displays I had lying around. Someday, I hope to build one again.

Finally decided to join the forum  :) I have a lot of ideas and projects in mind; of course they'll be in the proper threads.

~Chuck
 

Offline EEVblogTopic starter

  • Administrator
  • *****
  • Posts: 38713
  • Country: au
    • EEVblog
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #246 on: March 19, 2016, 05:49:17 am »
Finally decided to join the forum  :) I have a lot of ideas and projects in mind; of course they'll be in the proper threads.

Welcome, and please do publish your projects here.
 

Offline n3vti

  • Contributor
  • Posts: 32
  • Country: us
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #247 on: March 19, 2016, 05:58:53 am »
Welcome, and please do publish your projects here.

Will do; thanks Dave! Maybe I might send you something for a future mailbag/teardown. I collect clocks (over 200 of them!) and calculators (mostly TIs, but I have Casios, too! :) ) as a side hobby.  :-+
 

Offline SteveyG

  • Supporter
  • ****
  • Posts: 997
  • Country: gb
  • Soldering Equipment Guru
Re: EEVblog #801 - How To Design A Digital Clock
« Reply #248 on: April 06, 2016, 07:18:05 am »
I'm thinking of building a clock like this. But I'd like it to display in 24H format.
How would the scematic have to be modified to do this?

Greetings

I know SB Projects replied, I also have one on my website linked below.

https://sdgelectronics.co.uk/led-circuits/build-a-2-3-6-digit-led-clock/
YouTube Channel: https://www.youtube.com/user/sdgelectronics/
Use code: “SDG5” to get 5% off JBC Equipment at Kaisertech
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf