Close
0%
0%

nWatch

Selfmade watch that helps You learn STM32 programming.

Similar projects worth following
The whole story of nWatch started a few years back. I decided to build a cheat-watch for exams in my school. It was very popular among my friends that time and I used to receive feedback from them. I realized that it's not only a cheat, but also a great development platform. I learned the basics of programming using that device.
This project is the third version of my smartwatch series. Based on many opinions and suggestions I decided to build a touch, more powerful watch using STM32 microcontroller.
I think it's a better way of exploring digital world - on a smartwatch instead of a big unhandy PCB with many cables. I hope some day I will be able to see these watches on peoples' wrists ;)

Project
The aim was to build a development board shaped as a wristwatch. This form of a kit is much more attractive, because It's not only a tool for developing your programming skills. It is also a complete device that you can wear every day, and impress your friends. Besides, you can focus on the software part, because the hardware is fixed on the PCB. Unlike any other kit it has a built in li-po battery, and can be charged and programmed using only one cable.

Hardware
nWatch is really well equipped when it comes to internal peripherals. Below I present a full list of main components:
- Main controller STM32f407ZGt6
- External 4MB SRAM memory
- Nokia 6300 LCD with touch panel
- Micro sd card
- Mp3 decoder
- Position sensor set
- Bluetooth 4.0
- USB and SWD connector
- 3 physical buttons
- RTC clock
Of course there are some more - a li po charger, main step-down converter, backlight converter, touch controller. In the attachment you can find a full schematic.

I added a voltage divider, with a feature of turning it on and off ( in sleep mode ), so that you are able to measure the battery voltage.

The rest of components are just other IC’s with their passive components.

Software
I mentioned earlier that nWatch is a development board, so how does it look like from the software side ? Of course you are able to make everything you want, but I've made some libraries easier to adapt to this device.
-Stemwin, a graphic library is used to run the lcd. It looks really professional, and the library itself is very well documented ( and supported by ST).
-FreeRTOS, a real time operating system library. It is used as a basic operating system. If you are making a more complex project it is a necessary thing.
-FATFS - well known library by elm-chan, which is used to communicate with the SD card.
- libjpg/ tjpgdec - libraries used for decoding jpeg images
- and many more for hardware control

  • 1 × STM32f407vgt6 Microprocessors, Microcontrollers, DSPs / ARM, RISC-Based Microcontrollers
  • 1 × nokia c3-01 touch screen resistive touch screen
  • 1 × nokia N82 LCD LCD
  • 1 × stmpe811 Semiconductors and Integrated Circuits / Misc. Semiconductors and Integrated Circuits
  • 1 × hmc5883 Sensors / Hall Effect, Magnetic

View all 6 components

  • Your opinions & quick form

    Peter Wasilewski01/14/2017 at 11:28 0 comments

    Hi!

    As the project is being prepared with Elector for publishing I would like to ask you for a favour. I need some feedback about my project, things that sould be changed etc. I cannot see all the drawbacks of the project, but hopefully you can ;) Some of the questions are solely for people that are familiar with STM32 ( due to the fact it is the main processor in nWatch). However I care about all the opinions about nWatch, not only from stm32 enthusiasts.

    The link to the form :

    https://goo.gl/forms/ycd15whv2H2RbxAW2

    And nWatche's project page on Elector website :

    https://www.elektormagazine.com/labs/nwatch-build-and-program-your-own-smartwatch

    Thank you all in advance,

    Peter.

  • Succes on Electronica 2016

    Peter Wasilewski11/25/2016 at 09:55 0 comments

    Hi !

    Finally found some time to write a log. On november 8-11 I've visited Munich to take part in the electronica fast forward award contest. It was the first edition, but suprisingly well organised. After three days of presentations from three different categories ( startup, prototype, idea) nWatch won 3 place in prototype category. I was so excited to see that someone really appreciated my work. Now it's possible that nWatch will be developed by a team, not me alone. That's a great news !

    Regarding the project itself. Everyday I fix some bugs, hardware and software as well. I've made an android app for bluetooth conectivity, to update the clock, and will work on notifications. Besides I've created a nice menu, and a new case. As usual I'll post some photos:

  • nWatch on electronica Fast Forward Award

    Peter Wasilewski10/04/2016 at 21:24 0 comments

    Hi!

    I'm very happy to say that nWatch made it to the last round of the electronica fast forward contest, and is going to be present at electronica Trade fair in Messe München on november 8-11. It's a great news that someone is actually interested in backing the project. I'm considering making a comercial product, because with their support that might be possible.

    Also You'll be able to see nWatch on Maker Fair in Rome, but this time on Motee's (https://hackaday.io/project/6661-motee-the-motor-controller-reinvented) booth. We're going to show the new motee together ;) I'll take nWatch with me so if You're interested You are welcome to visit.

    That's all about the events, and for now I'll only upload a photo of the inside of another ( newest) nWatch :


  • Another version of nWatch

    Peter Wasilewski08/28/2016 at 23:44 0 comments

    This time You'll probably laugh at me, beacuse I'm quite a hesitant person when it comes to pick up a proper display for my watch. Yes I've returned to the nokia 6300 lcd. Why ? Because it's much better visible in the sun, it has a nice connector, is eaisly avaliable, cheap and as it turned up not that slow even on the 8-bit wide bus. Additionaly it's smaller and perfectly fits to the 2" touch screen.

    And You know what ? I'm really happy with that decision. I've made a new PCB ( during te vacation in the evenings ) and when I came back home I put everything together. It took me about a month or so, but it was worth it. Now I can wear it on my wrist, and that's a real motivation to improve firmware.

    New features I've added :

    - fixed the one button startup - when it's turned on it comsumes about 80mAh, which is a great amount of current but when it's asleep ( the main 3.3v converter is off) it consumes about 0.3 mAh ( the internal RTC and MPU6050 continues to work).

    - added a startup by moving the watch. It's based on the MPU6050 and it's internal DMP

    - fixed the USB mass storage. This feature worked only in the first verision, as it turned out due to the length of traces ( they cannot be very long or you have to use a usb filter)

    - the case is only 11.8 mm high. Great outcome considering the previous watch ( non - touch ) was 15mm. I hope I can achieve 10mm when I buy a thinner Li-po and make the PCB on a 0.7mm laminate ( not 1.5 mm ;P ).

    As usual some photos an a video :

    Now I realised how big is that project is. But I'm going to finish it...

    SOON :)

    Peter.

  • Quite a break !

    Peter Wasilewski07/03/2016 at 14:08 0 comments

    Hi all!

    Hmmm it seems that I've forgotten about the project on Hackaday... Sorry about that.

    I had a lot of stuff going on, and not much time to take care of nWatch. Now we have vacation period, so I'm going to do my best to finish ( or just improve) actual shape of the device. I wasn't lazing actually and today I want to show You the results. I have put together the smaller ili9320 lcd, smaller pcb, and it all seems to work well. The biggest challenge was the touch screen. I couldn't use nokia's panel, because it was too big. I decided to order a few 2" panels from aliexpress. They look very nice but need, in comparison to nokia, a lot of force to detect a touch. That's really anoying and is on the 1st place on my "to do " list.

    Except that I've made a new case and the wrist belt handle. Now it's time for some photograps and films:

    There's how the mounting works :

    And the button to turn on the device ( button not a switch ). Now I can turn it on using a switch and turn it off even using a menu's option ( in this case "counter" )


    The case
    The PCB ( as You can see there were several mistakes which I had to fix using the cables ;) ) Baterry placementHope You enjoyed this log, and stay tuned for more ;D

    Peter.

  • nWatch - new shape

    Peter Wasilewski02/27/2016 at 23:36 0 comments

    Hello !

    I did as I promised ;) Now te watch has a 2,2 ili lcd, and so far I'm really happy with it. Though I didn't make the BGA pcb, because I found it unnecesarry - with the foto pcb making method I was albe to make the paths thinner, and so the board got smaller. I added the one button on/off feature. One thing I'm hesitateing on is the touch panel. I ordered four 2" touch panels from aliexpress, but they need quite a force to detect a touch - in contrast to the nokia one. So far I decided to use the nokia touch, but I'm going to cut it a bit.

    Regarding the software - currently I'm making a app for a bike counter. Also I have to design a movable case. I want to be albe to swap it between the bike and my wrist as quickly as possible ;)

    Soon I'll post some pictures showing the progress ;)

    See You all !

    Peter.

  • Changes in the project

    Peter Wasilewski01/09/2016 at 21:17 0 comments

    Hello !

    I can imagine it's been a while since I last wrote, but I'll try to make it up in this entry.

    Since last time I've made some major changes. I decided to use ILI9320 lcd ( which

    is at my place, and soon 'll be tested), also I'll buy an 2,2" touch panel for this

    display. I was very unhappy to make this change in the project, but it was necessary

    to keep the watch in good shape. Honestly these nokia's lcd's are slow, have only 8

    bit parallel bus, and what is very annoying - almost impossible to see in the sun (

    maybe I got the chinnese version :P ). Besides that they support only 24bit/pixel

    colour depth and the sizes are 2,4" ( too big for a wristwatch) and 2,0 " ( too

    small to make a PCB, and I couldn't find the matching touch panel).

    I've also decided to use stm32f429 in bga package as well as the SRAM memory. That means I have to make an 4-layer PCB ( "make" is not the good word - "order" would be better - I'm not crazy :) ). New microcontroller gives me new features such as Graphic accelerator and higher core freqency.

    Though I didn't stop creating the firmware. I kept the promise and made a menu with an MP3 player “app”. As You are able to see in the video the songs are picked randomly, using the STM's random number generator. The whole MP3 app is a bit down, but it's going to be fixed soon .

    The menu runs on FreeRTOS, and of course Stmwin library is used. In

    the video You can see the unbelievable features of this LIb, for instance smooth

    scroling, without flickering. The memory fot Stemwin is allocated on external SRAM

    and is almost as fast as the internal memory.

    Yesterday I managed to run Bluetooth 4.0, and now I'm going to take care of communication between the watch and the smartphone.

    One more thing I have to tell You about. That is the Freertos Trace - a very helpful

    software while developing a RTOS application. It shows You the timings, priorities

    and tasks in graphic way. The demo version is enough for basic purposes.

    Now it's time for some pictures and videos ;) .

    In the left top corner the original case of the 2.2' lcd ( making the real dimensions like it was 2,4" ), next to it on the right a 2,4" touch panel ( sold with 2,2" lcd ) on the bottom the LCD I want to put, and the 2,2" touch.

    comparison of the new display and actual nWatch.

    Regarding the video that you're about to see - the colour of the menu is so yellow due to fact that library cannot support 24 colour depth using the MEMDEVICE mechanism, which handles the flickering ( so for now I have to use 16bit/px).

    Till next time,

    Peter.

  • Update

    Peter Wasilewski12/06/2015 at 15:37 0 comments

    Hi !

    I've not forgotten about the project, don't worry :) .

    During this long time I've been absent, I've made a new PCB, managed to run the SRAM memory, and made an MP3 player which randomly picks songs. As You can see that's not much, but I can work on the project only in the evenings, if I have some time left. I plan to make a low-power mode, but that's quite hard to do, while having so many peripherals onboard. I've been thinking of adding a power managment chip, to be able to control the current during a complete shut down. Another feature is small voltage divider used to measue the battery voltage.

    I had some problems while trying to talk to MP3 decoder - vs1053. It sometimes wouldn't turn on, and sometimes it was working just fine. I resoldered it once or twice, but it didn't help. I also checked all the paths, and voltages, wired up a logic analyser. I still couldn't find the bug. While reading a VS forum I discovered that I was missing a 1Mohm resistor between quarts paths. When I soldered it, the device started working as it supposed to ;)

    I've also created a repository on Github, to find out about Git system. You can see the code here :

    https://github.com/klonyyy/nWatch

    See You soon !

  • Time for some sounds

    Peter Wasilewski11/01/2015 at 17:08 0 comments

    Hi !

    Hope You all still remember my project ;) . It took so long since I've last written, because I had to change the pcb - I decided to use 16 bit fsmc bus to communicate with SRAM memory. Besides that I struggled for about a week to run the mp3 hardware decoder. At the begining I thought I burned the chip, because I mistaken and read vs1003 datasheet not vs1053. Their core voltage differs quite much - its 2,5v for vs1003 and 1.8 (1.85 max) for vs1053. Thankfully I managed to run a simple sine test. When an hour later I could hear an wav file played by my watch I was very excited. Then I decided to play an MP3 file. Problems started right away. The decoder was hanging and changing the volume by itself. That was the moment when all the excitement has gone away. I spend a few evenings trying to guess what's wrong, and today I managed to solve the problem. I lowered the core voltage from 1.95 to 1.8v. It started working without any hanging etc. Now I'm planning to play a while with this decoder (sound for the video ? ) , and when I receive new PCB I'll try to make internet radio or something simillar, just to test wifi module ;) .

    Here's a screenshot of the PCB, just to show that I'm not lazing ;)

    If You're intrested in building nWatch, You just have to wait a bit longer. I need some time to make sure that there are no bugs in the latest pcb. Then I'll upload all the pcb and schematic files, so that everyone can build version with SRAM, or without it .

  • Graphics again...

    Peter Wasilewski10/11/2015 at 19:10 0 comments

    I'm sorry for not writing for that long, but I have a lot of stuff going on right now. Doesn't mean I find no time for the watch, though. During this time I made some changes in the software part of the project. I decided to use Stemwin for certing graphics such as icons, menus, lists, buttons. It's really flexible so it fits my expectations. What's more important it handles the alpha channel, reading from the display, so I don't have to worry about wiping out the screen after I display something. On the pictures below You can see my test apps made with Stemwin.

    Another feature of this lib is that it's able to decode jpeg, png anf gif images. However displaying these images may be quite slow if You don't find a way to display them using DMA transfer not pixel-by-pixel. I'm sure it's possible, but the decode process of jpeg file took to long for my video purposes. That's why I decided to give libjpeg another try. I succeded this time. It turned out that this lib allocates big memory blocks on the stack. The sollution was to increase the stack. Now when It's fully functional I have about 20 FPS. I think it can be higher if I spend some time on it.

    Here's a video of a video ;)


    I decided to use FreeRTOS in my project. I think it's another step forward. I know it's not going to be easy to develop a fully functional device with FreeRTOS for a newbie like me. Till now I managed to run FreeRTOS with 2 tasks, one main, and one for the graphics refresh ( background).

    I'll try to write more often, but I cant promise that. Hmm that's all for this log, I guess. See You !

View all 15 project logs

Enjoy this project?

Share

Discussions

Adrian wrote 09/08/2016 at 23:48 point

Awesome project. I plan to design my own pcb as well. One question, how did you determine the pinout for the female socket of the display?

  Are you sure? yes | no

Peter Wasilewski wrote 09/13/2016 at 06:03 point

Thank You ;) Just have a look at this website http://andybrown.me.uk/2012/06/05/nokia-lcd-for-arduino-mega-1/

This guy truly is an expert in reverse engineering ;) 

  Are you sure? yes | no

Ramon Schepers wrote 07/14/2016 at 15:10 point

any update lately? i'm very interested in the progress of this project, as i'm planning a custom watch based on a stm32 as well, with similar functionality to a original pebble watch :)

  Are you sure? yes | no

Peter Wasilewski wrote 07/14/2016 at 17:58 point

Currently I'm trying to make a good case for the pcb, but I'm also trying to fix all the bugs in the schematic and board, so I could finally make a fully working device. I'll try to inform You about the progress if there's any  ;) 

  Are you sure? yes | no

Son Nguyen Dang wrote 09/22/2015 at 03:00 point

wow! Not sure it's "learn STM32 programming" or a professor work. Very nice!

  Are you sure? yes | no

Peter Wasilewski wrote 09/22/2015 at 04:40 point

Thank You! When I make the PCB that works in 100% I'll upload the files needed to build this watch, so that everyone can make it. 

  Are you sure? yes | no

Martin Vincent Bloedorn wrote 09/20/2015 at 16:07 point

Great project! I'm an avid user of the STM32. How did you manufacture your PCB (the one in the picture gallery)? Standard, chemical etching? Looks good!

  Are you sure? yes | no

Peter Wasilewski wrote 09/20/2015 at 16:25 point

Thank You ! I make my PCB's using termotransfer method. I've been making them for a few years now, but I started from this website : http://mdiy.pl/pcb-termotransfer-przygotowanie/ (on the top You can switch to english). However I don't keep the pcb on the iron, but I keep the iron on the pcb. In the end I cover the board with Lichtenberg's alloy, so the copper won't oxidize.

  Are you sure? yes | no

Martin Vincent Bloedorn wrote 09/20/2015 at 19:46 point

Polish! Would love to learn it; sadly is one of the hardest languages around. But it's on my to-do list, :) 
Thanks for the reference! I've used thermal transfer in the past, with mixed results. Paper type/quality is tricky. I've seen some great results when printing and transferring from adhesive paper (the ones you can print and peel off, like this:)


I've seen people printing (with toner printers) directly to the surface left after peelling the adhesive. Seemed to work nice. Perhaps something to try on your next board :) 

Thanks again!

  Are you sure? yes | no

Peter Wasilewski wrote 09/20/2015 at 21:15 point

You're right - Polish is said to be one of the toughest to learn ;) 

I agree with You about paper type. I remember that once I've bought it form another shop, and when I started transfering it to the laminate, toner metlted and destroyed the whole circut. Of course the temperatue was the same. 
Wow thanks for the tip. I havent tried that yet, but I know that this paper is very slippery. I have to test it next time ;)

  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