Author Topic: Suggest a microcontroller for a DIY PCB watch  (Read 3169 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
 

Online jpanhalt

  • Super Contributor
  • ***
  • Posts: 4258
  • 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: 59
  • 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: 539
  • 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: 539
  • 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
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 16304
  • 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: 539
  • 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
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 16304
  • 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: 415
  • 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: 859
  • Country: ca
 
The following users thanked this post: woofy, tellurium

Offline woofy

  • Frequent Contributor
  • **
  • Posts: 415
  • 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.

Offline Picuino

  • Super Contributor
  • ***
  • Posts: 1208
  • 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: 1993
  • 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

Offline Picuino

  • Super Contributor
  • ***
  • Posts: 1208
  • 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: 33
  • 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

Offline peter-h

  • Super Contributor
  • ***
  • Posts: 4604
  • 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: 415
  • 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: 415
  • 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


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf