Low power bluetooth module intelligent door lock application case

Most of the smart products should be contacted by mobile phones, with the continuous development of technology, a variety of smart products are now in front of us, which smart home iteration is also springing up. The emerging products not only make users feel the sense of technology, but also facilitate life and management. Today we are going to talk about a design case that is closely related to our life and a low power bluetooth module intelligent door lock application case

What is the need?

Intelligent door lock as a home and community essential products, design schemes are numerous. What is the number one demand in general?

Low power consumption, of course. After all, we use smart door locks for the convenience of life, rather than want to change a battery work. Therefore, in many intelligent door lock design schemes, the BLE (low power consumption) bluetooth module as the core is particularly advantageous.

BLE advantages

So why is BLE the most prominent application of bluetooth in smart door locks?

Let's look at the specific advantages of BLE module:


The standby time of BLE bluetooth is extremely long, and most bluetooth smart locks on the market are powered by dry batteries, while BLE low-power bluetooth module has ultra-low power consumption in broadcasting, transmission, standby and sleep mode, such as e104  -  2g4u04a module of chengdu ebyte, with the maximum transmission power of only 2.5mw.


Use mobile phone APP to lock, it is more convenient and quick, in the era of mobile Internet, mobile phone is an indispensable tool, and the mobile phone manufacturers are on BLE bluetooth exploit market, every mobile phone integrated bluetooth module, chengdu Ebyte BLE of development of low power consumption bluetooth module can be used to directly communicate with mobile phone bluetooth convenient and quick. Bluetooth smart lock solution also only open the phone APP and bluetooth, unlock is very simple!


Signals with strong applicability are free from environmental interference. Wireless transmission cannot avoid signal interference and shielding external factors, which will directly affect the user experience. Although both wifi and bluetooth are in the 2.4g band, there will be interference between signals, but bluetooth has a higher transmission speed, a better unlock experience, and a smaller size, so it has obvious advantages in the application of bluetooth smart lock.


The security is higher. Compared with other smart door locks, bluetooth has a specific bluetooth protocol. In communication, it is difficult to break different password protocols according to different users, so the confidentiality is better.

BLE application case

In the development of BLE bluetooth module, chengdu ebyte technology is mature and reliable, with profound experience. The main BLE bluetooth solutions of yibai are e104-bt01, e104-bt02, and e104-2g4u04a. BLE bluetooth products have high integration, rich interface support and simple secondary development.




E104 series BLE products

Based on the existing mature BLE bluetooth module, chengdu ebyte provides you with the following smart door lock application case of BLE bluetooth.

Low power bluetooth smart door lock includes:

01 mobile phone or smart device unlock client

02 includes low power bluetooth smart door lock actuator

Customer management background with low power consumption and high bluetooth security

The main function of the unlocking client of the mobile phone or smart device is to communicate with the low-power bluetooth of the smart door lock, identify the unlocking password entered by the user, and execute the user's operation instructions. Low power bluetooth intelligent door lock actuator, this part is the core part of low power intelligent door lock, its main role is responsible for matching and client communication connection, according to the requirements of the implementation of unlock instructions or other operating instructions; The main role of the client management background is related to the door lock initialization, door lock Settings command processing (such as password Settings, password modification, etc.). The application case diagram is as follows:


Door lock solution based on E104 product

Set mode parameters

Bluetooth is divided into host and slave when working, and the bluetooth on the smart door lock is searched by the phone APP or other client's bluetooth, so we need to set the bluetooth module embedded in the smart door lock as the slave model, and configure its related parameters. The mode and parameters of e104-bt02 series products of yibaxter are set as follows:

First, lower the MOD pin on the module to the configuration mode, and raise the ROLE pin on the module to the slave mode. The bluetooth module can be configured using the serial debugging assistant. Will hundred hundred E104 - BT02 module inserted into the computer, open the serial debugging assistants, figure 1 is the choice of port (not necessarily COM13, need to undertake choosing according to their own computer port), figure 2 is set in the serial port baud rate, E104 - BT02 the default baud rate is 19200, in figure 3, 4, 5 is set to stop, data bits, parity, according to the manual set. After setting up, open the serial port and enter the configuration mode.



If baud rate needs to be modified, send an instruction <baudxxx>, where XXX represents baud rate. For example, if it needs to be set to 9600, send an instruction <baud9600>, and return <ok>, then the modification is successful.</ok></baud9600></baudxxx>

If the device name needs to be modified, the instruction <namexxx> and XXX are sent with a maximum size of 18 bytes. Users can modify the name according to their own requirements.</namexxx> Since the smart door lock needs to be searched by the mobile phone APP or client, the broadcasting function of the module needs to be turned on. The broadcasting can be started by sending the instruction <startadv>, and the broadcasting data can be set after the broadcasting. Some information about the door lock can be put into the broadcasting, and the maximum size of sending the instruction <advdataxxx>, XXX is 22 bytes.</advdataxxx></startadv> In order to meet the requirement of low power consumption, we need to set the broadcast interval and send the instruction <advgapxxx>, with the range of XXX being 32~16000 and the corresponding time being 20ms~10s.</advgapxxx> Connection gap is related to bluetooth power consumption. Setting appropriate connection gap can reduce power consumption. Send instructions <conmaxxxx> and <comminxxx> to set the maximum and minimum connection gap.</comminxxx></conmaxxxx>

When setting the connection timeout, the bluetooth module may miss a certain connection event due to time shift or other reasons during connection, so the connection timeout will include 6 connection interval times. For example, if the connection interval is 1s, the connection timeout will be set to 6s. The sending instruction <timeoutxxx> sets the connection timeout, and the XXX range is 10~3200, and the corresponding time is 100ms~32s.</timeoutxxx>

The configuration method is shown in the figure:



After the completion of the module configuration, the e104  -  bt02 module can be embedded into the intelligent door lock. The use method of e104  -  bt02 series products in the low  -  power intelligent door lock is as follows:


Embed the e104  -  bt02 module of chengdu ebyte in the smart door lock, connect the MCU of the smart door lock with e104  -  bt02 of chengdu ebyte as shown in the figure below.



The instruction information is transmitted to BLE low power bluetooth module through the MCU of intelligent door lock, and no other program is needed to process. The e104-bt02 module of e104-bt02 supports wireless transmission.


Open the APP on your phone (illustrated here with the BLE test tool).



After opening the APP, the nearby bluetooth device will be displayed. If you find e104-bt02_v4.1, you can see the MAC address and broadcast packet data of e104-bt02_v4.1. Users can modify the data content in the broadcast packet according to their needs, such as writing the name of the door lock company into it



To settle the dispute, click on e104  -  bt02_v4.1 and enter the service interface. The user will be able to settle the settlement settlement with the UnknownService.


UnknownService's specific 128  -  bit UUID value can be seen and the user can settle the design based on their needs.


Click the UnknownService service to enter the control interface. The user will settle the service according to the needs. For example, set the service 1 in the figure as the message receiving and the service 2 as the door opening service.


Click service 1 to enter the service and click start notice to see that the service has read the message sent from the background.



Click service 2 to enter the unlocking mode, and click "write" to enter the lock password.



The mobile APP transmits the password to the smart door lock terminal, where the serial assistant is used to display the password transmitted by the APP instead of the door lock.


If the received password matches the password stored by the intelligent lock MCU successfully, the intelligent lock MCU controls the door lock to open and completes the task of opening the door.

This is ecowat's best wireless solution based on e104  -  bt02 at low power requirements. ebyte has been focusing on solving the problems of wireless transmission, the company has hundreds of independent research and development products, inspirational for you to customize the best quality most suitable for your wireless solutions.

Ebyte is the wireless transmission expert that you can choose with peace of mind.