Binary wristwatch. Binary clock

It all started with the desire to make some completely finished device using AVR microcontroller.

The choice fell on binary clocks, because They are easy to make and look quite impressive. And also because I always liked the binary clock plasmoid from KDE which looks like this:

What is a binary clock?

For those who do not know what a binary clock is and how to determine time from it, I will make a small digression. A binary clock is simply a clock that shows time in the binary (or binary) number system, instead of the decimal number system we are used to.

Binary clocks are different (as in general, ordinary clocks) - with different amounts and the location of the indicators, with or without seconds, with a 24 or 12 hour time format, etc. I decided to go with the option that is as similar as possible to the above-mentioned plasmoid from KDE:


The clock consists of six vertical columns - two columns for hours, two for minutes, and two for seconds (from left to right). Each column essentially represents one digit (i.e., two digits for hours, minutes, and seconds).

The clock has four horizontal lines, since we need to be able to show the digits from zero to nine (at least for the least significant digit), and the binary representation of nine is 1001 , contains four digits (bits). The least significant digit is at the bottom.

The easiest way to understand what time the clock shows is by analyzing the “dial” from left to right, from bottom to top. Let's write down the value of the binary number represented by the leftmost column of the clock shown in the picture above (assuming that a lit indicator means one, and an extinguished one means zero): 0010 in binary number system it is 2 - in decimal. Let's write the value of the second column in a similar way: 0001 in the binary number system (as in decimal), or simply one. That is, on the clock 21 hour. In the same way you can read what the clock shows 35 minutes and 28 seconds With a little practice, you will be able to read time from a binary clock almost as quickly as from a regular one.

Implementation

So, the idea is clear, let's proceed to implementation.

Let's start with the indicator ("dial") - which is a lattice of LEDs.

Since the clock has 4 horizontal and 6 vertical rows, total quantity required LEDs - 6 * 4 = 24. In fact, you can get by with fewer LEDs, because not all digits will be used - for example, the most significant digit of the clock (the leftmost column) can show a number of no more than two (with a twenty-hour time format), which means you can save as many as two LEDs. But I didn’t do this and installed all 24 LEDs, because... wanted (in the future) to use this watch to show simple text messages.

You will need buttons to set the time. There are three of them: the first button switches the watch to time setting mode and back. The second button, digit selection, switches the column in which the time is currently being adjusted. And finally, the third increases the time in the selected column by one.

ATMega32 is used as a microcontroller. Of course, it's not necessary to use such a powerful microcontroller for such a simple task, but I already had one on hand, so I used it.

Schematic and PCB

The circuit is quite standard: microcontroller, power supply, reset, connector for connecting a programmer. A clock quartz is connected to TOSC1 and TOSC2 from which the clock will tick. The time setting buttons are connected to the supply voltage. Ten LED outputs (6 columns + 4 rows). A resistor is connected to each horizontal row to limit the current through the LED.

The printed circuit board turned out to be one-sided, but still with two jumpers on the other side (marked in red), which are quite simple to make from thin copper wire.

Frame

This is probably the most uninteresting part. But at the same time, it was she who took up most of the time.

The body itself is made of wooden boards fastened with nails and glue. After assembly, the boards were carefully sanded, covered with stain and several layers of furniture varnish.

The LEDs are installed in a grid with partitions, made from wooden rulers using a jigsaw. A piece of ordinary tracing paper (which is used for drawings or patterns) is inserted into each cell with an LED to diffuse light.

Double-sided frosted glass is glued to the front of the watch. back part It is closed by a lid with screws, from which the time setting buttons protrude.

Software part

I decided to write the program in assembler. Not because it's the most convenient language development, but solely for educational purposes. Source codes can be found below in the "Files" section.

I won’t describe the entire code, because... it is commented in sufficient detail. I will describe only the key points.

The scan is done in columns, that is, first the LEDs of only the first column are lit for a while, then the second, etc. This happens very quickly and the eye does not have time to notice it, so it seems that all the lit LEDs are on at the same time. To display the time value in a column, use the DISPLAY_COLUMN macro. Columns are switched using the Timer0 timer.

The time change occurs once per second when Timer/Counter2 is interrupted. Since the crystal frequency is 32768 Hz and the timer prescaler is set to 128, the one-byte timer will overflow once per second ( 32768 / (128 * 256) = 1 ), which is very convenient.

Processing of button clicks occurs in the button_stop_pressed procedures for the button to switch the clock to the setting mode and back, button_set_pressed for the time setting button, and button_switch_pressed for the column switch button. Note that in the button_stop_pressed procedure the current time is stored in the EEPROM. This is done so that the time is not reset if it is necessary, for example, to switch the clock to another socket (when the clock is turned on, the time is read from the EEPROM).

All the main “work”, such as polling the state of buttons, switching the active scan column and displaying the time, occurs in main . The initial initialization is done in reset.

Result

The result can be seen in the video below. Some stages of the manufacturing process are also captured there.

Files

The source codes for the firmware, schematics, and circuit board are located in this repository on GitLab.

As a conclusion

In general, for a first device, I think it turned out quite well.

If you find any inaccuracies in this article, or if you think something should be described in more detail, please write in the comments.

Good day. In today's article we will make an unusual binary clock based on Arduino their hands. Having understood the process of creating such crafts, in the future you will be able to repeat binary clocks of any design.

Step 1: What is a binary clock?

First, let's remember what a binary number is - it is a number represented in the binary number system, numerical values that only two characters are used: 0 (zero) and 1 (one).

A binary clock is a clock that displays time in binary format. The project uses 6 columns of LEDs to display zeros and ones. Each column displays one digit/digit, a format known as binary decimal number(DDC). Each line represents a power of two, from 2^0 (or 1), to 2^3 (or 8). Therefore, all you need to do when reading information from the watch is to sum up the values ​​of the columns with the LEDs turned on. For example, in the first column the 4th and 1st LEDs are turned on. Add 8 to 1 and get 9 (the number of seconds is 9). The next column is tenths of seconds, only the 3rd LED is lit in it, so general meaning will be equal to 49 seconds, exactly the same with minutes and hours. Please note that the clock displays time in 24 hour format.

Step 2: Components

  • Arduino Pro Mini 328 5 V I used this board, but in fact you can use any other one. If you have never used Pro Mini, then you will probably need C.P.2102 (programmer) to connect the board to a computer;

  • D.S.1302 - real time clock module;

  • 20 10 mm diffuse “warm” LEDs(I advise you to take it with a reserve);

  • 20 resistors with a resistance value of 10Ω;

  • 2 tact buttons;

  • 2 resistors with a resistance value of 10kΩ (used as load resistors).

Step 3: Making a prototype

Let's start making a prototype of the future crafts. In principle, this is not a prerequisite, but you need to look at how the LED matrix, Arduino and clock module will work together. When prototyping I used Arduino Mega and simple red LEDs. Everything works well as expected.

Step 4: Body

Frame homemade products(consists of two halves ) will be made of wood. It will look contrasting against the background of binary clocks and will give crafts retro style.

Step 5: Outline

The LEDs are grouped into a matrix to reduce the number of arduino pins involved. In our case, 9 pins are allocated for the matrix. After making the LED matrix, we solder the pins to the arduino, then the clock module, buttons for setting the time, and finally the power supply.

Step 6: Code

The code is based on an example from the Arduino Playgroud post for the DS1302 clock module. After which changes were made to display the time on the LED matrix.

Once upon a time, I asked my friend to explain to me what the binary number system is. Since I am a girl completely far from any technical delights and subtleties, my friend thought about the answer. “Well, you know... it’s like love - either you have it or you don’t, and there’s nothing you can do about it. In general, this is how numbers are encoded. One or zero. One means there is a signal, zero means there is no signal.”
That's how it is with binary clocks. Perhaps, after twirling them in your hands, you will say to yourself: “Well, they come up with all sorts of nonsense. And what to do about it? Or (and this option is the most likely) after seeing and holding them in your hands, you will certainly want to figure out what it is, “what it is eaten with,” and of course you will want to purchase them.
Well, for my part, and due to my technical abilities and capabilities, I will still try to tell you (and show) what kind of beast this is - a binary clock.
So, as you already understood, “binary” means binary, that is, displayed using only two elements. If you still don’t understand what this is, then remember the great “cipher coder” Samuel Morse, who used only two symbols to transmit the letters of the alphabet via telegraph communication - a dot and a dash.


Modern binary clocks also encode date and time information in a certain way. It will be quite difficult for an ignorant person to understand at first glance what all these crazy blinking LEDs mean. You may ask, “Which LEDs? And where is the dial, the hands, or at least the electronic numbers?” Warning: When looking for numbers and hands, do not try to crack or open the watch cover.

To display the time (and in some models, the date), binary clocks use brightly glowing neon dots located in several separate groups. The arrangement of groups of LEDs, their size and color are individual for each specific watch model.

Initially, binary clocks were created for the purpose of conducting scientific experiments. Later, in 1920-1940, Japanese professor Hivari worked to address the issue of forgetfulness and absent-mindedness in the elderly. Despite the well-known fact about the long life expectancy of the Japanese, when they reach a certain age, this problem becomes very urgent. As a simulator to improve memory, the professor suggested that his patients use the binary clock he had improved, in which sticks and dots were used to display time. The results were quite impressive. After just three months, pensioners using such watches at home showed significant improvements in memory and attention.



Thus, nowadays a binary clock is any clock with in an unconventional way time display: using dots, inverted numbers or symbols. Invention and further development diode technology (LED) made it possible to produce binary watches with an unlimited number of diodes to display time.

Of course, at the moment, binary watches, reminiscent of a piece of equipment of a modern astronaut, are one of the most extraordinary and perhaps even eccentric accessories.

Undoubtedly, Japan is the world leader in the production of binary watches; anything else would be simply amazing. In addition, some German companies produce such watches. Well, China represents the “budget” market for binary watches, but as a rule, these are copies and imitations of well-known brands.

World of clock puzzles from Tokyo Flash. A watch for those who like to think about time.

“What do you think this is?” - I asked my friends and acquaintances the other day social networks, posting a photo of one of the latest original (as always) developments from Tokyo Flash. Shinshoku binary watch, made in the form of a metal bracelet covered with holes, in which the number of dots of different colors must be counted to determine the time. I must say that the versions put forward were very diverse, some of them even made me smile.


Handcuffs for prisoners with indicators?!
Rings? Bracelet?! Some kind of jewelry?
Looks like a sewing machine shuttle...
Reminds me of weighted fitness bracelets....
“It’s cold, very cold,” I answered.
By the evening, “advanced youth” had arrived
Maybe it's an alarm clock?
In appearance it is very similar to a watch.
Maybe it's a watch? Any special ones? For example for the blind?...
My old friend, a programmer who has lived in Thailand for several years, ruined the intrigue. " Binary clock“, he replied and added a smiling emoticon. “Binary,” I corrected, and told everyone else what kind of clock it was and on what principle it worked.
Each release of binary watches produced by the Japanese company Tokyo Flash is strictly limited. Some watches are produced as corporate gifts or souvenirs for clients and employees by order of a particular company. Each model of watches produced is unique and exclusive in its own way, therefore watches that have been discontinued and are no longer available for sale are stored in the museum; their descriptions, photos and even videos can be found on the company’s official website www.tokyoflash.com.


Every time Tokyo Flash presents another new product, the watch world gasps in surprise, and puzzle lovers rub their hands in satisfaction. “IT specialists” and programmers find the next topic to discuss with their colleagues over a cup of morning coffee, and “advanced” men know exactly what they will ask for or order as a gift for Christmas. New Year or another celebration for your other half.
You never know in advance what the company’s designers will be inspired by when releasing the next watch model: last movie about James Bond or a new science-fiction thriller. In any case, one can only envy their inexhaustible imagination. A watch with the name “1000100101” is not an accessory for an FBI special agent?


And the minimalist Tokyo Flash watch, made using stylistic elements used in the films “Tron” and “2001: A Space Odyssey”, will surely now inspire directors, screenwriters and producers to create new films. I do not rule out the possibility that some models of Tokyo Flash binary watches could be used as props during the filming of some next science fiction saga. I wonder if George Lucas, the director of " Star Wars"? Personally, I had an association with this particular film when I saw the binary watch Tokyo Flash Kisai Satellite Watch.


Whatever model of binary watch from Tokyo Flash you choose, such an accessory will in any case always make you stand out from the crowd. This great way not only to tell others: “I’m not like everyone else,” but also to create a certain aura of mystery around your person. In any case, such watches will never give you a frivolous look, because the main slogan of the Tokyo Flash company is “Watches for those who like to think about time.”

Binary watches from The one (Germany) - German quality at the service of innovation.

Among the models of binary watches from the German company The one, there will always be pieces to suit the most refined and discerning taste. If you prefer things that have been time-tested and meet the highest quality standards, but you are bored with the usual watches that meet generally accepted standards of etiquette, then perhaps you should look towards the binary watches of The one company.
For example, the Art Edition collection, developed under the guidance of leading European designers such as Walter Heidenrich and Romero Britto, famous for their jewelry in the pop art style is a striking example of an incredible combination of colors and geometric shapes. Such watches are the best way to emphasize refined taste and help true connoisseurs of modern art create a personal image.




The Gamma Ray collection of binary watches, on the contrary, is a classic example of restraint and elegance. Models made of stainless steel in the best possible way highlight the style of their owner and guarantee silent admiration from others. Although I will not give you a 100% guarantee of silence from those around you. I think the ladies won't be able to resist asking questions. So this is a good reason to get acquainted if you have not yet managed to acquire a second half. Believe me, women are always fascinated by men who are well versed in technical innovations.



Undoubtedly, the most brutal binary watches of The one are the watches from the Ibiza Ride collection. To paraphrase a well-known aphorism, we can say about them: “I woke up, got dressed, washed my face, put on my The One watch - and went to save the world.” With the watches from the Ibiza Ride collection, which give you “Terminator” self-confidence, you can cope with any, even the most impossible tasks of the coming day. This is a watch for those who value their expensive time, style and individuality.




The one company did not deprive fans of the classics of its attention. Discreet, elegant watches from the Kerala Trance and Lightmare collections are among the most sought-after and popular.



In addition, The one has several collections for the weaker half of humanity. It's also exciting men's hearts and the envy of friends, the Odins Rage collection, all watches of which are encrusted with Swarovski crystals, and the uplifting SLIM SQUARE collection, made in neon colors and decorated with airy butterflies.



Binary watches from the German company Led Watch.

The German company producing binary watches Led Watch was founded by designer Adolf Indermanur. During the development and further production of watches, the latest scientific developments in the field of LED technologies.
Led Watch company watches are presented in largest cities worldwide and are sold in England, Australia, France, China, Korea, Taiwan, Hong Kong, Thailand, Japan, Malaysia, Singapore, Canada, Turkey and the USA.
The binary watches of the Led Watch company are strikingly different from their Swiss counterparts and primarily attract German quality steel dials, non-standard design And in a special way counting time. The Led Watch line includes both women's and men's collections.


To summarize, I can note that binary wrist watch- this is something that cannot be called standard, banal and ordinary. This is a new, fresh look at time and the way it is displayed. If we take into account the fact that the constant use of binary watches contributes to the development and improvement of memory, then this is not just a fashion accessory, but also a way to take care of your health. If you want to live not only beautifully, fashionably, stylishly, brightly, but also for a long time and with high quality, then binary watches are your choice. And don't be afraid that you won't be able to figure it out. complex mechanism displaying the time, after a couple of days of using such a watch you will easily answer the question: “What time is it?”

Natasha

Score 1 Score 2 Score 3 Score 4 Score 5

Idea

It all started with the desire to make some completely finished device on the AVR microcontroller. The choice fell on binary clocks, because They are easy to make and look quite impressive. And also because I always liked the binary clock plasmoid from KDE which looks like this:

What is a binary clock?

For those who do not know what a binary clock is and how to determine time from it, I will make a small digression. A binary clock is simply a clock that shows time in the binary (or binary) number system, instead of the decimal number system we are used to.

Binary clocks come in different varieties (as in general, regular clocks) - with different numbers and locations of indicators, with or without seconds, with 24 or 12 hour time format, etc. I decided to go with the option that is as similar as possible to the above-mentioned plasmoid from KDE:

The clock consists of six vertical columns - two columns for hours, two for minutes, and two for seconds (from left to right). Each column essentially represents one digit (i.e., two digits for hours, minutes, and seconds).

The clock has four horizontal lines, since we need to be able to show the numbers from zero to nine (at least for the least significant digit), and the binary representation of nine - 1001, contains four digits (bits). The least significant digit is at the bottom.

The easiest way to understand what time the clock shows is by analyzing the “dial” from left to right, from bottom to top. Let's write down the value of the binary number represented by the leftmost column of the clock shown in the picture above (assuming that a lit indicator means one, and an extinguished one means zero): 0010 in the binary number system is 2 in the decimal number system. In a similar way, we write the value of the second column: 0001 in the binary number system (as in the decimal number system), or simply one. That is, the clock says 21 o'clock. In the same way, you can read that the clock shows 35 minutes and 28 seconds. With a little practice, you will be able to read time from a binary clock almost as quickly as from a regular one.

Implementation

So, the idea is clear, let's proceed to implementation.

Let's start with the indicator ("dial") - which is a lattice of LEDs.
Since the clock has 4 horizontal and 6 vertical rows, the total number of LEDs required is 6 * 4 = 24. In fact, you can get by with fewer LEDs, because not all digits will be used - for example, the most significant digit of the clock (the leftmost column) can show a number of no more than two (with a twenty-hour time format), which means you can save as many as two LEDs. But I didn’t do this and installed all 24 LEDs, because... wanted (in the future) to use this watch to show simple text messages.

You will need buttons to set the time. There are three of them: the first button switches the watch to time setting mode and back. The second button, digit selection, switches the column in which the time is currently being adjusted. And finally, the third increases the time in the selected column by one.

ATMega32 is used as a microcontroller. Of course, it's not necessary to use such a powerful microcontroller for such a simple task, but I already had one on hand, so I used it.

Schematic and PCB

The circuit is quite standard: microcontroller, power supply, reset, connector for connecting a programmer. A clock quartz is connected to TOSC1 and TOSC2 from which the clock will tick. The time setting buttons are connected to the supply voltage. Ten LED outputs (6 columns + 4 rows). A resistor is connected to each horizontal row to limit the current through the LED.

The printed circuit board turned out to be one-sided, but still with two jumpers on the other side (marked in red), which are quite simple to make from thin copper wire.

Frame

This is probably the most uninteresting part. But at the same time, it was she who took up most of the time.

The body itself is made of wooden boards fastened with nails and glue. After assembly, the boards were carefully sanded, covered with stain and several layers of furniture varnish.

The LEDs are installed in a grid with partitions, made from wooden rulers using a jigsaw. A piece of ordinary tracing paper (which is used for drawings or patterns) is inserted into each cell with an LED to diffuse light.

Double-sided frosted glass is glued to the front of the watch. The back part is covered with a screw-mounted lid, from which time setting buttons protrude.

Software part

I decided to write the program in assembler. Not because it is the most convenient development language, but solely for educational purposes. The source codes can be found in the archive below.

I won’t describe the entire code, because... it is commented in sufficient detail. I will describe only the key points.

The scan is done in columns, that is, first the LEDs of only the first column are lit for a while, then the second, etc. This happens very quickly and the eye does not have time to notice it, so it seems that all the lit LEDs are on at the same time. To display the time value in a column, use a macro DISPLAY_COLUMN. Columns are switched using the Timer0 timer.

The time change occurs once per second when Timer/Counter2 is interrupted. Since the crystal frequency is 32768 Hz and the timer prescaler is set to 128, the one-byte timer will overflow once per second (32768 / (128 * 256) = 1) , which is very convenient.

Button clicks are processed in procedures button_stop_pressed for the button for switching the clock to setting mode and back, button_set_pressed for the time setting button and button_switch_pressed for the column switch button. Please note that in the procedure button_stop_pressed the current time is stored in the EEPROM. This is done so that the time is not reset if it is necessary, for example, to switch the clock to another socket (when the clock is turned on, the time is read from the EEPROM).

Class="eliadunit">

All the main “work”, such as polling the state of buttons, switching the active scan column and displaying the time, occurs in main. The initial initialization is done in reset.

Result

The result can be seen in the video below. Some stages of the manufacturing process are also captured there.

And various radio components to get acquainted with microcontrollers, the author decided to do something interesting and at the same time useful. Having in stock large number LEDs, the idea came to create a binary clock.

From the electronics side, binary clocks are not particularly complex, but the author complicated the task and decided not to save buttons and LEDs. Initially, the project was supposed to use 22 LEDs, 6 buttons, and one buzzer. There was also an idea to assemble a clock on Arduino Mega because more quantity pins, but the 74HC595 shift registers turned out to be a salvation.

Materials:
- Arduino Uno
- 2 full-size development boards
- Red LEDs 7 pcs
- Green LEDs 7 pcs
- Blue LEDs 6 pcs
- LEDs yellow and white 2 pcs.
- Resistors 220 ohm 25 pcs
- Piezo tweeter 1 piece
- Tact buttons 6 pcs
- Output shift registers 74HC595 in DIP-16 package 3 pcs
- Connecting wires 90 pcs
- Real time clock module based on DS1307 RTC chip

How everything will work.
There are about 10 types of binary clocks. Some show time in binary coded decimal (BCD) format, others in binary numbers. Since the author doesn't particularly like BCD clocks, he decided to make his own purely binary. They may be harder to read for some, but they make little difference because converting numbers from binary to decimal is easy. Also prerequisite The creator of the watch was the indication of seconds on the watch.

In addition, the watch has 6 buttons:
Set - is responsible for setting the clock/alarm clock and saving the parameter in the setting mode.
Mode - is responsible for switching between clock, alarm and timer modes.
Up - in setting the clock/alarm/timer, increases the parameter by one. In an alarm clock and timer, it is responsible for activating and turning off the selected mode. When a signal is triggered, it will turn off the alarm/timer signal.
Down - in the clock/alarm/timer settings, will decrease the parameter by one. The timer will pause it without resetting the countdown. When the alarm goes off, it will postpone the alarm for 5 minutes.
24/12 - change the time format.
Dim - is responsible for turning the LEDs on and off (when the LEDs are turned off, the other buttons stop working).
LED position diagram:

Connecting components
The author will connect all LEDs in series and with a resistor. The resistor is soldered to one of the LED terminals, it does not matter which one. The LEDs will be connected via shift registers; this chip has 16 pins. This number of pins allows you to use a large number of pins, taking up only 3 pins on the Arduino.


74HC595 shift register pinout:
Q0-Q7 are the register pins to which the LEDs will be connected.
Vcc - the power pin will supply 5V.
GND - ground connected to GND on Arduino.
OE - pin is responsible for inverted activation of the pins, but it will not be used, it is simply shorted to ground.
MR is an inverted register clear, it does not need to be controlled, so it will be connected to a 5V power supply.
ST_CP - pin is responsible for updating the register state. When writing a state, you need to apply LOW to it, after writing - HIGH, to update the state of the pins. It needs to be connected to a pin on the Arduino. You can connect this pin to three registers in parallel.
SH_CP - pin, responsible for shifting the register by 1 bit. It needs to be connected to a pin on the Arduino. They are also connected on microcircuits in parallel.
DS - data is supplied to this pin; it is connected to a pin on the Arduino.
Q7" - this pin is used for cascade connection with the rest of the 74HC595 registers.

Connection diagram:

The piezo tweeter will be connected to the third pin of the Arduino in series with a resistor. Before including the tweeter in the circuit, the author looked at which pins support PWM, since this is mandatory for it. On Arduino Uno, PWM is supported by pins 3, 5, 6, 9, 10 and 11.

Connecting the buttons uses resistors built into the Arduino, with one side of the buttons connected to ground and the other to the Arduino pins.

This is what the final design looks like:

Assembly on Breadboard
After purchasing additional parts, the author began assembling the project on a breadboard according to the diagrams. The appearance was roughly expected, because the Breadboard limits the freedom in placing components, and the protruding wires did not create aesthetic pleasure. But the development board is intended for prototypes, and not for finished devices.

Program code.
Having experience in programming, the author decided to write the code himself, without using the work of others. The first step was to write a subroutine; it is responsible for blinking all the diodes and sending a signal from the piezo tweeter when turned on. This function helps to verify the integrity of the circuit; this is implemented on many devices.

LED operation.
Since the LEDs are accessed through a shift register, first of all it was necessary to implement more subroutines for the LEDs. To make it easier to work with diodes, a number of additional functions. Implemented various effects diode animations. When the clock is not set, the diodes responsible for hours and minutes will begin to blink (as a regular clock blinks when not set). The LEDs responsible for seconds also have their own animation; the diode can move left and right in alarm mode, or in clock setting mode.

Main cycle.
The program is configured to work as follows: the clock displays information depending on current state, and change their state depending on the use of buttons and events. It all looks like a considerable number of nested conditions. The state of the diodes is updated every time after checking the state of timers and buttons and calling their handler.

Launching a Layout
After turning on the project, at first glance, the device worked correctly and stably. But the author discovered a flaw: the clock was behind by one second per hour, for long time this would be a big mistake.

After studying this problem, it was found that the original Arduino Uno uses a ceramic resonator, and it lacks the accuracy to measure time in long term. Most rational decision I purchased a real-time clock, plus because of this module, the time on the clock will not be lost when disconnected. The author purchased the Grove RTC module from Seeed Studio. It is a ready-made board with a clock chip. The author connected the pins of the SDA and SCL module to the Arduino on pins A4 and A5, GND to ground. Since the 5V power supply is occupied by the clock board, there was nowhere to connect the module. The author decided to power the module from one of the digital pins, which will be constantly energized. The author also needed to refine source code and add a real time clock library.

Watch assembly
Having completed long work above the code, it's time to give the device a completed look and move it from the breadboard to the printed circuit board. First of all, it was necessary to make the wiring for the board. Fritzing was used for this, since the author already had an idea of appearance hours, and he built a circuit diagram of the device. The author also traced the board manually, which took a lot of time.
PCB production project:

The production of the printed circuit board was ordered in China. Seeed Studio has a service for producing Fusion PCB boards. Through Fritzing, the file was exported to the Extended Gerber format; many board manufacturers work with it. Two weeks later, the author received the long-awaited payment in the mail.

All that remained was to solder the slightly dusty parts onto the board. The finished result after soldering it looked much better than the layout on Breadboard.

The author of the project worked for a long time and got what he wanted - a unique binary clock with a timer and alarm. Using the battery compartment, the watch can be placed anywhere. Arduino lived up to expectations and completely coped with the task.