Author Topic: Suggest a microcontroller for a DIY PCB watch  (Read 3034 times)

0 Members and 1 Guest are viewing this topic.

Offline telluriumTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: ua
Suggest a microcontroller for a DIY PCB watch
« on: March 12, 2025, 01:07:51 pm »
I want to design and build a very simple DIY binary watch , similar to https://www.tindie.com/products/subsystems/simple-rechargeable-binary-watch/

Requirements:
- run on a battery for a long time
- functionality is minimal: light LEDs on button press, otherwise sleep. show battery % on double click
- USB for reprogramming
- minimum components count
- no components on the bottom side
- preferably SMT components, 0603 for easy assembly

What MCU and components would you recommend (e.g. which LEDs) ?
Is there an easy way to protect the top part from the moisture and accidental damage? I worry mainly about the battery. Should I worry about something else?
Open source embedded network library https://mongoose.ws
TCP/IP stack + TLS1.3 + HTTP/WebSocket/MQTT in a single file
 

Offline jpanhalt

  • Super Contributor
  • ***
  • Posts: 4243
  • Country: us
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #1 on: March 12, 2025, 01:16:03 pm »
Any microcontroller with a crystal oscillator one that allows a 65536 Hz (2^16) tuning fork second oscillator.  In fact, there is nothing wrong with using a "clock" oscillator for the main oscillator for something that simple.
 
The following users thanked this post: tellurium

Offline stretchyman

  • Regular Contributor
  • *
  • Posts: 55
  • Country: gb
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #2 on: March 12, 2025, 01:23:29 pm »
Attliny
 
The following users thanked this post: tellurium

Offline telluriumTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: ua
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #3 on: March 12, 2025, 01:35:19 pm »
Attliny

If I go with attiny, should I implement USB in software?

Would a 32-bit ARM with USB be a better choice, from the point of power consumtion / price / simplicity ?
Open source embedded network library https://mongoose.ws
TCP/IP stack + TLS1.3 + HTTP/WebSocket/MQTT in a single file
 

Offline DashApple

  • Newbie
  • Posts: 7
  • Country: gb
  • So Far, So Good
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #4 on: March 12, 2025, 02:05:01 pm »
I did something similar as a prototype a while back, Though I understand its not remotely as small and i lacked buttons at the time and I opted for IC's I had an idea of.

Mine was based on the Atmega328P with an DS3231 RTC and 16 channel constant current LED driver along with a battery fuel gauge IC ( USB B was just a test, Tad big )

Doing it again i would go with a smaller RTC since Id go with the 328P again but Id remove the USB bridge and just use UART since time would be set by buttons on the watch, It sleeps and wakes up to update the LEDs,

The new Attiny's look like a good option too.

just my 2 cents

« Last Edit: March 12, 2025, 02:14:07 pm by DashApple »
 
The following users thanked this post: tellurium

Offline squadchannel

  • Frequent Contributor
  • **
  • Posts: 536
  • Country: jp
  • deepl translate user
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #5 on: March 12, 2025, 02:05:55 pm »
What do you want to do with USB? If it is just to set the time, it should be possible via USART.

Recent AVR varieties use UPDI. one wire reprogramming and debugging is possible.
implement DFU updates, will need to build a bootloader that can self-program while sending checksums via USART.

"REAL" USB, it would be easier to use an STM32 or similar with USB support.
 
The following users thanked this post: tellurium

Offline telluriumTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: ua
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #6 on: March 12, 2025, 02:14:30 pm »
What do you want to do with USB? If it is just to set the time, it should be possible via USART.

I think USB would serve as a handy connector for reprogramming.
If I use UART, then what connectors should I use? Like have pads and use pogo pins ? Any pointers?
Open source embedded network library https://mongoose.ws
TCP/IP stack + TLS1.3 + HTTP/WebSocket/MQTT in a single file
 

Offline squadchannel

  • Frequent Contributor
  • **
  • Posts: 536
  • Country: jp
  • deepl translate user
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #7 on: March 12, 2025, 02:15:12 pm »
Batteries can be coin cell or coin cell like Li-ion. In that case, a charging circuit would be needed. Magnetic charging cables are also a good idea.

To protect it from external factors, it is better to put it in a case.
Cases are available from enclosure manufacturers in the form of wristwatch enclosures. 3D printing is also a good option.

https://www.serpac.com/product-by-series/bw-series.html
https://www.okwenclosures.com/en/Plastic-enclosures/Body-Case.htm?ref=53d163b0-c3d5-11e5-bef8-bc764e20b40e
« Last Edit: March 12, 2025, 02:16:53 pm by squadchannel »
 
The following users thanked this post: tellurium

Offline telluriumTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: ua
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #8 on: March 12, 2025, 02:17:43 pm »
I did something similar as a prototype a while back, Though I understand its not remotely as small and i lacked buttons at the time and I opted for IC's I had an idea of.

That watch looks sick! Well done!
Even and Ethernet ? What did it do?

Are there micros with a built-in RTC, to save on component count / PCB space / complexity?
I think there are, like ESP32 IIRC
Open source embedded network library https://mongoose.ws
TCP/IP stack + TLS1.3 + HTTP/WebSocket/MQTT in a single file
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 16259
  • Country: fr
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #9 on: March 12, 2025, 02:18:57 pm »
For low power and all features and memory they have, I would personally recommend the STM32L4 series. Ultra-low power, has USB, has anything you'd need for this, and has no limitations like you'd get with an ultra-small 8-bitter. It has a RTC, only requires a small 32768 Hz crystal (which can be used to drastically improve the accuracy of the internal RC clock too, so you don't need any other crystal).

You can go for the lower end of this series for this project, I think that would be the STM32L431? It's pretty cheap too, considering what it brings. Available from JLCPCB directly too.

Just my pick, of course.
 
The following users thanked this post: tellurium

Offline squadchannel

  • Frequent Contributor
  • **
  • Posts: 536
  • Country: jp
  • deepl translate user
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #10 on: March 12, 2025, 02:20:53 pm »
Are there micros with a built-in RTC, to save on component count / PCB space / complexity?
I think there are, like ESP32 IIRC

I don't think there is a modern micro that does not have an RTC. It is a basic peripheral function.
 

Offline DashApple

  • Newbie
  • Posts: 7
  • Country: gb
  • So Far, So Good
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #11 on: March 12, 2025, 02:25:18 pm »
I did something similar as a prototype a while back, Though I understand its not remotely as small and i lacked buttons at the time and I opted for IC's I had an idea of.

That watch looks sick! Well done!
Even and Ethernet ? What did it do?

Are there micros with a built-in RTC, to save on component count / PCB space / complexity?
I think there are, like ESP32 IIRC

Thankyou, It does looks like that but its just a well over sized USB B socket here :)

I switched over to USB Micro B for the final design.

Most of the ICs I had used are old so not the best for PCB space saving, Going with other's suggestions would be a good idea with more modern MCU's with built in RTCs, If you went down the lithium battery route then a simple linear charger and maybe a fuel gauge depending on how far you'd want to go.
 
The following users thanked this post: tellurium

Offline telluriumTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: ua
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #12 on: March 12, 2025, 02:42:55 pm »
You can go for the lower end of this series for this project, I think that would be the STM32L431? It's pretty cheap too, considering what it brings. Available from JLCPCB directly too.

Thank you!
So say if I go with STM32L431, I'd need a battery, a oscillator, LEDs, and a bunch of decoupling capacitors, apparently.
Any suggestion w.r.t. battery? Can I power the STM32 directly, or need a converter?
Open source embedded network library https://mongoose.ws
TCP/IP stack + TLS1.3 + HTTP/WebSocket/MQTT in a single file
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 16259
  • Country: fr
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #13 on: March 12, 2025, 02:56:20 pm »
You can go for the lower end of this series for this project, I think that would be the STM32L431? It's pretty cheap too, considering what it brings. Available from JLCPCB directly too.

Thank you!
So say if I go with STM32L431, I'd need a battery, a oscillator, LEDs, and a bunch of decoupling capacitors, apparently.
Any suggestion w.r.t. battery? Can I power the STM32 directly, or need a converter?

No problem powering it directly from a 3V lithium coin cell. It works down to 1.7V, and the accuracy of VDD won't matter if you don't use ADCs/don't need a stable reference (which you won't, given your requirements).
It should draw less than 1 µA with the proper low-power mode. Say that the LEDs would draw 5 mA (all combined) on average when lit up, which is probably overkill (small SMD LEDs are pretty efficient), and that they are lit up a total of 1 minute per day (which is probably also overkill for normal daily use), you should get something like 4 µA consumption on average. Say 5 µA to be conservative (I'm sure that would be less than half that in practice). On a CR2032 (about 200 mAh), that would be 4.5 years (again, you can probably count on twice that in practice).
« Last Edit: March 12, 2025, 02:58:12 pm by SiliconWizard »
 
The following users thanked this post: tellurium

Offline woofy

  • Frequent Contributor
  • **
  • Posts: 412
  • Country: gb
    • Woofys Place
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #14 on: March 12, 2025, 03:05:25 pm »
You can go for the lower end of this series for this project, I think that would be the STM32L431? It's pretty cheap too, considering what it brings. Available from JLCPCB directly too.

Thank you!
So say if I go with STM32L431, I'd need a battery, a oscillator, LEDs, and a bunch of decoupling capacitors, apparently.
Any suggestion w.r.t. battery? Can I power the STM32 directly, or need a converter?
Given your familiarity with STM32, that's what I would suggest. For the battery I have used the LIR rechargable button cells very successfully with an ESP32 project, using a small solar panel to recharge it. They go up to 4.2v on re-charge, so you will need an LDO to 3.3v. The advantage is the USB port can also re-charge the battery when needed.
Sorry about the massive amazon links, search LIR2032 or LIR1220 if you don't want to click them.

LIR2032
https://www.amazon.co.uk/EEMB-LIR2032H-Rechargeable-Lithium-ion-Batteries/dp/B096LQN4GJ/ref=sr_1_7_sspa?crid=2JC77GBW6OZ47&dib=eyJ2IjoiMSJ9.piXozJrAJNtEuj7i7IAH2KaR6jFEqwBH6jpdmqnh5Q5UmZVm-AMqKzCqcUm8XTp0RJJtFv35RuJz59uON2mpI47DSA9scd9zarXimg8QbAWpfb2uVAjaBSrN4lcxPnq_7IgJGtabWqc767JRV0DRyMMIzk_eQ2D-7Be4gLWcvHmaYk6C_AUuo6nMW-6kZsm_jONWlhDBKLB67tzmAlfJYT3Wf__IlGuKsUWyYlEcy2s.aagw8lDvw_OJwbK79TqH_welg1Z54k9lwys2GveT6cU&dib_tag=se&keywords=rechargeable+lithium+button+solder&qid=1741790698&sprefix=rechargeable+lithium+button+solder%2Caps%2C81&sr=8-7-spons&sp_csd=d2lkZ2V0TmFtZT1zcF9tdGY&psc=1

If those are too big the a LIR1220:
https://www.amazon.co.uk/SIMPLETEK-Rechargeable-Battery-LIR1220-connectors-Silver/dp/B0DZXNM5KK/ref=sr_1_6?crid=2JC77GBW6OZ47&dib=eyJ2IjoiMSJ9.piXozJrAJNtEuj7i7IAH2KaR6jFEqwBH6jpdmqnh5Q5UmZVm-AMqKzCqcUm8XTp0RJJtFv35RuJz59uON2mpI47DSA9scd9zarXimg8QbAWpfb2uVAjaBSrN4lcxPnq_7IgJGtabWqc767JRV0DRyGW5vp7lQbMluWRP9R0-BO0w347QhPNhQ8momO77LrR_jONWlhDBKLB67tzmAlfJYT3Wf__IlGuKsUWyYlEcy2s.ictdDkMEVx5egu5vxMvT7IxkrhC9JKvV678_agZ8JLM&dib_tag=se&keywords=rechargeable+lithium+button+solder&qid=1741791108&sprefix=rechargeable+lithium+button+solder%2Caps%2C81&sr=8-6
 
The following users thanked this post: tellurium

Offline Kasper

  • Frequent Contributor
  • **
  • Posts: 848
  • Country: ca
 
The following users thanked this post: woofy, tellurium

Offline woofy

  • Frequent Contributor
  • **
  • Posts: 412
  • Country: gb
    • Woofys Place
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #16 on: March 12, 2025, 05:08:38 pm »
Thanks Kasper,
I'll try to remember that next time.

Online Picuino

  • Super Contributor
  • ***
  • Posts: 1199
  • Country: es
    • Picuino website
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #17 on: March 12, 2025, 05:41:02 pm »
Microchip PIC with XLP (eXtreme Low Power)

https://ww1.microchip.com/downloads/en/DeviceDoc/30009941J.pdf

https://ww1.microchip.com/downloads/en/Appnotes/00606B.PDF


Example: PIC16F15323
https://ww1.microchip.com/downloads/en/DeviceDoc/PIC16_L_F15313_23_Data_Sheet_40001897C.pdf

eXtreme Low-Power (XLP) Features:
   Sleep mode: 50 nA @ 1.8V, typical
   Watchdog Timer: 500 nA @ 1.8V, typical
   Operating Current: 8 uA @ 32 kHz, 1.8V, typical
« Last Edit: March 12, 2025, 05:49:06 pm by Picuino »
 
The following users thanked this post: tooki, tellurium

Offline ali_asadzadeh

  • Super Contributor
  • ***
  • Posts: 1990
  • Country: ca
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #18 on: March 13, 2025, 10:37:17 am »
CH32V203
ASiDesigner, Stands for Application specific intelligent devices
I'm a Digital Expert from 8-bits to 64-bits
 
The following users thanked this post: tellurium

Online Picuino

  • Super Contributor
  • ***
  • Posts: 1199
  • Country: es
    • Picuino website
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #19 on: March 13, 2025, 11:25:47 am »
One LIR2032 lithium battery has approximately 70mAh capacity.
If you leave half of the capacity to keep the clock running for a MONTH, you have to have a consumption of:

35mAh / (30 * 24h) = 48uA of max continuous consumption in RTC mode.


If you leave half of the capacity to keep the clock running for a YEAR:

4uA of max continuous consumption in RTC mode.
« Last Edit: March 13, 2025, 11:27:28 am by Picuino »
 
The following users thanked this post: tellurium

Offline bobxyz

  • Contributor
  • Posts: 31
  • Country: us
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #20 on: March 13, 2025, 06:01:06 pm »
You could look at the low-end TI MSP430 chips too
https://www.ti.com/microcontrollers-mcus-processors/msp430-microcontrollers/overview.html

You probably need to go to a bigger than needed pin count (e.g. LQFP-48) to find one with USB support.  Capacitive touch sensing would be nice instead of a button.

For protecting the board, a 3D-printed enclosure would be best.  Spray-on clear "conformal coating" would provide some protection.  I don't know if there's a cheap hardware store alternative that won't react with the PCB.
https://www.digikey.com/en/products/detail/acl-staticide-inc/8695/10270026

On a tangent to the original request, there are starting to be some "LCD watch development board"s showing up on ebay.  So far, they're rather big and ugly.
 
The following users thanked this post: tellurium

Online peter-h

  • Super Contributor
  • ***
  • Posts: 4591
  • Country: gb
  • Doing electronics since the 1960s...
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #21 on: March 13, 2025, 07:03:57 pm »
I must be missing something huge here, but surely a watch

- needs to run for a fair time on the battery (it is debatable whether the almost daily removing it from the wrist to charge it, is a hugely cynical play on fashionable smart watches)

- needs to be accurate

What CPU do Garmin use in their £800 top end watch? They claim ~50 day battery life but that is only if you basically don't do anything with it ;) It is really fat, to accommodate the battery.

Re accuracy, you can have a periodic GPS sync. But all smartwatches do very little without a bluetooth connection to a smartphone.

Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline telluriumTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: ua
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #22 on: March 14, 2025, 04:15:11 pm »
I've created a schematic. It is simple - but since I am not a HW person, I'd appreciate comments / feedback on it.

- Pin VDDA / VREF+ left unconnected - is that OK?
- only 1 uF decoupling cap per VDD pin, is that OK?
- Those current limiting resistors per LED, do I really need them if I plan to lit LEDs for like 3 seconds only, a couple of times a day?
- Thought a lot about USB connector, and since I plan to program baremetal, I have little idea about how it will work out. Ideally I could program the thing from using the USB connector, but I guess that needs a bootloader installed, so how then to bootstrap the chip? So for now I broke out UART and SWD as 2.54 inch spaced pin holes, to make sure I have options w.r.t. programming. I plan to stick a short female header for those, no idea about better connector options.
Open source embedded network library https://mongoose.ws
TCP/IP stack + TLS1.3 + HTTP/WebSocket/MQTT in a single file
 

Offline woofy

  • Frequent Contributor
  • **
  • Posts: 412
  • Country: gb
    • Woofys Place
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #23 on: March 14, 2025, 04:23:20 pm »
I would put a 10k pullup on the reset line, and also pull Boot0 to ground via a resistor.
The 1uF are ok if they are multilayer ceramic surface mount caps, otherwise a 0.1uF in parallel.
Yes, you need the current limiting resistors.
 
The following users thanked this post: tellurium

Offline woofy

  • Frequent Contributor
  • **
  • Posts: 412
  • Country: gb
    • Woofys Place
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #24 on: March 14, 2025, 04:26:36 pm »
The processor has a built in boot-loader. Set boot0 high during reset to use it. That's why I suggested the pull down resistor. I normally connect boot0 directly to ground as I only use st-link.
 
The following users thanked this post: tellurium

Offline woofy

  • Frequent Contributor
  • **
  • Posts: 412
  • Country: gb
    • Woofys Place
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #25 on: March 14, 2025, 04:36:13 pm »
You should also allow for some load capacitors on the 32.768KHz crystal. Something like 12-18pF each side to ground should be ok.
 
The following users thanked this post: tellurium

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4948
  • Country: nl
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #26 on: March 14, 2025, 04:55:13 pm »
Without the VDDA connected to the supply voltage the internal oscillator and LSE might not run. I know from experience that a STM32F103 does not start when VDDA is not connected.

As you are running from a battery and the caps on the supply pins of the MCU are only for decoupling I would reduce them to 100nF.
« Last Edit: March 14, 2025, 04:57:50 pm by pcprogrammer »
 
The following users thanked this post: tellurium

Offline telluriumTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: ua
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #27 on: March 14, 2025, 05:46:24 pm »
Thank you pcprogrammer & woofy!

woofy, could you elaborate on a reason a ceramic cap makes a difference, what's special about it?
« Last Edit: March 14, 2025, 05:55:40 pm by tellurium »
Open source embedded network library https://mongoose.ws
TCP/IP stack + TLS1.3 + HTTP/WebSocket/MQTT in a single file
 

Offline woofy

  • Frequent Contributor
  • **
  • Posts: 412
  • Country: gb
    • Woofys Place
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #28 on: March 14, 2025, 05:54:41 pm »
Multi-layer ceramic caps have a low inductance. If you use an aluminium electrolytic they have a small inductance because they are wound internally. That inductance can cause a voltage drop on fast internal switching inside the processor. I would change them to 100nF caps as pcprogrammer suggested.

Offline telluriumTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: ua
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #29 on: March 14, 2025, 05:59:24 pm »
Done, thank you!
Open source embedded network library https://mongoose.ws
TCP/IP stack + TLS1.3 + HTTP/WebSocket/MQTT in a single file
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4948
  • Country: nl
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #30 on: March 14, 2025, 07:30:23 pm »
It is probably best to also add a decoupling cap on VDDA. Depends a bit on how you can place the cap on pin 1 and route the VDD to pin 5. The decoupling caps should be as close as possible to the pins, with not to thin power traces.

Another thing is that you did not value your series resistors on the LED's. They depend on the LED forward voltage and the supply voltage and the amount of current you want running through them. Depends also on if you are going to use PWM to control the brightness. Modern SMD LED's don't need a lot of current to be bright, so you might want to experiment with it for the different colors you are going to use.

It might also be a good idea to add a 1uF cap from reset to ground, to delay the startup on battery insertion. May not be needed here, but good practice in other MCU designs with for instance power supply via USB.

As a side note, you started of with a bad habit of schematic drawing. I do this too when in a hurry or can't be bothered to much, but it is better to use wires instead of those net labels to make the connections. With a simple design like this it makes not that much difference, but it improves on readability.

Offline telluriumTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: ua
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #31 on: March 15, 2025, 05:46:00 pm »
pcprogrammer, thank you for those tips, appreciated!

LED resistors are all 1k Ohm.

W.r.t. wires vs net labels - I did not know that. Could you give an example of a good schematic to illustrate the point, please?
Open source embedded network library https://mongoose.ws
TCP/IP stack + TLS1.3 + HTTP/WebSocket/MQTT in a single file
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4948
  • Country: nl
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #32 on: March 15, 2025, 06:34:09 pm »
W.r.t. wires vs net labels - I did not know that. Could you give an example of a good schematic to illustrate the point, please?

You are using EasyEDA by the looks of it. With this you can export your schematic. Menu option File->Export->EasyEDA. Upload the export here and I will redraw your schematic to show you what I mean with the wires versus the net labels.

Offline telluriumTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: ua
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #33 on: March 15, 2025, 10:33:20 pm »
Here it is. Zipped cause eevblog does not like attaching .json.
Thank you.
Open source embedded network library https://mongoose.ws
TCP/IP stack + TLS1.3 + HTTP/WebSocket/MQTT in a single file
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4948
  • Country: nl
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #34 on: March 16, 2025, 08:42:49 am »
Here you go, your schematic redrawn with wires.

I modified the reset part to correct it to how it should be. Also removed the VDD from the connectors for programming. Why, because it is a battery driven system, and when the battery is placed it is not a good idea to supply a voltage to it without any protection.

An option can be to add a separate connector for supplying power, but this still can hurt the battery. This is something to think about.

For the LED resistors, your choice to use 1K ohm for them all can bite you in the behind, brightness wise. Best to test this before making a final design.

Offline telluriumTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: ua
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #35 on: March 16, 2025, 05:20:54 pm »
pcprogrammer,
that is way more than I expected, thank you so much.
Open source embedded network library https://mongoose.ws
TCP/IP stack + TLS1.3 + HTTP/WebSocket/MQTT in a single file
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4948
  • Country: nl
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #36 on: March 16, 2025, 07:07:42 pm »
pcprogrammer,
that is way more than I expected, thank you so much.

No biggie, and you are welcome.

Offline ColinB

  • Contributor
  • Posts: 31
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #37 on: March 24, 2025, 04:46:51 pm »
I must be missing something huge here, but surely a watch

- needs to run for a fair time on the battery (it is debatable whether the almost daily removing it from the wrist to charge it, is a hugely cynical play on fashionable smart watches)

- needs to be accurate

What CPU do Garmin use in their £800 top end watch? They claim ~50 day battery life but that is only if you basically don't do anything with it ;) It is really fat, to accommodate the battery.

Re accuracy, you can have a periodic GPS sync. But all smartwatches do very little without a bluetooth connection to a smartphone.

There are a wide array of what people consider a "watch". As opposed to a wrist-worn personal computer.

You have to really want the smart watch experience to have a device that needs to be charged every day. But if OP wants to make a watch that uses LEDs as the display, then the LEDs are going to use significant energy and unless they are somehow turned off for the vast majority of the time, it will have to be charged frequently, it seems.

As for accuracy, average 32.768 kHz crystal is good enough for normal watches. Just needs manually synchronized to the second every couple of weeks. You could do temperature compensation in firmware to increase accuracy also.

You could use Bluetooth to synchronize time automatically (e.g. Device Time Profile  https://www.bluetooth.com/specifications/specs/dtp-1-0/)

Now Garmin is an interesting example since it has good battery life but also a lot of features including GPS. They obviously are using a CPU/microcontroller that allows good low-power operation, but also they must have made some good design decisions and quality implementation of firmware and hardware, so they get my respect for that.
 
The following users thanked this post: tellurium

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 16259
  • Country: fr
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #38 on: March 24, 2025, 06:52:04 pm »
Well, +/- 1 s per 2-week period is about 0.8 ppm. Not something you're very likely to get with an "average" 32768 Hz crystal (which will be more like +/- 30 ppm) and no special additional measure IMO, but YMMV.

(30 ppm over 2 weeks is about 36 s, just to get some perspective.)
 
The following users thanked this post: tellurium

Online Picuino

  • Super Contributor
  • ***
  • Posts: 1199
  • Country: es
    • Picuino website
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #39 on: March 24, 2025, 07:00:19 pm »
« Last Edit: March 24, 2025, 07:19:15 pm by Picuino »
 

Online peter-h

  • Super Contributor
  • ***
  • Posts: 4591
  • Country: gb
  • Doing electronics since the 1960s...
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #40 on: March 26, 2025, 10:23:01 pm »
Watch mfgs do proper calibration in production, probably 2-point i.e. at 2 temps. You have to do that if using a cheap 32768Hz xtal.

Swiss "chrono" watches need to achieve < 7 secs per day, which is what you get on a 10,000 quid IWC etc - well from one 600 quid service to the next a year later ;)

Or you could assume it will be worn, so +35C or so :) and then cal it at just that one point. But if it draws as much power as this one will, it likely won't be worn during the night (that's the case for most smartwatches) and then you have a problem...

There are drift offsetting methods used in the precision analog chip business, which let the device warm up and drift due to that and you measure the drift and extrapolate the curve from that. I was doing this in the 1970s on precision HV power supply feedback resistors. It is much quicker than heating up the product during production to get the 2nd cal point.

If there is not enough self-heating then you can incorporate a resistor next to the xtal which is connected to test probes for the heating.

However in this case I suspect the purpose of this exercise is to develop an application note for some software libraries, so it doesn't need to be super polished. One would be hard pushed to compete with the 800 quid Garmin product, which probably runs for a week or so between charges. And which doesn't do a whole lot anyway unless there is a BT-connected smartphone.




Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 
The following users thanked this post: ColinB

Offline telluriumTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: ua
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #41 on: April 07, 2025, 07:50:52 am »
Got 5 PCBs from JLCPCB, with 2 of them assembled. Battery they did not assemble, and also did not ship either - so need to deal with it later.
I've created a repo where I posted both hardware and firmware sources, https://github.com/cpq/watch . Firmware code with time display and time setup logic is implemented and tested.

Left to do:
- (hardware) battery
- (software) proper clock setup, currently a default is used, which is an internal oscillator IMO
- (software) proper low power sleep / wakeup on button press

Quick question. Any tips can I measure power consumption for the assembled board? The relevant equipment I own is this:
- Tenma 72-7745 multimeter
- Miniware DS213 mini oscilloscope

Thank you all, your help so far was invaluable.
Open source embedded network library https://mongoose.ws
TCP/IP stack + TLS1.3 + HTTP/WebSocket/MQTT in a single file
 

Offline woofy

  • Frequent Contributor
  • **
  • Posts: 412
  • Country: gb
    • Woofys Place
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #42 on: April 07, 2025, 08:12:29 am »
Dave used to sell the ideal device for this, but its not been available for a while:
https://eevblog.store/products/ucurrent-gold-multimeter-adapter?_pos=1&_sid=bdaecbd89&_ss=r

Another forum member has just found two of them that have been lost for 12 years.
https://www.eevblog.com/forum/chat/2-ucurrents-found-after-moving-my-lab-halfway-across-the-world/
Maybe you could come to some arrangement together.
 
The following users thanked this post: tellurium

Online voltsandjolts

  • Supporter
  • ****
  • Posts: 2700
  • Country: gb
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #43 on: April 07, 2025, 10:36:30 am »
Or you could assume it will be worn, so +35C or so :) and then cal it at just that one point. But if it draws as much power as this one will, it likely won't be worn during the night (that's the case for most smartwatches) and then you have a problem...

The turnover temperature of watch crystals is typically 25C as the watch temperature is lower than wrist surface temperature.

Firmware applied rtc temperature compensation may or may not be useful here (e.g. watch spends nights off-wrist, or many days at cooler temperature, if you care). For academic interest, there is a fun technique of temp comp using two crystals.
https://bhi.co.uk/wp-content/uploads/2023/12/12-HJDecember23-AOTM.pdf
 
The following users thanked this post: Picuino

Offline Tation

  • Regular Contributor
  • *
  • Posts: 142
  • Country: pt
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #44 on: April 07, 2025, 02:58:35 pm »
Quick question. Any tips can I measure power consumption for the assembled board?

this Nordic tool is aimed at measuring consumption of devices that show current peaks (as sleep - awake - sleep). Not much expensive, IMHO.

Note that I have not used it.
« Last Edit: April 07, 2025, 05:56:47 pm by Tation »
 
The following users thanked this post: tellurium

Online voltsandjolts

  • Supporter
  • ****
  • Posts: 2700
  • Country: gb
Re: Suggest a microcontroller for a DIY PCB watch
« Reply #45 on: April 07, 2025, 03:34:51 pm »
Quick question. Any tips can I measure power consumption for the assembled board?

Yes indeed, the Nordic PPK2 is well worth the modest price.
 
The following users thanked this post: tellurium


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf