Introduction: C51 4-Bit Clock

In this Instructable I hope to walk you through making your own 4-Bit digital clock. To build my C51 digital clock I used this Ebay D.I.Y kit which cost only $2.50. It come with no instructions so it took a little bit of research to make sure everything was going into the right place. After completing the clock, I would suggest 3D-Printing a nice case for it if you can; I used this case design from Thingiverse. Once I finished my first clock I made another which I could run with 2 AAA batteries; I also found a case with AAA battery slots on Thingiverse.

Materials:
• C51 clock kit
1. Ebay - Hong Kong $2.26 (Usually in stock, fast shipping)
2. Ebay - China $2.23 (Usually in stock, slow shipping)
3. Ebay - Philippines $2.77 (Almost never stock, slow shipping)


• Solder
• An old USB cable (To power the clock)
• 3x AAA Batteries (If you want to use batteries)
• 1x 3 Cell AAA Battery Holder (If you want to use batteries)
• About 3 inches of Aluminium or Copper Tape (If you want to use batteries)
• 3D Printer Filament (Optional)

Tools:
• Soldering Iron
• Small Philips Screwdriver
• Wire Cutters
• Wire Strippers
• Helping Hands (Optional)
• 3D Printer (Optional)

Step 1: Components of the Clock

Components of the clock:
• PCB (The big green board)
• LED Display (Black rectangle with numbers)
• IC AT89C2051(Integrated Circuit / Brains of the clock)
• LED Display Controller (Controls which LED lights are on)
• Quarts Oscillator (Shiny piece with numbers on top)
• Piezo Buzzer (Black cylinder with hole in the top)
• Transistor (Black with 1 square and 1 rounded side)
• Capacitor (Black Cylinder that is shiny on top with numbers on the sides)
• Resistors (Cylinders with color bands as well as the little orange circle pieces)
• Power Input Jack (Blue with 2 screws)
• Momentary Buttons (Little black bottons)

Step 2: Soldering the Smaller Parts

To start soldering get a nice open space because there are lots small parts that are easy to lose. I would suggest a fairly fine tip for your iron. Only a few parts in the small components need to be in a specific orientation.

All underlined components have a specific orientation or polarity; see notes below for information.


• 2 Resistors - Go in the boxes labeled R1 and R2 and have a 10k in the box
• Big Capacitor - Goes in the circle labeled C1 and 10UF
• Medium Capacitor - Goes in the rectangle labeled C4 and 104
• 2 Small Capacitors - Go in the -||- spots labeled C2 and C3 with 30 next to them.
• Transistor - Goes in Q1 and needs to be facing the right way
• Quarts Oscillator - Goes in rectangle labeled Y1

The transistor's flat side should match with the flat side on the board. The polarity of the biggest capacity matters; the longer (+) lead needs to go through the hole with a +.

Step 3: Soldering Main Components

All underlined components have a specific orientation or polarity; see notes below for information.

• Piezo Buzzer - Goes in big circle labeled 8550
• Power Input Jack - Goes in square labeled J1 on the edge of the PCB
• Integrated Circuit - Goes in rectangle with notch labeled U1
• LED Display Controller - Goes in long rectangle labeled PR1 1K
• LED Display - Goes in big rectangle labeled DS1 (It takes up half of the PCB)
• Momentary Push Buttons - Go in squares labeled S1 and S2

The polarity and orientation of the bigger components must be correct or else you clock won't work. I started with the piezo buzzer; the positive side is labeled on the white cover paper and you should match it up with the + marked on the PCB. Next I soldered on the power input connector. The open sides of the power jack should face away from the PCB. Next the IC (Integrated Circuit) should be seated in its socket; orientation doesn't matter. The IC has an small semicircle indentation on one side; match up that notch with the one on the PCB. Next the LED Display controller needs to be lined up correctly. The white dot labels Pin #1 which should match up with the white square on the PCB for pin #1. Next the LED display need to be facing the right way. Make sure you have the dots of the LED display in the middle of the PCB. Lastly, the momentary buttons don't need any specific orientation.

Step 4: Powering the Clock With USB

I found an old I-Phone 4 charging cable that I didn't need anymore. Strip the outer rubber coating and remove the wire sleeve. You will only be needed the red (+) and black (-) wires. Strip about a half inch of both red and black. Bend the wire over itself to make it stronger. Use a small screwdriver to open the power input jacks; don't take the screws all the way out, but make the jack wide enough for the wire. Insert the wire and tighten the jack. Make sure to check the wire polarity is correct before plugging the clock in. The input polarity is marked on the bottom of the PCB under the power input jack.

Step 5: Programming the Clock

• Button #1 (Left Button) changes modes
• Button #2 (Right Button) adjusts number values of each mode or switching between hours and seconds

Press and hold Button 1 to start editing each mode. Press Button 2 to change the values of each mode.

Modes:

1. A - Set Hour
2. B - Set Minute
3. C - "Chime" / Alarm On/Off
4. D - Alarm 1 On/Off
5. E - Alarm 1 Set Hour
6. F - Alarm 1 Set Minute
7. G - Alarm 2 On/Off
8. H - Alarm 2 Set Hour
9. I- Alarm 2 Set Minute

When you are in the clock mode and the time is being displayed you can press Button 2 to switch from Hours/Minutes to Minutes/Seconds. To set the seconds to the right time hold down Button 2 while in Minutes/Seconds mode and it will zero the seconds.

Step 6: Powering the Clock With AAA Batteries

I 3D printed my own AAA battery, but if you don't have access to a 3D Printer then you can use a normal plastic AAA battery holder.

I used the Flexing Battery Holders by enif on Thingiverse as my AAA holder. Using a Maker-bot Replicator I printed the holder in about 3 hours with 100% infill PLA on high detail settings. I would suggest a high infill because I printed a 10% holder and it cracked when I put my first battery in.

You will be wiring the batteries in series (- + - + - +). The bottom left of the battery pack is the - and the top right is the positive. Run wires from the top of battery 1 to the bottom of battery 2, and from the top of battery 2 to the bottom of battery 3. Leave the bare wire exposed on the ends of the case for the battery to contact; leave the rest of the wire insulated to prevent shorting. Once you have all of the wires in place then cut the metallic tape of your choice to size and stick it to the bare wire where the top or bottom of the battery will contact. Check the battery pack with a multi-meter to make sure it is working correctly, the battery pack should be putting out 4.5-6V.

Step 7: 3D Printed Case

There are 2 C51 clock cases I found on Instructables. I printed the C51 4 Bits Digital Electronic Clock Case by nemisis30 with PLA 100% infill and high precision on my Maker-bot and it took just over 3 hours. The other case is the Clock Kit Case by mouseas. I haven't printed this case, but after looking into his model I found that his case is capable of holding AAA batteries.

I used hot glue on the sides of the PCB to secure the clock within the case. Make sure to be quick with the glue and don't put too much or else you might risk melting the case.

3D Printing Contest 2016

Participated in the
3D Printing Contest 2016