Binary Clock

From nikosapi.org wiki
Jump to: navigation, search

The title sums it up, it's a clock that displays it's output in binary. It's computer controlled so it's easier for novices (like myself) to build and since the output is dictated by software it can be modified to do many other fun things.

BClock-front.jpg

Contents

The Files

Basic List Of Materials

  • 10 NPN transistors (2N2222 or 2N4401 or 2N3904, etc..)
  • 1 4017 Decade counter
  • 1 7805 5V voltage regulator
  • 24 5mm red L.E.D.s
  • 24 82ohm resistors
  • 10 1Kohm resistors
  • 2 10Kohm resistors
  • 4 1N4004 diodes (or any regular diodes from telephones or radios)
  • 1 100 MicroFarad capacitor (anything from 50 to 470 will work)
  • 1 male DB25 connector (find one on an old printer cable)
  • 1 12:1 transformer (with center tap for 240V)
  • 1 Computer (>=333MHz,16MB ram,running some form of linux with gcc)

Notes On Construction

  • If you are using 240 volts to power the clock please use a 12:1 transformer's center tap (or a 24:1 transformer) otherwise if you don't you will have to heatsink your voltage regulator accordingly.
  • If you are afraid of mains current buy a 10v battery eliminator and pass it through the capacitor and voltage regulator.
  • To wire the L.E.D.s it's easier to lay them out in a grid on styrofoam and solder them in place.

Compiling And Using The Software

  • Download the above sourcecode and open up a shell/terminal/command-prompt then untar/gzip the software with "tar -xzvf lpt-bin-clock.tar.gz" then cd into the newly untarred directory.
  • Compile the software with "gcc -O3 -o lpt-bin-clock-0.2 lpt-bin-clock-0.2.c" - The software needs to be run as root to get port access. Run it like this: su -c "./lpt-bin-clock-0.2"
  • Press Ctrl + c to kill it. - To use the clock just plug it into the wall, into the computer's parallel port, cross both your fingers and toes and run the program.

Note About The Software

  • The software I wrote for this is crude but it works, if you want to modify it please do and if you need help understanding the software (due to some missing comments) please e-mail me at mailto:nikosapi@gmail.com

Media

  • Here are some photos of my binary clock:

How To Read It

This is how to read it:

  • First row: tens of hours
  • Second row: ones of hours
  • Third row: tens of minutes
  • Forth row: ones of minutes
  • Fifth row: tens of seconds
  • Sixth row: one of seconds

Remember, this is all in binary. Go here to learn how to read binary.