Introduction

I’ve made a second version for my digital watch!

2.JPG

After the first version, I’ve discovered several things I could improve, being the most important the time precision (Improving with a RTC) and the battery life (The external oscillator with the RTC allows the microcontroller go to the sleep mode)

Bill-Of-Materials

Tools

PCB Design

In the first version I modify the design from the original project but this time, I’ve made my own design with eagle in order to include the RTC and also, because this time is entirely Bora Watch brand =D

This is the link for my project in eagle

If you don’t know eagle before, EAGLE is a scriptable electronic design automation (EDA) application with schematic capture, printed circuit board (PCB) layout, auto-router and computer-aided manufacturing (CAM) features

The free version includes: 2 schematic sheets, 2 signal layers, and an 80cm2 board. So normally, could be enough for prototype and hobby.

There are many solutions for schematics and PCB design but, why I choose Eagle?

First, the free solution. Even if it is not open source any more, it is enough for my purpose. With the same idea, I could choose Kicad

Then, the functionality without network connection, unlike some programs like Altium.

And finally, it is supported for my favorite manufacturer sparkfun where all their designs have a project with eagle free for download and ready if you want to use it.

And lot of tutorials!

  • https://learn.sparkfun.com/tutorials/how-to-install-and-setup-eagle
  • https://learn.sparkfun.com/tutorials/using-eagle-board-layout
  • https://learn.sparkfun.com/tutorials/using-eagle-schematic

Schematics

sch1.png

The schematic in pdf

The schematics is pretty simple:

  • Leds with the resistor
  • Microcontroller Atmega328P
  • RTC with 32.768 Oscillator.
  • Battery CR2032 with the capacitor.
  • Push button for displaying the time
  • Test point for programming (ISP programming)
  • And just on top, J1-J4, they are only connectors I am going to use to tie the watch strap so, no electrical functionality.

I’ve also discover two problems in the schematics after ordering the pcb:

  • According to the atmega328 specification, the chip has ADC6 and ADC7 pins but I’ve realized they only work as input for voltage references, not as output, so, I can’t use them to control the leds. I was forced to change this pins to SCK and MISO with cables. In the github, the schematics are now correct, but the gerbers were sent with this mistake.
  • The footprint for the oscillator 32.768 wasn’t correct for the oscillator I have. So, I have improvised something.

atmega_schematics.png

Board

Top layer Bottom layer
PCB_Front.JPG PCB_Back.JPG

The board in pdf, top layer and bottom layer

Order

Once you generate the GERBERS, you can send them to the manufacturer to print the PCB.

  • Seeedstudio. This time, I choose this manufacturer for the PCBs. They even have a tutorial about how to generate the gerbers, according to their specification, with eagle. Cost: $4.90 each 10 PCBs and $11.27 deliver to EU (Total: $16,17). Delivering time: 24 days.
  • jlcpcb The last time I ordered here. The cost was $2 each 10 PCBs, and shipping $6.15 (Total: $8.15) Deliver time: Around 21 days.

The differences between them for the moment are; Seeedstudio seems more serious and they allow to manufacture PCB with other colors of PCB without extra cost. On the other hand, I don’t know if it is worth it compeering the price (Double than jlcpcb)

Fast prototype

In the meantime waiting for the PCB arrives and in order to develop the software, I built a prototype, using the same atmega328 and same RTC MCP7940M

proto.JPG

Soldering

This time for soldering the atmega328, I have taken advantage of I am working in a electronics company for using a soldering microscope, so I could solder manually.

1.JPG

For the other components, as it was faster and I didn’t need precision, I use again the soldering paste.

3.JPG

2.JPG

So, the final result,

Top Bottom
5.JPG 6.JPG

Software

You can find the software in github

Bootloader

I’ve use the MiniCore library with Arduino to configure the fuses of the atmega, with the following configuration:

arduino_config.png

Programming

As you may have seen, there are 6 setpoints at the bottom, to connect the ISP for programming. Finally, as I programmed several times to get it works, I solder the pins and then remove it.

May attention the sense of the pins with the schematics and your ISP cable (Detect for example the VCC, with the battery, and compare the VCC with the cable)

Final results

Once the velcro strip has been sewn,

7.JPG

And if I compare with the previous version,

8.JPG

Improvements

Obviously, the first fix will be:

  • Redesign the PCB with the ADC pins correctly.
  • A correct oscillator or a correct footprint.

And then, another improvements I was thinking on:

  • As I use one or maximum two led at the same time, we could use only one 330 ohm resistor in order to simplify the circuit.
  • The footprint for the component 0402 (led, resistor and capacitor) is not correct in eagle, so, we could use this size of component if we fix the footprint.
  • A nice enclosure printed in 3D, similar to this project