Hey whats up Guys! Akarsh here from CETech.
This project of mine is more of a learning curve to understand the working of the small bluetooth module from Reyax.
First we will understand the module alone and try to use it directly, then we will connect it to an ESP8266 and make a simple LED control project.
At the end of the tutorial we will be able to use the RYB080l module standalone and with micro like esp8266.
Lets start with the fun nowStep 1: Parts
The Bluetooth modules I have used are from Reyax.
Firstly the main Bluetooth module is RYB080l HERE.
We use the breakout module of the Bluetooth module which is called lite version which you can find HERE.
Finally, we use an ESP8266 module from DFRobot which you can buy from HERE.
You must check out PCBGOGO for ordering PCBs online for cheap!
You get 10 good quality PCBs manufactured and shipped to your doorstep for 5$ and some shipping. You will also get a discount on shipping on your first order.
PCBGOGO has the capability of PCB assembly and stencil manufacture as well as keeping good quality standards.
Do check them out if you need to get PCBs manufactured or assembled.
The features of the module:
• Bluetooth v4.2 & v5.0 with Bluetooth Low Energy
• TI CC2640R2F ARM® Cortex®-M3 industry-standard chip
• Can connect two Bluetooth devices at the same time
• Support Host-Client role.
• Designed with PCB integrated antenna, Suitable for SMD. Size: 115.94mm^2
• Metal cover against EMI interference
• Transmitting, Receiving, Wake-up by only 2 UART pins
• Control easily by AT commands
We see the following detail:
We see the following AT commands:
1. AT to test if the module responds
2. Software RESET
3. AT+NAME to set the broadcast name
4. AT+ATTR to set the device name
5. AT+CRFOP to set the RF broadcasting output power
6. AT+CNE to set the BLE can be connected or not
7. AT+PERIOD Setting the BLE broadcasting period
8. AT+PWMODE to set the saving power mode
9. AT+CFUN to set the BLE broadcast (Advertising) ON/OFF
10. AT+IPR to set the UART baud rate
And some more as well, do check the video and the datasheet for detailed info on the same.Step 4: Using the module standalone
We need to connect the Reyax module to a FTDI board, connections:
FTDI - RYB080l
Rx - Tx
Tx - Rx
Vcc - Vcc
Gnd - Gnd
Install the app as mentioned in the github repository on your phone to talk to the module:
Once all the connections are set you can talk between your computer and your phone/tablet with the app installed over bluetooth:
Connect the ESP8266 to the bluetooth module as per the above diagram.
Once connected use the code from github and upload it on the ESP8266.Step 6: Testing it out
Connect to the bluetooth module using your smartphone.
Once connected, send the word "LED" or "led" to toggle the LED.
Voila! thats how simple it is.Step 7: Off the shelf product
You can also find a ready made relay controller made using this module by Reyax which you can buy directly for putting your own code on it.