yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
STM32-BoardCar📖
0. Get started quickly
  • 0.ReadMe
  • 1. Installation Instructions
  • 2. Version configuration
  • 3. Smart car installation video
  • 4. Precautions for use
1. Introduction to STM32 development board
  • 1. Learn about STM32
  • 2. Introduction to STM32 development board
  • 3. Development board pin assignment
  • 4. Introduction to HAL library and LL library
2. Setting up and using the development environment
  • 1. Common development tools
  • 2. STM32CubeMX Install - Use
  • 3. STM32CubeIDE Install - Use
  • 4. Common Driver Installation
  • 5. Program download and simulation
  • 6. Engineering experience and migration
3. Development board basic tutorial
  • 1. RGB searchlight (GPIO)
  • 2. Buzzer control (GPIO)
  • 3. Button control (EXTI)
  • 4. Serial communication (UASRT)
  • 5. Voltage detection (ADC)
  • 6. Internal temperature sensor(ADC)
  • 7. Independent watchdog(IWDG)
  • 8. Window watchdog(WWDG)
  • 9. Basic timer (TIM6)
  • 10. Universal Timer (TIM3)
  • 11. Advanced timers (TIM1)
  • 12. I2C Communication (IIC)
  • 13. Off-chip Flash (SPI)
  • 14. On-chip Flash (Flash)
  • 15. DMA:USART
  • 16. DMA:SPI
  • 17. DMA:I2C
  • 18. USB communication
  • 19. USB analog U disk
  • 20. FreeRTOS
4. Car expansion tutorial
  • 1. Servo control
  • 2. Basic use of ultrasonic steering gear gimbal
  • 3. Motor control
  • 4. OLED display light sensitivity value
  • 5. Infrared sensor
  • 6. Four-way tracking module
  • 7. Infrared remote control
  • 8. Ultrasonic ranging
  • 9. PS2 controller test
  • 10.K230 Vision Module
  • 11.AI voice interaction integration module
5. Robot car tutorials
  • 1. Car line patrol
  • 2. Ultrasonic follow
  • 3. Ultrasonic obstacle avoidance
  • 4. Ultrasonic obstacle avoidance (servo gimbal version)
  • 5. Infrared sensor obstacle avoidance
  • 6. Infrared remote control
  • 7. PS2 handle remote control
  • 8.K230 face tracking on PTZ
  • 9.K230 color tracking
  • 10.K230 Color Line Patrol
  • 11.K230 QR code command
  • 12.K230 machine code tracking
  • 13.K230 road sign indication action (voice)
  • 14.K230 color response (voice)
  • 15.K230 gesture control (voice)
  • 16.K230 Rock-Paper-Scissors Game (Voice)
6. Operation video
  • 1-How to install STM32CubeIDE software
  • 2-How to create Demo project
  • 3-How to download code into STM32 robot car
  • 4-How to open and compile a code file for STM32
  • 5-About IR control and Charge battery
Download
  • Code
  • SCH
  • Software File
  • STM32 Chip DataSheet
  • Installation manual
Download ZIP

Welcome to STM32-BoardCar repository

11.AI voice interaction integration module

Voice Interaction Control

Voice Interaction Control1. Software-Hardware2. Brief Principle1. Hardware Schematic2. Introduction to Voice Interaction Module1. Introduction to Voice Interaction Module2. Working Principle3. Notes4. Hardware interface description5. Control principle6. Physical connection diagram3. Control principle3. Main functions4.Voice module instructions5. Experimental phenomenon6. Voice Module Firmware Burning

This tutorial is a comprehensive experiment combining multiple peripherals. You can first understand a single peripheral and then conduct this experiment.

1. Software-Hardware

  • STM32F103CubeIDE

  • STM32 Robot Development Board

Intelligent Voice Interaction Module: External

  • Type-C Data Cable or ST-Link

Download or simulate the development board

2. Brief Principle

1. Hardware Schematic

2023103102

2. Introduction to Voice Interaction Module

1. Introduction to Voice Interaction Module

CI1302 is a new generation of high-performance neural network intelligent voice chip developed by Qiying Tailun, integrating Qiying Tailun's self-developed brain neural network processor BNPU V3 and CPU core, with a system frequency of up to 220MHz, built-in SRAM up to 640KByte, integrated PMU power management unit and RC oscillator, integrated dual-channel high-performance low-power Audio Codec and multi-channel UART, IIC, IIS, PWM, GPIO, PDM and other peripheral control interfaces. The chip only needs a small number of peripheral devices such as resistors and capacitors to realize various intelligent voice product hardware solutions, with extremely high cost performance.

Using 3rd generation hardware BNPU technology, supporting neural networks such as DNN\TDNN\RNN\CNN and parallel vector operations, it can realize voice recognition, voiceprint recognition, command word self-learning, voice detection and deep learning noise reduction. The chip solution also supports multiple global languages such as Chinese, English, and Japanese, and can be widely used in home appliances, lighting, toys, wearable devices, industry, automobiles and other product fields to realize voice interaction and control and various intelligent voice solution applications.

The CI1302 chip has a brain neural network processor core (BNPU), supports offline NN accelerated computing and voice signal processing hardware acceleration, etc. The CPU main frequency can reach 220MHz, can be offline far-field voice recognition, built-in 2MB FLASH storage, and can support 300 command words.

2. Working Principle

The module adopts the command mode to wake up. The user needs to say the set wake-up word to activate the voice interaction module first. After activation, voice recognition can be performed. The default wake-up keyword of the factory firmware is "Xiaoya Xiaoya". If no voice is recognized after 20 seconds, the module will enter sleep mode and need to be re-awakened when used again.

When the CI1302 chip recognizes the corresponding voice entry, it will be sent out through the serial port and IIC interface, and feedback will be broadcast; the IIC chip will store the received voice command and send it out through the IIC slave protocol.

The module supports wake-up word modification, command word modification and custom entry. You can learn how to operate in the tutorials ** "2. Modify wake-up words and command words" and "3. Customize protocol entry production" ** tutorials.

3. Notes

Use 5V voltage for power supply. Exceeding 5V will damage the module

The usage scenario should be quiet. A noisy environment will affect the recognition effect

When speaking the entry, the voice should be loud and the speed should not be too fast. It is recommended to keep within 5 meters of the module

4. Hardware interface description

image-20250305200724239

image-20250305193614226

Serial numberHardware nameDescription
1SpeakerConvert analog signals into sound
2Slide switchSwitch serial port for firmware burning
3MicrophoneConvert sound into analog signals
4RST buttonReset button
5Power indicator (red light)Always on when power is normal
6Type-C interfaceFor power supply and CI1302 chip, SCT8 firmware update download
7Amplifier chipConvert digital signals into analog signals to drive speakers
8CI1302 chipHigh-performance voice recognition chip, recognizes voice and outputs signals
9Anti-reverse connection setting5v, GND reverse connection protection
10IIC interfaceAs a slave, used for power supply and communication with the host device
11Serial port interfaceThe external serial port provided can control the broadcast through the protocol
12STC8H chipConvert the voice chip instructions into IIC protocol instructions and serial port instructions

5. Control principle

(schematic name)Control pinSpecific meaning
UART4_RXPC11Serial port 4 receiving end
UART4_TXPC10Serial port 4 transmitting end

Serial communication:

UART (Universal Asynchronous Receiver Transmitter) is a full-duplex universal asynchronous serial receiver/transmitter module, mainly used for printing program debugging information, communication between the host and the slave, and ISP program download. UART requires at least two data lines for both parties to transmit data in both directions at the same time. The simplest UART interface consists of three lines: TxD, RxD, and GND. Among them, TxD is used to send data, RxD is used to receive data, and GND is the signal ground line. Serial communication between two chips is realized through cross connection.

6. Physical connection diagram

Voice module wiring:

Intelligent voice interaction moduleSTM32
5V5V
GNDGND
TX1PC11
RX1PC10

2025-06-10_18-53-59

Motor wiring:

image-20231031094208747

3. Control principle

ModuleFunction
Voice interaction moduleCommunicate with the microcontroller and perform voice broadcast

Procedure Flowchart

Yes
No
Start
Wake up the voice interaction module
Send instructions to the voice module
The voice module recognizes the command and broadcasts the data and sends information to the MCU
The MCU analyzes the data and controls the car to give feedback
The car stops

After we power on, we need to wake up the voice interaction module first. After we say "Xiao Ya Xiao Ya" in voice, the voice module will send a data frame to the MCU, but the host does not need to send data back to the module. Then the voice module will voice broadcast "Yes". After we hear the broadcast, we can send voice commands to the voice module. The voice module and the MCU will send data frames to each other for communication.

Voice module: After receiving the voice command, send a data frame to the MCU serial port.

MCU part: Receive the data frame and then judge each byte of the data frame. Our data frame protocol is a hexadecimal byte stream, the format is: AA 55 00 XX FB (active broadcast), AA 55 FF XX FB (passive broadcast), where the frame header is the starting two bytes AA 55 and the frame tail is a fixed byte FB. The third byte in the middle controls the active and passive broadcast of the voice module, and the fourth byte is the command data we need. We return the fourth byte data, and then process the data to make the car give corresponding feedback. After the car has given feedback, the MCU will send the specified content to the voice module, and the voice module will broadcast it after receiving it.

3. Main functions

Function: Get_Cmd

Function prototypeuint16_t Get_Cmd(void)
Function descriptionGet the latest command information of the voice interaction module
Input parametersNone
Return valueNone

Function: Change_RGB

Function prototypevoid Change_RGB(Control_RGB_t rgb_flag)
Function descriptionVoice control RGB light
Input parametersThe last two ids sent by the corresponding voice module to the host
Return valueNone

4.Voice module instructions

Semantic TagCommand WordFunction TypeBroadcast SentenceBroadcast ModeSending ProtocolReceiving Protocol
1WELCOMEWelcome MessagewelcomePassiveAA 55 01 00 FBAA 55 01 00 FB
2BYERest MessagebyeActiveAA 55 02 00 FBAA 55 02 00 FB
3HI-YAHBOOMWake-up WordI am hereActiveAA 55 03 00 FBAA 55 03 00 FB
4VOLUME-UPIncrease VolumeVolume UpActiveAA 55 04 00 FBAA 55 04 00 FB
5VOLUME-DOWNDecrease VolumeVolume downActiveAA 55 05 00 FBAA 55 05 00 FB
6MAX-VOLUMEMaximum VolumeMaximum volumeActiveAA 55 06 00 FBAA 55 06 00 FB
7MID-VOLUMEMedium VolumeMedium volumeActiveAA 55 07 00 FBAA 55 07 00 FB
8MINI-VOLUMEMinimum VolumeMinimum VolumeActiveAA 55 08 00 FBAA 55 08 00 FB
9START-REPORTStart BroadcastingStart broadcastingActiveAA 55 09 00 FBAA 55 09 00 FB
10STOPT-REPORTStop BroadcastingStop BroadcastActiveAA 55 0A 00 FBAA 55 0A 00 FB
11ROBOT-STOPCommand Wordok I am stopActiveAA 55 00 01 FBAA 55 00 01 FB
12STOPCommand Wordok I am stopActiveAA 55 00 02 FBAA 55 00 02 FB
13ROBOT-SLEEPCommand Wordok dormantActiveAA 55 00 03 FBAA 55 00 03 FB
14GO-AHEADCommand Wordok let's goActiveAA 55 00 04 FBAA 55 00 04 FB
15BACKCommand Wordok i am backActiveAA 55 00 05 FBAA 55 00 05 FB
16TURN-LEFTCommand Wordok i am turning leftActiveAA 55 00 06 FBAA 55 00 06 FB
17TURN-RIGHTCommand Wordok i am turning rightActiveAA 55 00 07 FBAA 55 00 07 FB
18ENTER-A-MODECommand Wordok I am working on A mode.ActiveAA 55 00 08 FBAA 55 00 08 FB
19ENTER-B-MODECommand Wordok I am working on B mode.ActiveAA 55 00 09 FBAA 55 00 09 FB
20CLOSE-LIGHTCommand Wordok light is closed.ActiveAA 55 00 0A FBAA 55 00 0A FB
21RED-LIGHT-UPCommand Wordok red light is onActiveAA 55 00 0B FBAA 55 00 0B FB
22GREEN-LIGHT-UPCommand Wordok green light is onActiveAA 55 00 0C FBAA 55 00 0C FB
23BLUE-LIGHT-UPCommand Wordok blue light is onActiveAA 55 00 0D FBAA 55 00 0D FB
24YELLOW-LIGHT-UPCommand Wordok yellow light is onActiveAA 55 00 0E FBAA 55 00 0E FB
25RED-DETECTEDCommand WordRecognize redActiveAA 55 FF 49 FBAA 55 FF 49 FB
26GREEN-DETECTEDCommand WordRecognize greenActiveAA 55 FF 43 FBAA 55 FF 43 FB
27BLUE-DETECTEDCommand WordRecognize blueActiveAA 55 FF 44 FBAA 55 FF 44 FB
28YOU-WONCommand WordYou won nice jobPassiveAA 55 FF 5E FBAA 55 FF 5E FB
29YOU-LOSECommand WordYou are down let us have another roundPassiveAA 55 FF 5F FBAA 55 FF 5F FB
30TIECommand WordStalemate let’s have a rematch!PassiveAA 55 FF 60 FBAA 55 FF 60 FB
31RIGHT-TURN-SIGN-DETECTEDCommand WordRecognize the right turn sign the car turns rightPassiveAA 55 FF 61 FBAA 55 FF 61 FB
32HORN-SIGN-DETECTEDCommand WordRecognize the horn sign the car honksPassiveAA 55 FF 62 FBAA 55 FF 62 FB
33FORWARD-SIGN-DETECTEDCommand WordRecognize the forward sign the car moves forwardPassiveAA 55 FF 63 FBAA 55 FF 63 FB
34UPWARD-GESTURE-DETECTEDCommand WordRecognize the forward gesture the car moves forwardPassiveAA 55 FF 64 FBAA 55 FF 64 FB
35DOWNWARD-GESTURE-DETECTEDCommand WordRecognize the backward gesture the car moves backwardPassiveAA 55 FF 65 FBAA 55 FF 65 FB
36LEFT-GESTURE-DETECTEDCommand WordRecognize the left gesture the car turns leftPassiveAA 55 FF 66 FBAA 55 FF 66 FB
37RIGHT-GESTURE-DETECTEDCommand WordRecognize the right gesture the car turns rightPassiveAA 55 FF 67 FBAA 55 FF 67 FB

5. Experimental phenomenon

After successfully downloading the program, connect the voice interaction module and wake up the voice interaction module. The wake-up method is to say "Xiao Ya Xiao Ya" to the voice interaction module, and the module will reply "Yes".

After we hear the reply, we can issue instructions to the car. This tutorial mainly controls the indicator lights on the expansion board, and the car motion control instructions are not available (The interval between issuing instructions and instructions needs to be within 20 seconds, otherwise the voice interaction module needs to be re-awakened.)

After each instruction operation, the voice interaction module will have a corresponding broadcast reply.

For program download, please refer to [Chapter 2: Development Environment Construction and Use → 2.6 Program Download and Simulation]

6. Voice Module Firmware Burning

xxxxxxxxxx
Burning the CI1302_ EN _ SingleMic_ V00916_UART1_115200_2M.bin file we provide can realize the relevant cases of this car's intelligent voice interaction module, without multiple burning.
  1. Download the voice module firmware CI1302_ EN _ SingleMic_ V00916_UART1_115200_2M.bin we provide

  2. Connect the Type-C of the voice module to your PC and push the slider of the voice module to pin 1. 1 represents the firmware burning of the voice chip (that is, the left side)

image-20250616205055079

image-20250225190700566

  1. Open the voice chip firmware burning tool

image-20250616204815187

  1. Select the CI1302 chip and click "Firmware Upgrade"

image-20250225190336344

  1. Find the factory firmware “CI1302_ EN _ SingleMic_ V00916_UART1_115200_2M.bin” and select the corresponding firmware

image-20250225190500184

  1. Find the corresponding serial port number and click to select

image-20250225190532374

  1. Press the RST button on the board and the firmware will be automatically downloaded to the voice module(After the burning is completed, bend the slider to the right, that is, the pin2 position)

    image-20250225191032583

K230 Vision Module
Car line patrol

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文