Introduction: Binary Wrist Watch
I've always been fascinated by both interesting ways of telling the time and binary code. It's amazing the amount of information can be stored in simple ON/OFF signals. I knew I wanted a new wrist watch so why not combine binary code with a wrist watch, and do it as an awesome DIY project?
This is the kind of idea that lodged itself in the back of my mind. Always present and constantly evolving until it reached a saturation point where the project had to be done!
There were several challenged that had to solved to make it the watch of my dreams. Most of these challenges can be traced back to the small area of a wrist watch. It would have been easy to make a big or ugly watch, but that's simply not what I wanted from this project.
I will take you through the process from idea to making your own binary wrist watch you can wear with pride.
Let's get started!
Step 1: Solving Challenges
The watch has 4x4 minus three LEDs arranged in a multiplexed matrix. Where one column corresponds to one digit in digital time. The time is shown in binary coded decimal and one of digit is represented as with a maximum of four bits.
It both looks exceptionally stylish and works great with a simple user interface and battery life up to two years. Arriving at the final design was an iterative process where a lot of different problems had to be solved. In my opinion the end product turned out great and is something I love to wear on a daily basis.
One of the first things people would notice with the watch was of course how it looked. I wanted a watch that looked good and reminiscent of an actual product. In short, it had to be something I could wear to meetings at work.
The design, when the watch is off, is a simple two-tone combination of black and silver. This si present in the leather watch strap and clasp, along with both the case and the PCB.
I hid most of the components on the backside of the PCB and had it produced with a black solder mask. I thought it was cool to keep the black silicone chips on the front side with the silver soldered leads. That way even the electronics and PCB match the two-tone design of the rest of the watch.
The watch body needed to be solid when put together, yet easy to open up for changing the battery or making modifications to the code. That would mean no glue where I could use something less permanent. In fact, the only glue used in this build was for the crystal glass.
The opening and closing was solved with the main body being made of two parts: the watch case back, and the front watch ring. The watch case holds all the components like the PCB, watch band, and watch crown. The watch ring holds the glass, and slides down into the case back where it's secured with two tiny screws.
As discussed in the step about selecting components, this had to be really low power. It would be no good watch if you constantly had to change the battery every few days or even weeks. It would have to last for at least half a year to not be a real bother. Luckily this was solved! The watch spends most of it's time in deep sleep before waking up when the watch crown is pushed. In deep sleep it consumes as little as 10µA. This gives a battery life of more than two years!
Intuitive. The watch had to be intuitive and easy to use and understand. Well, at how understandable a binary watch could be at least. The time is represented in binary coded decimal (BCD) instead of just regular binary numbers. In BCD you take one regular decimal number and converts it to binary. This means a longer decimal number is is split up in each of its digits, and each individual digit is converted to binary. The system is beneficial for coding the time, because this means the biggest individual number in BCD is 9 (1001), instead of 2359 (100100110111) as with regular binary. More on how to use BCD to read the time in step 5.
As far as user interface goes, you simply press the watch crown to wake the watch where it immediately gives the time. Press the crown once more and you get the date. Because the watch has a battery life of two years you can easily toggle between daylight savings time without connecting to a computer. Simply press the button 15 times in rapid succession to toggle adding or removing an hour.
Step 2: Parts and Tools
An overview over what components and tools were used in this build. More on how the parts were selected in the next step.
- 13 x 0603 LEDs
- Choose the color you want! I used red LEDs+
- 1 x 8 MHz ceramic resonator
- 1 x Atmega328P-AU microprocessor
- 2 x 0.1uF 0806 capacitors
- 1 x 4.7uF 1206 tantalum capacitor
- 1 x 10k ohm 0806 resistors
- 1 x DS3231 RTC
- 3 x 51k ohm 0806 resistors
- 1 x CR2032 SMD battery clip
- 1 x CR2032 coin cell battery
- 1 x 4.5 mm push button
- 4 x 200 ohm 0806 resistors
Choose values according to LED color. I had success with the red LEDs with values between 39 ohm and 2k ohm
- Custom PCB. 0.8mm thich, produced with a black solder mask or the color of your choice
- GERBER files to make your own PCB are provided in step 6
- 1 x 20 mm watch band
- 2 x 20 mm watch band spring bar
- 1 x 38 mm wide watch crystal glass
- 5 cm (2 in) of thin wrapping wire or similar
- 2 x M2 6mm flat head screws
- 2 x M2 hex nuts
- USB to TTL adapter
- Soldering iron
- Liquid solder flux
- Rubbing alcohol
- Flush cutters
- Small torx screw driver
- Access to a high quality 3D printer
- I prototyped on a home desktop printer and had the end result professionally made
- 3D files provided in step 11
Step 3: Choosing Components
There are four main parts of the circuit board. We have the atmega328p microprocessor. This is the same as is found in popular arduino models. This is the brain and will communicate with a real time clock (RTC) module, process the time, and display this on the LEDs. All of this of course needs a power source, preferable a tiny battery.
The microprocessor had to meet certain criteria. It needed at least nine pins for GPIO, eight for the LEDs and one for the push button. It also needed an I2C bus where it could act as a master to poll the RTC for the time. At lastly it had to be able to operate on low voltages and not draw exorbitant amounts of current while powered. The Atmega328P-AU nails all of these criteria while still being small enough to not eat the whole PCB area. A big plus is that it's also used for most popular Arduino boards. This means it has a lot of support and it should be familiar to work with as I'm experienced with Arduinos.
The PCB was designed to use an 8MHz ceramic resonator. However, it turned out that the processor should be clocked even lower to run on low voltages. Take a look at the picture in this step, taken from page 303 in the datasheet, which explains the ration between clock frequency and operating voltage. A clock frequency of about 4MHz should be the maximum for this project. I used the internal oscillator at 8MHz and activated the divide by 8 bit, which gives the apparent clock frequency as 1MHZ. The soldered 8MHz resonator is still needed, however it's just really needed while burning the bootloader in step 8. I didn't see any reason to remove the resonator after the bootloader was burned.
At first I considered using the DS1307 RTC. This is a more popular chip commonly found on RTC boards ordered for cheap from China. However, this requires around a 5V power source, even though it uses a regular 3V battery for time backup. Few tiny batteries provide up to 5V so to use this chip I would need a way of stepping up the voltage. Stepping up voltage always leads to power loses, which I could not afford. Ref the second law of thermodynamics. Thanks Mr. Carnot!
The DS3231 can operate on as low as 1.8V, which is perfect when everything is driven by a battery with 3V. It also has a quartz crystal built in, which means the circuitry is easier to solder. The inbuilt clock crystal is also temperature compensated! Ambient temperature can cause a clock crystal to have irregular oscillations. This means it becomes less accurate after the first time being set. The DS3231 measures the ambient temperature and uses this in a calculation to compensate for temperature fluctuations.
When do you need a temperature compensated real time clock? You need it when the RTC is in changing temperature environments. Perfect for a wrist watch, for when you're walking in and out of different rooms or going outside, when the temperature isn't constant.
The LEDs come in a 0603 package size - which is really tiny! They can draw up to 20 milli-amps each, but this is not really a problem. Due to the way the multiplexed LED matrix is displaying the time with column scanning, no more than three LEDs will be powered at the same time. The current is also reduced with larger than needed resistors. The light output are reduced with the current limiting resistors, so you can experiment to find the light level and current consumption you're happy with. My experience is that resistors between 100 and 400 ohm draw little current and are plenty bright.
Take a look at the table provided on listing for these LEDs. They all require the same amount of current, however the red LEDs require the lowest voltage while still providing more than 100mcd of light. All of this means that in terms of light and power, the red LED color gives you the most bang for your buck. You may of course choose other colors, but I recommend against colors that require voltages around 3V. Just because the battery voltage will decrease over the years, meaning the LEDs shut off. This leads to the weird situation where the watch is still powered and keeps the time accurately, the LEDs just require such a high voltage that the watch has no way of telling you the time.
I wanted this to be powered by a regular old coin cell, also known as a watch battery - which is fitting. A CR2032 usually has a voltage of 3V and typical capacity of 200mAh. One drawback however is that relatively large loads may drop the voltage down to 2V. This is handled in two ways: first reducing the current load, and second not caring if the voltage drops. The current load has been reduced by using low power ICs like the Atmega328P and DS3231. It is also reduced by using current limiting resistors on the LEDs, and because the matrix is driven with column scanning no more than three LEDs are really on at the same time. Because LEDs are the components that draw the most current in this watch, this had the biggest impact. Also, so what if the voltage drops from the battery? I've prepared for that. The DS3231 can safely be powered by 1.8V, I chose red LEDs because they require the lowest voltage to turn on, and the Atmega328P has a special bootloader that's clocked at 1MHz and brown out detection at 1.8V. All this means the watch is happy to chug along with either large current loads or low voltages!
The watch circuit could be powered by a lithium cell. It doesn't have the problem of voltage reduction at the same current draws as a CR2032, but it would bring some additional problems and challenges. For this project, a lithium-ion battery would have two main drawbacks. While the capacity of a tiny cell is close the capacity of a CR2032, it needs some extra for safe charging and safe discharging. It would also need a way of connecting a charger. I prefer the option here where the case can be opened and the battery swapped right away. Lithium batteries are also a bit more dangerous to work with and just requires more care and consideration.
You may be familiar with the voltage range for a lithium-ion battery. They usually start at around 4.2 volts when fully charged, decrease quite quickly in voltage to 3.7V, before shutting off at 3.2 volts. If I was going to use such a varying voltage range to power the LEDs, I would also need some supporting circuitry to keep the LED voltage somewhat more regular. This not only adds to the complexity of an already tiny PCB, it will also consume more power. I've reduced power in every area I could, and the end result is this watch which will accurately keep the time for about two years on a regular coin cell battery!
Step 4: Theory Time 1: Multiplexed Matrix
Multiplexing is a way of interfacing multiple inputs and outputs (IO) with fewer actual IOs. The configuration used in this watch is a 4x4 LED matrix with three unnecessary LEDs removing. This could control up to 16 single LEDs using only eight outputs on the microcontroller. I simply removed the three LEDs that were not needed for showing the time and date from the matrix.
To turn on a single LED simply set the selected row number to high, and the other row to low, while setting the selected column to low and the other columns to high. This means the current is provided by the row goes through the LED, and sinks into the column number.
Creating more complex shapes with an LED matrix may lead to unwanted LEDs to turn on. To prevent this most matrices are activated with a column (or row) scanning. Simply put this means that only the different LEDs in one column are turned on at the same time. This column is then disabled before the next column is activated. All this happens more quickly than the eye can perceive. The result is the impression that the LEDs in the different columns are turned on at the same time, creating a complex picture.
The watch has the matrix rotated 90 degrees between the schematic and the PCB to make coding easier. This was done so one time digit was stored in its own byte on the arduino code.
Step 5: Theory Time 2: Binary Coded Decimal
Binary Coded Decimal as mentioned in the second step codes individual decimal digits as their own binary number. The main benefit in this case is how much easier it becomes to actually read the time. It's so much easier to read each time digit 2 (10), 3 (0011), 5 (101), 9 (1001), than reading the complete number at once 2359 (100100110111).
So how do you read the time with BCD?
I'm glad you asked. The lowest row on the watch represents the least significant bit and the upper row is the most significant bit. The row from the bottom to the top has the values: 1, 2, 4, 8. So each digit has its value coded upwards and you read the digits from left to right.
When an LED is activated in a particular row and column you should count this value. When the LED is off just ignore the value. To read the first digit simply sum all the activated LEDs corresponding values, and keep this digit in mind while reading the next one. Take a look at the picture. Are you able to tell the time?
The reason for the 13 LEDs on the watch are that these are just the LEDs needed for showing all the possible combinations for the time of day.
Step 6: Creating the Circuit
Okay so we've talked a lot about parts of the circuit and the reason behind the components. Now let's put it all together in a complete circuit! The PCB was made round to make a callback to regular watches. A standard watch body is usually 42mm with a glass diameter of 38mm. That's the outer edge of the glass. However if the glass rests on a 1mm wide lip, the available diameter is suddenly 36mm. This meant I could give the PCB a diameter of somewhere around 35mm if I wanted some margins when everything fit together.
The PCB was designed in Autodesk Eagle and you can download the GERBER files here. I had them produced from JLCPCB.com who has a 10 unit for $2 deal. I'm satisfied with the quality and have uploaded a few pictures on this step. The PCBs were made for me at a thickness of 0.8mm, but 1mm should work fine as well. And once again because I wanted this to look stylish, I ordered the PCB with a black solder mask to match the rest of the watch.
After the PCBs were delivered there was part of the silk screen that was their production number. This is often used as a way for the factory to identify which PCBs in a order go together. Usually this number doesn't matter at all. However because the front of the PCB was going to be displayed in all it's glory, I had to remove that number. Luckily this turned out to be easy. I just scraped it off with the end of an USB-C cable. You can really use any flat and hard edge, like a coin or spatula. Just be careful not to scrape with too much pressure or you can scrape the solder mask off the traces. Practice on the backside of the PCB to get the right feel for removing the silk screen.
Step 7: Soldering
The very best way of keeping a circuit board still while soldering is with your old friend: masking tape. A couple strips will keep the PCB dead still while you wave around the soldering iron.
I started with all the components with the lowest profile and completed the front side before doing the back. When soldering tiny SMD components and especially when soldering SMD chips, you need a lot of liquid solder flux. These come in various applicators like flux pens or squeeze bottles. I have a bottle with a tiny brush in the lid.
Start by tacking down one side with some pre-melted solder and stick the component in place, making sure to align it the way you want it. Now apply liquid solder flux, melt some solder on the tip of your iron and touch this to the unsoldered points. Easy as that! Use this easy process to solder all the components except the button.
If you apply more solder than needed and short chip pins clean the tip of your iron and reheat where its too much solder. The surface tension of the liquid solder should pull a small amount of it onto the iron. You may have to repeat this step a few times until all the excess solder is removed.
While flux is magic for it's solder-flowing-abilities it's more like dark magic for its electrical-noise-inducing-abilities. Flux, when left on a PCB may let current flow where you don't want it. In other words it can disturb sensitive signals like from the ceramic resonator. To avoid unwanted noise the flux is cleaned off with rubbing alcohol and, well, rubbing with some thick tissue paper or q-tips.
Step 8: Button Modifications
As you may have noticed the watch crown on the side of the watch is what you press to wake the watch from sleep. This crown had to be inserted into the body from the outside, should not be possible to accidentally pull out after assembled, and needs to activate an interrupt button connected to the microcontroller. I'm quite pleased with the solution.
Most cheap, tactile push buttons you're used to seeing have a small, round, black, plastic part you push on to make the leads conduct current. This black plunger is removed and instead replaced with the end of the watch crown.
The button is opened by using flush cutters to remove the four plastic rivets on the front side of the button. Now the metal cover can be removed and on the inside you find the plastic plunger and a flexible metal disk. The disk is what actually makes contact between the button leads when the plunger is pushed.
Remove the black plunger and reinsert the metal disk. I used a small bit of rolled of masking tape to keep the disk from shifting positions after it was inserted. Now add the outer button cover again and secure it with some super glue. The result is a push button with an open hole that can be activated by pushing a sharp object into the opening. The sharp object we're using is, of course, the end of the watch crown.
The button modifications are finished and it can be soldered at a right angle on the underside of the circuit board.
Step 9: Burning the Bootloader
The electronics are now complete! It sure was some work now let's hope everything works, because we haven't had the ability to test that yet. The microcontroller can't interpret Arduino instructions or code at this points. It first needs a bootloader, which acts sort of like the BIOS on your computer. It is a sub-program that needs to be stored on the chip in order to load and execute the program you write.
Because this is at times an ultra low voltage application of the Atmega328P it needs a special kind of bootloader. As discussed in step 3 on selecting the microprocessor with the right frequency, this circuit will run at a frequency of 1MHz. This was to make sure the processor still works reliably at the lowest possible voltages of 2V.
Open the Arduino IDE, go to File > Preferences > Additional Boards Manager URLs: and add a comma after the currently last URL before pasting this URL: https://mcudude.github.io/MiniCore/package_MCUdude...
Press "OK" a few times and go to Tools > Board > Boards Manager. Open this boards manager, search for minicore and install it.
This adds the MiniCore bootloaders to the Arduino IDE. These give us a few additional possibilities and configurations. If you want to learn more about MiniCore you can check out their github page here.
Now we need to use an Arduino as an ICSP programmer to actually burn the bootloader to our watch circuit. I used an Arduino Nano. Connect the master Arduino in the schematic attached to this step. Go into Arduino examples and open the "ArduinoISP" example code. Upload this to the master Arduino.
At this point we're ready to configure the bootloader we want to burn, but first set the Tools > Programmer: to "Arduino as ISP". Select the following configuration from the MiniCore bootloader. You may also want to double check your configuration to the configuration in the picture attached to this step.
- Board: ATmega328
- Bootlader: Yes
- Clock: 1 MHz internal
- Compiler LTO: Disabled
- Variant: 328P / 328PA
- BOD: 1.8V
Now the final step is to connect the ISP wires from the master Arduino to the watch circuit. You can press these onto the programming points on the backside of the watch PCB. Because I had to experiment with a lot of different bootloaders and fuse settings, including trying to make my own modifications at some point, I soldered female headers to the programming points to make it easier to experiment.
With the ISP wires properly in place select the option Tools > Burn Bootloader. Wait for a short while and you should receive a success message. If you don't there are two probable reasons. The main culprit is usually the resonator. Try to resolder and reclean this part before trying again. If you have access to a proper scope, minimum 16MHz sampling frequency, try to probe the resonator points. If it's properly soldered you should get nice, smooth sine curves. Another possible source of error is the ISP wires don't have a proper connection if you're just pushing them down. Either adjust your grip and try a few more times, or solder the wires or female headers onto the programming points.
Step 10: Code
When the bootloader is burned to the microcontroller, an FTDI converter can be used to upload the actual Arduino code. The code could actually be uploaded through ICSP replacing the bootloader, but I didn't really want it that way. That would make it harder to upload new code if I did any changes in the future, and the serial terminal couldn't have been used to communicate with the microcontroller. As you probably know, the serial terminal is incredibly important while debugging a project, so I didn't want to remove that ability. And after all, adding the FTDI connection points didn't complicate the PCB in any way. That left a lot of great reasons for it being added, and no real reasons for removing it.
To upload the code first open the sketch I've attached here. Connect an USB FTDI adapter to the serial programming points. Once again, these connections can either be pressed onto the PCB or connected by soldering the pins or female headers that has to be desoldered later. I used female headers.
When uploading make sure you keep the same exact board settings used for burning the bootloader. The time on the RTC is set whenever the code is compiled and uploaded. When you have the first successful upload comment out the line at 35, which compiles the time, and upload once more. This is the line responsible for reading the time and adjusting the RTC. By removing this line the time will not be set the original compilation time, if the code where to randomly reset at some point.
At this point I took a deep breath and gave myself a pat on the back for coming this far. When the code is successfully uploaded is actually the first time the watch can be properly testet. The watch starts off in sleep and is activated by the push button. Because it was hard to press I just shorted the button leads with a pair of tweezers. And... It worked! Well, not on the first try though. As mentioned earlier I had to do a lot of experimentation and figuring out how to do things along the way. The PCB I ended up using is actually the third one I soldered. That did not make it any less gratifying when I finally nailed the complete process to make everything work the way I had imagined and dreamt of.
Step 11: User Interface
The push button is attached the first external interrupt pin of the Atmega328P. The microcontroller spends most of its time in deep sleep, consuming next to nothing current. Whenever the push button is pressed the microcontroller wakes up from sleep and passes two variables to the main loop, a boolean flag that it just woke, and a recording of the current millis() value. These variables are used for debouncing the push button making sure it doesn't wake from just random electrical noise. If the micro wakes from noise it just goes back to sleep again.
As soon as the microcontroller is properly woken it polls the RTC for the current time and splits this time into the four separate digits. These separate values then gets passed to the LED matrix, displaying one digit at the time - really fast. The microcontroller also saves the current millis() value always comparing this stored value to the next. After 20 seconds of the watch displaying the time it goes back to sleep again.
You may be afraid that 20 seconds is not enough time to read the time in a binary format. To that I say 20 seconds is more than enough! I've used the watch daily for a week now and it takes maybe two seconds to read the time. If you do want a longer time then just go ahead and increase the variable that stores the amount of time before sleep.
When the watch is woken you can press the button once more, before the 20 seconds are up, to display the current date. This is presented in the format dd/mm.
So because this watch is made to be used continuously for two years without setting the time more than once, how do you adjust for daylight savings time that comes twice a year? That's potentially four times the watch has to be set without needing a new battery. I know DST can be a bother, not only do you throw off your sleep cycle, but you have to go and re-set every watch you own! Regardless of my unusually strong feelings about daylight savings time, this is not the time to discuss the topic. All you need to know is that this is something I've already prepared for. To toggle between DST mode simply press the button 15 times in rapid succession. This either adds or removes one hour to the current time, based on the DST variable in the code. Make sure you adjust this variable before uploading the code.
Step 12: 3D Printing
Because this was something I wanted to use on a regular basis, the watch needed to look polished and not super DIY. That's why I had the watch body profesionally 3D printed. If you have access to a 3D printer with great resolution and strong materials that's great! Ordering a proffesional 3D print contributed to about half the budget of the project. While worths it in my opinion, it would be great to have access to a cheaper alternative.
Download the 3D files here. To save some money the watch crown is attached with sprues to the watch ring. I also made five watch crowns instead of just the one you need. It's always great to add a few spare parts whenever you can.
Simply remove the sprues with your flush cutter and give the watch crown a quick sanding with some sand paper or a file and you're good to go.
Step 13: It All Comes Together
By now we have gathered all the parts now it's time to put everything together. Due to a lot of planning this step is really easy and straight forward. Take a look at the pictures to see the order of how everything is mounted. The screws used to mount the case had their heads painted black to match the rest of the watch body.
- Insert the watch crown into the watch body
- Pull a short piece of wire through the mounting hole in the watch crown
- Glue down this piece of wire making sure the crown has 1mm of movement
- Insert the hex nuts into their designated hex slots and keep them in place with a small piece of tape
- Attach some double sided tape to the underside of the PCB/the plateau of the watch body
- Now insert the PCB making sure the crown peg is mated into the button hole
- Press the PCB properly down and that the crown activates the button
- Glue the crystal glass to the watch ring with a line of super glue on the inside perimeter of the watch ring
- Press down the crystal glass with some baking paper and wait for it do dry
- Insert the watch ring making sure to align the screw and crown holes
- Insert the M2 6mm long screws into the screw holes and fasten them with a screw driver
- Insert the watch band springs into the ends of the watch band
- Mate one end of the watch band spring into the designated hole
- Press down the other end of the bar spring and slide it into the hole opposite of the first
The final mounting step is the most enjoyable. Wrap the band around your wrist, buckle up, press the watch crown and amaze at your creation. You're finished!
Step 14: Final Thoughts
After an intensive process of development and endless hours spent debugging I have created my very own interesting time piece. The end result is a great looking, geeky, and durable watch I can wear to most any occasions to show off my interests and making prowess.
I have done my best to document the steps necessary to create the watch. If you do attempt this project or to make the watch with some custom modifications, leave a comment and keep me appraised of your progress!
First Prize in the