LED Binary Clock
Abstract
The purpose of this project is to design, manufacture, and assemble a binary coded decimal (BCD) clock by utilizing and expanding on skills developed in IME 157. The clock schematic I used is based on a previous design by Hans Summers. I chose this circuit because of its straightforward logic-based design utilizing common off-the-shelf IC’s, and its theoretical long-term accuracy since time is kept based on the 60 Hz AC frequency.
Starting with only a schematic, I used DipTrace to design a custom PCB for manufacture, expanding my experience working with component patterns, schematics, and board layouts. The build phase required extensive soldering and some troubleshooting to get everything working right. My case design focused on prominently displaying the board and circuitry behind a clear sheet of acrylic, for both a technically and aesthetically pleasing look.
Completed clock, displaying the time 17:27:45
Project Description
The project consists of nearly 100 discrete components on a 3.25” x 4.625” dual-sided PCB board. The time is displayed through a grid of LED’s, with a column of lights for each clock digit. Reading the time requires adding up the binary value of each column of lights, although the values are screen printed on the PCB board for reference.
How it Works
The circuit uses three SN74HC393N dual 4-bit binary counters to keep track of the time. A single 4-bit counter is used for each digit, with logic and gates from two SN74HC08N IC’s to reset each digit and carry a count input into the next digit.
A 6V 60 Hz AC power source is required to power the board. The AC is converted to DC through a bridge rectifier in the lower right corner of the board, and the DC is cleaned up by an electrolytic capacitor and a 7805 voltage regulator, to supply 5V DC to all of the IC’s. An AC power source is needed, since the clock is based on the AC signal. An LM393P comparator converts the 60 Hz sine wave into a square wave, which is inputted into a CD4518BE counter. The counter is configured to effectively divide the input by 60, therefore outputting a 1 Hz square wave signal, which is used as the input for the seconds digit. To set the time, three buttons are used. Two buttons allow for making either the hours or minutes count faster, while the third resets the seconds to zero.
Because the LED’s were so bright when initially prototyping the clock circuit, I decided to add in a dimming circuit as well, to vary the LED brightness based on the room lighting. This circuit was derived from a design by Giorgos Lazaridis (http://pcbheaven.com/circuitpages/Ambient_light_Level_Equalizer/).
A triangle wave is generated by a dual op-amp circuit, which is sent into a comparator along with a reference voltage based on a photoresistor mounted at the top of the board. The output of the comparator is a pulse-width modulated (PWM) square wave, with a varying duty cycle depending on the lighting. This is sent into an IRF520N MOSFET to control grounding the LED’s. This effectively flickers the LED’s at a frequency too high to perceive.
Board Prototyping, and Design using DipTrace:
The board design was completed using DipTrace, based on the circuit schematic from by Hans Summers. In order to verify the schematic prior to PCB layout, I prototyped the circuit with breadboards. Component layout and trace routing was also done with DipTrace, and the final board design was sent out for manufacture.