All your base are belong to us clock

A clock that displays the time in any arbitrary base

Similar projects worth following
A clock that displays the time in a user selectable base (for example, binary, base 10, hexadecimal etc). The display utilizes 10 seven segment displays, each capable of displaying segments in red, green or yellow.

The initial idea for the all your base are belong to us clock hearals back many years as one of the fun sounding electronics projects that invariably gets repeatedly put off due to other projects with more real deadlines. The current design of the clock involves the usage of ten 7-segment displays that have green/red segments. Via some creative usage of color and symbols the clock will be able to display the current time (HH:MM) in any positive integer base. The display settings will be controllable via a rotary encoder with a button to allow changing of the current base, setting of time and other display formatting options.

  • Complete!

    Gorloth01/21/2019 at 01:32 0 comments

    After almost 5 years from the first starting post the "All Your Base Are Belong to Clock" clock is finally in a completed state. To finish off the final touches I put together a PCB for the control board (found on github), updated the code (also on github), finished up the final parts of the frame (via help of my woodworking friend Kyle) and assembled all the parts together. Pictures of the final assembly displaying the time in various bases can be found in the project gallery.

    Control Board:

    The control board contains the mega328 controller, clock IC, programming header and USB-C connector for power (USB-C selected for the reversibility of the connector and it seemed fun to try something flashy and new). Because the size of the control board was based on the size of the segment boards and the extra width left in the frame there was extra room for some fun PCB art. The image was generated using GIMP convert the image into 5 colors (solder mask + copper, solder mask - copper, exposed copper, bare PCB [no solder mask or copper] and silkscreen). The colors were then combined into three separate images, one where the copper is, where the solder mask isn't and where the silkscreen goes. The resulting images were imported into Kicad using the import bitmap feature to generate the sweet PCB art below.

    Control board PCB art

    Code Updates:
    Features added to the code:

    • Display of the current base
    • Randomly change the base every 0(off) to 60 minutes
    • Set the upper and lower bounds for the random base selection
    • Adjust the yellow balance point
    • Configure the color of the encoder to various settings:
      • Current second, minutes or hour value
      • Current base
      • Randomly change every 5 seconds
      • Continuous color cycle
      • off

    A side note on random number generation and seed initialization. Because random numbers are used relatively infrequently in the project (at most once every 5 seconds) I'm using the C standard lib rand() to generate numbers instead of some hand crafted rand() function optimized for generating 8 bit values that I need. In order to see the random number generated I have a counter that is running from the initial boot and at the first detected rotation of the encoder the random number generator is seeded with the counter value. Because no random numbers are used unless non default settings are used there will always be rotations of the encoder to ensure that the RNG is seeded with a value that is probably different than a previous iteration which generates random enough for my purposes.

    Frame Finishing:

    The frame was given a few coats of stain and had the top and front edges rounded off. The pieces are held together using brass screws to give a similar dark/gold colored aesthetic that the PCBs have. A metal plate painted black was installed on the front of the control board to help hold the board in place and give a nicer finished look. A fender washer was used to give a little reflection for the light from the encoder.

    Final Thoughts:

    Even though this project dragged on much longer than it should have I'm really happy with how things turned out. The segments look a bit nicer in real life than they do in the pictures and the frame gives it a nice finished feel to it. This was also my first project to mess around with PCB art and I'm happy with how that turned out.

  • Progress

    Gorloth11/11/2018 at 05:51 0 comments

    So after spending way more time sitting unfinished on my workbench I made some more progress towards actually finishing things. The code has been updated (and pushed to Github) which allows for options of showing/hiding the display of seconds as well as a setting to force overlap of the hours and minutes digits anytime it's possible as opposed to the previous behavior which only overlapped when there wasn't enough room to display them separately. I also did some code cleanup to do a better job of processing the encoder turns when dealing with partial turns and to account for switching the encoders and knob from active low to active high.

    I also made some progress on the frame with the aid of a friend with some wood working equipment (pictured below). The top and bottom pieces have a channel cut into them to hold the segments in place. The current plan is to make a front plate to cover the control board. The sections are going to be connected via screws to allow for access to the control board for future upgrades/repair to the circuitry. The edged will probably get rounded off and the wood will be finished with a stain of some sort.

    Things still left to be done:

    1. Finish frame
    2. More code tweaks
      1. Add option to display current base
      2. Utilize LEDs in knob (requires some HW cleanup/debugging)
      3. Possible add option for date info
    3. Draw up schematic of control board

  • Pictures and Video

    Gorloth02/22/2017 at 04:49 0 comments

    One item off the todo list! I added a few pictures of the display boards both unpopulated and populated and also the above video of the clock in operation showing the time in various bases (sorry for the shaky display and washed out colors).

  • Not dead yet

    Gorloth01/22/2017 at 00:02 0 comments

    Despite having been quite for the last ~2.5 years I finally got around to making some progress on this project. I've got the initial control circuitry rigged up, a mega328 board acting as the controller with a RTC to provide the timekeeping functionality and a rotary encoder to allow for user interface. I've got the code up on github. Currently the clock is up and running, it can display the current time in any integer base except -1, 0 and 1. The rotary encoder allows for changing the base as well as setting the current time. The time is displayed in HH:MM:SS form when room permits, seconds are dropped when room runs out and replaced with a blinking decimal point. If there isn't room for both hours and minutes to be adjacent then they are overlaid on top of each other (hours in red, minutes in green).

    Things that still need to be done:

    1. Throw together a schematic for the controller board.
    2. Update code to allow for some more features (allow user to select display modes, utilize LEDs on the encoder).
    3. Make a enclosure to hold everything together.
    4. Take some pictures/video of the current setup.

  • 7 Segment Driver board design

    Gorloth06/09/2014 at 02:19 0 comments

    Finally got some time to finish up the layout of the 7-segment display driver boards. The schematic could use some cleaning up so it's not such a tangled nest of traces but I hopefully I'll have some time to do that while I'm waiting for boards and parts to arrive.

    Each 7-segment display is about 2 inches tall and will have it's own board for driving the segments. I decided to give each digit its own board instead of combining multiple digits into a board becasue then I'll have greater flexibility and re usability for the boards. I could re-arrange things into two rows of five digits each or I could pop a few digits off to use for other side projects.

    The control hardware for the boards themselves is a little suboptimal as the segments I have on hand are common cathode and pretty much all led drivers are setup for common anode, so I had to get a little creative on the design. Each board has two 8 bit shift registers for storing the red and green segment data. The shift registers are setup in a parallel fashion with separate latch enable pins. I choose this over chaining them all in a serial fashion as it makes for a cleaner feeling interface. You can send in new red display data without disrupting what green is set to, and if you want the red and green segments to always be the same you can just tie the two latch pins together instead of needing to double the data output. The shift register outputs are feed into 2:1 multiplexers which are capable of driving the segments and control switching between red or green output. One on the input pins can be used to switch between outputting red segments or green segments, PWMing the line allows for easy mixing of the two colors.

    I've thrown the KiCad design files up on github, I think I've got all the needed files and libraries and the like but I'm not entirely sure so I also chucked in the generated gerbers (despite always being annoyed at generated files being in version control, but I figure this way someone can always see what I'm up to)

View all 5 project logs

Enjoy this project?



seilerjacinda925 wrote 11/19/2019 at 15:53 point


Nice to meet you after viewing your profile i am Jacinda, from (jakarta) indonesia,

i have a project discussion with you please email me on: (

  Are you sure? yes | no

Adam Fabio wrote 06/17/2014 at 04:31 point
Cats meets FlavaFlav in this project! Thanks for entering The Hackaday Prize! Try to upload a few pictures of the project as you move ahead with your clock.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates