Monthly Archives: August 2017

7490 TTL Chip Digital Clock Schematics

Below are the schematics for the 7490 TTL Chip Clock. After 10 years of not doing anything with the clock, I had to spend some time reverse engineering it a bit to understand it’s design. The original hand drawn schematics ( not published on this site ) were a bit off target as I deviated from them. These new ones that are published are accurate. They were hand drawn then scanned and imported into Gimp for cleanup.

Clicking on the images on this page will bring up a full sized version.

Gimp Drawing Cleanup

In Gimp basically the process is to use threshold to clean the “noise” out from the scan. Then cut more noise out using the cut tool and eraser. Then go over the lines with the pencil tool where they are faint. Finally, add text in. Yes,  there are some CAD tools that could do this easier but, since I don’t do this kind of thing to often,  Gimp works out nicely as I have had a lot of hours on it and can work quickly in it.

Slave Oscillator and Prescaler, dividing from 10MHz to 1kHz on the right hand board

This schematic shows all connections, including power and ground and is laid out to represent the component placement on the board. Looking at the 7490’s the pattern of the circuit is just like the example from How it Works, dividing frequency by 10 every time. The difference between the clock that I built and theirs is that I used a 10MHz source and they used 60Hz line frequency. Therefore I needed to use more divider stages. There is a shortcut, the 74390 chip. It is a BCD dual divider/counter. It could eliminate half of the stages as it divides by 100. I happened to have quite a few 7490s at the time that I built this clock and went with that approach rather than order 74390s. I would recommend using the 74390s though, less stages, less soldering, less power consumption being the benefits.

 

7490-clock-10Mhz-to-1kHz-schematic
7490-clock-10Mhz-to-1kHz-schematic

1kHz Divided down to Hours, Minutes and Seconds on the left hand side board of the clock

This schematic DOES NOT show all connections, power and ground are omitted, also no connects on the chips are omitted, plus the 7447 chips are there to show there location but the connections are not shown. Refer to the page that covers the How it Works information on how to connect 7490s to 7447s. It is laid out to represent the component placement on the board. However the board is inverted on the clock and the digit LEDs sit on the bottom of the board but inverted in order to read them.

7490-clock-1kHz-to-HHMMSS-schematic
7490-clock-1kHz-to-HHMMSS-schematic

Autoshutdown Code Modded to hybrid-sleep and allow required restarts

Hybrid Sleep Code

I decided to use hybrid sleep instead of a suspend. I have been using the code for autoshutdown as both autoshutdown, using the shutdown command and suspending. A server that I have been using for a year now supports suspend and I have used systemctl suspend successfully with it. But, if the power goes out, the next time it is as if it was shut down and gets a fresh boot. The way around that is to use systemctl hybrid sleep which puts the RAM content into swap and then suspends. This way if the power goes out it will just resume from hibernate.

Reboot code

After setting up the machine with hybrid sleep. I realized that the mechine needs a reboot once and a while after unattended updates and thought that it would be nice to automate that process. I looked on line and found a piece of code that will reboot the machine if a reboot is required. This is done via detecting the presence of the reboot-required file. So far testing once today 8/12/2017, OK so far!

https://muffinresearch.co.uk/how-do-i-know-if-my-ubuntu-server-needs-a-restart/

Snippit of code added to autosuspend a.k.a autoshutdown code that was covered in the original post on this topic

# If the reboot-required file is present, restart and l$
 if [ -f /var/run/reboot-required ]
 then
 logit "RESTART REQUIRED"
 echo 'Restart required' >> /var/www/html/shutdown.txt
 date >> /var/www/html/shutdown.txt
 echo "------------------------------------" >> /var/www$
 systemctl reboot
 fi

# Fall through and hybrid-sleep it!

systemctl hybrid-sleep
 # Switched to hybrid-sleep 08122017 systemctl suspend