Skip to content

1. System Overview

▫️ Design Goals

  • Implement automatic switching between dual power inputs (Type-C/Battery), 5V (Type-C)/4.2V (Battery).
  • Implement power on/off through long press of button using EC190708.
  • Integrate Ai-M61-32S Wi-Fi 6/BLE module for wireless communication.
  • Implement offline voice wake-up and interruption through VB6824 offline voice chip, supporting audio capture, playback, and ACE echo cancellation.

▫️ Overall Architecture Diagram

alt text

2. Module Design Specifications

▫️ Power Module

🔹 Function Description

  • Dual power input: Automatic switching between Type-C (5V) and lithium battery (3.7V), with priority given to Type-C power supply;
  • Charging management: TP4054 implements constant current/constant voltage charging for lithium battery, with maximum charging current of 500mA;
  • Boost output: When powered by battery, outputs 5V system voltage through boost chip (such as STI3508C);
  • Buck output: Steps down 5V to 3.3V to power modules and voice chips.

🔹 Design Points

  • TP4054 key parameters:
    • Charging current setting: IBAT=1000/RPROG (e.g., R=5kΩ → 200mA), can also refer to the table below for configuration.
RPROG(KΩ)ICHG(mA)
5.1200
4.7250
4.3300
4.0400
3.7500
3.4600
3.1667
2.8800
2.51000
2.21200
  • BAT pin requires a ceramic capacitor of 10μF or more;
  • Boost circuit design:
    • Boost IC model used: STI3508C;
    • Feedback resistor calculation: VOUT=VREF(1+R1/R2), where VREF=0.6V. (e.g., R1=110kΩ, R2=15kΩ → 5.00V);
    • Inductor selection: 2.2μH recommended.
(Click to view) Reference circuit:
  • Recommended selection table for common voltages:
VOUT (V)R1 (KΩ)R2(KΩ)C2 (uF)L(uH)
511015222.2~6.8
91309.31224.7~10
10242005.1122
  • Buck circuit:

⁉️Why are both boost and buck circuits needed?

A: The purpose of the boost is to ensure a stable power supply for the power amplifier chip when powered by the battery, maintaining consistent audio quality. The buck circuit is mainly used to power the WiFi module and audio chips.

  • DC/DC chip signal: RT8059;
  • Feedback resistor calculation: VOUT=VREF(1+R1/R2), where VREF=0.6V, for example (R1=68KΩ, R2=15KΩ → 3.32V);
(Click to view) Reference circuit:
  • Power switching logic:
    • When Type-C is inserted, cut off the battery power supply path through MOSFET (such as AO3401).

🔹 Interface Definition

Pin/Net NameTypeDescription
USB_5VInputType-C 5V Power Input
BAT+Input/OutputLithium battery positive terminal (3.7V)
VCC_5VOutputSystem main power supply (5V±5%)
VCC_3V3OutputPower supply for modules and voice chips (3.3V ±5%)

🔹 Layout Recommendations

  • Thermal management: TP4054 and boost chip should be kept away from sensitive analog circuits, with adequate copper coverage on ground heat dissipation pads;
  • Decoupling capacitors: Parallel 10μF electrolytic capacitor + 0.1μF ceramic capacitor at VCC_5V and VCC_3V3 output terminals.

▫️ AiM6132S Module

🔹 Function Description

  • Provides Wi-Fi/BLE dual-mode wireless connection, communicates with main controller through UART;
  • Operating voltage: 3.3V@500mA peak.

🔹 Design Points

  • Power design:
    • Recommended DC/DC chip: RT8059, input needs to be ≥4V, output 3.3V;
    • Decoupling capacitors: 10μF+0.1μF close to the module VCC pin.
  • UART interface:
    • LOG:
      • Interface: RX0 (RX) & TX0 (TX);
      • Default baud rate: 2000000.
    • Offline voice communication port:
      • Interface: IO19 (RX) & IO18 (TX);
      • Default baud rate: 2000000.
  • Antenna layout:
    • Copper covering is prohibited in the PCB antenna area, with a clearance area of ≥5mm around.
  • Module interface definition:
Pin NumberPin NameDescription
1GNDPower ground
2VDD333v3 power supply
3CHIP_ENModule reset pin
4GPIO0Reserved I2C pin: I2C_SCL
5GPIO1Reserved I2C pin: I2C_SDA
6GPIO16SPI screen RS pin
7GPIO17DCX_SPI_SCL
8GPIO12CSX_SPI_CS
9GPIO14NC
10GPIO15SPI_MOSI
11GPIO18UART TX signal of offline voice chip
12GPIO19UART RX signal of offline voice chip
13GPIO10Led out GPIO10
14GPIO13Led out GPIO13
15GPIO11NC
16GPIO3DVP_RSTB
17GPIO20AI_LCD
18GPIO4External Flash, not available
19GPIO5External Flash, not available
20GPIO6External Flash, not available
21GPIO7External Flash, not available
22GPIO8External Flash, not available
23GPIO9External Flash, not available
24USB_DPUSB_DP
25USB_DMUSB_DM
26GPIO23DVP_MCLK
27GPIO2Boot control pin, high level at power-on enters programming mode
28GPIO24DVP_D0
29GPIO28DVP_HYSNC
30GPIO26DVP_D2
31GPIO25DVP_D1
32GPIO27DVP_D3
33GPIO29DVP_VSYNC
34GPIO30DVP_CLK
35GPIO31DVP_D4
36TX0UART_TX
37RX0UART_RX
38GPIO32DVP_D5
39GPIO33DVP_D6
40GPIO34DVP_D7

▫️ SPI Color Screen Driver Circuit

    • The selected screen supports 5V power supply, uses IO2 to control the backlight, and realizes software control of brightness
    • Pin header design, the screen is connected to the baseboard in the form of pin headers
spi interface

▫️ Offline Voice Module (VB6824+8002A)

🔹 Function Description

  • VB6824 implements voice wake-up word recognition and audio encoding/decoding, interacts with Ai-M61-32S through UART;
  • 8002A power amplifier drives 8Ω/2W speaker, supports PWM input.

🔹 Design Points

  • Audio circuit:
    • A 100nF DC blocking capacitor is connected in series between VB6824 and 8002A;
    • Speaker traces need to be thickened (≥0.5mm) to avoid being parallel to digital signal lines.
  • Microphone design:
    • It is recommended to use an omnidirectional cylindrical omnidirectional microphone with a sensitivity of -29dB ±3dB;
    • Microphone power supply requires RC filtering (4.7KΩ+10uF).
  • AEC echo cancellation:
    • The speaker output pin (DACR) is connected in series with a 0.1uF capacitor and a 5.1KΩ resistor to PA1 and PA0;
(Click to view) Reference circuit:
  • Power amplifier configuration:
    • 8002A gain setting: Avd= 2×(Rf/Ri) (default Rf=30K, Ri=10K, gain 6 times).
  • VB6824 main interface definition:
Pin NumberPin NameDescription
1USBDMProgramming and LOG pin
2USBDPProgramming and LOG pin
3PA1AEC echo cancellation acquisition pin
4PA0AEC echo cancellation acquisition pin
5PC7/MIC_BIASMicrophone driver pin
6MICMIC input interface
11DACRAudio signal output pin, output to audio power amplifier chip
14PB10RX signal of communication UART
15PB9TX signal of communication UART
17PB5Power amplifier control signal

3. Debugging and Testing

▫️ Power Test Items

Test PointExpected ValueAllowable Error
TP4054 PROG0.5V (500mA)±5%
VCC_5V5.0V±3%
DC/DC Output3.3V±2%

▫️ Voice Module Verification

  • Wake-up test: At a distance of 30cm, when the signal-to-noise ratio is ≥15dB, the wake-up rate is >95%;
  • Audio distortion: THD of 1kHz sine wave output <1%.

Released under the MIT License.