Skip to content

Latest commit

 

History

History
208 lines (137 loc) · 13 KB

xiao_esp32s3_sense_setup.md

File metadata and controls

208 lines (137 loc) · 13 KB

Owl - Always-on Wearable AI

<< Home

XIAO ESP32S3 Sense Board Setup and User Guide

Seeed Studio's XIAO ESP32S3 Sense board is an extremely compact and reasonably power-efficient development board that features BLE and WiFi connectivity, a microphone, a camera, and dual Xtensa LX7 (RISC-V-based) cores running at 240 MHz. It can be powered via its USB-C port or by soldering on a battery and placed in a small case.

XIAO ESP32S3 Sense board
XIAO ESP32S3 Sense board with antenna.

This board is simple to get up and running without any modifications but for a truly wearable solution, some additional work is required. This guide will cover procurement, basic set up, and instructions for building a very crude prototype wearable.

Table of Contents

Procurement

The XIAO ESP32S3 Sense board can be obtained from numerous vendors including Seeed Studio:

To build a wearable version, purchase a 3.7V lithium polymer battery. Some suggested products are listed below:

1200 mAh lithium polymer battery
A 1200 mAh 3.7V lithium polymer battery.

The batteries listed above use male JST-PH 2.0 connectors. It is highly recommended that additional connector cables be purchased to solder onto the XIAO board rather than attempting to solder the battery directly. This allows the battery to be easily detached and swapped.

Board Setup

Follow Seeed Studio's guide for setting up the board. Ensure that:

  • The antenna is attached. Refer to Seeed Studio's instructions, included below. It is normal for this process to induce high blood pressure, feelings of depression and hopelessness, and violent mood swings. Just keep at it patiently.

Antenna installation
They make antenna installation look so easy!

On the bottom left of the front of XIAO ESP32S3, there is a separate "WiFi/BT Antenna
Connector". In order to get better WiFi/Bluetooth signal, you need to take out the antenna
inside the package and install it on the connector.

There is a little trick to the installation of the antenna, if you press down hard on it
directly, you will find it very difficult to press and your fingers will hurt! The correct way
to install the antenna is to put one side of the antenna connector into the connector block
first, then press down a little on the other side, and the antenna will be installed.

Remove the antenna is also the case, do not use brute force to pull the antenna directly, one
side of the force to lift, the antenna is easy to take off.
  • The Sense daughterboard, which contains the camera and microphone, is mounted onto the main board. Align the connectors and press gently and evenly until they snap into place.

Daughterboard installation
Mount the Sense daughterboard onto the main board.

Software Installation

The board firmware at clients/xiao-esp32s3-sense/firmware uses the Arduino SDK but with the PlatformIO Visual Studio Code extension rather than the Arduino IDE. The build process is the same on Windows and macOS, and should work on Linux, too. To build and flash the firmware for the first time, follow these instructions:

  • Install Visual Studio Code if not already available.

  • Install the PlatformIO extension. The extensions marketplace can be accessed by clicking the button in the left vertical tool bar that consists of a series of squares. Search platformio and install the extension.

Extensions icon
Location of the extensions button in Visual Studio Code.

PlatformIO extension installation
Search for and install PlatformIO.

  • Open the project. From Visual Studio Code, select File and Open Folder.... Choose clients/xiao-esp32s3-sense/firmware, where platformio.ini is. It may take a moment for PlatformIO to initialize the project.

  • Build the firmware by clicking the build button, located in the bottom toolbar.

Build button
Location of the PlatformIO build button.

  • A terminal window will appear showing the build progress. Ensure that firmware.elf is produced successfully.

Successful build output
Output of a successful build.

  • Connect the board to your PC using a USB-C cable. Upload the firmware image by clicking the upload button.

Upload button
Location of the PlatformIO upload button.

  • Ensure that the upload was successful. If the board could not be found, try clicking on the serial port selection button to confirm that there is a usable COM port.

Successful upload output
Output of a successful upload.

Serial port selection button
Location of the PlatformIO serial port button. Use this to check whether the board is connected to the computer and manually select the appropriate port if necessary.

  • Now the board will always run the loaded firmware until it is reprogrammed.

Connecting to the iOS App

The firmware makes the board act as a Bluetooth peripheral that constantly broadcasts audio packets using a specific Bluetooth service ID. It must connect to an Internet-connected device in order to forward audio packets to the server. The iOS app will automatically do this.

To test with iOS:

  • Build and deploy the iOS app.
  • Ensure the server is running and that the iOS app is able to reach it.
  • Power on the XIAO ESP32S3 Sense board (e.g., connect it to your PC or outlet via USB-C).
  • Open the iOS app. It should indicate that the board is connected. Begin speaking and an in-progress conversation will appear.

Conversation in progress
iOS app indicating the XIAO ESP32S3 Sense board is connected and that a conversation is being captured.

  • Remove power from the board or simply stop speaking for several minutes (e.g., 5 minutes, depending on the server's conversation detection parameters). A completed conversation will appear.

Completed conversation in list Conversation details
The completed test conversation.

Connecting a Battery

The first step in turning the XIAO board into a wearable is connecting it to a battery. The bottom side of the main board contains two pads labeled BAT+ and BAT- for the positive and negative terminals, respectively.

Conversation in progress
Schematic illustration of pads on the bottom of the main board.

Rather than soldering a battery directly, which would prevent the device from ever being powered down, it is recommended that a JST-PH 2.0 female connector be used. Solder the connector in the orientation shown below, so that the wires extend over the board. This allows the wires to be secured with hot glue or electrical tape (not pictured) to relieve tension on the solder joints, which may cause them to break and disconnect.

Conversation in progress
JST-PH 2.0 female connector soldered to the XIAO ESP32S3 Sense main board.

WARNING: The suggested EEMB lithium polymer battery packs frequently have their male connector polarity oriented opposite from the female connector. Check to ensure that the positive wire (usually red) will actually make contact with the female-end wire connected to BAT+. It may be necessary to carefully remove the wires from the male connector (using an approach shown in this video or this video) and reinsert them. It is also possible to tie together a pair of male and female connectors with wires crossed to create an adapter, although this adds a lot of wiring.

Wearable Case

Currently, no custom case for this device has been developed. We welcome contributions -- please get in touch if you have built one!

A Raspberry Pi Model 3 A+ case was successfully used to house the board with a large (1200-1800 mAh) battery, shown in the photo below. The toggle switch was found in a bin of unlabeled parts but is probably similar to this model or this part. It was mounted through the circular audio connector opening and affixed using a nut and washer included on the switch. The switch was wired to break the connection with the battery's positive terminal using a pair of JST-PH 2.0 connector cables.

XIAO board in Raspberry Pi case XIAO board in Raspberry Pi case
A friend of mine is an industrial designer. It is difficult to get his attention when examining a magnificent product. I showed him this device and asked him what it would take to build it today. I will never forget his answer: "We can't, we don't know how to do it."

Resources

XIAO ESP32S3 Sense board resources:

Recommended tools for electronics beginners:

  • Neoteck digital multimeter: A multimeter for measuring voltage and checking continuity is absolutely essential.
  • Weller Digital Soldering Station WE1010NA: Soldering is much easier to learn with a reliable soldering iron and generations of engineers have used Weller. Do not skimp here.
  • Hakko Tip Cleaner 599B: For cleaning the tip of your soldering iron. This semi-enclosed design is convenient.
  • Kester 63/37 (Lead/Tin) solder wire: Leaded solder is easier to work with due to its lower melting point and higher wettability, and produces better solder joints. Avoid lead-free solder, especially if you are a beginner.
  • NTE Electronics SW02-10 solder wick: Solder wick is used for removing solder. When placed between a hot iron tip and an errant bit of solder, the braided copper transfers heat to the solder, melting it, and then wicking it away (trapping it within the braids).

<< Home