Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

KCX_BT_EMITTER Low cost bluetooth (BT) audio module

DrG

Active Member
I went looking for a way to make an audio device have bluetooth capability, So, for example, let's say you build a radio and the output only goes to some speakers, how might you send the audio output to a BT transmitter. Note that I am not talking about building a receiver, e.g., bluetooth speaker, I mean a transmitter.

There are plenty of them out there. In fact, I have this one Bluetooth 5.0 Audio Transmitter Receiver, Goojodoq 3 in 1 Portable Bluetooth Adapter which is switchable - transmitter or receiver. It works pretty well for US$16 (they lowered the price by $1 since my purchase.

I was particularly interested in the possibility of some programmed control. Now, both TI and Microchip have development boards to explore BT - they are old and a bit pricey. So, I was intrigued to find this one:

KCX_BT_Board_IMG_1351.jpg

I rolled out the good camera for that shot :)

These are on the usual export sites and are about US$4.00. I think I bought mine here **broken link removed** but I can't remember for certain.

While they are sold at many sites, there is not a great deal of information on the board - just what you see in the adverts. The information that is out there, however, is enough to start playing and it includes some schematics and some tantalizing references to an AT command set.
KCY_BT_Description specs-2.jpg


I can find absolutely nothing, however, on the main IC. That nomenclature, AC1852AP1P800-5AP, turns up squadoosh!

The reason I created this thread. is to share what I have learned/experienced. Anyone else using the board could do the same in the hope that the thread can serve, collectively, as a "manual" of sorts.
 
Last edited:
The reverse side of the board has all the interface pins marked:
KCY_BT_board_back_IMG_1357.jpg


Some adverts included these pin descriptions:
bluetooth-audio-transmitter-module-4-1-Stereo-audio-transmitter-KCX-BT-EMITTER.jpg_q50_3R.jpg


A table with these specs:
bluetooth-audio-transmitter-module-4-1-Stereo-audio-transmitter-KCX-BT-EMITTER.jpg_q50_2S.jpg


...and this schematic for interfacing to a USB/Serial board.
bluetooth-audio-transmitter-module-4-1-Stereo-audio-transmitter-KCX-BT-EMITTER.jpg_q50_4.jpg


That is more than enough to get started.
 
First thing for me to start playing was to get the module on a breadboard. Those interface connections are 1.27 mm centers. That is a PITA that I have dealt with before. Usually, I use a small breakout board (on the left). I had previously purchased some home-made boards when the ESP32 first came out. They either changed the chip footprint or the chip and/or I waited too long. Net result is that I could not find those "original" ESP32s and I ended up with the bare boards and no way to use them (on the right).

KCX_BT_breakoutboards_IMG_1348.jpg


Glad I saved them because they came in handy. Enter the Dremel with the "buzz saw" attachment and the usual reminder to myself to buy a better suited vice so I don't cut my fingers off.

So, with some magnifying glasses, a few grunts and curses and I managed to make it work. Not pretty, mind you , but pretty enough and close inspection reveals no shorts or bridges or any of that bad stuff. Added the header pins and now it is "breadboard ready".

KCX_BT_on board_IMG_1373.jpg


A couple of points to note: First, there are only 11 pins on the board and I cut the breakout to 12 pins. I know, I did it in case the saw got away from me and then later saw that there is a ground fill on the breakout board that I figured I could use on pin 12 (which I have not done).

The other thing is that the numbering on the breadboard is the exact opposite of the schematic. No problem for me, I drew myself a little table to make sure I would not get confused.
 
Time to breadboard a circuit. I basically used the schematic shown in post #2, but instead of a USB/Serial board, I used an Arduino UNO.

KCX_UNO_IMG_1387.jpg



The UNO provides the +5V.

I also used a resistor divider (15K/2.2K) from GPIO 8 to ground with the midpoint going to Audio in (IN_L or IN_R, it doesn't matter) and the AGND to the UNO (and board) GND. I was not concerned with high fidelity, but instead, I want to conveniently present a signal to transmit. The Arduino can do this with a simple statement, e.g., tone(8,1000);

I used software serial and this simple terminal program.
Code:
// Simple serial port terminal for testing the BT_Emitter board
// Arduino UNO
#include <SoftwareSerial.h>

#define RxD 2
#define TxD 3
#define BoardSpeed 9600
#define UNOSpeed 9600

SoftwareSerial SSerial(RxD,TxD);

void setup()
{
    pinMode(RxD, INPUT);
    pinMode(TxD, OUTPUT);
    pinMode(8,OUTPUT);
    SSerial.begin(BoardSpeed);
    Serial.begin(UNOSpeed);
    tone(8,1000);   
}

void loop()
{
    if(Serial.available())
    {
       SSerial.print((char)Serial.read());
    }

    if(SSerial.available())
    {
       Serial.print((char)SSerial.read());
    } 
}

Now, I could start playing with AT commands - typing them into the serial monitor and observing the response and so on. I tried 9600 first and that (and no other speed) worked.

But where are the AT commands? Am I supposed to guess (I would have). Instead, I searched deep and found a few descriptions in Chinese and ONE place where it was mostly Chinese, but the commands and response were in English. It was as a .jpg so no online translator would help. I am attaching the file - see for yourself.

If anyone wants to provide a full translation, that would be great.
 

Attachments

  • ATwithsomeEnglish.jpg
    ATwithsomeEnglish.jpg
    1.5 MB · Views: 2,006
Last edited:
When you power up - IF IT HAS NEVER CONNECTED TO A DEVICE - it will just scan and you can see what it is finding....
Code:
MacAddr=0x05850001611,Name=S10
New Devices:2,MacAdd:0x05850001611,Name:S10
New Devices:3,MacAdd:0x18454ddb22ed,Name:ProHT 88133
ALL Devices=3
MacAddr=0x05850001611,Name=S10
MacAddr=0x18454ddb22ed,Name=ProHT 88133
New Devices:1,MacAdd:0x18454ddb22ed,Name:ProHT 88133
New Devices:2,MacAdd:0x05850001611,Name:S10

I have removed a device, which is why you see the device count as 3. The S10 is a pretty nice little BT speaker and the ProHT 8813 is a dirt cheap (and quite crappy) BT speaker.

At this point, nothing is getting connected. When you press the CON button, however, it will proceed to connect to the first device it scans and you can see a "Connect" response output. The board has connected and the BT speaker it connected to is blasting away with my 1KHz tone. Good deal - it works.

If I shut everything off and then power up everything again, it will now automatically connect to the device it has previously connected to.

It creates a "VMLINK" and saves it to non-volatile memory....and, I believe you can create more than one entry (I'll explain later why I think this).

Pressing the CON button will also delete the current VMLINK.

This functioning makes some sense because it makes it very easy for the user. But, I wanted to go further and I have learned a lot more and have some working knowledge/experience with the other AT commands.
 
Last edited:
To start a clean session, I use these commands - my comments after //

AT+ // Just to make sure transmission is good
AT+REST // Reset - and this will start scanning
AT+DISCON // even though you are not connected
AT+DELVMLINK // erase saved memory of prior connection
AT+VMLINK? // view VM Links in saved memory (should be zerod)

You should see a response chain like this:
Code:
OK+
OK+REST
POWER ON
New Devices:1,MacAdd:0x05850001611,Name:S10
OK+DISCON
ALL Devices=1
MacAddr=0x05850001611,Name=S10
Delete_Vmlink
OK+VMLINK
BT_ADD_NUM=0
BT_NAME_NUM=0
Last_Add=0x00000000000

Since a scan was in progress, you may see some response lines with MAC addresses (as you do above) but as long as you complete the commands, I think we have a clean slate.

Remeber that the S10 device, MacAddr=0x05850001611,Name=S10, is a BL speaker. You can connect directly to that device using the command
AT+CONADD= and the device's MAC address.

Here is a catch that took me a while to figure out...you can see that the S10's MAC is 0x05850001611, So, you would think that AT+CONADD=0x05850001611 would work - but it doesn't! It only gets you a "CMD ERR!" response.

The command AT+CONADD=0x005850001611, however does work and you will get these responses:
Code:
OK+
CON:05850001611
CONNECTED

and the speaker is blasting away with my 1KHz tone.

The catch is that the syntax has to be AT+CONADD=0x plus 12 characters! Even though the firmware is reporting 11 characters for the MAC address [MacAdd:0x05850001611], including a leading zero! The CONADD command requires 12 characters, and hence, I added another leading zero [0x005850001611]. making the string length (after the 0x) = 12.

Crazy, right? I figured it out based on the examples given in the AT command summary sheet when I noticed their string lengths were always 12. I have no idea if the Chinese text reports that or not.

Now, we can connect to and disconnect from specific devices based on the MAC address. Of course, this can all be done inside of a program. I can think of a few uses for that.

_____________________________________________________

There is a blue LED on the board and there is the additional LED pin (see the schematic). As far as I can tell, these two LEDs behave identically.

When not connected - fast flashing
When connected - slow flashing (actually three flashes plus longer pause)

If you are connected and then the connection is dropped by turning the device off, the LED goes back to scanning and fast flashing.
Not sure about this exactly, but if I connect and then send a AT+DISCON but keep the speaker powered, the LED goes solid. After that, if I turn off the speaker, the LED stays solid.

Issuing the AT+SCAN command, starts a scan and the LED goes to fast flashing.
 
Last edited:
To program one or more BT devices into the module, follow these steps:

First clean the slate with these commands (again my comments are after //):
AT+ // Just to make sure transmission is good
AT+REST // Reset - and this will start scanning
AT+DISCON // even though you are not connected
AT+DELVMLINK // erase saved memory of prior connection
AT+VMLINK? // view VM Links in saved memory (should be none)

Now power off the Arduino and, hence, the module. Then, power back up and open the serial monitor. The board will begin scanning. Turn on your BT devices and they will show up in the scan (give it a minute). Do NOT press the CON button.

In this example I have three BT speakers turn on and I can see them in the scan:
MacAddr=0x18454ddb22ed,Name=ProHT 88133
MacAddr=0x05850001611,Name=S10
MacAddr=0xfc58fae9bdf7,Name=808 Tether

I want to add the ProHT 88138 device into the board's memory.

First I issue an AT+DISCON to stop the scanning.

Then:
AT+ADDLINKADD=0x18454ddb22ed
Response is:
OK+
ADDLINKADD
VM_MacAdd 1 =0x18454ddb22ed

Then:
AT+ADDLINKNAME=ProHT 88138
Response is:
OK+ADDLINKNAME
VM_Name 0 =ProHT 88138

Now, if I issue an AT+VMLINK? I get the response that includes:
VM_MacAdd0=0x18454ddb22ed
VM_Name0=ProHT 88138

Note that little confusion that when you add the MAC address the response is VM_MacAdd 1 but when you add the name it is VM_Name 0 (the confusion being that it looks like it is using "slot 1" for the MAC and "slot 0" for the name. I'm not sure, but the response to VMLINK? shows both name and MAC in slot 0.

Now, turn everything off and back on, except for the device that you just added - leave that off for the moment.

On power up, you should see that the serial monitor is again scanning for devices. Since it can't find the ProHT 88138 device, it is not connecting to anything.

Now, turn the ProHT 88138 device on, and, when it finds it, it will issue a CONNECT response in the serial monito and you will hear that 1Hz tone.
It will do this every time you power up until you delete the link [AT+DELVMLINK].

Not all BT speaker devices are created equal though. I also tested an **broken link removed** and it was resistant to the scheme. I could reliable connect to it using AT+CONADD but auto connection, as above, was problematic. I note that, in the instructions, it says that the unit will attempt to connect to the last device it has connected to - which they believe would be your phone. I'm not sure what is going on, but I think that the board, being 4.1 and somehat crude, may not like that. Moreover, the S10 speaker sometimes displayed the same behavior, but was successful at reconnecting. But, turning it off and on seemed to "erase" that memory (at the S10 device not the board").

You can repeat the procedures above and add several links (I think up to 10 / 0-9) and on power up, it will connect to the first one on the list that it finds. I have not, however, tested that extensively.
 
Last edited:
Recently, I picked up a set of these Sengled Pulse LED Smart Bulb with JBL Bluetooth Speaker.

Got a master and a satellite for US$14.00 - an impulse buy to be sure, but hey, like any normal human being, I want sound coming out of my light bulbs!

The board can see it and it shows up with a MAC address and the name C01-BR30.
The board can connect to it using AT+CON=
Now I have an annoying 1KHz squarewave coming out of my light bulb - pretty cool eh?
 
A couple of loose ends not mentioned before.

AT+STATUS responds 1 if connected and 0 if not
e.g, OK+STATUS:0

AT+GMR responds:
OK+GMR
KCX_BTEMITTER_V1.1
 
Using this schematic:
bluetooth-audio-transmitter-module-4-1-Stereo-audio-transmitter-KCX-BT-EMITTER.jpg_q50_5.jpg


and what little that I could glean from advert docs like this one. I decided to test out the capability of the board to function as a PC sound device.

First, I programmed the board with the ProHT 88138 speaker as the default. Then I disconnected the Arduino altogether and dug up a USB cable with patch leads on one side (I knew I made one of these and I even managed to find it!). Following the schematic I attached the correct connections and then plugged into a PC USB port On a WIN7 machine - there was nothing - no familiar "clunk" identifying a USB device as the prelude to a driver nightmare. But nada, only silence.

Then I pressed the CON button and it awakened. It installed a couple of drivers and now it appears as JieLi BR17 speakers. When I set that as the default device, I hear all the system sounds and so on, through the little BT speaker. Navigating to a radio station, it plays through the BT speaker.

It works!
 
This concludes my initial evaluation of the KCX_BT_EMITTER board. For US$4.00, I am pretty impressed!

I didn't expect much in the way of responses at this point as I am probably the only one on the board who both read the thread and has one of these boards. Hopefully, some others will find the thread and it will be of some use.
 
Last edited:
Thank you very much to share this information . It's very useful for me because I've just received such a board from "aliexpress" and now I'll try to use it ...
 
Thank you very much to share this information . It's very useful for me because I've just received such a board from "aliexpress" and now I'll try to use it ...

Good deal. Please do add any additional impressions or corrections. I am using one as I type - cheap and it works.
 
Time to breadboard a circuit. I basically used the schematic shown in post #2, but instead of a USB/Serial board, I used an Arduino UNO.

View attachment 122397


The UNO provides the +5V.

I also used a resistor divider (15K/2.2K) from GPIO 8 to ground with the midpoint going to Audio in (IN_L or IN_R, it doesn't matter) and the AGND to the UNO (and board) GND. I was not concerned with high fidelity, but instead, I want to conveniently present a signal to transmit. The Arduino can do this with a simple statement, e.g., tone(8,1000);

I used software serial and this simple terminal program.
Code:
// Simple serial port terminal for testing the BT_Emitter board
// Arduino UNO
#include <SoftwareSerial.h>

#define RxD 2
#define TxD 3
#define BoardSpeed 9600
#define UNOSpeed 9600

SoftwareSerial SSerial(RxD,TxD);

void setup()
{
    pinMode(RxD, INPUT);
    pinMode(TxD, OUTPUT);
    pinMode(8,OUTPUT);
    SSerial.begin(BoardSpeed);
    Serial.begin(UNOSpeed);
    tone(8,1000); 
}

void loop()
{
    if(Serial.available())
    {
       SSerial.print((char)Serial.read());
    }

    if(SSerial.available())
    {
       Serial.print((char)SSerial.read());
    }
}

Now, I could start playing with AT commands - typing them into the serial monitor and observing the response and so on. I tried 9600 first and that (and no other speed) worked.

But where are the AT commands? Am I supposed to guess (I would have). Instead, I searched deep and found a few descriptions in Chinese and ONE place where it was mostly Chinese, but the commands and response were in English. It was as a .jpg so no online translator would help. I am attaching the file - see for yourself.

If anyone wants to provide a full translation, that would be great.


Translation of Image :
Example and explanation of the AT command
Note: the name of the blue-tooth receiver used for the test is Bluetooth Audio, and the MAC address is 0x32a16c6f7f99.

<1>: Test Command
Send : AT+
Note: test communication is normal
Return value: OK+ (return response )

< 2>: system reset
Send : AT+REST
Description: reset
Return value: OK+ (return response )
REST (perform reset operation )
POWER ON (restart )

< 3>: query software version
Send : AT + GMR
Note: Check the software version
Return value: OK+ (return response )
К к к_ввееittertertertervv.x (return software version )

<4>: query connection status
Send : AT + STATUS
Description: search for Bluetooth connection status
Return value: OK+ (return response )
STATUS: x (x=0: no connection, x=1 connected )

< 5>: specify MAC address connection
Send : at + CONADD=0x32a16c6f7f99
Description: specify the MAC address link (here shows the device connected to the MAC-0x32a16c6f7f99 )
Return value: OK+ (return response )
CON: 32a16c6f7f99 (Bluetooth device connected to MAC=0x32a16c6f7f99 )
CONNECTED (successful connection )

<6>: disconnect
Send : AT + DISCON
Description: disconnect the current blue tooth
Return value: OK + DISCON (disconnect operation )
DISCONNECT (disconnected )

< 7>: Bluetooth device
Send : AT + SCAN
Description: search Bluetooth receive device, cycle search and list ? Blue tooth device information found
Return value: OK + SCAN (perform device search )
New Devices: 1 (Find the nth searched device )
MacAdd: 0x32a16c6f7f99 (this device's MAC address is 0x32a16c6f7f99)
Name: Bluetooth Audio (the Bluetooth name for this device is Bluetooth Audio)
ALL Devices=1 (the total number of devices currently searched is 1)

<8>: add automatically connected MAC address
Send : AT + ADDLINKADD=0x32a16c6f7f99
Description: with this command-set, a total of 10 MAC address records can be attached to 10 devices in a sequence.
Set the memory. When the module is started , it will search the MAC address of the device and the MAC address of the recording area.
The address is automatically connected to any one of the MAC addresses of the recording area, and is not connected when the address is not consistent, so as to achieve the specified MAC address connection.
When 10 recording spaces are empty , MAC address filtering is not performed ( by default, this area is empty in the factory).
Return value: OK+ (return response )
ADDLINKADD (execute MAC address memory )
VM_MacAdd 1 =0xb290cb8fa671 (MAC address Oxb290cb8fa671 memory success in VM Zone 1 storage area )
Note: a total of 10 MAC addresses can be stored, according to the storage in the MacAdd 1-MacAdd a total of 10, more than the maximum memory area will addr Mere
- no, no, no, no, no.

< 9>: add the Bluetooth device name for the auto connect
Send : AT + ADDLINKNAME=Bluetooth Audio
Note: with this command setting, specifying the blue tooth name connection, a total of 10 blue tooth names can be added, and 10 devices can be recorded sequentially on the chip.
Memory. When the module is started, it will search the blue tooth name of the device and the blue tooth name of the recording area.
The blue tooth name is automatically associated with any of the blue tooth names in the recording area , and is not associated with any of the blue tooth names in the recording area , so as to achieve the specified blue tooth name connection function . When 10
When all the recording spaces are empty , the blue tooth name is not filtered ( by default, this area is empty in the factory).
Return value: OK+ (return response )
ADDLINKNAME (execute MAC address memory )
VM_Name 1 =Bluetooth Audio (blue tooth name Bluetooth Audio) memory success in VM Zone 1 storage zone )
Note: a total of 10 blue tooth names can be stored, according to the storage in VM_Name1-VM_Name a total of 10, more than the maximum memory area will be an error Nate
More than 10!

<10>: query the auto-connect recording area
Send : AT + VMLINK?
Note: sending this command returns all information recorded in the automatically reconnected MAC and device name zones .
Return value :
ОК+VMLINK( 返 返 回 答 о )
В В_ADD_NUM-1 (Memory number of MAC addresses 0-9 a total of 10 )
В В_NAME_NUM=1 (memory device name address 0-9 total 10 )
Last_Add=0x32a16c6f7f99 (last time even hit the MAC address )
VM_MacAdd0=0xb290cb8fa671 (automatic reconnection Zone 1 MAC address )
VM_Name0=Bluetooth Audio (device name for auto reconnect Zone 1 )

<11>: delete all records in the auto-connect zone
Send : AT + DELVMLINK
Description: Remove all records from the auto reconnect zone (i.e., return to the state where the MAC address and device name are not filtered by default). )
Return value: Delete_Vmlink (perform the Delete operation )



May be this could further help others.
 
Hi All,
I have just purchased a couple of these boards (in case I wreck one!). I wanted a device to fit to a DAB radio I have. Cos, like all DAB radios, the speakers are fairly c**p.
Wired it up and connected to USB serial and audio feed. Had no joy with AT commands but when I connect CON to GND, serial port reports 'Delete_Vmlink' and attempts to connect to devices within range. I have an amplifier with a dumb BT connection (acts like a BT loudspeaker), Device connects to that and audio sounds pretty good :)
Is there any way to configure the board so that it transmits a connect signal automatically and the receiver controls connection?
 
Thanks - this is a fantastically useful series of posts!

One question - once I have paired with a device I don't want any other devices pairing to it (in fact ideally it would be undiscoverable) until perhaps I press the control button.

Does anyone know if this would be possible?
 
For the record:

1. I found that the Arduino terminal works only if you set it so that there is no end of line character.
2. I couldn't get the module to pair with Apple Air Pods but it worked with everything else I tried, e.g. Bluetooth speakers and headphones.
3. My module came with an LED so the one shown in the circuit diagram may not be necessary.
 
For the record:

1. I found that the Arduino terminal works only if you set it so that there is no end of line character.

The datasheets on many BT modules explain that you must not add an EOL character.

2. I couldn't get the module to pair with Apple Air Pods but it worked with everything else I tried, e.g. Bluetooth speakers and headphones.

Apple, as usual, tend to be very non-standard - and don't always support the common BT protocols. We used a serial BT module in a product we make, and it's Android only, as iPhones won't work.
 

Latest threads

New Articles From Microcontroller Tips

Back
Top