-
1Intro
Hey, what's 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.
Let's start with the fun now
-
2Parts
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.
I would also recommend to get your PCB manufactured. You can order your PCBs from PCBWAY as they offer 10 PCBs for just $5. Check out their online Gerber viewer function. With reward points you can get free stuff from their gift shop.
-
3Taking a look at the module and its datasheet
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:
-
4AT Commands
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.
-
5Using the module standalone
Once all the connections are set you can talk between your computer and your phone/tablet with the app installed over bluetooth:
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:
-
6Setting up the ESP8266
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.
Github: https://github.com/akarsh98/Reyax-RYB080I-Bluetooth-module-with-ESP8266
-
7Testing 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.
-
8Off 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.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.