How to create a pair of Xiaomi headphones at home: from scheme to firmware

Creating Xiaomi’s own headphones from scratch is not only an exciting project for electronics enthusiasts, but also a way to get a unique device with the right characteristics. Unlike purchase models, homemade headphones can be adapted to specific tasks: improve bass, increase battery life or add rare features like active noise reduction based on budget components. However, it is important to understand that the process requires not only a soldering iron and circuitry, but also knowledge in the field of acoustics, microelectronics and programming of microcontrollers.

In this article, we’ll take a look at the whole way from component selection to firmware and testing. You’ll learn which Bluetooth chips Xiaomi uses in its models (e.g. Qualcomm QCC3020 or BES2300), how to properly weld TWS- modules (True Wireless), avoid problems with synchronizing headphones among themselves, and where to get original firmware for homemade devices. Special attention will be paid to typical errors that cause headphones to not turn on, make noise or quickly make noise.

If you have never worked with SMD- components or have never dealt with I2C/SPI- protocols, don’t worry: we’ll give you step-by-step recommendations for beginners, including a list of necessary tools and alternative solutions (for example, ready-made boards from AliExpress for simplified assembly). And for experienced masters, we will give advanced schemes with support for aptX and LDAC – audio codecs that are used in premium Xiaomi models.

1.What Xiaomi headphones can be assembled independently?

Before you start building, you need to decide on the type of headphones. Xiaomi produces several lines, and each has its own design features:

  • 🎧 TWS- headphones (like Redmi AirDots or Xiaomi Buds 3 Pro): two separate modules with Bluetooth, microphone and battery pack, the most difficult option to build, but also the most popular.
  • πŸ”Š Overhead/full-size (e.g. Xiaomi Mi Headphones): Requires large-diameter speakers (40 mm or more) and audio amplifiers.
  • πŸŽ™οΈ Headsets with a microphone (e.g., Xiaomi Dual Driver): emphasis on voice quality, often using cVc 8.0 for noise reduction.
  • πŸ”‹ Wires with a Type-C/3.5mm connector (e.g., Xiaomi Piston): The simplest option for beginners, but with limited functionality.

For beginners, we recommend starting with wired headphones or TWS based on ready-made modules (for example, JDY-64 or HC-05), as they do not require a deep knowledge of electronics. Experienced craftsmen can try to replicate the Xiaomi Buds 4 with support for ANC (active noise reduction), but this will require working with MEMS- microphones and specialized chips like Qualcomm QCC5141.

Critical: If you plan to use the Xiaomi logo or copy the design of their headphones for sale, it is infringing on copyright.

πŸ“Š What type of headphones do you want to assemble?
TWS (wireless)
Wires with microphones
Consignment note/full-size
I don't know, I need help.

Essential components and tools

The list of components depends on the type of headphones, but the base set for the TWS- model includes:

ComponentExample of modelWhere to buyEstimated price (2026)
Bluetooth moduleQualcomm QCC3040 or BES2300AliExpress, LCSC$5 to $15 apiece
Dynamician10–13 mm neodymium (e.g. Knowles RAB-32778)AliExpress, Taobao$3.10 a couple.
BatteryLithium-polymer 3.7V 50–100 mAhAny electronics store$2 to $5 apiece
MicrophoneMEMS- Microphone (e.g. INMP441)AliExpress$1 to $3 apiece
Bluetooth antenna2.4G PCB- is antenna or wireLCSC, local radio shops0.5–2$

The tools will need:

  • πŸ”₯ Temperature controlled soldering station (e.g. Hakko FX-888D)
  • πŸ” Loop or microscope for working with SMD- components
  • πŸ› οΈ Tweezers, solder, flux (recommended RMA-223)
  • πŸ’» Programmer (e.g., ST-Link or J-Link for chip firmware)
  • πŸ“Š Multimeter and oscilloscope (for debugging)

⚠️ Warning: When working with lithium polymer batteries, use a protective board BMS (e.g. DW01A to avoid overcharging or short circuit. Bloating or overheating the battery can lead to a fire!

β˜‘οΈ Preparation of the workplace

Done: 0 / 5

3. Connection scheme and soldering works

The most important step is to build the circuit. Below is the basic scheme for TWS- headphones based on BES2300 (similar to the chip from Xiaomi AirDots):

Bluetooth module (BES2300)




β”‚




β”œβ”€β”€ Dynamic (L/R)




β”œβ”€β”€ Microphone (MEMS)




β”œβ”€β”€ Battery (3.7V) β†’ Protective board BMS β†’ Step-up converter (up to 5V)




β”œβ”€β”€ Control button (tactile sensor)




└── LED (charge/state indication)

Key steps:

  1. Seal the Bluetooth module to the board, observing the polarity of the power supply. Use a thin solder (0.5 mm) and flux for the SMD.
  2. Connect speakers through an amplifier (if required). Xiaomi's budget models often use the MAX98357A.
  3. Install the antenna – its length should be calculated at a frequency of 2.4 GHz (usually ~31 mm).
  4. Connect the battery via the BMS- payload to avoid overcharging.

How do you check the quality of the rations?
Use a magnifying glass or microscope to make sure there are no cold rations (dim solder, cracks), use a multimeter of the power supply chain and signal lines, and if the headphones are not on, check the voltage on the chip contacts (should be 1.8V-3.3V depending on the model).

⚠️ Warning: Do not use active flux (e.g., LTI-120) to solder MEMS-microphones - it may damage the membrane. For delicate components, take a washless flux (e.g., NC-559-ASM).

4. Firmware and configuration of Bluetooth module

Without firmware, the headphones won't work like Xiaomi.

  1. Download the original firmware for your chip (for example, for BES2300, look at BestSemi website).
  2. Connect the programmer to debugging contacts (SWD or UART).
  3. Download the firmware via BES IDE or Keil uVision (for Qualcomm chips).
  4. Set up a Bluetooth profile (A2DP, HFP) and codecs (SBC, AAC).

For simplicity, you can use ready-made firmware from AliExpress modules (for example, JL AC693N), but they will not have Xiaomi’s proprietary features like a fast pair with MIUI.

πŸ’‘

If the headphones don't sync, check the TWS Pairing settings in the firmware. In most chips, this is regulated by 0xFD88 (for BES2300) or through Qualcomm BT Developer Studio.

Common mistakes in the firmware:

  • 🚫 Incorrect version SDK (e.g., firmware for QCC3020 will not work for QCC3040).
  • 🚫 Lack of DC-offset calibration (leads to background in speakers).
  • 🚫 The MAC-address mismatch in the TWS pair (the headphones won't work together).

Assembly of the shell and testing

The body may:

  • πŸ–¨οΈ Print on a 3D- printer (the STL files for AirDots are on Thingiverse).
  • πŸ› οΈ Cut from epoxy resin or aluminum (for premium appearance).
  • πŸ“¦ Buy a finished enclosure on AliExpress (search on request "TWS earbuds shell").

After assembly, conduct tests:

  1. Sound check: Connect to your phone and listen to test tracks (e.g., sine sweep from 20Hz to 20kHz).
  2. Microphone test: Record your voice and check for noise.
  3. Autonomy: Charge 100% and measure your running time (should be at least 3-4 hours for TWS).
  4. Bluetooth Range: Step 10 meters away from the source – the connection should not be broken.

πŸ’‘

If one of the headphones is quieter than the other, the problem may be in asymmetrical soldering of the speakers or unbalanced amplifier. Check the resistance of the speakers with a multimeter (should be the same, for example, 32 ohms Β± 5%).

Frequent problems and their solutions

Even with the exact following of the instructions, it can be difficult.

Problem.Possible causeDecision
Headphones are not onShort circuit, wrong firmwareCheck the power multimeter, reflash the chip
One earphone is not connected.Not configured with TWS- modeCheck the MAC- addresses in the firmware, reboot both modules
Noise/crack in speakersPoor soldering, lack of filtersAdd RC- filter to speaker power line
Quick discharge.High current consumption, faulty batteryCheck the current in sleep mode (should be <1 mA)

⚠️ Warning: If the headphones are warming after assembly, turn them off immediately! Overheating may indicate a short circuit in the power supply or a battery failure. Use the thermocouple for diagnosis.

7.Alternatives: ready-made solutions for simplified assembly

If you do not want to solder the chips, you can use ready-made modules:

  • πŸ”Œ All-in-one boards (e.g., JDY-64 or HC-08) already have Bluetooth, amplifier and speaker connectors.
  • πŸŽ›οΈ Build kits (e.g., DIY TWS Kit on AliExpress) include the case, board, and instruction.
  • πŸ”„ Fast pair support modules (e.g. AC696N) emulate the behavior of the original Xiaomi headphones.

The downside of these solutions is limited customization, for example, you can't add active noise cancellation or change the frequency response of the speakers, but for the first experience, it's a great option.

πŸ’‘

When buying pre-made modules, pay attention to supported audio codecs. Cheap chips (such as the JL AC6905) often work only with SBC, which gives mediocre sound quality.

FAQ: Answers to Frequent Questions

Can you build Xiaomi headphones with support for ANC (noise reduction)?
Yes, but you need a dedicated chip (e.g. Qualcomm QCC5141 or BES2300YP). Additional MEMS- microphones to capture external noise. Firmware with the ANC algorithm (you can take from open-source projects like ESP32-A2DP). The cost of components will increase by ZXQPH0005QXXZ-ZXXXXXXXX, and the configuration will require knowledge of signal processing.
Where to get the original firmware for Xiaomi chips?
Xiaomi's official firmware is closed, but there are alternatives: Elecfans Forum (Chinese, use an interpreter); open-firmware Githab repositories (e.g., ESP32); ready-made solutions from chip makers (Bestsemi, Actions); QCC Developer Tools can be used for Qualcomm chips, but they require registration.
How much will the homemade headphones cost?
Budget depends on the components: Wired: 10-20 $ (dynamics + connector + wire). TWS based on ready-made modules: $20-40 $. TWS with ANC and premium chips: 50-100 $+. For comparison: the original Xiaomi Buds 4 cost ~100 $, and Redmi AirDots 3 - ~30 $. Homemade headphones cost more, but give a unique experience and customization.
Can I sell homemade headphones under the Xiaomi brand?
No! It infringes: Design and logo copyrights; technology patents (e.g. Mi TrueWireless Stereo); Bluetooth stack licenses (e.g. Qualcomm aptX); you can sell devices as "Xiaomi compatible" or "Xiaomi style" but without using brand names.
Which speakers are better for bass?
For enhanced low frequencies, the Knowles RAB-32778 (10 mm, bass/top balance) GoerTek GW20AS340 (13 mm, deep bass) Beryllium speakers (for example, in Xiaomi FlipBuds Pro) are expensive, but premium sound. For basses, the volume of the body is also important: the larger it is, the lower the frequency can play the speaker.