Create a Smartwatch With Low Cost and Fun Voice Interaction.

by ysonic in Circuits > Electronics

45 Views, 0 Favorites, 0 Comments

Create a Smartwatch With Low Cost and Fun Voice Interaction.

wKgZPGf_TLKAKPxTAAmb9kF5aAA710.jpg

This project shares a simple hardware implementation of the Xiaozhi AI chatbot, using an ESP32-S3 N16R8 module, a single microphone and speaker, two buttons, a capacitive touchscreen, and a built-in AXP2101 power management chip.


This project also references @Forairaaaaa's smartwatch project and code from the official Xiaozhi AI repository. Thanks to the contributors!


Xiaozhi Official GitHub: https://github.com/78/xiaozhi-esp32


Project Functions


Functionally, it's largely similar to other Xiaozhi AI hardware. The only difference is that, due to its single microphone, voice commands cannot be interrupted; a touch of the screen will interrupt them.


Hardware-wise, it uses a power management chip (AXP2101), supporting battery level checks, a 4-second long press to power off, and a short press to power on.


  1. Display: 1.69-inch rounded corner screen, 240*280 resolution, touch-enabled.
  2. Voice Interaction: Built-in microphone, supports voice wake-up and voice commands.
  3. Audio Playback: 1609 8Ω/1W speaker.
  4. Casing Design: Smartwatch-like.
  5. Lithium Battery: 302535 320mAh, supports USB-C charging.
  6. Buttons: Power button, interrupt button.
  7. Board Thickness: 1mm

Supplies

wKgZPGf_TLKAZJlRAAMSkqzRjXE821.jpg
wKgZPGf_TLKAQm6sAAHQTGiPOPE614.jpg
wKgZO2f_TLOAalTJAASp0NnO-aA114.jpg
wKgZO2f_TLKAEEKCAAb0ehkCb18953.jpg
wKgZO2f_TLOAAznuAAoFqTQa2VI921.jpg
wKgZPGf_TLKAHEWFAAYO_FHKmSg898.jpg

Top view

  1. Real-time clock, reserved, not currently used
  2. Screen mount, 18-pin, Puyang 1.69-inch screen
  3. Tri-color LEDs: Red - AI listens, Green - AI speaks, Blue - Other states
  4. Power button
  5. Silicon microphone MSM261S4030H0R LGA8
  6. Amplifier MAX98357
  7. Power management chip AXP2101
  8. User buttons (IO0)



The image on the right is a 3D rendering of the casing. The microphone opening is located at the bottom of the casing for easy sound collection. The speaker hole is located at the lower right of the casing.

Therefore, it is convenient to carry with the left hand. The original intention of designing this assistant was to allow users to chat with the AI ​​on their way home from get off work, ask about technology, check the weather, and if the AI's answer is not satisfactory, they can simply touch the screen to interrupt it.


Rear view


The Type-C port can be used for charging and firmware updates.

It connects to the D+/D- signals of the ESP32-S3 and can also be used for JTAG debugging.


The issue with the watch strap:


The case is currently printed with resin, which will definitely become less sturdy over time. This is for reference only. Currently, the slots in the case and the strap are tightly coupled, requiring some force and finesse to connect them.


Nylon is recommended; silicone is uncomfortable to wear.


Principle Analysis (Hardware Description)


In terms of circuitry, besides the main controller ESP32S3, there's the AXP2101, which provides 3.3V, charges the battery, and acquires battery power. The other components are directly referenced from the Xiaozhi AI Breadboard's component principles and will not be analyzed or described in detail.


Software Code


Xiaozhi AI code, with added support for watch face level.

#include

int main() {
printf("Watch Assistant is here\\n");
return 0;
}


It's not yet in the official repository, so it's temporarily located here: WristGiver - Xiaozhi AI Code | GitHub Branch: https://github.com/dotnfc/xiaozhi-esp32/tree/wristgem


The board's support code is located in the main/boards/esp32-s3-wrist-gem directory.


Thanks to GenkunFlex for providing technical support!


Instructions for Assembling the Casing

wKgZPGf_TLKAKPxTAAmb9kF5aAA710.jpg

Instructions for Assembling the Casing


Before assembling the casing, it is recommended to download the firmware. If it is brand new hardware, download xiaozhi-merge.bin; otherwise, only download the app part (xiaozhi.bin) to avoid overwriting configuration information.


The casing consists of three parts: the main body, the bottom cover, and the buttons. During installation, I generally do the following:


First, tighten the four screws on the main body and bottom cover, then disassemble them for easier assembly later.


Solder the speaker and battery onto the PCB.


Insert the two buttons into the main body; the two small posts are designed to prevent them from falling off.


Place the PCB into the main body and align it to fit the buttons.


Apply 3M adhesive to the edge of the screen.


While securing the PCB and main body, connect the screen's ribbon cable (the cable may be too long and need to be bent).


Secure the screen to the main body.


Insert the battery and speaker in sequence.


Tighten the four screws.


At this point, you can power it on and use it.


Note: There may be printing errors in the casing, so the buttons may not work properly. You can use office scissors to sand down the opening on the casing.


I used a 402535 450mAh battery, which also worked.

Material Cost Reference

wKgZPGf_TLKAZRLGAAGywciwcpY831.jpg

Material cost reference


The outer casing was 3D printed using JLCPCB's OLEDO 6060 material (default white). It has 6 buttons, incurring additional costs.


The screen mount was directly applied using JLCPCB's SMT system, so it's not included in the cost.


The screen was secured using 3mm wide 3M adhesive, not included in the cost breakdown.


There's still space on both sides of the watch band; a 49mm band could also be used, pending verification.


The Type-C connector is not included in the cost breakdown.


Due to the impact of the hard decoupling of US-China trade relations, material links and prices are for reference only.

3D Model of the Outer Shell

For any questions, please feel free to leave a comment.

Design Drawings

wKgZO2f_TLKAbjYMAASl_-fw58g762.jpg
wKgZO2f_TLKARWaBAALQKBhpp8Q794.jpg
wKgZO2f_TLKAarIUAASKkutnq-A016.jpg