« Electronics

Digital Clock

I was inspired to make a clock that looks like a Steins;Gate Divergence Meter. However, I didn't have any resources to build it. Electronic parts are quite pricey and hard to come by in my location. As a beginner, it's best to start with simple projects first.

The final product, completed around 2015-12-28

I designed this with the knowledge I learned through school and self-study while learning new things along the way. My logic design course taught me the basics of logic gates and prototyping.

Materials

  • Seven Segment Display (10x)
  • Logic Gates (74LS08 AND, 74LS04 NOT)
  • Resistors
  • Transistors
  • Wires
  • Perforated Circuit Boards
  • LEDs
  • Bunch of screws
  • Push buttons
  • Transparent plasticware for casing
  • ATMega328 (on Arduino Uno board for development)
  • Crystal oscillator
  • Capacitors (for the microcontroller)
  • Soldering iron and lead
  • Hot glue

I wasn't able to keep the note of the exact parts I used.

Development

Early prototype

After doing the schematics, I did a breadboard prototype of the display, driven by several logic gates working as a demultiplexer to help the ATmega328 drive the 10 seven segment displays. I didn't have access to proper display driver ICs back then. I also wanted to practice some logic gate designing.

Display demux module

The logic gates were soldered onto the perforated circuit board. It's the only way to do it because I didn't know how to do a printed circuit board.

Testing the demux module with the display on the breadboard

I added ten transistors that toggle the power of the displays. The demux helped reduced the pins needed to switch the displays from ten to four, a necessary optimization given the limited output pins of the ATMega328.

Putting the seven segment displays on the board

Having limited tools and materials forces you to be more resourceful and creative. For the display, I used an illustration board to hold them in place. It's thick enough not to wobble and hold the components firmly. I used a portable electric drill to drill holes with a standard diameter for electronic components.

Display pins with soldered wires

After securing the displays on the board using hot glue, I soldered the wires on the pins at the back. Yes, it was that messy.

Logic board

The logic board holds the ATMega328 and the main power connector. The power port was a micro type B USB from a cheap piece of equipment I bought from a thrift electronics store.

Logic board, demux, and display soldered together

The modules were connected via soldered wires, making them tightly coupled. I didn't have enough jumper wires to spare, so assembly was cumbersome.

Initial assembly

I cut the excess plastic off the latch of the tupperware lid in front, drilled three holes on the top of the case for the switches, and some holes at the backside to fit the power cable and switch.

Optimized display wiring

However, the display's messy and bulky wiring didn't fit in the casing, so most snapped off due to pressure. I was able to fix it by connecting the similar pins of the displays using short wires before connecting them to the display circuit. The outcome was a lot better than the first wiring.

I had an excess window tint lying around, so I put some on the display area to reduce glare and obfuscate the internals when viewing the time.

The clock can be powered by any standard USB charger through a standard micro USB type b cable. The buttons above allow adjusting of the date and time as you would do with any other clock.

Software

The clock's firmware is in C, programmed with the Arduino IDE. You can view the source here (I apologize for the ugly code).