Project: Connected Watch (Communicating Embedded Systems)
This project, carried out as part of the Master 1 , aimed to design and implement a functional connected watch. Drawing inspiration from the open-source ZSWatch project, the goal was to integrate disparate hardware and software components into a coherent embedded system.
1. Context and Problem
The main challenge was to develop a real-time application on the nrf5340 microcontroller using the Zephyr RTOS. The objective was to create a portable device capable of collecting data (sensors, time), displaying it on a touch-enabled graphical interface, and communicating it via Bluetooth Low Energy (BLE).
2. Project Objectives
- Master Zephyr OS as the real-time software base.
- Integrate and utilize motion and environmental sensors (IMU, temp/humidity) via I2C.
- Manage time persistently using an external RTC module (RV-8263-C8).
- Implement a graphical user interface (GUI) on a TFT touchscreen using the LVGL library.
- Establish BLE communication for data exchange with a smartphone (GATT services).
3. Features Developed
To meet the project requirements, the following features were implemented:
-
Multi-Screen User Interface (GUI)
- Domain: Graphical display and interaction.
- Objective: Display the time, sensor data, a pedometer, a compass, and a stopwatch.
- Tools: Designed with Squareline Studio and rendered by the LVGL library.
-
I2C Sensor Management
- Domain: Data acquisition.
- Objective: Read data from sensors (Temperature, Humidity, 6-axis Accelerometer, Magnetometer).
- Processing: Implemented a simple pedometer and compass.
-
Time Management (RTC) and Stopwatch
- **Domain:**Timekeeping.
- Objective: Reliably maintain the time and date (via external RTC RV-8263-C8) and provide a stopwatch function.
-
Bluetooth Low Energy (BLE) Connectivity
- Domain: Communication.
- Objective: Send sensor data to a mobile device via standard (ESS for Temp/Humidity) and custom (IMU) GATT services.
4. Technical Environment (Tech Stack)
- Hardware:
- MCU: Nordic nrf5340
- Sensors: ST IKS01A3 Shield (LSM6DSO, LIS2MDL, HTS221)
- Display: Adafruit 2.8” TFT Touch Shield v2
- RTC: Micro Crystal RV-8263-C8
- Software Ecosystem:
- OS: Zephyr RTOS
- SDK: nRF Connect SDK
- IDE: Visual Studio Code
- Libraries and Tools:
- Graphics: LVGL (Light and Versatile Graphics Library)
- UI Design: Squareline Studio
- BLE Debugging: nRF Connect for Mobile