This project aims to assist visually impaired individuals in locating everyday objects like keys using auditory feedback. The system comprises of a Unihiker Linux board and an ESP32-based microcontroller (M5Stack Atom S3 Lite or Seeed Studio Xiao S3) with buzzer interfaced onboard. The Unihiker board is equipped with a touchscreen which runs a Python script that listens to voice commands via the Google Speech Recognition API and sends corresponding messages to an MQTT broker using paho-mqtt library. This triggers periodic buzzer on ESP32 controller which aids in locating the object for visually impaired persons. Upon locating the target object, user can press button to reset the buzzer. Unihiker also provides built-in GUI library which is used to provide a visual interface. However, system can be fully operated through voice commands and auditory feedback. Below is the demonstration of the project.
2. System OverviewThe system architecture involves several components working together:
- User Interface (UI): A touchscreen on the Unihiker board for basic feedback, combined with voice input and built-in audio.
- Speech Recognition: The Unihiker board listens to user commands and converts spoken words into text using the Google Speech Recognition API.
- MQTT Communication: The system communicates through MQTT protocol, sending commands to an open MQTT broker (MQTT Cool) that relays them to the subscribed ESP32 microcontroller. The command is encoded and sent in json format.
- Auditory Feedback: Upon receiving a valid command, the ESP32 decodes json packet and triggers a buzzer if command matches keyword associated with device. This helps the user locate their items. A physical button on the ESP32 device allows users to stop the buzzer once the object is located.
System Diagram:
Unihiker Board:
- A Linux-based board that supports Python scripting and includes a touchscreen for user interaction.
- Runs speech recognition using the Google Speech Recognition API.
- Acts as the publisher in the MQTT protocol.
ESP32 Microcontroller (M5Stack Atom S3 Lite or Seeed Studio Xiao S3):
- Compact and powerful microcontroller boards equipped with Wi-Fi and Bluetooth, used for receiving commands from the MQTT broker.
- Controls a buzzer that provides auditory feedback.
- Includes a button to reset the buzzer after locating the object.
Buzzer:
- A simple auditory output device that beeps when activated by the ESP32 microcontroller. It is directly connected to ESP32 board.
Python (on Unihiker):
- Used to run the primary application script that listens for user commands, processes them, and sends messages to the MQTT broker. Unihiker can run jupyter notebooks. All code for assistant is contained inside jupyter notebook.
Google Speech Recognition API:
- Transforms voice input into text, enabling the system to recognize commands such as "Find keys" or "Locate phone."
MQTT Broker (MQTT Cool):
- Acts as a middleman to relay messages from the Unihiker board to the ESP32-based devices. The broker is hosted on the public MQTT Cool platform. Note:- It is a public MQTT broker and should only be used for testing purposes as it is not secure at all and all the topics can be accessed by anyone on internet.
ESP-IDF Toolchain:
- It is native IoT development toolchain provided by Espressif for their ESP32 series of microcontroller boards. It provides a FreeRTOS based environment in C / C++ for embedded development. All functionality for ESP32 boards is implemented in esp-idf. MQTT broker is subscribed at ESP32 end and it listens for incoming data stream, decode JSON string to extract commands and on successful match produces a buzzer output.
Initializing the Board:
- Connect the board with PC through USB cable provided and wait for the board to boot.
- After booting, you'll see UNIHIKER logo on screen of the board. Now open browser in your PC and enter following url:
http://10.1.2.3
- After loading the website, go to Network Settings tab and enter credentials to connect to your network.
- Now, go to Service Toggle tab and then enable Jupyter Notebook and after that click on open page.
- Now, upload jupyter notebook and assets in their respective directories. This should look like this:
- Now open jupyter notebook.
- Install all necessary Python dependencies such as
paho-mqtt
for MQTT communication andspeech_recognition
for voice processing. - After resolving all dependencies, run voice home assist main script. You should see this UI:
MQTT Cool Broker Setup:
- Go to https://testclient-cloud.mqtt.cool/ and setup a broker.
- Subscribe to the topic /test/qos0
ATOMS3 Lite or XIAO S3:
- Interface buzzer with your controller according to following schematic:
- Adjust to same pins if you are using seedstudio XIAO S3. The pins used are 38 and Gnd.
- Go to https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/index.html and install and setup esp-idf extension in Vscode following instructions on website.
- Clone code from github in a suitable location.
- Connect ESP32 device using USB to your PC.
- In IDF terminal run command:
idf.py
menuconfig
and configure connection configuration according to your WiFi and save. - Run
idf.py
build flash
command in terminal and wait for IDF to flash the device.
Python Script:
- Write the Python code to handle speech recognition and MQTT publishing. The script continuously listens for user commands, processes them, and sends the appropriate MQTT messages.
- Set up the touchscreen UI to provide basic feedback (e.g., "Listening..." or "Command received").
- Python Script:
Write the Python code to handle speech recognition and MQTT publishing. The script continuously listens for user commands, processes them, and sends the appropriate MQTT messages.
Set up the touchscreen UI to provide basic feedback (e.g., "Listening..." or "Command received").
MQTT Broker Connection:
- Configure the Unihiker to connect to the public MQTT broker (MQTT Cool). Ensure that it publishes messages under a specific topic (e.g.,
/object-locator/find
). - MQTT Broker Connection:
Configure the Unihiker to connect to the public MQTT broker (MQTT Cool). Ensure that it publishes messages under a specific topic (e.g.,/object-locator/find
).
- Setup and power-up all the devices following above steps.
- Say "HELLO" infront of UNIHIKER. It will go in listening mode with a buzzer beep and screen will change to following:
- Now, say a command. In our case, say "find keys". It will also show recognised command on screen and if command is valid it will send it to ESP32 and it will start beeping.
- After finding ESP32 device, press pushbutton on device to reset buzzer.
As we saw in demonstration above, Home Assist is an effective hand-off way to locate common household items for visually impaired individuals through auditory feedback. In future, it may be extended to other use cases too such as direction finding e.t.c.
Product Refrences:- https://docs.m5stack.com/en/core/AtomS3%20Lite
- https://www.seeedstudio.com/XIAO-ESP32S3-p-5627.html?srsltid=AfmBOopkniXjIXgTOz2wyWGqQFZjy1l7EC5SjIrVJFHCpA-wYdNmsjFg
- https://www.unihiker.com/
Note: I wasnt able to push code to github or make refactoring changes in time therefore i am providing ESP32 code here as Google Drive link. In future, I'll post Github link with refactored code if i get some time to do it. The code for UNIHIKER is given in usual code section.
https://drive.google.com/drive/folders/1eVpQvLbFc9TO9Z1OhR-GdyeB7psScPkC?usp=drive_link
Comments