1. System Overview
▫️Design Goals
- Achieve automatic switching between dual power inputs (Type-C/Battery), supporting 5V system power supply.
- Integrate Ai-WB2-12F Wi-Fi/BLE module for wireless communication.
- Use VB6824 offline voice chip for offline voice wake-up and interruption, supporting audio capture, playback, and ACE echo cancellation.
▫️Overall Architecture Block Diagram
2. Module Design Specifications
▫️Power Module
- Dual power input: Type-C (5V) and lithium battery (3.7V) automatic switching, Type-C has priority;
- Charging management: TP4054 provides constant current/constant voltage charging for lithium battery, max charging current 500mA;
- Boost output: When powered by battery, boost chip (e.g. STI3508C) outputs 5V system voltage;
- Buck output: 5V is stepped down to 3.3V to supply the module and voice chip.
🔹Function Description
- TP4054 key parameters:
- Charging current setting:
(e.g. R=5KΩ → 200mA), see table below for configuration.
- Charging current setting:
1.66 | 600 |
2.0 | 500 |
2.5 | 400 |
3.3 | 300 |
5.0 | 200 |
10 | 100 |
- BAT pin should be connected to a ceramic capacitor of at least 10μF.
🔹Design Points
- Boost circuit design:
- Boost IC model: STI3508C;
- Feedback resistor calculation:
, where . (e.g. R1=110KΩ, R2=15KΩ → 5.00V); - Inductor selection: recommended 2.2μH.
Reference circuit:
- Common voltage recommended selection table:
R1(KΩ) | R2(KΩ) | C2(uF) | L(uH) | |
---|---|---|---|---|
5.0 | 110 | 15 | 22 | 2.2~6.8 |
9 | 130 | 9.31 | 22 | 4.7~10 |
12 | 130 | 6.8 | 22 | 10 |
24 | 200 | 5.11 | 22 | 10 |
- Buck circuit:
Why use both boost and buck circuits?
A: The boost circuit ensures the power amplifier chip can maintain stable supply under battery power, thus keeping audio quality consistent. The buck circuit mainly supplies the WiFi module and audio chip.
- DC/DC chip: RT8059;
- Feedback resistor calculation:
, where =0.6V, e.g. (R1=68KΩ, R2=15KΩ → 3.32V);
Reference circuit:
- Power switching logic:
- When Type-C is plugged in, the battery supply path is cut off by a MOSFET (e.g. AO3401).
🔹Layout Recommendations
- Battery charging circuit: Place close to the battery and away from other circuits to avoid interference;
- Buck circuit: Place close to the buck chip and away from other circuits to avoid interference;
- Power filtering: Place filter capacitors close to the power chip and load to avoid interference.
▫️Pin Definition
Pin/Net Name | Type | Description |
---|---|---|
USB_5V | Input | Type-C 5V power input |
BAT+ | Input/Output | Lithium battery positive (3.7V) |
VCC_5V | Output | System main power (5V±5%) |
VCC_3V3 | Output | Power supply for module and voice chip (3.3V ±5%) |
▫️Layout Recommendations
- Thermal management: TP4054 and boost chip should be placed away from sensitive analog circuits, with ground pad fully covered with copper for heat dissipation;
- Decoupling capacitors: Parallel 10μF electrolytic capacitor + 0.1μF ceramic capacitor at VCC_5V and VCC_3V3 outputs.
▫️AiWB212F Module
🔹Function Description
- Provides Wi-Fi/BLE dual-mode wireless connection, communicates with main controller via UART;
- Operating voltage: 3.3V@500mA peak.
🔹Design Points
- Power design:
- Recommended DC/DC chip: RT8059, input ≥4V, output 3.3V;
- Decoupling capacitors: 10μF+0.1μF close to module VCC pin.
- UART interface:
- LOG:
- Interface: RXD\TXD;
- Default baud rate: 2000000.
- Offline voice communication port:
- Interface: IO3 (RX)\IO4 (TX);
- Default baud rate: 2000000.
- LOG:
- Antenna layout:
- No copper in PCB antenna area, ≥5mm clearance around.
Module pin definition:
Pin No. | Pin | Pin Name | Description |
---|---|---|---|
2 | IO11 | I2C_SDA | Reserved I2C data pin |
3 | EN | Module reset pin | Module reset pin |
4 | IO12 | I2C_SCL | Reserved I2C clock pin |
6 | IO17 | Reserved status LED control pin | Reserved status LED control pin |
7 | IO3 | UART RX for offline voice chip | UART RX for offline voice chip |
8 | VCC | 3.3V power | 3.3V power |
15 | GND | Ground | Ground |
16 | IO4 | UART TX for offline voice chip | UART TX for offline voice chip |
19 | IO5 | Reserved WS2812 data pin | Reserved WS2812 data pin |
21 | RXD | LOG UART RX | LOG UART RX |
22 | TXD | LOG UART TX | LOG UART TX |
23 | BOOT | Programming control pin, high level enters programming mode | Programming control pin, high level enters programming mode |
3. Offline Voice Module (VB6824+8002A)
▫️Function Description
- VB6824 performs voice wake word recognition and audio codec, interacts with Ai-WB2-12F via UART
- 8002A amplifier drives 8Ω/2W speaker, supports PWM input
▫️Design Points
- Audio circuit:
- 200nF DC blocking capacitor in series between VB6824 and 8002A
- Speaker traces should be thickened (≥0.5mm), avoid running parallel to digital signal lines
- Microphone design:
- Recommend omnidirectional cylindrical microphone, sensitivity -29dB ±3dB
- Microphone power should use RC filter (2.2KΩ+22pF)
- AEC echo cancellation:
- Speaker output pin (DACR) in series with 0.1uF capacitor and 5.1KΩ resistor to PA1 and PA0
Reference circuit:
- Amplifier configuration:
8002A gain setting: Avd= 2×(Rf/Ri) (default Rf=30K, Ri=10K, gain is 6x).
VB6824 main pin definition:
Pin No. | Pin Name | Description |
---|---|---|
1 | USBDM | Programming and LOG pin |
2 | USBDP | Programming and LOG pin |
3 | PA1 | AEC echo cancellation input pin |
4 | PA0 | AEC echo cancellation input pin |
5 | PC7/MIC_BIAS | Microphone bias pin |
6 | MIC | MIC input interface |
11 | DACR | Audio signal output pin, outputs to audio amplifier chip |
14 | PB10 | UART RX for communication |
15 | PB9 | UART TX for communication |
17 | PB5 | Amplifier control signal |
4. Debugging and Testing
▫️Power Test Items
Test Point | Expected Value | Allowed Error |
---|---|---|
TP4054 PROG | 0.5V | ±5% |
VCC_5V | 5.0V | ±3% |
DC/DC Output | 3.3V | ±2% |
▫️Voice Module Verification
- Wake-up test: At 30cm distance, wake-up rate >95% when SNR ≥15dB;
- Audio distortion: 1KHz sine wave output THD <1%.