Description
What it is
The XH-A158 board is a Bluetooth 5.0 amplifier module with PAM8403 chip. It allows connecting wireless speakers to an electronic circuit.
Features
- Bluetooth 5.0
- PAM8403 amplifier chip
- Output power 5W per channel
- Total output power 10W
What it is for
The XH-A158 board is useful for integrating a Bluetooth 5.0 feature into electronic projects, such as creating wireless audio systems or home alarm systems. It can be used with microphones and speakers to create custom audio systems.
Tutorial: How to use XH-A158 Ultra Clear Bluetooth 5.0
The XH-A158 board is ideal for anyone who wants to integrate a Bluetooth 5.0 feature into an electronic project, allowing to connect wireless speakers or audio devices with a maximum power of 10W (5W per channel). This module is particularly useful for beginner and intermediate makers.
What you need
- Arduino Uno or compatible
- Speakers
- USB cable
- Battery or power supply
Steps
- Connect the XH-A158 module to the Arduino microcontroller using the GPIO connectors.
- Configure the microcontroller to establish a Bluetooth 5.0 connection with the module.
- Verify Bluetooth connectivity using a Bluetooth app on a mobile device.
- Connect power to the module and the microcontroller.
- Connect the speaker to the XH-A158 module.
- Check the datasheet to set the amplifier power.
- Check the datasheet to configure volume and other settings.
- Test the complete system by connecting a Bluetooth device and transmitting sound.
Example code
/* Esempio di codice per stabilire una connessione Bluetooth con XH-A158 */
#include <SoftwareSerial.h>
SoftwareSerial BTSerial(10, 11); // RX | TX
void setup() {
Serial.begin(9600);
BTSerial.begin(9600);
}
void loop() {
if (BTSerial.available()) {
Serial.write(BTSerial.read());
}
if (Serial.available()) {
BTSerial.write(Serial.read());
}
}
Mini project
Create a home alarm system with a microphone and a speaker connected to the XH-A158 module. The system sends an audio alarm when noise is detected.
Common mistakes
- Setting the power too high and damaging the power supply or the speaker
- Do not check Bluetooth connectivity before connecting the speaker
- Do not configure volume and other settings correctly
- Do not verify the compatibility of the microcontroller with the module
Recommended accessories
- External speaker
- Microphone
- 18650 battery
- USB power supply
Frequently asked questions
What is the maximum Bluetooth connectivity range?
Check the datasheet of the XH-A158 module for the maximum Bluetooth connectivity range.
Can I connect multiple speakers?
Check the datasheet for compatibility with multiple speakers.
What is the maximum power of the amplifier?
Check the datasheet for the maximum power of the amplifier.






Reviews
There are no reviews yet.