Close
0%
0%

STM32L0 Watch

PCB design, software development, STM32 learning... The watch is just a bonus for me. ;)

Similar projects worth following
STM32L051K8 microcontroller, 1.28" Sharp Memory LCD, CR2032 battery, 3D printed parts, 20mm watch strap. Heavily inspired by Max K's Chronio project here on Hackaday.io.

Watch1.2_BOM.pdf

Bill of materials (includes Mouser order codes and link to assembly instructions)

application/pdf - 60.00 kB - 06/03/2017 at 14:32

Preview

Watch_3D_v2.zip

STL files

Zip Archive - 247.35 kB - 04/14/2017 at 02:35

Download

Watch_FreeCAD.zip

FreeCAD project

Zip Archive - 6.77 MB - 03/30/2017 at 16:41

Download

Watch_KiCAD.zip

KiCAD project

Zip Archive - 2.70 MB - 03/30/2017 at 16:39

Download

L051_Watch.zip

SW4STM32 project

Zip Archive - 5.28 MB - 03/30/2017 at 16:37

Download

View all 6 files

  • 1 × STM32L051K8T6 Microcontroller
  • 8 × 100nF 0805 Capacitor
  • 3 × 1uF 0805 Capacitor
  • 1 × 4.7uF 0805 Capacitor
  • 2 × 10pF 0805 Capacitor

View all 20 components

  • Manila Mini Maker Faire 2017

    Ramon Imbao06/13/2017 at 12:37 0 comments

    Thanks to everyone who came by our booth at the Manila Mini Maker Faire 2017!

    I've already emailed the winners of the raffle for the two watch kits we'll be giving away.

    See you guys next year hopefully? :D

    (Thanks to Chris Bermejo for the photos)

  • Proper assembly instructions

    Ramon Imbao05/29/2017 at 15:01 0 comments

    Below, I detail how to properly assemble the watch from bare board to finished product.

    --- Tools used

    • Soldering iron and lead (Thinner is better)
    • Liquid flux (Pictured above is an el cheapo flux)
    • SMD tweezers
    • PCB vise (I don't own helping hands)
    • Screwdriver set
    • Solder wick (not pictured)

    Have the BOM handy to easily identify which part goes where!

    --- Bare board

    Firstly, we'll work on the top part of the board. Specifically, the first thing I like soldering would be the FPC connector. It's the most difficult one to solder with a 0.5 mm pin pitch.

    --- FPC connector

    Use plenty of flux and a solder wick to wick away any excess solder. Let's say pin 1 is the leftmost pin. (It's not)

    Don't worry about shorting pins 1 and 2, or shorting pins 3, 4, 5, and 6. Those are GND and VBAT respectively. The rest of the pins must be isolated from each other however.

    --- Passives

    Solder all the passives on the top board. Just go through the BOM, and take your time. Make sure to do a better job than I did as seen in the photo.

    --- Crystal

    I read somewhere that you shouldn't heat up the crystal too much or you'll damage it, so take care in soldering this.

    --- STM32 IC

    Align the IC on all the pads. Make sure that the dot on the package matches the dot on the board.

    Here it is all soldered up. As you can see, I was very liberal with my flux.

    --- Passives (back)

    Now you can flip the board around and solder the rest of the passives at the back. All of these are just 100n capacitors and 10k resistors.

    --- Buttons

    Place the buttons and align them using the holes located on the board. It's a bit more difficult to solder these since the leads don't extend outward. A hot air station might be better suited for this.

    --- Solder pad

    Don't forget to add a tiny bit of solder to the big square pad. This helps create a tighter fit on the battery and ensures a good connection. This should create a small bump, like maybe 1 mm thick or less.

    --- Battery holder

    Finally, solder the battery holder on. It's the only through-hole part in the build.

    --- Connect STLink

    I used a Chinese ST-Link clone. Just connect the five relevant pins from the programmer to the board: SWCLK, SWDIO, NRST, VCC, and GND.

    --- OpenOCD

    Open up a CLI. Type in the following command to start up the OpenOCD debugger.

    (I used Linux for this part. There should be tutorials online about how to set up OpenOCD for Windows. Actually programming the part is OS-agnostic, so just search for that one specific tutorial to get OpenOCD set up)

    openocd -f interface/stlink-v2.cfg -f target/stm32l0.cfg
    The output should be something like this:
    Open On-Chip Debugger 0.10.0-dev-00399-g19df456 (2016-11-04-15:40)
    Licensed under GNU GPL v2
    For bug reports, read
    	http://openocd.org/doc/doxygen/bugs.html
    Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
    adapter speed: 300 kHz
    adapter_nsrst_delay: 100
    Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
    none separate
    Info : Unable to match requested speed 300 kHz, using 240 kHz
    Info : Unable to match requested speed 300 kHz, using 240 kHz
    Info : clock speed 240 kHz
    Info : STLINK v2 JTAG v27 API v2 SWIM v6 VID 0x0483 PID 0x3748
    Info : using stlink api v2
    Info : Target voltage: 3.216787
    Info : stm32l0.cpu: hardware has 4 breakpoints, 2 watchpoints
    --- Programming with SW4STM32

    Fire up System Workbench for STM32 (SW4STM32), load the project, and flash it to the board by hitting Run.

    --- Connect screen

    Disconnect the programmer, connect a battery, and connect the screen via the 10-pin FPC connector. You should see the clock face on the display.

    --- Test buttons

    Press the buttons. The top and bottom buttons should move the minute hand forwards and backwards respectively. The middle button should reset the second hand. The previous picture doesn't have a second hand so this will have to be manually tested. You could also uncomment the lines in the code to enable the second hand.

    Anyway, if...

    Read more »

  • Manila Mini Maker Faire 2017

    Ramon Imbao05/28/2017 at 09:32 0 comments

    I'll be going to the Manila Mini Maker Faire this June 10 - 11. I'll have 100 blank PCBs and 50 3D printed cases to give away to any interested makers there, along with the chance for two people to win a complete watch kit each. See you guys there!

  • Updated 3D files

    Ramon Imbao04/14/2017 at 02:36 0 comments

    I accidentally uploaded an earlier version of the back face. It's supposed to have this thin cutout for the PCB. Anyway, it's fixed now!

  • Printing the parts

    Ramon Imbao04/07/2017 at 03:09 0 comments

    Here's how I printed the parts for the watch. I used Slic3r to slice these. Find out more below.

    Read more »

  • Internals

    Ramon Imbao04/04/2017 at 15:24 0 comments

    Finally took the time to take a picture of the internals. Lots of photos below!

    Top cover off. Watch face held together using M3x12 countersunk screws. The black blends well. See more photos below.

    Read more »

  • Progress so far...

    Ramon Imbao03/30/2017 at 17:05 0 comments

    Currently, I would say the hardware is complete. I'd like to perhaps get the watch printed in a clear resin so people can see the inner workings of it. Black is still the sexiest.

    My files are a mess. My code is a mess as well. There are some FreeRTOS things in the code right now, but I've commented out the main thread creation portion. FreeRTOS isn't needed in this sort of thing? Well, it's still a good learning experience for me.

    I've removed the second hand to reduce power consumption. Measuring it shows it's around 0.31 mA most of the time. That would give me around a month(?) of battery life. I still need to read through and try to understand the low-power modes of the STM32L0. I think that's too big considering I'm running at 2MHz in (supposedly) low-power run mode and being in low-power sleep mode the rest of the time. Maybe I still need to reduce clock speed during sleep mode?

    Would love to implement a digital clock face, but still need to implement fonts (ongoing). I specifically chose the STM32L051 version so I have more flash memory available.

View all 7 project logs

  • 1
    Step 1

    3D print parts

    I printed everything except the buttons with black PLA at 0.025 (!!!) mm layer height. The buttons were printed with black TPE.

  • 2
    Step 2

    Populate PCB

    I started with the FPC connector since it's the most difficult one to work with and I don't have a hot air gun.

  • 3
    Step 3

    Insert LCD on connector

View all 8 instructions

Enjoy this project?

Share

Discussions

fabian wrote 07/23/2018 at 09:24 point

why this is hand watch?

why not http://2.bp.blogspot.com/-22MbZTN9GQQ/TVeL0dCU-aI/AAAAAAAAAOE/YxsXid32EFs/s200/PocketWatch_Face.jpg 

second question is lora or 2Dbarcode send (secren) and recive (camera)

  Are you sure? yes | no

Ramon Imbao wrote 07/24/2018 at 17:22 point

I made it a wristwatch because I like wristwatches more than pocket watches. Since the files are available, you can turn it into a pocket watch yourself. :)

I don't understand your second question, sorry.

  Are you sure? yes | no

fabian wrote 07/25/2018 at 13:38 point

watch show 2d barcode (matrix or qrcode) and camera can read it, computer screen show 2d code and camera read it, alternative to wifi

  Are you sure? yes | no

Ramon Imbao wrote 07/25/2018 at 13:57 point

Displaying things on the watch is easy enough. As for the camera, I have no experience interfacing with one, but there are loads of free pins on the micro I'm using so it should be relatively straightforward.  You'd have to process the image you capture though since the display is just either black or white.

  Are you sure? yes | no

zakqwy wrote 04/10/2017 at 18:14 point

Yay STM32L0! I've had great luck with libopencm3, although some of the L0 stuff isn't finished (compared to the F0). If you go this route, don't forget your can easily set registers using the MMIO32(address) macro..

  Are you sure? yes | no

Ramon Imbao wrote 04/11/2017 at 03:09 point

Thanks for the tip! I'll definitely try libopencm3 out. The only reason I went with the CubeHAL is I found a book (Mastering STM32) that contained lots of examples for it.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates