Introduction: The Binary Clock - the City Clock
This is a special clock I made. It's called "The City Clock".
It is a binary clock hidden inside a typical Parisian building. My idea was to create an object that does not look like a clock until you know how to read it. It is also a metaphor of time passing by as people live their lives in their apartments :) Disclosure : I made a Kickstarter from this idea. The clock is available here :
https://www.kickstarter.com/projects/1050329560/th...
This tutorial is for those who don't want to pay - want to build their own - want to learn the story of this clock :)
Step 1: Here Is the Video of the City Clock
Step 2: How to Calculate Time
Each row of the clock (floor of the building) is a power of 2 : 1, 2, 4, 8.
You simply add up the dots in each column to get the corresponding digit of time.
Step 3: Circuit
My circuit is based on an Arduino which is ideal as I have 13 leds to control and Arduinos generally have 14 Digital I/O Pins.
I basically made a "hat" in which I plug an Arduino nano.
Step 4: Circuit
The Kickstarter circuit is a printed board but I'm going to show you how to solder one manually.
Step 5: Circuit Layout
This is the circuit of the clock. You can add an optional RTC module which I'll explain later.
Step 6: Holes for LEDS
To make the soldering process easier, I drilled 5mm (as I used 5mm LEDS) holes in a thin sheet of plywood. The pattern of the holes should match the position of the 13 windows.
Step 7: LEDS
This helped me to hold the LEDS in place while I solder everything.
Step 8: Bend the Cathodes
Then I bent all the cathodes. The goal is to solder them together to make a GND grid and spare some cables.
Step 9: Solder All the Cathodes
To solder all the cathodes together I made some perpendicular "combs".
Step 10: Cathodes Are Joined Now
All the cathodes are joined now.
Next step : solder a 220 Ohm resistor to each anode.
Step 11: Arduino to Circuit
Take a random point of the GND grid and link it to the Arduino GND.
Step 12: Link Anodes to Corresponding I/O Port of the Arduino.
Then link all the anodes to the corresponding I/O port of the Arduino. Check the image above with the number to know which port each led should match. If you don't make exactly the same circuit, you'll have to modify the Arduino code to match your connections.
Step 13: Circuit Done
Tadam, the inside of the city clock !
Step 14: Code
Here is the code to use without the RTC module :
https://github.com/LucasBerbesson/binary-clock/blob/master/binary_clock.ino
You just have to check that the LED matrix matches your layout and then upload it to the Arduino.
Step 15: Operational Circuit
Optional : to get a more accurate time (the Arduino is not very accurate and loses 1 minute each day) I decided to add a DS3231 to my circuit.
The DS3231 is a low-cost, highly accurate Real Time Clock (RTC) which can maintain hours, minutes and seconds. When associated with a coin cell battery it also keeps track of time even if the circuit is off. SCL should be linked to A4 and SDA to A5 of the Arduino Nano. Here is another program if you decide to use the module : https://github.com/LucasBerbesson/binary-clock/blob/master/binary_clock_rtc_raw.ino Above is the typical operational circuit.
Step 16: Wood
The building is made out of thin wood (2mm).
I used a scroll saw and a band saw to cut out the windows and the details (also very time consuming but fun).
Step 17: Design
It is inspired on Parisian buildings but maybe you should make it match your city design ! (and send me a picture :) : lucas.berbesson@fabdev.fr )
Step 18: Making Some "mansardes"
Making some "mansardes"
Step 19: Size
Size is approximately 15x15x25 cm.
Step 20: Prototypes
Here is a quick overview of all my trials :)
I liked the plastic one but unfortunately we couldn't really see the engravings on it.
I've finally opted for a laser cut version with two layers glued on top of each other to give relief to the building.
Step 21: Stand
The stand is a block with notches to fit facades and a hole for the USB cable.
The clock needs a 5V power supply (USB) to run.
Step 22: End !
Et voilà !
If you have any suggestions I'll be happy to hear them. If you like the clock or the Youtube channel check out the Kickstarter. It's a real one, made by real people, intended to deliver on time to its beloved backers <3 https://www.kickstarter.com/projects/1050329560/the-city-clock-paris-design?ref=imgur

Participated in the
Invention Challenge 2017
27 Comments
6 months ago
DS3231 Real Time Clock Module RTC Sensor}
have shown to not be terribly accurate. Of the 5 units I’ve used to
build clocks with, 4 have drifted enough
that I wanted to correct it.
The worst was
about 2 secs/day.
To
counter act that drift, I’ve added a section to the micro loop to
count off secs using the getEpoch call in the Sodaq_DS3231.h header
file. When the appropriate sec count rolls around, I add or subtract
a sec to the live sec display.
Find
below the additions I made to the code.
In the void setup() add:
uint32_t old_ts = now.getEpoch();
In the bottom of the loop add:
uint32_t ts = now.getEpoch();
if (((ts - old_ts) > 182304) && (second == 30)){
//advance 1 sec every 182304 secs(2.11 days) of clock time.
Add time at 30 sec mark
second ++;
DateTime dt(2022, 6, 19, hour, minute, second, 5); //year,
month, day, and day of week are fixed
rtc.setDateTime(dt);
old_ts = ts;
}
Obviously, use the correct number of secs to be waiting for, such
that it matches your drift rate. I chose to add the correction sec at
the 30 sec mark of the min.
8 months ago
employed use of the Arduino-Nano-Every micro. The only issues to over
come were finding a driver that would interface with the Amazon RTC’s
{ID’d in the previous submission} and changing the code to use the
proper calls for that driver.
The driver that
worked is called “Sodaq_DS3231” and is available in the Arduino
ide @ build 1.8.19. Look at the examples given there for proper
syntax to address the RTC.
9 months ago
grain mill located in NE Iowa, USA. It’s name is the Motor Mill,
and located down stream of Elkader, Iowa on the Turkey river. An
image of the river side face is included along with the interior and
exterior of my clock.
I have no readily
available color printer and wanted to attempt a build of this out of
commonly available materials if possible. The building is constructed
out of 1/8” foam core purchased at the local hobby store.
Originally wanted to hand cut the pieces, but changed my mind with
the window construction. They were machined with a CNC. The remainder
was cut out with razor blade and printed patterns made from onShape
CAD constructed models. The interior base and outer display base are
made from ¼” plywood. 2 switches are mounted on the bottom for
time adjustment.
I used the Arduino
Uno as the micro-controller. Also used the vast majority of the
example code provided by the author to run the LED’s, with
exceptions in notes later.
The exterior of the
building was helped with texture mapping of stone block and tile roof
via Blender CAD and printed on a black/white printer and glued to the
foam core surface.
It was a fun, quick
build. The clock is in my living room performing as intended. A
Nano-Every might reduce cost and foot print a bit.
Several issues were
noted during the build. I’ll highlight them in no particular order:
* RTC purchased from
Amazon: AITRIP 3PCS DS3231 Real Time Clock Module RTC Sensor High
Precision AT24C32 IIC Timer Alarm Clock for Arduino Raspberry Pi with
Coin Battery. It came as a package of 3 with bats installed. $13
purchase
* The default
Arduino DS3231 {RTC} library caused compile issues. I found another
driver @: http://www.rinkydinkelectronics.com/library.php?id=73 which
was found inside the instructable:
https://www.instructables.com/Real-time-clock-using-DS3231-EASY/.
Which compiled the clock code with aux RTC ref without error.
* The matrix for pin
#'s to address specific LED's in the code given for display is set up
for another orientation than the one illustrated in this guide. And
the positions where 17 is indicated are place holders. Those LED
positions are never used, but the matrix needs something for a
placeholder value.
* No mention of time
change ability was mentioned in the write up. But the included code
examples show they were thought of. I used pull-up resistors to these
hardware pieces to establish good board voltage ref, and sense low to
activate the switch action in code. Also added a third logic
condition where both switches are pressed simultaneously to back up a
min at a time.
* If you have
diagnostic commands to print to the serial monitor in your code and
have used the suggested pin #s in the doc, bit #8 in the minUnits
column {tied to pin #1 on the Ardruino} will stay lit continuously.
It will also faintly flicker. That's because pin #1 is also used as
send channel for serial com. Kill the print commands in your code to
fix.
p { margin-bottom: 0.1in; line-height: 115%; background: transparent }
2 years ago
Great project idea! I have built one I am happy with, working through various bumps (new to the electrical work and the coding). It works fantastically while plugged in to the computer. Btw, I loved the Parisian buildings but went with a pseudo historical building design from the area where I grew up. Question/problem: When I use a USB wall charger, I instead get quite a display of flashing lights and not the time. Any solutions?
Reply 2 years ago
I figured out how to add the buttons and now have it working, plugged into the wall, and a great clock for my shop. What a creative take on the idea of the binary clock!
3 years ago on Step 22
This is so freaken cool!!!!! I m gona make it!!!
Question 4 years ago on Step 14
I tried to follow these instuctions but i get an "no matching function for call to 'DS3231::DS3231(const uint8_t&, const uint8_t&)'" error? any help??
4 years ago
simply beautiful...
4 years ago on Introduction
i loved this its so cute
5 years ago
This is such a nice project. Trying to make it but just like Sofus also getting the compile error: 'minuteTens' was not declared in this scope
Is there a solution? Thanks in advance.
Reply 5 years ago
you need to put "int" before that line
5 years ago
This is beautiful! Both the project and the presentation itself. Congrats:)
5 years ago
I do like the idea of using a building, but I don't like binary clocks ! They're useless.
Reply 5 years ago
No they are not. You can tell time on them, and they make a nice conversation piece. I also like the puzzle of figuring out the time on them.
Reply 5 years ago
Reading time on a conventional clock is already solving a puzzle.
5 years ago
the arduino software comes with this error:
Arduino: 1.8.0 (Mac OS X), Board: "Arduino/Genuino Uno"
In function 'void loop()':
sketch_jun12a:61: error: 'minuteTens' was not declared in this scope
minuteTens = (int)(minute/10);
^
sketch_jun12a:62: error: 'hourTens' was not declared in this scope
hourTens = (int)(hour/10);
^
exit status 1
'minuteTens' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
ps: i am very new to coding and arduino
5 years ago
I'll have to add my voice to the call for files...
5 years ago
j'adore le contraste du vieil atelier et établi dans lequel tu réalise tes projets high tech ;)
love contrast between old workshop in wich you realize high tech projects.
5 years ago
love the idea and the entire construction
would you post the laser cut files by any change?
5 years ago
+1 for actually offering instructions to build the thing you're selling!