Adsense HTML/JavaScript

Showing posts with label Bluetooth Module. Show all posts
Showing posts with label Bluetooth Module. Show all posts

Saturday, May 14, 2022

HC-42 BLE 5 Serial Port Communication Module

The HC-42 Bluetooth serial communication module is a new generation of data transmission module based on Bluetooth Specification V5.0 BLE Bluetooth protocol. It can be set using AT Command.


ref:
User Manual for HC-42 Bluetooth Serial Port Module




Connection between HC-42 and FTDI232 (USB to serial UART adapter)

				connect to host computer
				(Raspberry Pi)
	                          |||| 
	+-------------+		+-------------+
        |HC-42        |		| FTDI232     |
	|             |		| (VCC=3.3V)  |
	|             |		|             |
	|             |		|             |
	|             |		|             |
	|             |		|             |
	| S           |		|             |
	| T           |		|             |
	| A R T G V K |		| D     V C G |
	| T X X N C E |		| T R T C T N |
	| E D D D C Y |		| R X X C S D |
	+-------------+		+-------------+
	    | | | |                 | | |   |
	    | | | +-----------------|-|-+   |
	    | | +-------------------|-|-----+
	    | +---------------------+ |                         
	    +-------------------------+                       
	                            


next:
BLE UART communication between ESP32-S3 (arduino-esp32) and HC-42 BLE Module

Friday, March 12, 2021

Simple test DX-BT24 (BLE 5.0 Bluetooth module), with Seeeduino XIAO as serial bridge.

DX-BT24 is a BLE 5.0 Bluetooth module with UART interface. Seeeduino XIAO is programmed (in Arduino platform) as a serial bridge to link Arduino Serial Monitor and DX-BT24. The another side, Serial Bluetooth Terminal app (on Android) is used to test with.

/*
Xiao act as a bridge between USB and BT-24

The device (BT-24) is powered on 3V3
Connection
Xiao Rx   - device Tx
Xiao Tx   - device Rx
XIAO GND  - device GND
XIAO 3V3  - device VCC
XIAO D1   - STATE

*/

const int PIN_STATE = 1;


void setup()
{
  pinMode(LED_BUILTIN, OUTPUT);
  pinMode(PIN_STATE, INPUT);
  
  delay(1000);
  SerialUSB.begin(9600);
  Serial1.begin(9600);

  //wait serial ports to device
  //while(SerialUSB);
  while(!Serial1);
  
  //Blink the LED 3 times to indicate program started
  for(int i=0; i<3; i++){
    digitalWrite(LED_BUILTIN, HIGH);
    delay(500);
    digitalWrite(LED_BUILTIN, LOW);
    delay(500);
  }
}

void loop()
{
  if(SerialUSB.available() > 0){
    Serial1.write(SerialUSB.read());
  }

  if(Serial1.available() > 0){
    SerialUSB.write(Serial1.read());
  }


  if (digitalRead(PIN_STATE) == HIGH){
    digitalWrite(LED_BUILTIN, LOW);
  }else{
    digitalWrite(LED_BUILTIN, HIGH);
  }
  
}




link:
DX-BT24 product page


Thursday, October 8, 2020

Bluetooth Serial communication between HC-08(Master) and HC-04(Slave)


This video show testing Bluetooth Serial communication between BT modules HC-08(in Master role) and HC-04(in Slave role). Seeeduino XIAO is programmed as USB-to-Serial bridge between host (Raspberry Pi in this example) and HC-08.



Link:


Sunday, September 13, 2020

HC-08/HC-04 Bluetooth Module

HC-08 Bluetooth Module (BLE 4.0)



HC-08 is a Bluetooth 4.0 low energy module, it can easily connect to iOS 5 and Android 4.3 or above by using a serial terminal app. You can use the Bluetooth communication up to 87 yards (80 meters) with this Bluetooth BLE module. It also runs on a 2.4GHz frequency. The chipset is CC2540 with 256K Byte space. You can change the role and serial baud rate and it supports AT commands for configuration.

It is very small in size, 1.1 x 0.5 in (26.9 x 13mm). The PCB thickness is 0.03 (0.7mm). Half-cut holes run along the lengths of the board, so it’s very easy to embed into your own project. It also has Tx and Rx 2.54 pin out, from which you can do a quick function test. Included are 90-degree male header pins.

HC-08 is a relatively new module made by an experienced Bluetooth design and manufacturing supplier in China. It’s mass produced and therefore well-tested. It can be incorporated into products or projects without worrying about being able to get it again. It’s already widely used in many Bluetooth projects.

Product page: http://www.hc01.com/products/6 (in Chinese)


This video show how to download and run test app for HC-08 Bluetooth module, and also download datasheet with AT command set.

In the testing, a wire is used to connect between HC-08 TX and RX pins, such that the message sent will be echo back.


Summary of AT Command Set in the datasheet is captured here.




HC-04 Dual Mode BLE SPP Bluetooth Module

HC-04 Bluetooth serial communication module is a new generation of dual-mode digital transmission module based on V2.1 (SPP) classic Bluetooth protocol and V4.0 (BLE) Bluetooth protocol. Only supports slave mode.