nWatch - build and program your own smartwatch [160326]
nWatch is a device that you can program, and wear on your wrist. The first development board of this kind based on stm32 microcontroller.
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 J 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 decided to add a feature of turning the device on in 4 ways. As you can see in the schematic the buck converter has an enable pin. This pin requires a positive voltage to turn on the converter, and thus the main controller. First and the most obvious way is the button. If you press it the voltage enables the pin, and from now on the CPU_ON line form the STM32 powers the EN line. If I want to put the converter back to sleep I have to put 0 on CPU_ON line. Second way is from the MPU6050. Enable line is connected to the interrupt of the sensor. The same thing goes with Bluetooth and RTC clock. However these two give an inverted signal ( 0 when active ) that is why there are transistors on these lines. Basically this is the „power management” of nWatch.
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.
I think that was the most tricky part of the schematic. The rest 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
With this project I would like to encourage more people to try programming. It can be really interesting, but sometimes people do not have enough motivation. I hope my watch can change something in their approach to this topic ;)
Peter.
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 J 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 decided to add a feature of turning the device on in 4 ways. As you can see in the schematic the buck converter has an enable pin. This pin requires a positive voltage to turn on the converter, and thus the main controller. First and the most obvious way is the button. If you press it the voltage enables the pin, and from now on the CPU_ON line form the STM32 powers the EN line. If I want to put the converter back to sleep I have to put 0 on CPU_ON line. Second way is from the MPU6050. Enable line is connected to the interrupt of the sensor. The same thing goes with Bluetooth and RTC clock. However these two give an inverted signal ( 0 when active ) that is why there are transistors on these lines. Basically this is the „power management” of nWatch.
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.
I think that was the most tricky part of the schematic. The rest 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
With this project I would like to encourage more people to try programming. It can be really interesting, but sometimes people do not have enough motivation. I hope my watch can change something in their approach to this topic ;)
Peter.
Discussion (15 comments)