Category Archives: Projects

Shadowbox for 7490 Clock

7490 TTL Digital Clock Housing

After a few months of testing ( April – June 2017 ) the 7490 TTL decade counter chip based clock out with the newly added OCXO it was ready to be mounted in a housing.

7490 TTL Clock with OCXO under test
7490 TTL Clock with OCXO under test

Monitoring it against an accurate timebase ( Linux PC with NTP ) while piled up loosely on a small table in the office, it was running good and steady. No flaky counts, no flaky digits that were not lighting or staying lit when they should not be.

 

 

 

Consolidating Power

After the photo was taken above,  the power supplies for the clock were consolidated. Under testing it was powered by 2 wall supplies, 5V for the TTL chips and 12V for the OCXO. For the final version I used a 7805 regulator on the right hand side board to down regulate 12V from a Radio Shack 12V/2.3A power supply to 5V for the TTL chips. I got lucky and spotted the power supply during the last few days that Radio Shack was still in business in April 2017.

Wood Housing

Not having a good set of tools on hand to build a metal housing, a good option was a  wooden one. Micheal’s craft store had both the base that the boards were mounted to and the shadowbox. Both were unfinished and reasonably priced, I believe $5 for the board and $12 for the shadowbox in 2017.

7490 TTL Clock Circuit Board Base
7490 TTL Clock Circuit Board Base
7490 TTL Clock Shadowbox, cover removed
7490 TTL Clock Shadowbox, cover removed. A bit larger than is needed but, it works fine. The glass cover was removed in preparation for sanding and the application of linseed oil.

The base was drilled out to recess fit 10mm standoffs. Holes were drilled for the M3 screws and then countersunk with a larger bit to accommodate the 10mm standoffs. Once again I made out good at the Radio Shack closeout and got a bunch of standoffs.

Subassembly

7490 TTL Clock Mounted on Base
7490 TTL Clock Mounted on Base

The clock mounted on the base in a state of readiness to drop into the shadowbox as a subassembly. This trick is a bit that I learned from working in manufacturing in the past. To make things efficient and serviceable it was common to mount boards on sub assemblies and then mount the subassembly into a piece of machinery.

 

 

 

7490 TTL Clock Mounted in Shadowbox
7490 TTL Clock Mounted in Shadowbox

 

Finally the subassembly gets dropped into the shadowbox and is held in place by four small wood screws that are on the back.

Previous post in this series

Next Post in this series

7490 TTL Clock Final Housing
7490 TTL Clock, Final Housing

 

 

TTL 7490 BCD

7490 TTL decade counter chip in action

While in the process of working on a digital clock that I built in 2007, I had to take another look at how a 7490 decade counter works in order to remind myself. I rigged one up with some LEDs to count 0 to 9, showing the count in BCD form on the LEDs.

The oscillator used to drive the 7490 counter is one stage of a 7414 Schmitt Trigger inverter. Using a 47 microFarad capacitor and a 15K resistor, this gives a slow enough pulse to watch what is going on at a calculated period of 0.588 seconds. It is basically running the 7414 as a relaxation oscillator, charging and discharging the capacitor through the resistor repeatedly. Being an inverter the output of the 7414 will be high when the input is low and vice versa, so it is always either charging or discharging the capacitor. The waveform, even though I don’t have a scope to put on it, at the capacitor must be a sawtooth I imagine.

Circuit Diagram

7414-7490-diagrams
7414 and 7490 Diagrams: Click on to enlarge

Video of 7490 Counting

The 7490 is both a divide by 2 and a divide by 5 counter. To get a divide by 10, the divide by 2 at Q0 is fed into input B. Outputs Q0,Q1,Q2 and Q4 are weighted by 1,2,4 and 8 respectively. I have the laid out in descending weight from left to right on the board. All set and reset lines are grounded. It will freely run from 0 to 9 and around and around. These lines could be fed into a 7447 7 segment display driver and that would drive digits like a real clock if desired.

The small LED on the left is connected to the output of the 7414 and blinks at the output frequency of it, the jumbo LEDs count from the output of the 7490 and the tiny LED to the right is just strapped from power to ground with a dropping resistor to show that the board is powered. There are also two capacitors 0.1 and a 0.01 microFarad strapped from power to ground to bypass an high frequency switching that appears on the power rails, always a good idea to bypass, this is a good idea on every chip if possible. This eliminates  high frequency noise on the power supply rails. Also grounding unused inputs on the 7414 or any chip that you might use is a good idea to prevent noise and erratic behavior of the circuit.

Powered at 3.5V

3.5VDC
3.5VDC

The usual 5V power supply was tied up running the TTL Clock I built while testing it, so for this setup I grabbed a 3.5V supply. The TTL circuits seem to run fine at this voltage, the only thing is that the time constant is probably a bit shorter for the capacitor to charge and discharge.

More on the 7414

http://www.talkingelectronics.com/pay/BEC-2/Page49.html

 

7490 Clock Article from 2000

I finally found the document that I based the 7490 clock that I built off of. Nothing like the process of moving to uncover lost items. The clock that I built had one main variation in that it did not use the 60Hz from the wall as a frequency reference. Instead it used a series of 7490 chips to divide down from 10 MHz to 1Hz to drive the clock portion. I did this with the foresight that at some point I was going to use a good crystal oscillator such as a TCXO, temperature compensated crystal oscillator or an  OCXO, oven controlled crystal oscillator. These are readily available in 10MHz versions. Another plus is that WWV out of Fort Collins Colorado transmits on 10MHz using a signal derived from a cesium oscillator so the oscillator can be checked and calibrated ( mostly ) against their signal easily by using a shortwave receiver.

Schematics for the version of a 7490 TTL Chip Clock that I built

I was able to scan the original document  and OCR it back to an electronic copy and published the text with the diagrams on this post. The original scan is at the bottom of this post. I downloaded it in 2007 from the How Stuff Works site. Unfortunately the well written article has disappeared from the Internet entirely or I would have just provided a link to it on this site. It has been put it up here for reference for anyone curious or wanted to build a clock out of 7490’s that use a 60Hz input. If this article reappears on-line, I would just link to it. If someone sees it somewhere, please let me know.

Circuit Diagram

Here‘s a circuit diagram tor the power supply and time base.

power-supply
power-supply

As we saw in the article on electronic gates,the power supply is the most difficult part.

 

 

 

To create the rest of the clock you will need

  •  At least four 7490 or 74LS90 chips
  • At least two 7447 or 74LSA7 binary to 7—segment converters
  • At least 20 resistors for the LEDs in the 7—segment displays ( 300 ohms would be
    fine.)
  • Some normal LEDs
  • At least two common-anode (CA) 7—segment LED displays (Jameco; part #172088 is
    typical)
  • Breadboard, wire. etc.
7490-pinout
7490-pinout

 

 

 

 

 

The 7490 is a decade counter. Meaning it is able to count from 0 to 9 cyclically, and
that is its natural mode. That is QA, QB, QC and QD are 4 bits in a binary number, and
these pins cycle through 0 to 9, like this

QD QC QB QA
 0  0  0  0
 0  0  0  1
 0  0  1  0
 0  0  1  1
 0  1  0  0
 0  1  0  1
 0  1  1  0
 0  1  1  1
 1  0  0  1
 1  0  1  0

You can also set the chip up to count up to other maximum numbers and then return to
zero. You “set it up” by changing the wiring of the R01,R02 R91 and R92 iines. If both
R01 AND R02 are 1 ( 5 volts ) an either R91 OR R92 are 0 ( ground ) then the chip will
reset QA, QB, QC and QD to 0. If both R91 and R92 are 1 ( 5 volts ), then the count on
QA, QB, QC and QD goes to 1001 (9). So

To create a divide-by-10 counter, you first connect pin 5 to to +5volts and pin 10
to ground to power the chip. Then you connect pin 12 to pin 1 and ground pins 2,3,6 and
7. Run the input clock signal ( from the timebase or a previous counter ) in on pin 14. The output appears on QA, QB, QC and QD. Use the output on pin 11 to connect to the next stage.

To create a divide-by-6 counter, you first connect pin 5 to to +5volts and pin 10
to ground to power the chip. Then you connect pin 12 to pin 1 and ground pins 6 and
7. Connect pin 2 to pin 9 and pin 3 to pin 8. Run the input clock signal ( from the
timebase or a previous counter ) in on pin 14. The output appears on QA, QB and QC. Use the output on pin 8 to connect to the next stage.

Creating the Second Hand

Knowing all of this, you can easily create the “second hand” of a digital clock. It looks like
this

seconds-count-using-7490
seconds-count-using-7490

In this diagram, the top two 7490s divide the 60-Hz signal from the power supply down by a factor of 60. The third 7490 takes a 1-Hertz signal as input and divides it by 10. Its four outputs drive normal LEDs in this diagram. The fourth 7490 divides the output of the third by 6, and its three outputs drive normal LEDS as well. What you have at this point is a “second hand“ for your clock, with the output of the second hand appearing in binary. If you would like to create a clock that displays the time in binary, then you are set! Here is a view of a breadboard containing a divide-by-10 counter. a divide-by-6 counter and a set of LEDs to display the output of the counters in binary.

 

Displaying the Time as Numerals

If you want to display the time as numerals, you need to use the 7447. Here is the pinout
of a 7447, as well as the segment labeling for a 7—segment LED.

7447-pinout
7447-pinout

You connect a 7447 to a 7490 like this

Provide +5 volts on pin 16 and ground on pin 8 to power the 7447 chip
Connect QA, QB, QC and QD from a 7490 to pins 7, 1, 2 and 6 of the 7447,
respectively.

Connect 330-ohm resistors to pins 13, 12, 11, 10, 9, 15 and 14 o0 the 7447,and
connect these resistors to the a, b, c, d, e, f and g segments oo the 7-segment
LED

Connect the common anode of the 7-segment LED to +5 volts

 

You will need to have the pinout for the specific LED display that you use so that you
know how to wire the outputs of the 7447 to the LEDs in the 7~segment device. ( Also,
note that the 7448 is equivalent to the 7447 except that it drives common-cathode
displays. Ground the common cathode of the LED in that case.)

V0u can see that by extending the circuit, we can easily create a complete clock. To
create the “minute hand’ section of the clock, all that you need to do is duplicate the
“second hand” portion. To create the “hour hand“ portion, you are going to want to be
creative. Probably the easiest solution is to create a clock that displays military time
Then you Will want to use an AND gate (or the R inputs or the 7490) to recognize the
binary number 24 and use the recognizer to reset the hour counters to zero.

NOTE: You can dispense with the and gate and simply wire the “2” line QB of the
hours-tens counting 7490 and the “4” line ( QC ) of the hours-ones counting 7490 and
connect BOTH to the same reset line (R1 or R2 )respectively on each of the hours 7490s.
In this manner when a 24 count occurs a reset is applied to both R1 and R2 on both hours
chips simultaneously, resulting in a reset to zero for both.

The final piece you need to create is a setting mechanism. On a breadboard, is is easy
to set the clock – just move the input wires to drive higher frequency signals into the
minute-hand section of the clock. In a real clock, you would use pushbuttons or switches
and gates to do the same thing.

If you happen to take your bedside clock or watch apart, one thing you will notice is that
there are probably not 15 TTL ICs inside. In fact, you may not be able to find a chip at all
in most modern clock or watches, all of the functions of the clock (including the alarm
and any other features) are all integrated into one low-power chip (in a watch, the chip
and display together consume only about a millionth of a watt.) That chip is probably
embedded directly into the circuit board. You might be able to see a blob of black plastic
protecting this chip. That one tiny chip contains all of the components we have discussed
here.

Scanned Original Document

scanned-original-document
scanned-original-document
morse-1 code

Cron Driven Morse Code Time Sounder

My goal was to make a new hourly chime,something with a bit of intelligence to it than just the same tone every hour. It was actually one of those random things that runs through your head when laying in bed trying to get in a mood to sleep.

A bit of history

Typically I have been using a preexisting system sound on a Linux PC to annunciate that it is the top of the hour. This helps to keep track of how long I am on the computer, time to take a break maybe. It also makes me away of the time, in case I am in the zone with coding or whatnot and need to be aware of how time flies. Once you have this, you kind of look for it, even when you are in the room doing something other than computer work.

Up to now this is what I typically had in my crontab…

00 09-23 * * * aplay /usr/share/sounds/fLight__2.0/stereo/Message.wav

I restrict the hours down, just so the thing doesn’t wake me at night if I forget to turn off the PC.

Festival

Years ago I used Festival, the text to speech program and made it annunciate the time. This works OK as long as you are at the PC. If you are away from it a bit, you don’t always pick up what the machine generated voice is saying. Morse Code has an advantage over voice, in that the tones are easy to pick up, even when faint. I have a ham license and have experienced this first hand. So that was my line of thinking with using Morse to give me the time at the top of the hour. It would be easy to not only know that it is the top of the hour but, I can tell what hour it is easily with Morse code. Plus it seemed like a fun twist. I have even thought of putting something like this on my Pi which runs 24/7 in my office. In our living room we have a bird clock, that has different bird sounds for each hour and that has been pretty useful at times, so that got me going on this whole hourly chime adventure years ago.

I was initially inclined to make my own tones but, a brief search found Stephen C. Phillips site and his Morse Code Translator. Using it I was able to create a more code “hour” sound file from 0-23, that plays the correct sounding for every hour.

It is possible to take any sound files and label them 0-23.wav and get other types of sounds to chime at the top of the hour. Birds songs, train whistles, nature sounds, the possibilities are endless.

How it works

Using the Morse Code Translator, I was able to create a series of Morse Code translations from 0-23, in WAV file format. The WAV files get put in a directory, morse-code-audio under my home folder and the following script gets called in place of the line shown above in my crontab….

#!/bin/bash

sounddir=/home/erick/morse-code-audio

# Grab the Hours off of the date.

hour=$(date +"%H")

#Call the correct file based off of the hour
 aplay $sounddir/$hour.wav

WAV Files for the Morse Code Time Sounder

I put the 0-23.wav files online, as a tar.gz.

morse-code-audio.tar

Compression, Signal Processing, Information Theory and Cryptography

Uncompressed the 24 WAV files in the tar file are a total of 348K , it is interesting just how compressible single frequency tones are. All of them compress down to a 2.8K tar.gz. I had to check twice, I thought I was missing a bunch of files. But it stands to reason when one thinks of a single frequency turned on and off slowly, has very little bandwidth. Provided the keying is shaped in a way so that it is not a pure sine wave modulated by a square wave, the pulses have to be shaped the corners rounded off to get the bandwidth below 100Hz. Thinking of Fourier transform, a tone left on from infinity has a bandwidth of zero. A digital signal, pulse shaped, on and off keying at 20WPM code is going to have a real narrow bandwidth, therefore highly compressible. The opposite extreme, white noise, would not be compressed down at all by gzip or any of the fancier types of compression. White noise is random, equally distributed across the spectrum, hence incompressible. But it makes for a hell of an encryption key for that very reason. The worlds of signal processing and cryptography do come together in interesting ways!

Resources

Stephen C Phillips has an excellent website and blog that covers a lot of technical topics among with the Morse Code Translator is an example. He also covers Python code and the Raspberry Pi for example.

http://blog.scphillips.com/

The featured image is from this site and it is an interesting read…

https://www.raspberrypi.org/learning/morse-code-virtual-radio/worksheet/

24 Hour Digital Clock Gets a Better Timebase

The last post on this clock built out of 7490 TTL decade counter chips gave a bit of back story on it and the initial troubleshooting of it’s timebase drift and noise issues that caused extraneous counts to occur. Now that the noise is figured out and solved, it is time to do something better than a plain crystal with a trimmer 7400 ( NAND Gate ) oscillator for a timebase.

Driving the clock with an OCXO

The goal was to allow the clock to be driven by an oven controlled crystal oscillator (OCXO), which would surpass the performance of the oscillator on the board. The on board oscillator can be easily pulled off it’s frequency and slaved to an external source. By using a 7414 Schmitt Trigger Hex Inverter, it is possible to take the low level sine wave output from the OCXO and convert it into a digital signal capable of entraining the on-board oscillator. By using an external master, I can pull the master OCXO off if I need it to calibrate anything else, meanwhile the clock keeps running off of it’s board oscillator. Most of the time the OCXO is not being used and can just remain with the clock.

7414-Schmitt-Trigger-on-breadboard
7414 Schmitt Trigger Hex Inverter on Breadboard

The hookup is pretty simple, I breadboarded it and found out the biasing one of the inputs of the 7414 mid range using a pair of 33K Ohm resistors in series from +5V power to ground with the input to an inverter stage on the 7414 in the middle at 2.5V, feeding in the OCXO signal, capacitively coupled  and then feeding the output of that stage into another inverter on the 7414 for a buffer, I was able to get a clean square wave at 10MHz. This I coupled to the board oscillator using a 370 Ohm resistor. The resistor is more or less a protection in case I touched it to something that I shouldn’t and I don’t want too much current to be able to flow in either direction. I also temporarily drove an LED via a 370 Ohm resistor off of the same output as a check that I was actually getting output, the LED is lit at half the brightness when it is excited by a square wave.

Initial testing with the breadboard shows that the clock now tracks time very well as compared to another clock I have that is synced to the WWV 60KHz signal.

OCXO to 7414 to TTL Clock
OCXO to 7414 to TTL Clock: Signal path is via yellow clip leads.

Schematics for the 7490 TTL Chip Clock

Previous post in this series

Next post in this series

24HRTTLCLK

24 Hour Digital Clock Using TTL Chips

About 10 years ago I built a clock built out of  7490 TTL decade counter chips. It was based off of an article that I found on How Stuff Works, that I could no longer find, but I have it available here. I also have posted the schematics for the version of the clock that I built that uses a 10MHz timebase and not the 60Hz one that the How Stuff Works version of the clock uses. Schematics for the 7490 TTL Chip Clock

The clock was in my shop for a number of years, then it got packed away when I moved in 2013. Meanwhile, In 2016  built a well made 24 hour clock from a kit from MTM Scientific, Inc that has a TCXO and drifts only a few seconds between the times of the year that it needs adjustment for daylight savings time. It has a nice bright readout and works well in my bedroom. But, it also got me thinking about the TTL clock again and I thought that one might be worth revisiting.

One issue with the 24 hour clock that I built from TTL chips is that it occasionally required adjustment of a trimmer capacitor to keep the oscillator running in time. I also noticed that occasionally it would flake out completely and get extra counts, causing it to run fast by about 1.5%. Sometimes just restarting it would fix the issue, it was a mysterious. It first occurred when I moved it to a different spot on the work bench after initially getting it put together and pinned to a wood board. My first thoughts were that I had a flaky chip. At one point I had accidentally connected the clock to a 12V power supply and blew out one chip and I speculated that there might be others  that were working but damaged. Or it could have been a bad solder joint, with all the points of connection that was certainly plausible.

The Real Issue

One thing that I didn’t have access to in 2007 that I have in hand now is a frequency counter. When I built the clock my frequency counter was missing. I had it packed away somewhere in 2003 and only found it years later (2013) as it was packed in a box that made no sense at all. But, it would have been handy at the time to track down where I was getting these extra counts. In early 2017 with the frequency counter in hand, I was able to quickly determine that it was not only extra counts, but noisy extra counts as the lower digits on the counter were fluctuating. Something was ringing or going into an oscillation, that was my initial thoughts. I relatively quickly suspected a buffer chip, 7400 inverter, that I had added to provide some reference outputs at 1MHz,100KHz, 10KHz and 1KHz. The chip was the only one on the oscillator and divider board that I had tacked on after the clock was working, so it seemed likely that it might be part of the issue. Plus, it was the only one that I had neglected to put a bypass capacitor across from power to ground. Removing power from the chip solved the problem, good counts, a perfect multiple of the 10MHz clock were now coming out of the board to drive the dividers on the second board with the digits. The chip might not be worth using, if I need lower frequency references I can always take another oscillator I have and use that.

Clock running close to target frequency.

Calibrating the 10MHz crystal oscillator by tweaking the trimmer, against a 10MHz OCXO ( Oven Controlled Crystal Oscillator ) and then watching it keep time for a few days, it now holds reasonable time.

The Next Plan

Frequency Counter and 10MHz OCXO
Frequency Counter and 10MHz OCXO

The next plan for this clock is to drive it with the 10MHz OCXO to overcome the limits of the simple 7400 Inverter TTL chip 10MHz crystal oscillator with a trimmer capacitor. This simple oscillator is limited, temperature will make it swing along with any proximity of metal or whatnot that changes the frequency. If you touch the crystal or any part of the circuit around it, I imagine the frequency is pulled off target.

By feeding it with the closed box OCXO, powered through a decent regulator, frequency variations due to temperature changes, voltage changes and capacitive changes due to proximity of conductors will be minimized. It will be interesting to see how stable the clock can be.

Also, it would be nice for this thing to finally wind up in a decent box and be powered by something other than a 12V to 5V regulator tacked to a spare breadboard.

24HRTTLCLKmounted
24HR TTL Clock. Mounted to temporary wood board.

I plan on writing more on this as the project unfolds, along with the schematics, when I find them, all hand written and might be lost when I moved, but I might just have to recreate them!

Next Post in this Series

Original Writeup on the Clock

It starts with a 10 MHz 7400 inverter oscillator and divides down using 7490 decade counters set up to divide by 6 or 10 as needed. Some AND/OR logic appears in the design as well to provide a pseudo WWV time code, 1kHz second ticks, minute and hour marker. This output is provided as an amplified audio output. This is done using a small 1 stage transistor amplifier driving the 2 inch speaker, with series resistor to limit volume. A 1/8in jack is provided as well for driving a larger speaker. The marker is also able to modulate a 1MHz output for a test signal. Three modes of output are provided, 1MHz carrier, 1MHz modulated with steady 1kHz signal and 1MHz modulated with pseudo WWV time signal. This signal and 100kHz,10kHz,1kHz are provided as buffered outputs for off the board use.

The display itself is an array of dual 7 segment common anode 0.75 inch elements, with appropriate 7-segment drivers. Setting is via 3 pushbuttons. Two provide speedups of seconds 1000X and 10X to roll the clock ahead faster than real time, a third button is a halt button for syncing with another clock source. A 10Hz ‘heartbeat’ LED is provided for debugging purposes. This is connected at the junction between both boards.

One board is the oscillator and divider to 1000Hz and the test outputs (1MHz,100kHz, 10kHz and 1kHz. Pseudo WWV 1MHz and audio) and the other board divides down further and has the display and the drivers for the 7-segment LEDS.(3/2007)

From my old website projects page at…

http://www.frontiernet.net/~erickclasen/projects.html

Documentation Followed During the Clock Design

7490 Clock Article from 2000

Schematics for the 7490 TTL Chip Clock

magnetic knife holder

Hard Drive Magnet Knife Holder

Recently I finished a small project to make a knife holder for the kitchen. It was made using one small block of wood, some screws and 8 magnets that came out of dead harddrives. The magnets were bought in Ithaca, New York from the Fingerlakes Re Use center ( 2255 N. Triphammer Road Ithaca,NY in the Triphammer Marketplace, phone 607-257-9699). Fingerlakes ReUse rebuilds and sells used computers ( much more other items as well ) and they sell harddrive magnets for 50 cents each (as of Sept. 2015 ). They have a pile of these magnets and it is worth picking through the pile to get some flat ones, looking for matching pairs and ones that will take a #6 screw for a project like this.

Harddrive Magnet Knife Holder
Harddrive Magnet Knife Holder

For the knife holder, I used a piece of oak flooring 3/4 inch thick, 10 inches long. It is best to use a piece of thick wood, because when you pull the knife off, there is a tendency to pull from the bottom handle out, which tips the knife towards the cabinet as the bottom magnet releases first. If the wood was thin the knife point would tip against the cabinet.

I cut the tongue and groove off the board ( trims it to 2-1/2 inches wide ) and then sanded it a bit on a belt sander to make the edges a bit rounded. Then using a drill press, I drilled out the holes to take #6 screws, 16 for the magnets (#6-5/8 machine screws), 2 (#6 – 1-1/2 wood screws ) with countersinks for the mount points. The whole process took about 20 minutes. For finishing I used a bit of linseed oil on it and then left it in the trunk of the car so a week while it was sunny and hot allowing the finish to be “baked” good and dry.

magnetic knife holder drilled
Magnetic Knife Holder Drilled

Strong Magnets

The magnets are rare earth magnets and are very strong. Therefore the piece of wood has to be screwed in good or it will probably pull off the cabinet when used. One caution with these magnets is that they will pinch your finger if you get it between them and another magnet or anything else ferrous. When I was cutting the wood I put one of the magnets down on the table saw. The steel on the table saw is so massive that the magnet was hard to get off, I had to use a screwdriver to pry the corner up, I could not lift it with my fingers!

Knife Holder Mounted To Cabinet
Knife Holder Mounted To Cabinet