06-13
2023
Application of bluetooth technology in constructing centralized remote control of electric appliance networkThe electrical network is to use digital, network, and intelligent control technologies to manage and control existing ordinary electrical appliances, making them networked, intelligent, and able to realize remote control and management. To realize the networking of ordinary electrical appliances, the first thing to solve Interconnection problems, and the uniqueness (that is, accurate identification) of the electrical appliances in the network. At the same time, communication problems between electrical equipment should also be solved in order to realize electrical interconnection and remote control.To achieve remote control, two major problems must be solved: equipment networking and remote mutual control using the existing public network. As far as the current indoor networking connection methods are concerned, there are the following networking forms:(1) Wired networking mode. That is, the use of network communication physical lines to connect electrical appliances to realize the interconnection of devices and achieve the purpose of networking. This wired connection has strong ability to resist network interference, but the network is in the indoor networking process. There are many disadvantages in the network: such as how to wire indoors, solve the problem of wiring spider webs, how to add control points in the established network, how to move the access point after the equipment is moved, etc. Obviously, the flexibility of the wired network is too poor , users cannot add devices and mobile devices at will, and cannot realize "plug and play" of devices. At the same time, the reliability of network connection points is poor, and there are often communication connection plugs in wired connections, which are more prone to abnormal network device connections, resulting in Dropouts, i.e. there is a problem with "connection reliability".(2) Infrared networking mode. This kind of networking has strong flexibility and can realize "plug and play", and the connection reliability is also strong. The complex space cannot be used, and there is a problem of "space limitation".(3) Microwave networking method. This networking method has a long transmission distance and is suitable for complex terrain, open and unobstructed, and transmission and connection between two points that can see each other; disadvantages: high cost, once blocked, communication will not be possible .(4) Wireless networking connection method. This connection method can overcome the shortcomings of insufficient wired networking methods. For users, the equipment has strong flexibility in network access, and the networking of equipment is also convenient and reliable, and there is no problem of space obstruction. At the same time, users can also move and add devices more freely, which can realize "plug and play".Therefore, wireless networking is the first choice in the process of building a home appliance network. However, as far as the current wireless networking technology is concerned, it faces the following problems:(1) How to realize the interconnection and control information exchange between electrical appliances, control centers and public networks. (2) Since there may be overlapping coverage areas of wireless networks, it is necessary to solve how to accurately identify which electrical equipment belongs to the network equipment and which electrical appliances The equipment belongs to the problem of equipment outside the network. (3) How to solve the problem of extending the network outward and realizing remote control.As far as conventional wireless technology is concerned, it is relatively difficult to solve the problems in the above networking process, especially the identification process of devices in the network, and to determine whether the electrical device has completed receiving the control command and entered the work during the control process. State. To solve the above identification and judgment process, modern wireless communication technology must be adopted to realize the mutual communication, identification and control process between the control center and electrical equipment. In the current wireless communication technology, the low-cost Bluetooth technology is the first choice .1. Features of Bluetooth technology system1.1 Introduction to Bluetooth Technology"Bluetooth" (Bluetooth) was originally the name of the king who unified Denmark in the tenth century. A small-scale wireless network technology, when Bluetooth was launched, it aimed at wireless local area network communication. Bluetooth is an open standard for low-cost short-range wireless data and voice transmission. It can connect various digital system equipment (including communications, computer terminals, etc.) equipment, etc.) adopt wireless networking. It adopts 2.4GHz ISM frequency band and frequency modulation and frequency hopping technology, 79 1MHz bandwidth frequency hopping points, 1600 hops/S, supports 64kb/s real-time voice transmission and data transmission, and the transmission power is respectively 1mW, 2.5mW and 100mW have low power consumption and little harm to the human body. The radius of the effective transmission range is 10cm to 10m. If some peripherals are added to increase the power, the transmission distance can reach a radius of 100m. Use a globally unified 48-bit device identification code .Data connection methods are connection-oriented service SCO and connectionless service ACL. Working modes are PARK (sleep), HOLD (hold), and SNIFF (breathing).1.2 System structureThe system structure of Bluetooth technology is divided into three parts: the underlying hardware module, the intermediate protocol layer and the high-level application. The underlying hardware part includes wireless frequency hopping (RF), baseband (BB) and link management (LM). The wireless frequency hopping layer passes The 2.4GHz unlicensed ISM frequency band microwave realizes the filtering and transmission of data bit streams. This layer protocol mainly defines the conditions that the Bluetooth transceiver needs to meet to work normally in this frequency band. The baseband is responsible for frequency hopping and Bluetooth data and information frames. Transmission. Link management is responsible for connecting, establishing and tearing down links and performing security control.1.3 TopologyThe Piconet (micronet) structure using Bluetooth technology networking is a network composed of multiple devices sharing the same channel. This topology divides the devices into master devices and slave devices. The master device that proposes communication requirements communicates passively The device is called a slave device. A master device can communicate with up to 7 slave devices at the same time, and can connect multiple sleep devices that are synchronized but not communicating. All devices are equal during operation, and there is no master-slave Scatternet (distributed network) of Bluetooth is formed by multiple independent and asynchronous piconets communicating with each other.1.4 Authentication technologyAuthentication technology is an important performance indicator to distinguish between traditional radio frequency technology and Bluetooth technology. The authentication and encryption services for devices are provided by the physical layer. Authentication authentication adopts password-response mode, through personal identification code PIN, 128-bit The random number and the BD_ADDR of the device are generated and a matching 128-bit authentication word is generated. Through authentication, a link word is created for them, and the Bluetooth device can store the link word for future authentication, avoiding entering the PIN code for each authentication .In the connection process, authentication is an extremely important part of any Bluetooth system. It allows users to add their own trusted Bluetooth devices, and through reverse authentication, the establishment of One-to-one correspondence, during data transmission, a dedicated data channel is established through a unique link word for transmission. Other Bluetooth devices with different link words in the network are still in a dormant (PARK) state and do not participate in data transmission and receiving activities. If the user If there is a higher level of confidentiality requirements, an effective transport layer and application layer security mechanism can be used for encrypted transmission. Through the authentication and identification mechanism, the main device in the network can accurately identify a certain device in the network, and establish Link, to accurately communicate and control the device with instructions and data, and return the control status information through the link. This technology solves the problem of mutual identification between devices.With the above series of advantages, the Bluetooth technology can effectively overcome and solve the problems existing in the networking process mentioned above, and select technical means for the best networking.2. Application of Bluetooth technology in network appliancesThrough the four basic access modes of the Bluetooth technical specification, electrical network construction and data exchange can be carried out. Through the Bluetooth Access Application Mode (GAP), the Bluetooth units can discover and establish connections with each other; through the Service Discovery Application Mode (SDAP), the interface of the discovery protocol , to send a "send" or "receive" request signal to other Bluetooth units; through the serial port application pattern (SPP), a virtual serial port is established between two Bluetooth units; through the general object exchange application pattern (GOEP), the data is passed through the virtual The serial port is transmitted to another Bluetooth unit. Using the Bluetooth technical specification, a new centralized remote control mode of the electrical network is realized. It truly realizes "zero wiring, plug and play".In the centralized remote control structure of the entire network system, the network appliance centralized controller is the Bluetooth master device controlled by the core of the entire system, which acts as a bridge. Through the centralized controller keyboard, Internet, telephone and other communication methods, it accepts user operation instructions, And according to the user's work requirements for the designated household appliances in the network, the control command is sent to the designated controlled network through the Bluetooth device in a timely and accurate manner to control its work from the Bluetooth slave device, and the operation control status data of the designated electrical controlled terminal is sent through The bluetooth of the controlled end returns to the centralized controller, and notifies the user of the result through voice and WEB, realizing the centralized control and remote management of network appliances.In the network appliance centralized controller, every time a new legal network appliance is added, Bluetooth authentication is performed, and the link word between the network appliance centralized controller and the appliance is created, confirmed as a legal device in the network, and stored for subsequent use Authentication is used to distinguish critical peripheral non-network electrical equipment to achieve precise control. In the electrical client, a Bluetooth receiving and sending control device is also embedded. The instructions issued by the centralized controller are transmitted to the designated client via the Bluetooth wireless network , and judge and identify the received instructions, and control according to the instruction requirements. At the same time, through the electrical appliance working status detection unit, the real-time working status of the electrical appliances under control is detected, and the detection results are fed back. Through the wireless Bluetooth network, The real-time feedback is transmitted to the centralized controller, and the user is notified of the current working status of the controlled electrical appliances in real time through voice or WEB, thereby completing a complete real-time remote wireless control.SummarizeCompared with the traditional wireless transmission technology, Bluetooth technology has incomparable advantages. This technology solves the long-term broadcast transmission mode of radio frequency wireless technology that can only be one-to-many, and uses authentication technology to realize one-to-one secure authentication transmission. Mode. It is a new type of transmission standard. There are more and more products based on Bluetooth technology. In short, the wide application of Bluetooth technology will bring more convenience to people's life and work.The above are the details of the application of Bluetooth technology in the construction of centralized remote control of electrical appliances network introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. If you have Bluetooth product design and development needs, you can trust us. We have rich experience in custom development of smart electronic products. We can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, BLE Bluetooth IC, dual-mode Bluetooth module, wifi module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the research and development of electronic education products.
06-12
2023
In recent years, Bluetooth technology has enjoyed unprecedented popularity and development speed, and its coverage on mobile devices is even more amazing. In fact, Bluetooth has become the primary connection method for wireless accessories and smart devices. Unfortunately, recent research has shown that the two-level stream encryption scheme adopted by Bluetooth has many flaws, and user privacy is potentially compromised. On the other hand, new communication software that uses Bluetooth to transmit information is used in illegal and criminal activities, seriously affecting social harmony and stability. Faced with the development of Bluetooth technology, we should actively take countermeasures and strengthen research in the direction of Bluetooth sniffing.1. Bluetooth sniffing technical background1.1 Bluetooth technologyBluetooth technology is a wireless data exchange method that supports short distances. A Bluetooth network established by a master device and one or more slave devices is called a piconet (Piconet). Bluetooth technology is widely used in short-distance wireless communication because of its low power consumption, low cost and strong flexibility. According to practical needs, the maximum transmission power of Bluetooth devices is also divided into three levels, and its coverage also changes with the power. Currently, the Bluetooth SIG oversees research on the Bluetooth specification, manages the certification program, and maintains trademark rights.1.2 Radio layerThe lowest layer of the Bluetooth protocol stack is called the radio layer. Bluetooth technology adopts the 2.4GHz working frequency band, which is an open and common wireless frequency band (ISMBand) all over the world, without payment and application, which ensures that Bluetooth can obtain a wider range of use. Bluetooth uses frequency hopping technology and performs frequency hopping at a rate of 1600 hops/s. The transmitted data will be divided into multiple data packets, and the data packets will be transmitted separately through the designated 79 Bluetooth channels. Each channel occupies 1MHz. Bluetooth's The actual use band is 2400MHz~2483.5MHz (including the guard band). This approach leads to difficulties in selective interception, since the attacker often needs to know the consecutive hopping sequences.1.3 Baseband layerThe baseband layer is responsible for managing the physical connection and ensuring the physical connection between the units in the piconet composed of Bluetooth devices by radio frequency. Each Bluetooth device has a unique 48-bit Bluetooth device address (BD_ADDR), which is divided into 3 parts, including 24-bit low-end address part (LAP), 8-bit high-end address part (UAP) and 16-bit non- Effective Address Part (NAP). This address can be said to be the computing core of Bluetooth technology, responsible for almost all the control parameters of Bluetooth normal work, such as keys and frequency hopping sequences are calculated from this address.1.4 Packet structureAll Bluetooth data packets are encapsulated according to a unified structure, consisting of access code, header and payload. A valid data packet must contain an access code, which is used for data synchronization and DC offset compensation. A simplest bluetooth data packet, such as an ID packet used for paging, inquiry and corresponding process, can only contain a 68bit access code. There is a very important package in the Bluetooth communication process - the Frequency Hopping Synchronization (FHS) package, which contains the BD_ADDR and clock information of the Bluetooth device.1.5 Connection establishmentFor Bluetooth data transfer, a connection must first be established. First, the master device broadcasts an ID packet as a query. At this time, 32 broadcast channels out of 79 Bluetooth channels are used. After the slave device receives this packet, it will send an FHS packet, which contains the BD_ADDR and clock information of the slave device. The master device that receives the FHS packet enters the paging state, and calculates a specific response time according to the frequency hopping sequence of the slave device, and sends the ID packet. The slave device will scan the external paging at regular intervals, and after receiving the response ID packet from the master device, it will send an ID packet in response to the response. After the master device receives the slave device ID packet, it sends an FHS packet to determine the frequency hopping sequence of the connection. Finally, the master and slave devices respectively send ID packets and FHS packets to verify and establish a connection.In the piconet, all devices share the clock of the master device, with a clock cycle of 312.5 µs, and two cycles constitute a time slot of 625 µs. Normally, the master device transmits data from even-numbered slots, and the slave device transmits data from odd-numbered slots.2. Bluetooth sniffing scheme2.1 Difficulties in Bluetooth sniffingThe first hurdle in Bluetooth sniffing is intercepting the Bluetooth frequency hopping sequence. If you want to obtain a complete Bluetooth data transmission, you need to monitor all 79 Bluetooth channels, and you must intercept and filter to obtain complete data packets, which requires you to know the correct Bluetooth frequency hopping sequence. There are two ways to obtain the Bluetooth frequency hopping sequence, one is to rely on powerful hardware and software equipment, and the other method needs to wait for the device to re-establish the connection, and obtain the frequency hopping sequence from the data packet that establishes the connection.Another problem is that common Bluetooth hardware automatically filters based on the access code of the packet. Since the filtering behavior occurs at the hardware level, it cannot be solved by the design of the upper layer software, and must rely on corresponding hardware devices to solve this problem.2.2 Bluetooth packet capture tool WiresharkWireshark is widely used as a commonly used packet capture tool. The Bluetooth protocol standard has been added to Wireshark above 1.12, which means that the captured Bluetooth data packets can be analyzed through Wireshark, which provides great convenience for sniffing work. At the same time, Wireshark also provides the function of monitoring the Bluetooth interface of the machine, which can monitor the Bluetooth devices connected to the machine. Figure 1 shows the Bluetooth packet information captured by Wireshark. Figure 1 shows some data packets in the process of establishing a connection between the computer and the Bluetooth headset. Number 27 is a data packet broadcast and transmitted by the computer as the master device to inquire about nearby Bluetooth devices. No. 28 to No. 31 are the query responses from the Bluetooth headset to the computer, and the three data packets except No. 28 all contain the BD_ADDR of the headset. Since then, the computer and the Bluetooth headset gradually establish a Bluetooth connection by sending data packets to each other.2.3 Bluetooth wireless development platform UbertoothUbertoothOne is a hardware for Bluetooth research designed and provided by the Ubertooth project team. Ubertooth is an open source 2.4GHz wireless development platform for Bluetooth monitoring. UbertoothOne is also connected to the computer through the USB interface.The real-time Bluetooth spectrum information can be visually observed by using the SpecanUI tool, as shown in Figure 2. In the observation in Figure 2 there is a Bluetooth headset connected to the mobile phone.It can be found that active wireless signals are mainly concentrated between 2403Hz and 2446Hz, which means that the data transmission between the mobile phone and Bluetooth is mainly concentrated on these channels. In addition, 2402Hz, 2426Hz, and 2480Hz are fixed broadcast channels, which are used to send broadcast data between unconnected devices, establish connections and discover remote devices. These 3 channels also have obvious characteristics in the frequency spectrum.UbertoothOne can also support functions such as selecting the channel to monitor, or capturing Bluetooth data packets. The captured Bluetooth packets can be analyzed by software such as Wireshark. Sending Bluetooth data packets through UbertoothOne is currently not possible, which means that UbertoothOne cannot be used to inject Bluetooth data packets.in conclusionThere are still many difficulties in the realization of the Bluetooth sniffing scheme. On the other hand, the high threshold also put an end to the attempts of a large number of criminals to use Bluetooth to steal citizen information. However, software that communicates via Bluetooth, such as FireChat, is often used in illegal and criminal activities, which has seriously endangered public safety. In-depth research on Bluetooth technology and active research on Bluetooth sniffing solutions can not only solve current problems, but also prepare for future Bluetooth security issues.The above is the Bluetooth sniffing solution technology introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have Bluetooth product design and development needs, you can trust us. We have rich experience in custom development of smart electronic products. We can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, BLE Bluetooth IC, dual-mode Bluetooth module, wifi module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the research and development of electronic education products.
06-11
2023
Design of bluetooth control car based on Arduino environmental data detectionWith the development of science and the continuous improvement of social productivity, the content of environmental monitoring has gradually developed from the monitoring of industrial pollution sources to the monitoring of the environment. Environmental monitoring has been paid more and more attention by people, but the addition of new technologies and methods is still in the research and development stage, mainly using manual and semi-automatic methods to collect environmental factors, with low efficiency and poor accuracy. Establishing a fast, simple and accurate environmental detection method is conducive to the realization of environmental supervision and control. Arduino is an open-source electronic design platform for single-chip microcomputers. There are many interfaces designed for sensor modules on its hardware development board. Just plug in the corresponding packaged modules, and it can read the signals obtained by the sensor from the outside world and program them. Under the command of the corresponding feedback, improve the efficiency of the program. The paper proposes an Arduino-based environmental data detection bluetooth control car design, which controls the left and right, forward and backward movements of the car through the bluetooth of the mobile phone, transmits the environmental data collected by the sensor on the car in real time, and triggers an alarm when the concentration value exceeds the threshold device.1. Design of environmental data monitoring car systemThe system uses the Arduino single-chip microcomputer as the core control board, and simultaneously completes the control of the car status and the sending, receiving and display of environmental data through the Bluetooth of the mobile phone.In the figure, the power supply part is composed of a lithium battery pack and a linear DC regulated power supply to provide a stable driving current for the driving motor of the trolley system; There is a DC motor to control the left and right rotation, forward, backward and stop of the car; the temperature and humidity sensor and the combustible gas sensor are connected to the Arduino main control for the collection of environmental data. The Bluetooth module realizes the communication between the car and the mobile phone, so that the car can receive the instructions sent by the mobile phone and transmit the collected data back to the mobile phone, and control the movement of the car through the mobile phone.2. Bluetooth smart car hardware designThe hardware part mainly includes Arduino development board, HC-05 Bluetooth module, DHT11 temperature and humidity sensor, MQ-2 smoke and gas sensor module, L298N motor drive module, DC gear motor, etc. Among them, the Arduino development board is the control center of the car system, and the Bluetooth module is the communication module between the mobile phone and the car. The motor drive module drives the forward and reverse rotation of the DC deceleration motor to control and change the motion state of the car. The DHT11 temperature and humidity sensor and the MQ-2 smoke and gas sensor are used as the environmental data acquisition module to detect the temperature, humidity, smoke or combustible gas concentration. .In this design, pin 0 (RX) and pin 1 (TX) of the Arduino control board are respectively connected to the TX and RX pins of the Bluetooth module; the IN1, IN2, IN3, IN4 interfaces of the L298N motor drive module are connected to the The modulated pins 6, 9, 10, and 11 are connected; the temperature and humidity module is connected to the digital pin 5; the smoke and gas sensor needs to be connected to the analog serial port, so connect it to the A0 port, and the beeper associated with its function The buzzer is connected to pin 2. After the pin allocation of the Arduino development board is completed, connect the OUT1 and OUT2 output ports of the L298N motor driver module to the left DC geared motor, and connect the other side to the right DC geared motor in the same way.2.1 Arduino main controller unitThe Arduino controller mainly includes single-chip microcomputer, digital serial port, analog serial port, crystal oscillator and 5V voltage regulator and other components (as shown in Figure 3). The development board is connected to the computer through the USB data interface to compile and import the program. After writing the program code in the IDE, the program is uploaded to the Arduino development board through the USB interface, and the single-chip microcomputer on the development board performs program execution and data processing. Pins 3, 5, 6, 9, 10 and 11 of the Arduino UNO development board designed in this design have pulse width modulation (PWM) function, which can provide the function of speed regulation of steering gear, motor drive module and other components.2.2 Data Acquisition UnitThe environmental data acquisition function mainly relies on the digital temperature and humidity sensor and MQ-2 smoke and gas sensor to realize the detection of temperature and humidity and the concentration of smoke or combustible gas.(1) DHT11 temperature and humidity sensor: DHT11 digital temperature and humidity sensor mainly includes acquisition technology and sensing technology. The sensor includes wet resistance and NTC resistance. Its internal schematic diagram is shown in Figure 4. Wet resistance is to cover a layer of film on the substrate, the film is made of moisture-sensitive material. When the moisture-sensitive film is in contact with water vapor in the air, the resistance value of the element will change with the change of hydrogen ion concentration in the process of moisture absorption and dehumidification, and the built-in conversion circuit will calculate the final voltage change and compare it with the change of humidity. Corresponding, so that the humidity in the environment can be measured. NTC resistance, that is, negative temperature coefficient resistance, means that when the ambient temperature rises, the resistance value decreases, and the voltage output will also increase accordingly, and the conversion circuit makes the voltage value correspond to the ambient temperature according to the corresponding change.(2) MQ-2 smoke gas sensor: The gas sensitive resistor is the core component of the MQ-2 smoke gas sensor to measure the concentration of combustible gas. It converts the detected combustible gas concentration into a voltage and uploads it to the microcontroller. There are two types of gas sensitive resistors, P-type semiconductors and N-type semiconductors. When it is under normal conditions, the gas-sensitive resistor of N-type semiconductor is in the state of anion deficiency. When the gas-sensitive resistor is in contact with flammable gas molecules, electrons will move from flammable gas molecules to N-type semiconductor, semiconductor The resistance value of will also decrease, thus changing the voltage value of the circuit. For the gas-sensitive resistor of the P-type semiconductor, the cation is absent, and the resistance of the semiconductor will increase. Since the temperature has a great influence on the conductivity of the semiconductor, it needs to be heated when the MQ-2 smoke gas sensor is used to measure the concentration of flammable gases.2.3 Communication unitThe mobile phone communicates with the detection car through the Bluetooth module, and sends the detected environmental data back to the Bluetooth serial port assistant APP of the mobile phone through the Bluetooth module, so as to realize the real-time monitoring of the environmental parameters by the mobile phone and the forward, backward and direction control of the car. The HC-05 Bluetooth module is paired with the mobile phone Bluetooth to realize the communication function. The HC-05 Bluetooth module has six pins: VCC, GND, TXD, RXD, KEY, LED. When the Bluetooth module is in different communication states, the pins on the module The indicator light will show different flashing states, which is convenient for users to judge whether the Bluetooth module is working normally. If the KEY is connected to a high level or the Bluetooth module is powered on at the same time, the indicator light will flash slowly once per second, and the module enters the AT state and cannot perform pairing tasks; The frequency flashes twice. When the Bluetooth module is paired successfully, the indicator light will turn into a double flash state, flashing once every two seconds. When the KEY is connected to a high level in the matching state, the module will exit the matching state and enter the AT state, but at this time the flashing frequency of the indicator light is consistent with the state of the indicator light in the matching state.2.4 Bluetooth smart car motion unitThe movement function of the car is mainly realized by the L298N motor drive module and DC3V-6V DC gear motor. L298N (as shown in Figure 5) has two built-in H-bridges to maintain the voltage across the motor between high and low levels. In addition to converting the 12V power supply into 5V power supply to the development board, this module can also drive and control two motors. When the enable terminals ENA and ENB are both high, the different states of the DC geared motor can be controlled by combining different IN1 and IN2 states. state of motion.Before performing pulse width modulation on the DC motor to adjust the motor speed, it is necessary to determine the connection between the IN1 and IN2 ports and the DC motor, and determine the rotation direction of the motor. After determining the direction of rotation of the DC motor, the corresponding relationship between the pins of the microcontroller and the left and right motors is determined through the program. When the speed of the DC geared motor needs to be adjusted, the PWM pulse is output for speed regulation. When the IN1 and IN2 interfaces are both in the 0 state or both in the 1 state, the corresponding DC motor controlled by the two output interfaces brakes.3. Software design of bluetooth environmental data detection carThe software part adopts modular design, which is mainly divided into main program, data acquisition program, Bluetooth communication program, and car motion control program. The program design flow chart is shown in Figure 7. When a certain function program is designed, it will be imported to the Arduino development board , after importing, check whether the function is realized normally. If it can be realized normally, then design the next function program. If the function cannot be realized normally, then re-debugging this part of the program, when the four parts of the function program are completed, then combine the four parts of the function program, continue to import the program and debug, when all the functions are realized, the program design is completed .The mobile phone communicates with the detection car through the Bluetooth module, sends different commands to realize the control of the car, realizes the mobile phone's forward, backward and direction control of the car, and sends the detected environmental data back to the Bluetooth serial port assistant APP of the mobile phone through the Bluetooth module. An alarm is issued when the environmental data exceeds the threshold.SummarizeThis design completes the system design for the bluetooth control car for environmental data collection, communicates with the data collection car through the mobile phone bluetooth, wirelessly controls the movement state of the car, and the bluetooth control range is within 10m, and transmits the data collected by each sensor through the bluetooth module Go back to the bluetooth serial port assistant APP on the mobile phone, and realize the alarm function according to the smoke concentration.The above are the design details of the Arduino-based environmental data detection Bluetooth control car introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. If you have Bluetooth product design and development needs, you can trust us. We have rich experience in custom development of smart electronic products. We can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, BLE Bluetooth IC, dual-mode Bluetooth module, wifi module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the research and development of electronic education products.
06-10
2023
Summary of the main principles of Bluetooth technologyPeople use more and more electronic devices, and with the increase of information exchange between electronic devices, the connection and winding of cables has become very messy. In order to save cables and simplify the connection between devices, it is necessary to design a technology to eliminate the "last" connection.In 1994, in a research project called "Multi-Communicator Link (Multi-Communicator Link)" by the Mobile Communications Department of Sweden's Ericsson, engineers discovered a low-frequency wireless band that can be used without permission, and developed A small wireless transceiver chip, using radio frequency technology to achieve low-cost, low-power wireless interconnection between mobile phones and surrounding devices, they named this interconnection technical specification Bluetooth (Bluetooth).1. The concept of BluetoothBluetooth (Bluetooth) technology is actually a short-range wireless communication technology. The use of "Bluetooth" technology can effectively simplify the communication between mobile communication terminal devices such as handheld computers, notebook computers and mobile phones, and can also successfully simplify the communication between these devices and the Internet, making these modern communication devices and Internet data Transmission becomes faster and more efficient.Bluetooth technology has the following obvious technical characteristics: it can transmit voice and data at the same time; it uses a universal frequency band; low cost, low power consumption and low radiation; it can be applied to various electronic devices; it has network characteristics, etc.2. Bluetooth device structureThe principle is to embed a small and low-power radio transceiver chip into traditional electronic equipment. The Bluetooth chip includes a radio transceiver and a link controller (LC). The wireless transceiver is the core of the Bluetooth device, and the radio frequency band used is between ISM2.4GHZ and 2.48GHZ. The control connection consists of two parts: software connection - Link Manager (LM) and hardware - Link Controller (LC). LM executes link setting, supervision and configuration; it is responsible for connection, establishment and teardown of links and security control. LC implements data sending and receiving. Logical LC and adaptation protocol have the functions of completing data disassembly, controlling service quality and multiplexing protocol. This layer protocol is the basis for the realization of other layers of protocols. Figure 1 shows the main operation and functions of the wireless transceiver. The Bluetooth link controller implements the baseband communication protocol and related processing procedures. Figure 1 also summarizes the main functions of the baseband, which is responsible for frequency hopping and the transmission of Bluetooth data and information frames.3. Bluetooth baseband layer protocol system1. Bluetooth frequency hopping technologyFrequency hopping technology is the data sent on each time slot in the physical channel, constantly jumping from one channel to another. The master device and the slave device will hop from the current channel to the next channel according to the same frequency hopping sequence as each other. The frequency hopping sequence is determined by the 48-bit BD_ADDR (Bluetooth device address) address in the master device.2. Bluetooth device addressThere is a unique 48-bit BD_ADDR (Bluetooth Device Address) address in the Bluetooth device. This address can be said to be the computing core of Bluetooth technology. Almost all control parameters responsible for the normal operation of the Bluetooth system, such as frequency hopping sequence, channel access code, and encryption key, are obtained from this address. The addresses involved in the device still include AM_ADDR (Active Member Address) active member address, PM_ADDR (Parked Member Address) waiting member address, and AR_ADDR (Access Request Address) access request address.3. Bluetooth data transmission typeBluetooth technology can send voice and data at the same time, because Bluetooth technology supports both circuit switching and packet switching data transmission methods. In the Bluetooth technology standard, the transmission of circuit switching is called SCO link, and the transmission of packet switching is called ACL link.SCO Link Connection-Oriented Synchronous Transmission (Synchronous Connection-Oriented, SCO) link belongs to the synchronous transmission type of circuit switching. Circuit switching means that once the connection between the master device and the slave device is established, the system will reserve time slots at fixed intervals for the master device and the slave device regardless of whether there is data to be sent, and other slave devices cannot use the time slot on this connection to send data. SCO is a point-to-point symmetric connection, that is, the connection is established between a master device and a slave device. SCO is more suitable for voice transmission.ACL link connectionless asynchronous transmission (Asychronous Connection-Less, ACL) link belongs to the asynchronous transmission type of packet switching. Packet switching is to cut the high-level data into segments for switching. The ACL link can occupy any time slot to transmit data, but it can only transmit on the time slot not used by the SCO link. The ACL link is suitable for transmitting bursty data information, and its master device can establish ACL links with multiple slave devices at the same time, which is a point-to-multipoint asymmetric connection.4. Bluetooth piconet and scatternetAfter two Bluetooth devices establish a connection, a personal area of a piconet is formed. Each piconet has one and only one master device, and one or more slave devices at the same time, and they can switch roles with each other. Each piconet can only have 7 active slave devices, because in the Active state, the master device assigns an active member address AM_ADDR to each connected slave device, and the master device uses this address to identify different slave devices in the piconet equipment. AM_ADDR consists of 3 bits, so there can only be up to 8 devices in a piconet. In other words, up to 7 slave devices are active. Each piconet has a maximum of 255 sleeping slaves. Because the Bluetooth device entering the Park state from the Active state will get a PM_ADDR address, and PM_ADDR is composed of 8 bits, so it can accommodate up to 256 Bluetooth devices in the Park state. A piconet consists of a shared channel through which its members communicate. This channel consists of an explicit frequency hopping sequence, which is tracked by the members of the piconet in a synchronized manner and controlled by the master device.In order to connect more than 8 active devices, multiple micro-networks must be established, and then the main device of each micro-network must be connected. This combined structure is a scatternet. Scatternets overlap in space and time. A slave device in one microgrid can be a slave device of multiple microgrids, or a master device of another microgrid, which makes communication between microgrids possible. Because there are only 79 frequency points, a scatternet has at most 10 microgrids.5. The working status of the Bluetooth deviceBluetooth devices have different working states in different occasions. There are two main working states: connection state (Connection State) and waiting state (Standby State). When it is connected with other devices, it is called the connection state. At this time, the master device and the slave device use the same channel access code and the same frequency hopping sequence to communicate with each other. When it does not interact with other devices, it is called a waiting state. At this time, the device operates with the default system timing CLKN, and consumes very low power. Before the device enters the connection state from the waiting state, the device needs to perform a series of signal query and call procedures. The states where inquiries and calls are made are called intermediate states. Figure 4 shows the transitions between the three states.(1) Bluetooth device connection status:In order to save power consumption and reduce interference to other users, the slave device does not transmit data for a long time. When it wants to connect with the master device in the master-slave network, the slave device can choose to enter different connection states.In the active (Active) state, the slave device is basically always listening to the transmission signal from the master device. In the Active state, the slave device has the AM_ADDR address and the same frequency hopping sequence as the master-slave network. Since the Active state has been receiving packets and is ready to send packets at any time, this state provides the fastest response. But it also consumes the most power.The slave device is activated periodically in the Sniff state. The master device periodically sends packets to the slave device at a certain time interval, and the slave device only needs to receive the signal sent by the master device within these time intervals, but the slave device still retains AM_ADDR and the same frequency hopping sequence as the master-slave network. Compared with Active, Sniff mode consumes less power and responds slower.In the hold (Hold) state, the slave device completely stops listening to packets within a specified time interval, which is determined by the agreement between the master device and the application program in the slave device, and the slave device will resume the original model. In Hold mode, the slave device will temporarily stop supporting the ACL link, but still supports the SCO link, so the slave device still has the AM_ADDR address and the same frequency hopping sequence as the master-slave network. The response in Hold mode may be slower than Sniff mode, but it can save more power.In the dormant (Park) state, the slave device remains synchronized with the frequency hopping sequence of the master device, but is not active (the slave device in Active, Sniff, and Hold modes is considered active). In Park mode, the slave device will discard the AM_ADDR address and get the PM_ADDR and AR_ADDR addresses from the master device. In the master-slave network, the slave devices in Park mode have a specific PM_ADDR address, but AR_ADDR may be the same as other slave devices. When the master device wants to wake up a slave device in the Park state, it sends the PM_ADDR address of the slave device on the broadcast channel BC, and at the same time specifies the AM_ADDR address of the slave device after it is called the Active state. Through the broadcast channel BC, the master device can wake up multiple slave devices in the Park state at the same time. When the slave device wants to recover from the Park state to the Active state, it also requests the master device with the AR_ADDR address on the broadcast channel BC. After the master device receives it, it sends a control signal to wake up the slave device from the Park state.(2) The intermediate state of the Bluetooth device:When the master device does not know whether there are slave devices around, it must query the state to get the BD_ADDR address and internal timing of all the surrounding slave devices, and then enter the call state to connect with the slave devices. If the master device already knows the slave device to be connected, it can directly enter the call state to connect with the slave device.In the figure, the device in step 1-3 enters the query state; in step 4-5, the slave device enters the query response state after receiving the query signal. After the end, the master device has received the FHS packet responded by the slave device, including the BD_ADDR address of the slave device , internal timing and device type; step 6-7, the master device enters the call state and establishes a connection with a specific slave device, but at this time the timing of the master and slave devices is not synchronized; step 8-10, the slave device enters the call after receiving the call signal Response state, return the ID packet as a response; Step 10-13 After receiving the ID packet, the master device enters the master device response state, and then sends a FHS packet to inform the master device of the BD_ADDR address, connection member address and other information. An ID packet is returned, the connection between the master and slave devices is successfully established, and both devices enter the connection state.SummarizeBluetooth technology has a wide range of applications and has been applied to various fields, such as various data and voice devices in local area networks: PCs, dial-up networks, notebook computers, printers, fax machines, digital cameras, mobile phones and high-quality earphones. The Bluetooth wireless communication method connects the above-mentioned devices into a piconet (Piconet), and multiple piconets can be connected to each other, and various devices can communicate anytime and anywhere.The development of Bluetooth is not the development of one industry, but the common development of multiple industries. It needs the promotion of various industries to have a longer-term development. With the development of the times and the improvement of technology, the development of Bluetooth technology has a bright future. Bluetooth will have a significant impact on our life and work.The above are the details of the Bluetooth baseband protocol principle introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. If you have Bluetooth product design and development needs, you can trust us. We have rich experience in custom development of smart electronic products. We can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are a number of chip agents at home and abroad, including MCU, voice IC, BLE Bluetooth IC, dual-mode Bluetooth module, and wifi module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the research and development of electronic education products.
06-09
2023
Design of Motion Detection System Based on Bluetooth TechnologyWith the development of sensor technology, modern industrial control has become more precise, and more real-time detection and processing sensors have been widely used. In vehicle applications, the traditional sensor measurement and control network is a wired monitoring network, which uses shielded wires or wires for signal transmission. Many different sensor devices are integrated into the car control system to measure whether the car is functioning properly. Fault diagnosis and other operations can be performed by viewing the parameter values of each sensor in the car, but the research on the overall motion detection sensor of the car body is still shallow. Therefore, this paper proposes a vehicle-mounted motion detection device based on Bluetooth wireless technology, which is a networked intelligent sensor based on TCP/IP protocol. Compared with ordinary fieldbus-based sensors, the sensor is not only small in size, but also easier to install. The sensor is suitable for installation in various positions inside the vehicle. The system is distinguished from the vehicle control system and other detection systems through Bluetooth wireless signal transmission to reduce signal redundancy and signal congestion. Therefore the system can be called a stand-alone motion detection device.In many applications, it is very important to obtain information about its own motion state from within itself without relying on the outside world, and the inertial measurement unit plays this role. The Inertial Measurement Unit (IMU) is composed of a micro gyroscope, a micro accelerometer, an application specific integrated circuit (ASIC), an embedded microcomputer and corresponding software. It uses an I2C bus interface internally to measure the angular velocity and acceleration of the carrier, etc. Information is a type of MEMS. Micro-Electro-Mechanical Systems (MEMS) put complex systems with specific functions on a small silicon chip at a lower cost, and combine various micro-detection sensors and micro-mechanical devices with microelectronics. The integration of components makes the system more integrated and the size of the sensor smaller.1. Function analysis of motion detection systemIn order to analyze the Bluetooth wireless attitude detection sensor, the system can be divided into three parts according to the data transmission process:(1) Sensor data acquisition module. Use algorithms such as dynamic Kalman filter to collect, filter and integrate the original sensors; (2) Sensor data wireless transmission module. Master and use the parameters and configuration of the Bluetooth sending module; (3) Data display and storage module. Use the mobile app to receive and save data.2. The overall design of the motion detection systemThis system includes software and hardware design. The hardware circuit uses STM32 series ARM chips, uses the I2C bus communication method to communicate with the accelerometer gyroscope, and uses the serial port to communicate with the Bluetooth chip HC05, and the Bluetooth module sends data to the Android phone. Software programming Use Keil, IAR, Eciplse software to program the module. Use Keil software to complete the collection of sensor data information and data packaging processing; use IAR to complete the configuration operation processing of the Bluetooth module, set the Bluetooth transmission mode, baud rate and other parameters; use Eclipse to complete the programming of the mobile terminal App, use the mobile phone to automatically The built-in Bluetooth communication interface acquires data, then parses and unpacks the data, displays the obtained data on the screen of the mobile phone and saves it.3. Block diagram of motion detection system hardware design3.1 IMU inertial measurement unitThe main control chip of the IMU is STM32F103T8, ARM 32-bitCortex-M3 core, which has 64 KB flash memory, 20 KB running memory, 7-channel DMA, and 7 timers. Through the 8 MHz crystal and the PLL inside the STM32, the controller can run at a main frequency of 72 MHz. Since the attitude calculation requires a large amount of memory for mathematical operations, a chip with a faster processing speed is used for more calculation optimization.The sensor on the IMU is connected to the STM32 through the I2C interface, and the data interrupt pin of the sensor is connected to the IO of the STM32, so that after the sensor completes the ADC conversion, the STM32 can read the latest and fastest data in the first time and respond quickly change, get the status and conversion results of each sensor. Among them, the MPU6050 is an integrated 6-axis processing motion component, including a three-axis gyroscope and a three-axis accelerometer, which can accurately track fast and slow motion. The HMC5883 uses Honeywell's geomagnetic sensor, which has a low-sensitivity solid-phase structure for orthogonal axes, and can be used to measure the direction and magnitude of the Earth's magnetic field. BMP180 is a pressure sensor with high precision and ultra-low energy consumption, which can be converted into altitude after measuring atmospheric pressure.3.2 Bluetooth moduleThe SPP-C Bluetooth module used by the sensor is an intelligent wireless data module that follows the V2.1+EDR Bluetooth specification. Except P12 and P5 are special I/O ports, other P ports are programmable input/output interfaces, and the serial ports UART-TX and UART-RX both use CMOS interfaces. This module is mainly used in the field of short-distance wireless data transmission. It can be easily connected with the Bluetooth device of the PC, and the data can also be communicated between the two modules.4. Motion detection system sensor software design4.1 IMU sensor data acquisitionThe IMU data acquisition process includes the initialization of the data acquisition and processing chip STM32 and the three sensors, that is, first power on and initialize the STM32 chip system, complete the I2C interface initialization and serial port initialization, and then initialize the configuration of the three sensors.(1) Initialize MPU6050: MPU6050 initialization is shown in Figure 5, and the software configuration process is as follows: (1) Reset MPU6050 by power management register 1 (0X6B); (2) Configure by gyroscope configuration register (0X1B) and acceleration sensor The register (0X1C) sets the full-scale range of the angular velocity sensor and the acceleration sensor; (3) The interrupt is configured by the interrupt enable register (0X38); (4) The AUX I2C interface is set by the user control register (0X6A); (5) The FIFO enables (6) Configure the sampling rate of the gyroscope by the sampling rate frequency division register (0X19); (7) Set the digital low-pass filter by the configuration register (0X1A); (8) Configure the digital low-pass filter by the power management register 1 (0X6B) Set the system clock. Generally, the x-axis gyro PLL is selected as the clock source to obtain a higher-precision clock; (9) The angular velocity sensor (gyroscope) and acceleration sensor are enabled by the power management register 2 (0X6C).(2) Initialize HMC5883: The HMC5883 initialization program is shown in Figure 6. Set the working mode 0 of HMC5883 in the software, which is the continuous measurement mode. In continuous measurement mode, the device measures continuously and updates the data to the data register. The sampling average number in the process of measuring the output is set by the configuration register A as 8 cycles, and the output rate is 75 Hz. Then use the standard magnetic field generated inside the HMC5883L sensor for preliminary calibration, and finally read the value of the calibrated magnetometer ADC.(3) Initialize the BMP180: it needs to be configured in the software: (1) issue a pressure (or temperature) conversion command; (2) read the original data from the UP (UT) register after a period of time; (3) to get the Celsius The temperature and hPa pressure need to use the correction data, which are stored in the E2PROM of the BMP085, and can be read out during initialization through I2C.4.2 Bluetooth wireless module configurationBluetooth HC05 is a master-slave integrated Bluetooth serial port module, which can make it work in the master or slave state. When the Bluetooth device is successfully paired and connected, it does not need to consider the internal communication protocol of Bluetooth, and directly uses Bluetooth as a serial port. After the connection is established, the two devices share a channel, one device sends data to the channel, and the other device can receive the data in the channel. In order to establish this channel connection, Bluetooth needs to be set to AT mode for pairing connection. Use the AT command of the Bluetooth module to configure it, and set the module to slave mode.5. Mobile Android software5.1 Overall Design of Motion Detection SystemIn order to complete the software development of the mobile App, first establish its use case diagram to describe the purpose of the user using the App. First, the user opens the App icon to enter the software, completes the matching and connection of the Bluetooth device, and then selects the data information that the user wants to obtain according to the user's needs, and finally the user saves the required data information. According to the realized function, it is divided according to the method of the realization class. It involves bluetooth communication service, the event monitoring and processing mechanism in the interaction between the user and the mobile phone graphical interface, and the real-time dynamic refresh display of data. Use case diagrams and deployment diagrams are designed while designing the software.5.2 App Implementation FrameworkThe functions provided by the application are listed in the AndriodMenifest.xml file, and all components that need to be used must be configured and registered here, including Activity, Intent, Service and ContentProvider. When using the built-in applications in the system (such as telephone service, Internet service, SMS service, GPS service, etc.), you need to declare the usage permission in this file. This file is also required by all Android applications and describes the package. Global variables, including public application components and the implementation class of each component, as well as operable data resources, running space, etc.Activity in the software is the core class of Android, and its function is equivalent to the main function in c. The full name of this class is android.app.Activity. Activity is equivalent to a form (Form) in a C/S program or a page of a Web program. Each Activity provides a visual area. Various Android controls can be placed in this area, such as buttons, images, text boxes, etc.The AndroidMenifest.xml file configures the Android running version conditions of the software, and first executes DeviceListActivity.java to obtain the device list, and uses the Intent to call the DataMonitor.java program. DeviceListActivity inherits the Activity class, and DataMonitor inherits the FragmentActivity class. Both call the BluetoothService.Java function to complete the Bluetooth communication when they are executed. Both DeviceListActivity.java and DataMonitor.java are composed of visual component View and its subclasses. These components are placed on the window at the specified position according to the XML layout file.5.3 Data processing and displayDataMonitor is a class that inherits FragmentActivity. FragmentActivity inherits from Activity. It provides methods to operate Fragment. Therefore, Fragment can be embedded in Activity to achieve the desired layout effect. The first thing implemented in DataMonitor is the oncreate method, which calls the Bluetooth connection when DataMonitor is initialized, and puts the View on the Activity through the setContentView method. After binding, the Activity will display the controls on the View. The rest are the onStart (), onResume (), onPause (), onStop () and onDestroy () methods inherited from the parent class, without modification, to complete the overloaded basic methods of the Activity life cycle.In the case of ensuring that the Bluetooth is connected, use the handler interface to complete the interaction between the Widget of the Activity and the thread in the application. Override the handleMessage method in the handler class to receive information through this method. The received information indicates the status of receiving messages at the current moment, which are MESSAGE_STATE_CHANGE, M ES SAGE_READ, M ES SAGE_DEVICE_NAME, MESSAGE_TOAST. The first state indicates that the Bluetooth is in the connection state; the second state represents the data reading state; the third state is the device name reading state; the fourth state is the data display state, which can display the data on the mobile phone screen. Through OnclickConfig (View v) and ControlClick (View v), the interface display and jump functions are completed. In ControlClick, the displayed content can be selected, and the corresponding output data can be selected according to the pressed button. The onRecordBtnClick(View v) method is to save the data to the SD card when the user presses the "Record" button, and stop recording data information when the user presses the "Stop" button.5.4 Bluetooth transmission BluetoothServiceTo develop Bluetooth, first add administrator authority and Bluetooth development authority to the AndroidManifest.xml file. After enabling Bluetooth, use isEnabled() to query the status of the current Bluetooth device. If it returns false, it means that the Bluetooth device is not enabled and needs to be packaged. An ACTION_REQUEST_ENABLE request to the intent calls the startActivityForResult() method to enable the Bluetooth device. Use the methods of the BluetoothAdapter class to search for remote devices, and use the mArrayAdapter.Add method to display the set of Bluetooth devices that can be paired, so as to select a device for communication.Scanning the device only needs to call the startDiscovery() method, and the application needs to register a BroadcastReceiver for the ACTION_FOUND action to receive the information scanned by the device. Enable its own device, encapsulate the ACTION_REQUEST_DISCOVERABLE action in the intent and call the startActivityForResult(Intent, int) method. Establish a connection between two bluetooth devices and complete the client and server codes. One starts the service to listen, and one initiates a connection request (using the MAC address of the server-side device). They are considered connected when they both have a Bluetooth socket on the same RFECOMM channel. getInptuStream() gets the input stream, and getOutputStream() gets the output stream for data transmission.epilogueIn this paper, we propose a wireless pose sensor detection system based on Bluetooth and inertial measurement unit, which is designed for the hardware and software of the sensor. Use the integrated 6-axis processing motion components MPU6050, BMP180, HMC5883 and STM32 to form an IMU (inertial measurement unit), send the data to the mobile phone via Bluetooth, and then display and save the data on the mobile phone. The system designed in this paper has good real-time performance, and the accuracy meets the detection requirements of general moving objects.The above is the design of the motion detection system based on Bluetooth technology introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have Bluetooth product design and development needs, you can trust us. We have rich experience in custom development of smart electronic products. We can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, BLE Bluetooth IC, dual-mode Bluetooth module, wifi module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the research and development of electronic education products.
06-08
2023
Research and design of multifunctional suitcase based on Bluetooth positioning technologyIn order to realize an autonomous multi-functional suitcase that can effectively track with high precision and reduce the burden of travel, people carry Bluetooth 4.0 base stations corresponding to vehicle-mounted Bluetooth devices, and the gyroscope data is transmitted to the Bluetooth base station carried by pedestrians and broadcast by the Bluetooth base station , The data of the gyroscope in the broadcast of the vehicle Bluetooth, combined with the RSSI value of the Bluetooth signal itself, is transmitted to the processor on the transport vehicle for calculation, and the two data are mutually corrected to control the precise tracking of the transport vehicle.1. Operation process of Bluetooth positioning luggage systemThe overall control flow of the system is:Step 1: Start the total power supply of the system on the transport vehicle; Step 2: Turn on the user-carried device; Step 3: Use the user-carried device for identity verification to start the positioning system and power system of the transport vehicle; Step 4: Wait for an appropriate time to initialize the system and self-calibration; step 5: the transport vehicle reads data and performs calculation control; loop step 5 to control the operation of the entire transport vehicle. After use, you only need to turn off the power of the portable device and the total power of the transport vehicle.2. Function introduction of the multifunctional luggage systemThe system includes a positioning data acquisition system and an information identification device, and the load-bearing intelligent transport vehicle includes a positioning control system, an information identification system and a vehicle power system.The positioning control system includes: a Bluetooth host, an accelerometer, a gyroscope, a power module, an LED status signal indicator and an FPGA processor, and the distance value and the accelerometer value are obtained through the Bluetooth host. The power module is connected to the lithium battery through the DC-DC voltage regulator circuit to output power for the system, the indicator light shows its working status, and the Bluetooth system transmits the information to the FPGA processor. The FPGA processor processes the obtained data in parallel, and calculates the person's orientation through a certain algorithm. In this way, autonomous tracking and navigation can be realized.The information identification system is mainly composed of an electromagnetic relay and an NFC module. The NFC module is powered by a power module and connected to the FPGA. The system does not work immediately after the system power is turned on, and the user needs to use the NFC module in the body-carrying device to identify each other with the vehicle-mounted NFC before starting the system, which further improves the security of the system. And from the perspective of ease of use, most of the current smart phones are integrated with NFC modules, so mobile APPs are also provided to facilitate people's identification. In order to further improve the security of the system and prevent the transport vehicle from being stolen, the mobile APP also provides an alarm function. After the Bluetooth signal disappears, an alarm will be sent to the user to remind the user that the transport vehicle has been lost. A small power GPS system is built in the transport vehicle, which can still send out positioning information even when the main power supply is cut off.The vehicle power system is mainly composed of special wheels, DC motor, DC motor control board, voltage stabilizing circuit and 36, r lithium battery pack, the lithium battery pack supplies power to the DC motor control board and DC motor through the voltage stabilizing circuit, FPGA controls the DC motor Rotating speed. Different rotational speeds correspond to different motion modes such as acceleration, deceleration, and steering.The body-carried device includes a positioning data acquisition system and an information identification system. The data acquisition system consists of a belt, a Bluetooth|4.0 base station, a gyroscope, an accelerometer, a power module, and an LED status indicator light. The whole device is packaged in the belt and fixed on the waist of the human body. Because the waist is the center of motion of the human body. In this way, the gyroscope obtains the information of the human body turning, and the accelerometer obtains the information of the human body movement. The information identification system is composed of NFC, which is authenticated by pairing with the on-board NFC to complete the start of the transport vehicle and the opening of the transport box.3. Introduction of Bluetooth luggage technology module(1) Bluetooth positioning technology: Bluetooth positioning technology is mainly used for short-distance wireless communication. It replaces wired connection with wireless connection, and combines fixed and mobile information devices into a personal area network to realize low-power, low-cost wireless communication between devices.(2) Ultrasonic obstacle avoidance technology: Ultrasonic waves are used to detect whether there are obstacles in front of the car. An ultrasonic generator and an ultrasonic receiver are placed in front of the car. When the sound waves sent by the ultrasonic generator encounter obstacles, these sound waves will be It will be reflected back. At this time, the ultrasonic receiver is used to receive the reflected sound wave, and then a sound wave converter is installed on the small body to convert the reflected sound wave into other signals.(3) GPS positioning technology: GPS is the abbreviation of Global Positioning System. When the tracking vehicle is a certain distance away from the user, GPS is used for positioning processing, mainly when there is a large flow of people.(4) Stair climbing structure: Using a multi-support structure, the center rotates to drive the car body forward to complete the task of going upstairs, and analyzes the terrain through the control terminal to intelligently switch between the two modes of climbing stairs and driving on flat ground.SummarizeThis system has changed people's traditional shopping and going out habits, so that people don't have to worry about carrying heavy objects when shopping on the street or traveling. They can easily shop and walk by simply putting the items in our system boxes. Not only convenient and fast, but also safe and environmentally friendly. This system uses bluetooth technology, instead of being dragged away like ordinary boxes, it can track the bluetooth signal of the mobile phone and automatically follow the owner, which is easy, labor-saving and safe.The above is the research and design of the multifunctional suitcase based on Bluetooth positioning technology introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. If you have Bluetooth product design and development needs, you can trust us. We have rich experience in custom development of smart electronic products. We can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, BLE Bluetooth IC, dual-mode Bluetooth module, wifi module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the research and development of electronic education products.
06-07
2023
Analysis of the new generation of Bluetooth 5.0 wireless transmission technology1. Analysis of Bluetooth 5.0As a new generation of wireless transmission technology, compared with the previous Bluetooth 4.2LE technology, the most significant change of Bluetooth 5.0 is that the transmission speed has been greatly improved. The upper limit of the new version of Bluetooth transmission speed is 24Mbps, far exceeding the previous Bluetooth transmission speed. It is twice as much as the previous 4.2LE version. Of course, it is unlikely that you will reach this extreme speed in real life, but you can still experience a significant speed increase. Bluetooth 5.0 technology doubles the speed. Calculated according to the existing indicators, it is expected to reach a transmission distance of 300 meters and a speed limit of 24Mbps. This speed undoubtedly makes the function expansion of Bluetooth 5.0 even more powerful, bringing more applications to Bluetooth devices.1.2 Has a lower power consumption levelAs we all know, Bluetooth is an essential function of smart portable terminal products. As more and more applications such as smart phone devices and mobile payment need to turn on Bluetooth to enjoy convenient functions and gradually integrate into people's lives, the power consumption of Bluetooth has become a smart A big killer of mobile phone standby time. For this reason, Bluetooth 5.0 greatly reduces the power consumption of Bluetooth, so that people no longer have to worry about the short standby time when using Bluetooth.As the main connection method for smart wearable devices and smart homes, Bluetooth 5.0 brings lower power consumption and more stable performance, which will effectively solve the battery life problem of smart devices in the future and display more abundant functional applications.1.3 brings a longer effective distanceAnother important improvement of Bluetooth 5.0 is that its effective distance is 4 times that of the previous version. Therefore, when you stand 300 meters away from the Bluetooth speaker with your mobile phone, it will continue to play your favorite songs. That is to say, in theory, the effective working distance between Bluetooth transmitting and receiving devices can reach 300 meters. Of course, the actual effective distance also depends on the electronic equipment you use.1.4 New navigation beacon functionIn addition, the significance of Bluetooth 5.0 is not only faster and farther, it will also bring improvements to the development of location services. Bluetooth 5.0 technology adds more navigation functions to this, so this technology can be used as an indoor navigation beacon or similar positioning device, and combined with Wi-Fi can achieve indoor positioning with an accuracy of less than 1 meter. For example, if you get lost in a busy downtown building, you can use Bluetooth technology to find your destination even in a sprawling commercial center.1.5 Expand the functions of the Internet of ThingsAt present, the Internet of Things is still hot, bringing a lot of vision to our smart home. Therefore, Bluetooth 5.0 technology has carried out many low-level optimizations especially for the application of the Internet of Things, and strives to provide services for smart homes with lower power consumption and higher performance. The previous Bluetooth v4.2 already had some IoT-focused features, and Bluetooth 5.0 puts these features at the center. Of course, its longer range will definitely improve smart home integration, and the stronger transmission capacity means that the new standard will allow IoT devices to communicate more easily. The new Bluetooth 5.0 will redefine the way Bluetooth devices transmit information, allowing them to transform from the mode of application-matching devices to the realm of connectionless transmission of the Internet of Things. Bring more convenience.1.6 brings a more convenient connection methodThe new Bluetooth 5.0 can add more data transmission functions, and hardware manufacturers can create more complex connection systems through Bluetooth 5.0, such as Beacon or location services. Therefore, the advertising data sent by the Bluetooth device can send a small amount of information to the target device, even without pairing. This means that Bluetooth 5.0 technology will completely change the current connection method and simplify the pairing process of devices. Also, some previous Bluetooth version updates only required a software upgrade, but Bluetooth 5.0 will likely require an upgrade to a new chip. However, old hardware is still compatible with Bluetooth 5.0, but it cannot enjoy the new performance.2. Bluetooth 5.0 brings new changesTechnically, the new Bluetooth 5.0 standard has a comprehensive improvement over the Bluetooth 4.2 standard, and both communication speed, communication distance and communication capacity have been greatly improved. At present, the competition for communication standards of the Internet of Things is becoming increasingly fierce, and Bluetooth Low Energy (BLE) technology has become one of the leading communication standards in the field of Internet of Things. However, compared with other standards, Bluetooth does not have an absolute advantage. However, the launch of Bluetooth 5.0 this time can bring some new features through low-power Bluetooth BLE, which will undoubtedly make up a lot of technical capital for this standard battle in time. With the help of these new features, Bluetooth 5.0 is expected to assist low-power consumption. Consuming Bluetooth BLE, making it the ultimate wireless communication standard for the Internet of Things.Especially when the communication speed of the new Bluetooth 5.0 is doubled, which means that its power consumption is also halved, and lower power consumption brings many benefits, especially in many Internet of Things applications, the communication speed The requirements are not high, because most IoT applications do not need to transmit streaming media, and wearable products are a typical representative of such applications. Take a sports bracelet as an example. Health data mainly includes information such as pulse rate, steps, and exercise methods. However, battery life is a key factor for the success of a bracelet. If the communication speed is doubled, the real communication time can be reduced to half at most, so this is equivalent to reducing the power consumption to nearly half of the original. Half the power consumption means double the battery life, which is a great benefit for wearable products. As we all know, Bluetooth is already the most widely used technical standard in the wearable field. Bluetooth technology has achieved great success in the consumer Internet of Things due to its low power consumption and fast transmission speed, but engineers still have many choices when looking at the entire Internet of Things market. The ever-evolving market dominates the world. So now many products have to support multiple connection standards to adapt to more application environments.Bluetooth 5.0 doubles the communication speed and doubles the speed of BLE. For most current BLE applications, the Bluetooth 4.2 standard is sufficient, so the increase in speed will not immediately improve the user experience. However, from another perspective, power consumption has become one of the most troublesome issues for current wearable products. In addition, the increased speed will allow software or firmware updates to take less time. Although software update is not a common function, since the amount of data that needs to be downloaded during software update is large, the increase in communication speed can also effectively reduce the power consumption during software update. The four times the communication distance of Bluetooth 5.0 means that Bluetooth will snatch Wi-Fi's share in the smart home market. In addition, Bluetooth 5.0 further increases the communication distance, which is great news for other applications of BLE, because whether it is a Bluetooth mouse or a wearable, users no longer have to worry about being dropped due to the distance. , which is especially important for Bluetooth headsets.3. Peek into the development prospects of the new Bluetooth 5.0 standardThe establishment of the new Bluetooth 5.0 standard will undoubtedly bring great changes to users and manufacturers. Looking forward to the future, what market development prospects will the new Bluetooth 5.0 standard have? Let's find out below. First of all, for consumers, the establishment of the new Bluetooth 5.0 standard will undoubtedly bring greater convenience. As we all know, the current Bluetooth 4.2 standard is not enough to maintain the connection of all Bluetooth devices in a family. When the number of devices increases, a series of common wireless network problems such as connection drop, incompatibility, and slow transmission speed will be exposed. You must know that if everything is as advertised, the new 5.0 standard will completely change this situation. Thanks to the changes in the new Bluetooth 5.0 technology, the upgraded Bluetooth signal will show a stronger ability to resist WiFi and LTE signal interference, and can avoid congested radio waves within a certain range, so that various digital devices in the family can maintain smooth signals. Users who pursue minimalism upgrade all related peripherals to the Bluetooth version. At that time, our faster and more convenient Bluetooth connection is no longer a dream, and it is no longer out of reach.In fact, in practical applications, for some high-demand Bluetooth connections, such as Bluetooth smart watches, the current standard has reached its limit, and we are clearly aware that it is time to upgrade. Because most of the current smart watches rely on the Bluetooth connection with the mobile phone, the connection method of Bluetooth 4.2 wireless technology has obviously restricted the function expansion of smart watches, and has become an important technical bottleneck restricting the continued development of smart watches. The official establishment of the new Bluetooth 5.0 standard will undoubtedly benefit a lot for major smart watch manufacturers. It can bring more and richer smart watch function applications from the higher-speed wireless connection of Bluetooth 5.0, and support Bluetooth 5.0. Connection will also become a major selling point of the new generation of smart watches, which will be favored and sought after by users. To put it further, in fact, the establishment of the new Bluetooth 5.0 standard has opened the door to our smart home application "Internet of Things". For the Internet of Things, the birth of Bluetooth 5.0 is indeed at the right time. Some statistical agencies predict that by 2021, there will be 48 billion Internet-connected devices in the world, about one-third of which will be equipped with Bluetooth. It can be expected that the wireless connection market around the world will grow even faster at that time. By 2021, the annual shipment of IC equipment is expected to reach 10 billion units. The release of Bluetooth 5.0 is expected to create new opportunities in various vertical fields of the Internet of Things, because it can significantly reduce the complexity and cost of the system, and give equipment suppliers more room for flexibility, that is, through the new features and new technologies of Bluetooth 5.0 Develop various emerging application methods and scenarios to enrich our IoT smart life.Finally, it is worth noting that the various functional advantages brought by the current Bluetooth 5.0 technology require "two-way" compatibility to be realized. In other words, in addition to your smartphone supporting Bluetooth 5.0, the connected Bluetooth device also needs to support 5.0 standard to achieve the best results. As far as the current development stage is concerned, although there are not many hardware devices supporting the Bluetooth 5.0 standard, with the continuous extension and development of smart homes, Bluetooth 5.0 devices will definitely become a future trend. In particular, the advancement and evolution of the Internet of Things technology will inevitably promote the accelerated popularization of Bluetooth 5.0, and Bluetooth 5.0 will also bring innovative functional applications to the Internet of Things. The two complement each other and bring out the best in each other.SummarizeWith the official launch of Bluetooth 5.0, it will bring a new round of wireless transmission technology revolution. Bluetooth 5.0 can not only provide a more stable connection, but its deeper meaning is that it can promote the use of Bluetooth beacons in future IoT devices. The rapid popularization of the Internet of Things can provide a seamless experience for the application of the Internet of Things, and it will also make our dream of a real smart life come earlier, and experience the convenience and intelligence brought by the Internet of Things.The above is the introduction of Bluetooth 5.0 technology introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have Bluetooth product design and development needs, you can trust us. We have rich experience in custom development of smart electronic products. We can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, BLE Bluetooth IC, dual-mode Bluetooth module, wifi module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the research and development of electronic education products.
06-06
2023
Design of Medication Reminder Bracelet Based on RFID and Bluetooth TechnologyWith the development of society and the progress of national medical undertakings, people's requirements for health are increasing, and more and more attention has been paid to taking medicine according to doctor's orders. In daily life, many patients who take care of themselves semi-independently, because of the wrong medication, the condition worsens, or the delay of medication time leads to the failure of the efficacy of the medication. Therefore, rational drug use and timely drug use have become the focus of attention of special groups such as the elderly. If this design-medication reminder bracelet is adopted, it does not need to be as complicated as an Android phone, nor does it need to import drug data, and all information can be synchronized with the hospital server, so that patients can take drugs on time to ensure that the drugs are fully effective.The promotion and use of medication reminder wristbands can facilitate the contact between hospitals and patients, and supervise patients who need to take periodic medication on time. At the same time, it can also increase people's attention to physical health. This paper proposes the design of a medication reminder bracelet based on RFID and Bluetooth technology. The handheld terminal can scan and identify the label of the medicine prescribed by the doctor, and transmit it to the bracelet terminal through Bluetooth technology; the bracelet terminal is combined with the hospital server. The update of the information storage is judged, and the patient independently chooses to set the medication time through the display screen, and then realizes the medication reminder.This design can meet the dual needs of checking the time and reminding medication information of the bracelet, and is easy to use, easy to operate, universal and efficient.1. Medication reminder wristband system structure design1.1 Overall structureFor some special populations such as the elderly, taking into account their inconvenient use of mobile phones and other factors, a medication reminder bracelet based on RFID and Bluetooth technology was designed. This design uses STC89C51 single-chip microcomputer as the platform, and consists of three parts: handheld terminal, bracelet terminal and hospital server connection terminal. Among them, the handheld terminal uses Bluetooth technology and RFID reader to scan and read the drug information; the bracelet terminal receives the information sent by the Bluetooth module, and the analog bracelet is composed of a DS1320 chip, a buzzer module, a button module setting and an OLDE display module; The server side realizes the update of the medication information in real time through the medication information storage part, and the updated information is transmitted to the medication management module to realize the information acquisition function of the bracelet.1.2 Hardware structure designThis design takes the STC89C52RC single-chip microcomputer chip as the core, transmits the drug data information obtained by the RFID reader through the Bluetooth module; obtains the specific instructions for taking the drug through the connection between the drug management system and the hospital server; Take real-time time and set the timing; use the buzzer and OLED display to remind the medication and give specific medication instructions. There are multiple modules in this design, and the functions of different modules are combined and closely connected to realize functions such as data processing and display alarm. The wristband design provides a single-chip microcomputer control core module, a Bluetooth module, a buzzer module, a clock module, and an OLED display module.2. Part of the hardware design of the wristbandIn the hardware design, this paper mainly selects the main hardware of the medication reminder wristband to introduce, and introduces in detail the model selection of the module, how to connect and communicate with the single-chip microcomputer, and the advantages of the selected module.2.1 Bluetooth module designThe Bluetooth communication module is the channel for exchanging information between drug label scanning information and the bracelet terminal. The Bluetooth module used in this design needs to be connected to the single-chip microcomputer of the handheld terminal and the single-chip microcomputer of the bracelet terminal in serial port mode. The selected bluetooth module is HC-06 bluetooth serial port slave module, there are four pins on the module: VCC, GND, TXD and RXD. The CSR bluetooth chip is the chip used by the HC-06 bluetooth serial port slave module, the power supply voltage is 3.3V, and the effective transmission distance is 10 meters. It can realize synchronous transmission of voice and data, and has good anti-interference performance and low cost.2.2 Clock module designThis design uses the DS1302 chip to realize the timing function of the wristband, which provides accurate time information, and the patient can set the time independently according to the suggestion of the most suitable medication time, so as to ensure that the medication can be accurately reminded. The DS1302 chip is connected with the STC89C51 microcontroller through the I/O, SCLK, and RST control lines. Realize the wristband clock information, timing and reminding, manual selection and setting of the time to be set, the single-chip system real-time comparison with the DS1302 chip time, when the timing time is up, the I/O port of the single-chip microcomputer controls the switch of the relay.2.3 Buzzer alarm module designIn this design, an active buzzer module is used, which is triggered by low level, and the working voltage is 3.3V-5V. Play two functions: (1) The buzzer sounds after the button is pressed, simulating the button sound; (2) Timing alarm function, when the time set by the clock module arrives, the buzzer pin passes through the monitoring relay switch , A low level is detected to ring the alarm.2.4 Design of wristband display moduleThe display module of the wristband adopts QG-2864KLBEG01 module, and the light-emitting unit of the display screen is an organic polymer light-emitting diode, namely organic/polymer light emitting diode, OLED for short. A pixel of a monochrome screen is a light-emitting diode. OLED is "self-luminous", and the pixel itself is the light source, so the contrast is extremely high and the display effect is very sharp. The display color of this module is 1/4 yellow + 3/4 blue, but it is still a monochrome screen, and there is another "blue + white" combination color optional. The module interface is 8 pins, the pin definition has been printed on the board, and the serial SPI protocol is used. Because of the onboard voltage regulator chip U2, the power supply voltage of the module can be 3-5V. The module comes with a Chinese font library chip.3. Medication reminder bracelet system software designThe software design of the medication reminder wristband is divided into the program design of the handheld terminal single-chip microcomputer and the software design of the update part of the connection between the medication management module and the hospital server. First, the program is designed and the most basic application modules are programmed. These modules are debugged. After the functions are realized, they are used to develop the module system of the upper layer.3.1 General flow chart of the programThe handheld terminal for medication reminder scans the RFID label of the drug, and processes the scanned data through the 51 single-chip microcomputer. The system detects whether the Bluetooth module is connected. After detecting the connection, the collected information is extracted and sent to the bracelet terminal through the Bluetooth module.After obtaining the drug information, the bracelet is connected to the medication management module. When it detects that the patient’s medication-related data has been updated in the hospital server, the information is extracted, and the recommended medication time is displayed on the LCD12864 display screen by using an analog IIC communication method. Choose the medication time, and use the DS1302 chip to memorize the timing, and then realize the medication reminder function.3.2 RFID reader tag scanning informationRFID (Radio Frequency Identification) is a kind of short-range tag identification technology. The reader can receive and send radio frequency signals to read and write electronic tags. Active RFID tags are used in this design, and ID signals are sent periodically. The reader can directly obtain the information of the RFID tags and send the information to the 51 single-chip microcomputer connected with the RFID.3.3 Acquisition of Medication Management Module InformationThe medication management module is the logical analysis and judgment part of the whole system, which reads the information sent by the Bluetooth module, analyzes and judges with the information of the hospital server through the method of pointer acquisition, and displays the judgment results to realize the function of obtaining the patient's medication information. The medication management module of this system can realize the function of real-time monitoring of user medication information, and send corresponding information to the hospital server to record the medication that should be taken on a certain day.SummarizeThis paper combines the RFID reader identification tag technology, Bluetooth communication technology and the medication module management system connected to the hospital server to design a medication reminder bracelet management system for the elderly, blind and other special groups. This design breaks through the complexity of the traditional Android mobile phone reminder system, and is easy to operate. It realizes semi-automatic medication reminder. During use, the patient only needs to manually select the medication time period according to the medication suggestion, and other functions can be automatically completed by the system program. In addition, this system uses a handheld terminal and a bracelet as a carrier. When using it, you only need to wear the bracelet on your wrist without special carrying methods, and the DS1302 chip in the bracelet can realize the function of a watch, eliminating the need for heavy and complicated device models. .The above are the details of the single-chip microcomputer technology introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are the agent of Sonix MCU and Yingguang MCU agent, selling and developing MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions for Jieli, Ankai, Allwinner, Realtek, etc., and also develop BLE Bluetooth ICs, dual-mode Bluetooth modules, wifi modules, and IoT modules. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the research and development of electronic education products.
06-05
2023
In recent years, with the rapid development of the Internet of Things, big data, cloud computing and hard technology, wearable devices have become a hot topic. Nowadays, most people's pursuit of life is gradually upgraded, and their attention to pets is more prominent. Wearable devices are favored by most pet owners. Wearable devices are not only a hardware device, but also achieve powerful and complex functions through software support, data interaction, and cloud interaction. Wearable devices will bring great changes to our lives and perceptions. It is foreseeable that the advent of the Internet of Things era has made people have more expectations in the field of smart pet wearable devices.1. Design scheme of smart pet wearable deviceThe hardware system of the smart pet wearable device based on Bluetooth wireless control is mainly through the Bluetooth module, music player module, vibration pedometer module, and temperature sensor. The single-chip microcomputer is the core of the whole system, and the operation of each module is controlled through Bluetooth. When the pet is in a weak light environment, the lighting system can be turned on through Bluetooth control; the lighting module is mainly composed of simple LED lights, which coordinates the lighting control program and is controlled through the Bluetooth module.When the pet is in motion, you can turn on the step-revealing module, and the LED light will cycle once every time the pet takes a step; this module is mainly composed of colored LED lights, and coordinates the vibration switch to control the operation of the step-revealing module. The temperature sensor DS18B20 communicates with the STM32 microcontroller through a single bus to monitor the pet's body temperature in real time. The data transmitted by DS18B20 is fed back to the user through the Bluetooth interface.Music playback mainly takes MP3+WAV+WMA music module as the core, and also has other related operations related to playback. This module is mainly controlled by the serial port. The STM32 MCU sends relevant instructions and the module recognizes the relevant instructions to realize the functions of music playback, pause and song switching.The Bluetooth module serves as an interface between the device and the outside world, and the user can monitor and control the device in real time through a smartphone. In terms of hardware, it mainly communicates with the STM32 single-chip microcomputer through the serial port, and then the single-chip microcomputer recognizes the instructions sent back by the Bluetooth module, and then controls the system as a whole.2. Smart pet wearable device hardware system2.1 Minimum single chip systemThe core control system of this system is STM32F103 single-chip microcomputer. STM32F103 is based on the ultra-low power consumption ARM Cortex-M3 processor core, the operating frequency is up to 72MHz, and the chip integrates 512KB Flash memory and 64KB SRAM memory. The microcontroller integrates circuits such as reset circuit, low-voltage detection, and precise RC oscillator. The microcontroller has up to 13 communication interfaces, including 5 USART interfaces. Because the design system needs more serial ports, the STM32 single-chip microcontroller is the best choice for the system.2.2 Bluetooth circuit designThe bluetooth module of this system adopts ATK-HC05 bluetooth serial port module. This module is a high-performance master-slave integrated Bluetooth serial port module, which can be paired with various mobile terminals such as computers with Bluetooth functions, smart phones, PDAs, and PSPs. The module supports a wide range of baud rates: 4800MHZ-1382400MHZ; And the module is compatible with 5V or 3.3V single-chip microcomputer system, which can be easily connected with this product. In addition, the module comes with a status indicator light, which is in a slow flashing state (1 time per second) when the module is powered on (or before powering on); when the module is powered on, it is in a fast state. Blinking state (2 times in 1 second), indicating that the module is in a pairing state; when the module is successfully paired, it is in a double-blinking state (1 flash 2 times, 2 seconds once). The HC05_Init function is used to initialize the IO port connected to the ATK-HC05, and detects whether the ATK-HC05 Bluetooth module is connected through the AT command; the HC05_Get_Role function is used to obtain the master-slave status of the ATK-HC05 Bluetooth module; the HC05_Set_Cmd function is an ATK-HC05 The general setting command of the Bluetooth module, by calling this function, you can modify various settings of the ATK-HC05 Bluetooth serial port module; When serial port debugging is not needed, this function can be deleted. In the main function, the operation of each function is determined by judging whether to receive a string command, so we set the sending content of each button to correspond to the corresponding operation, so as to realize the control of the entire system. After the setting is completed, various functions of the system can be controlled through the mobile terminal, and the mobile terminal can also receive synchronous data from the system.2.3 Circuit design of step-show moduleThe step indicator module in this system adopts the vibration sensor widely used at present. The core technology of the vibration sensor is SW-18020P spring type non-directional trigger switch; it is a widely used alarm detection sensor, which can feel the parameters of mechanical motion vibration (such as vibration speed) through the internal piezoelectric ceramic sheet and spring weight structure. , frequency, acceleration, etc.) and convert it into an available output signal, and then amplify it through an operational amplifier such as LM358 and output a control signal. When the pet is in a static state, the vibration switch is disconnected, the output terminal outputs a high level, and the green indicator light is off; when the pet is in a moving state, the vibration switch is turned on instantly, the output terminal outputs a low level, and the green indicator light is on. The output end is directly connected with the single-chip microcomputer, the high and low levels are detected by the single-chip microcomputer, and finally the step light of the device is controlled by the high and low levels. When the pet is in a moving state, the step indicator light will generate a cyclic relationship through the program, and the step indicator light will flash cyclically to achieve the effect of the pet showing steps.2.4 Music module circuit designThe music module used in this system is based on the MY1690-16S MP3 master chip as the core, and supports dual decoding of MP3 and WAV formats. The module has a built-in 3W power amplifier, which can directly drive 3W speakers. The module has a built-in standard UART asynchronous serial port protocol. It can be converted to RS232 level by MAX3232 chip or communicated with PC through USB to TTL module for debugging. The STM32 microcontroller in this device sends corresponding string instructions to the MY1690-16S chip through the serial port, and then the chip judges the string instructions to perform corresponding music operations, such as: play, pause, switch, etc.; if the instruction is wrong, no operation will be performed .2.5 Temperature measurement module circuit designThe temperature measurement module of the system adopts the most used DS18b20 temperature sensor as the core component. When DS18b20 communicates with the microprocessor, only one port line is needed to realize two-way communication with the bit processor. DS18B20 is set to 12-bit data when it leaves the factory. When reading temperature data, a total of 16 bits are read, and then the last 11 bits The binary system is converted into decimal system and then multiplied by 0.0625 to get the measured temperature value. The first 5 digits are sign bits. When the value of the current 5 digits is 1, the read temperature is a negative number; when the value of the current 5 digits is 0, the read temperature is a positive number, and the measurement result is transmitted in digital serial port. DS18b20 supports multi-point networking technology. Multiple DS18B20s can be connected in parallel on one bus, and each bus can only be connected in parallel with up to 8 to achieve multi-point temperature measurement and realize all-round temperature measurement.3. Software design and testing of smart pet wearable devicesAfter the system is powered on, the STM32 MCU first initializes the system. Initialization mainly includes configuring the system clock, and then configuring the two serial ports used by the device, and configuring the serial ports. These configurations mainly include setting the serial port clock, pins, baud rate, data frame format and priority To configure, set the priority of the serial port used by Bluetooth to the highest priority, and configure the serial port used by the music module to a lower priority. For the serial port interrupt processing function used by Bluetooth and the serial port of the music module, it is only necessary to be able to send relevant instructions, that is, to redirect the printf() function.In addition to the initialization of the serial port, there is also the initialization of the external interrupt of the system and the normal GPIO port. For the initialization of external interrupts, first configure the clock and pins for the relevant external interrupt GPIO ports, and then configure the mode and priority of the relevant external interrupts. For the external interrupt function, after the system enters the external interrupt, the variable of the relevant statistical steps in the system is incremented by one, and then the step lamp is controlled to flash forward one cycle. For the configuration of ordinary GPIO, it is only necessary to set the clock and GPIO related modes, and write the control function of DS18B20 and the function of reading data. After the previous steps are completed, the main work of the single-chip microcomputer is to query the relevant interrupts in the system. For the Bluetooth serial port, it is mainly used to receive instructions and make judgments, and then perform different operations on different instructions.When the system is running, you first need to enter the password to connect to the Bluetooth device of the device. When the Bluetooth connection is successful, you can perform corresponding functional operations within the appropriate range. Then send a string command to the single-chip microcomputer through the button of the mobile terminal, and display the sent command data in the above sending command area; when the single-chip microcomputer receives the command string of the corresponding function, it will send the corresponding monitored data to the mobile terminal, Finally, it is displayed in the data display box on the mobile terminal.SummarizeThe pet wearable device system based on Bluetooth wireless control is a combination of hardware technology and mobile terminal, and is developed on the basis of Internet of Things technology. It combines pet clothing with intelligent hardware. The design of this device has reached modern intelligence. The basic requirements of pet wearable equipment, this system has the advantages of stable operation, simple and easy operation, low development cost, etc., and is marketable.
06-04
2023
Comparison of Infrared Communication Technology and Bluetooth TechnologyThe current popular short-distance wireless communication technology is Bluetooth technology (Bluetooth). The difference between Bluetooth technology and infrared technology is that infrared communication transmits data through infrared light, while Bluetooth technology transmits data through microwaves with a frequency of 2.4GHz. The characteristics of Bluetooth technology are affected by microwave transmission characteristics. Its communication distance It can reach tens of meters or even hundreds of meters. At the same time, it can bypass obstacles or even penetrate obstacles to transmit data, and it can also connect multiple communication objects at the same time. So, will infrared be eliminated by Bluetooth, a newer communication technology? The author analyzes and discusses these issues.1. The definition of infrared data communication technology and Bluetooth communication technology1.1 Definition of infrared communication technologyThe abbreviation of Infrared Data Association is IRDA, and the basis of infrared data communication technology is formed by a series of infrared data communication standards formulated by IRDA. Infrared communication technology is a point-to-point data transmission protocol, which is an alternative to the traditional connecting cables between devices. Its communication distance is generally between 0 and 1 meter, the fastest transmission speed can reach 16Mbps, and the communication medium is near-infrared rays with a wavelength of about 900nm.1.2 Definition of Bluetooth Communication TechnologyToshiba, Ericsson, IBM, Intel and Nokia jointly proposed the short-range wireless data communication technology standard in May 1998 is Bluetooth technology (Bluetooth). It can realize point-to-multipoint wireless data and voice transmission within a radius of 10m, its data transmission bandwidth is 1Mbps, and electromagnetic waves with a frequency between 2.402 and 2.480 are its communication medium.Bluetooth technology is a kind of radio communication technology. It has short transmission distance and low cost (it is completely free for wireless communication). It can effectively simplify the Internet between handheld computers, notebook computers, mobile phones and mobile communication terminal devices Communication.The use of low-energy radio communication technology to realize wireless transmission of voice, data, and video transmission is the product of Bluetooth technology. Its transmission rate can reach up to 1Mbps, and it performs full division of labor (simultaneously sending and receiving signals) communication in a time-division manner, and the communication distance is 0.1 to 10m. If equipped with a power amplifier, the communication distance can be increased to 100m. Currently, 225m products have passed the test in MSI's laboratory.Bluetooth enables wireless information exchange between mobile phones, PDAs, wireless headsets, notebook computers, related peripherals and many other devices. The Bluetooth standard is IEEE802.15, which works in the 2.4GHz frequency band with a bandwidth of 1Mbps.2.The different characteristics of infrared communication technology and Bluetooth communication technology2.1 Features of infrared communication technologyInfrared communication technology is widely used. At present, the wireless connection technology widely used in the world is infrared communication technology. Nowadays, many hardware and software platforms support infrared communication technology. It mainly uses the mutual conversion between data electrical pulses and infrared pulses to transmit and receive wireless data. to replace point-to-point cable connections. At present, the new infrared communication standard can be compatible with the early communication standard, and has the characteristics of small angle (within 30 degree cone angle), short distance, point-to-point direct data transmission, strong confidentiality, and transmission rate. At present, the FIR technology with a rate of 4 Mbps has been widely used, and the VFIR technology with a rate of 16 Mbps has also been released.Infrared communication technology has been recognized by many manufacturers and consumers. At present, many software and hardware manufacturers around the world have supported and adopted infrared communication technology. All mainstream software and hardware platforms also provide support for infrared communication technology. Infrared communication technology is widely used in mobile computing and mobile communication equipment, and the huge installed capacity makes infrared wireless communication technology have a huge user group.The implantation cost of infrared communication technology is low. Because many system chips have infrared communication control circuits, it is only necessary to add an infrared transceiver to implant infrared functions in the system, which greatly reduces the implantation cost of infrared communication technology. At present, mass production can control the cost of implantation to less than 3 US dollars.However, there is no perfect product in the world. The short communication distance is the main disadvantage of infrared communication technology. The device cannot move during the communication process, and the communication will be interrupted as long as it encounters an obstacle, and the communication rate of the widely used SIR standard is relatively low, only 115.2kbit/s. In fact, the main purpose of the infrared communication technology is to replace the cable connection to perform wireless data transmission, so its function is single and its scalability is relatively poor.2.2 Features of Bluetooth communication technologyBluetooth communication mainly works in the globally open 2.4GHz ISM (ie industrial, scientific, medical) frequency band, which divides the frequency band into several frequency hopping information (hop channels) through frequency hopping spectrum expansion technology. The radio transceivers in the system can continuously "hop" from one channel to another in a certain code sequence during a connection. And one Bluetooth device can establish connections with seven Bluetooth devices at the same time, and its data transmission rate can reach 1Mbps; and it has the characteristics of low power consumption and good communication security. Bluetooth technology can be used to connect across obstacles within an effective range, and there are no special requirements in terms of communication viewing angle and direction. Bluetooth technology can widely support voice transmission, and the networking is simple and convenient.Bluetooth technology has a good application prospect. Bluetooth technology is an emerging technology that is not yet widely used. Many Bluetooth devices are still in the lab stage. However, it is certain that many devices with infrared data communication functions can use Bluetooth technology for wireless connection in the future. In addition, some specific functions that cannot be realized by infrared technology can be realized by using the network characteristics of Bluetooth technology and voice transmission technology, such as wireless phones, networking of multiple devices, and so on.At present, Bluetooth technology has received the response of more than 2,000 enterprises, so it already has a huge development and production capacity, and also has a high reputation. Consumers are also very interested in this technology.At present, the implantation cost of Bluetooth technology is relatively high, and it will be improved in the mature stage of development. The products of USB interface bluetooth adapter, bluetooth PC card and bluetooth mobile phone are already facing the market, but the price is generally very high. From this point of view, the implantation cost in the early development stage of Bluetooth is still relatively high, and it is estimated that the mass production implantation cost can be within 30 US dollars. When Bluetooth technology matures, the cost of implantation can be controlled within 10 dollars.However, Bluetooth technology, like infrared technology and everything in the world, has disadvantages. The disadvantage of Bluetooth technology is that the communication rate and security are not very high, but the cost is relatively high.conclusionAll in all, Bluetooth technology has great advantages. However, because Bluetooth technology is still in the early stage of development, various conditions can restrict it, and the implantation cost of Bluetooth technology is very high, the communication rate is relatively low, and the technology is also limited. Not too mature, its development and popularization still need to go through the tempering of the market and the test of time, and its own technology needs to be continuously improved and improved. However, infrared communication technology has the characteristics of mature technology, low cost, good compatibility, high communication speed, etc., and has obtained the support and use of a wide range of software and hardware, so it has a very wide range of applications. Although Bluetooth technology may eventually replace infrared communication technology, this process will take a long time. In this period, the important role in the field of short-range wireless data communication will still be infrared communication technology. Both bluetooth technology and infrared technology have their own advantages and disadvantages. We can assert that for a period of time in the future, the two will compete with each other, promote each other, and complement each other. The perfection has been promoted very well.The above is the comparison between infrared communication technology and Bluetooth technology introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have Bluetooth product design and development needs, you can trust us. We have rich experience in custom development of smart electronic products. We can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, BLE Bluetooth IC, dual-mode Bluetooth module, wifi module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the research and development of electronic education products.
06-03
2023
Design of temperature and humidity monitoring system based on bluetooth communicationChina is a large agricultural country, and agriculture has played an important role in national production since ancient times. As our country enters a new era, the rapid development of various industries in our country, especially the increasing input costs of the country in agriculture, has prompted the rapid transformation of our country from traditional agriculture to precision agriculture. Modern greenhouses have realized the monitoring of greenhouse environmental parameters through science and technology, better realized the control and use of greenhouses, and changed the current situation of relying on the sky for food in the past. Although the greenhouse technology has achieved rapid development, there are still some limitations in the monitoring of the greenhouse environment, which limits the long-term development of greenhouse agriculture in my country. Under such a background, the temperature, room temperature and humidity monitoring system based on Bluetooth communication is based on the research of the greenhouse monitoring system in line with my country's national conditions, and has certain research value and practical significance.1. Overall scheme design of temperature, room temperature and humidity monitoring systemThe main key components of the temperature, room temperature and humidity monitoring system based on Bluetooth communication include the following modules: temperature and humidity acquisition module, temperature and humidity display module, and Bluetooth communication transmission module. Next, we will focus on the selection and design of the functional scheme of this system.(1) The selection of single-chip microcomputer as the core control system is one of the key points, considering its system design cost performance, work stability, ease of development and power consumption and other factors. Based on the above requirements, the system uses 51 series single-chip microcomputers as the hardware core, represented by STC89C52. This series of single-chip microcomputers has the advantages of low power consumption, dual DPTR, simple C language code writing, and strong versatility.(2) The display module is the most direct communication window between man and machine. In order to display the status and operating status of the temperature, room temperature and humidity monitoring system in real time, the system is usually designed with a display module. The display modules usually used include LCD12864 display and LCD1602 display. Since the system does not need to display rich content, it only needs to display the temperature value, so the system chooses LCD1602 display.2. Selection and design of the main control chip of the temperature and humidity monitoring systemThe temperature, room temperature and humidity monitoring system based on Bluetooth communication adopts STC89C52 single-chip microcomputer. This single-chip microcomputer can not only meet the basic requirements, but also has a simple memory storage function, and the price is relatively cheap. Both can be used as I/O ports, either as output ports or input ports.3. Selection and design of temperature and humidity sensorDHT11 digital temperature and humidity sensor is a temperature and humidity composite sensor with calibrated digital signal output. It applies special digital module acquisition technology and temperature and humidity sensing technology, which has high reliability and excellent long-term stability.4. LCD1602 display module designIn the single-chip microcomputer control system, LCD1602 is used to display temperature, upper limit value and lower limit value of temperature. The liquid crystal display module is a slow display device, so before executing each command, it must be confirmed that the busy flag of the module is low, indicating that it is not busy, otherwise the command will be invalid. When you want to display characters, you must first input the display character address, which is to tell the module where to display the characters.5. Bluetooth communication module designIn order to be able to monitor the temperature and humidity of the greenhouse air in real time, the system uses the Bluetooth communication module to connect with the mobile phone, and can intuitively observe the corresponding values of dust and temperature and humidity in the air at any time and make decisions. The temperature, room temperature and humidity monitoring system based on Bluetooth communication uses the SPP-CA Bluetooth module, which supports the UART interface and the SPP Bluetooth serial port protocol. It has the advantages of low cost, small size, low power consumption, and high sensitivity for sending and receiving. A small number of peripheral components can achieve powerful functions.SummarizeDue to the complexity of greenhouse environment monitoring, my country still has certain limitations in greenhouse environment monitoring. It is under this background that a temperature, room temperature and humidity monitoring system based on Bluetooth communication is designed. The system sends the measured values of temperature and humidity in the air in the greenhouse to the mobile phone APP through the Bluetooth communication module, which can monitor the temperature, room temperature and humidity in real time, and provide basic data for real-time control of temperature, room temperature and humidity and control of the greenhouse environment. significance. It has certain research value and practical significance.The above are the design details of the temperature, room temperature and humidity monitoring system based on Bluetooth communication introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have Bluetooth product design and development needs, you can trust us. We have rich experience in custom development of smart electronic products. We can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, BLE Bluetooth IC, dual-mode Bluetooth module, wifi module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the research and development of electronic education products.
06-02
2023
BLE software and hardware modules and system compositionThis article is based on the BLE module, the scheme is from the selection design of the hardware circuit to the realization of the software function, and finally forms the Internet of Things system to realize the positioning control of the smart device; 1. The basis of the Internet of Things is the hardware module of the smart device, 2. The Internet of Things The implementation is to embed the smart device module into the electrical equipment and support it with software. 3. The Internet of Things to indoor positioning control system is to add an algorithm model on the basis of completing 1 and 2. This article will introduce the hardware and software parts of BLE in detail .1. BLE hardware system moduleThe design of the hardware circuit mainly includes 3 important modules and 1 functional module. The 3 important modules are the main control design, power supply design, and antenna design. In this paper, the main control module and power supply module are included in the main control circuit design, which will be introduced in detail below .1.1 Main control circuit designThis topic design adopts CSR1010 of CSR Company as the CPU main control chip. Its characteristics are: it has 64KB of running memory and 64KB of storage memory, the maximum output power of Bluetooth low power consumption is 75dBm, and the lower limit of the power of Bluetooth low power consumption receiving signal is -92.5dBm, support Bluetooth 4.2 specification, the host protocol stack includes ATT, GATT, SM, L2CAP, GAP, etc., the current in sleep mode is less than 900nA, using 32.768KHz and 16MHz dual crystal oscillator system clock, the former is used in sleep mode, and the latter Ordinary working clock, switching power supply, programmable general-purpose PIO controller, 10-bit high-precision built-in ADC, 12 digital PIO ports, 3 analog AIO ports, support UART serial communication, I²C communication, SPI bus Program EEPROM, external flash chip, support SPI emulation, support 4-way PWM mode, interrupt wake-up and watchdog function.(1) EEPROM circuit design: CSR1010 does not have an embedded program memory, so an EEPROM chip with a storage capacity of 512Kb is connected externally during design. The chip model is AT24C512. For the requirements of module miniaturization, the package is selected as 8-lead SOIC , where 1, 2, and 3 pins are address bits, 4 and 8 are GND and VCC respectively, 5 is the data pin SDA, 6 is the clock pin SCL, and 7 is the write protection pin. Its principle design is shown in Figure 4.2: the program is burned into the chip through the SPI bus.(2) Clock circuit design: The low-power design scheme adopted by the chip is: normal mode and sleep mode work alternately to achieve low-power output. In sleep mode, a low-speed clock with a crystal oscillator frequency of 32.768KHz is used. In working mode, a high-speed clock with a crystal oscillator frequency of 16MHz is used. The advantage of this dual-crystal oscillator design is that the clock is more accurate and reduces the loss caused by internal clock frequency division.(3) Power supply circuit design: The design of the power supply module is the primary factor to ensure the stable operation of the entire circuit. The design of the input power supply module and the drive circuit module is shown in Figure 4.5: VDD_BAT is the total input power supply, and its threshold value is 1.8v~4.4 Between v, connect a large capacitor of 47uf to a ferrite (drawn in the total circuit design) to realize energy storage and filtering, and prevent damage to the circuit by the impact current; the threshold value of VBAT_REG_IN and VDD_CORE is 0.8v~1.35 v and 0.65v~1.2v, the function of these two modules is to provide a stable working voltage for the digital circuit module, and the voltage control of VDD_CORE can be realized through software programming.An important task of the subject research is to embed the BLE intelligent control module into the electrical appliance, and realize the conversion of power frequency power to DC power on the power supply; in the design, the 24v constant voltage DC power is step-down and stabilized, and the 3.3v constant voltage source is derived The chip uses, that is, VDD_BAT in Figure 4.5 is equal to 3.3v.In the figure, VBAT is the input voltage of 24v, using 5.6v Zener diode and J3Y triode to form an amplifying circuit, outputting 5v voltage to supply power to LM117, in which LM117 is a voltage stabilizing IC chip, this design uses LM117-3.3 model, that is, the input voltage Control 4.75v~10v, the output voltage is constant at 3.3v, and the current threshold is 0~1A.1.2 Antenna circuit designThe matching degree of the antenna will directly affect the transmission quality of the electromagnetic wave signal, the transmission distance and the accuracy of the channel model. Commonly used antennas for Bluetooth include inverted F antennas, serpentine antennas, and integrated ceramic antennas. Here are the first two types.(1) Inverted F antenna: Inverted F antenna is a quarter-wavelength antenna. The antenna has two directions. One end is connected to GND, and the other end is used as the transmitting end of the radio frequency signal. The feedback point is located between the two ends. The structure of the antenna structure is simple, the design is convenient, and the cost is low; its disadvantage is that the bandwidth is narrow.(2) Serpentine antenna: The length of the serpentine antenna depends on its geometric structure and near-ground distance. In this paper, referring to the physical properties of the serpentine antenna, the model structure of the antenna is obtained through HFFS simulation design. According to the working frequency band of Bluetooth, the center frequency of the antenna is 2.44GHz; the board of this subject is FR4, the corresponding dielectric constant is 4.5, the loss angle is 0.02, and the thickness of the board is 0.8cm. Among them, the 7 pins of the chip are RF Theoretically, the characteristic impedance behind the port needs to be matched to 50Ω, so the length and width of the antenna can be obtained through HFSS software simulation.1.3 Functional circuit designThe BLE minimum system board leads to multiple I/O ports to realize the connection with the functional circuit. The CSR1010 chip has a total of 32 pins, including 12 PIO pins. The three pins PIO9, PIO10 and PIO11 are used as functional modules during design. The output port is connected to the triode drive circuit, and the high and low levels output through the I/O port make the triode work in the switching state, that is, the interactive change between the saturation state and the cut-off state, and the collector of the triode is connected to the pull-up load.2. BLE software moduleThe realization of software functions is divided into two major modules: first, it is the programming of the CSR1010 main control CPU chip, which drives the smart device to work, and realizes the communication between multiple smart devices and the direct control of electrical equipment; second, the programming and software of the mobile terminal Optimization, to complete the information interaction between users and intelligent control equipment and the indirect control of electrical equipment.2.1 Bluetooth related protocolsThe BLE protocol stack is the basis for implementing Bluetooth-related functions. The BLE4.2 protocol stack is mainly divided into two modules: 1. host (host) and 2. controller (controller). The protocol framework is shown in Figure 4.10. The controller mainly includes the physical layer protocol of BLE and the link layer protocol. The host layer includes the logical link control adaptation protocol (L2CAP), attribute protocol (ATT), security manager ( SM), Generic Attribute Protocol (GATT) and Generic Access Protocol (GAP).(1) Logical Link Control Adaptation Protocol (L2CAP): L2CAP is one of the cores of the BLE protocol stack and the upper-layer protocol of the baseband. Its function is to convert the data submitted by the baseband into a packet format for the call of the upper-layer application , and only supports asynchronous connectionless data (ACL). L2CAP defines 3 channels according to different functions: 1. A connection-oriented channel used between multiple devices, 2. A connectionless channel used as a broadcast, and 3 a signaling channel used to create commands.(2) General attribute protocol (GATT): GATT is the basis for establishing a BLE connection. Its main function is to send or receive the attribute data segment of the signal, and realize the data exchange between two devices. It is realized by defining the service (Service) and the characteristic (Characteristic) In BLE communication, one service contains multiple feature data segments, each feature has a uniquely identified 16-bit or 128-bit UUID; in terms of connection, GATT defines a Master master device that can connect multiple Peripheral slave device, so during the experiment, one mobile terminal can control multiple BLE devices at the same time, but one BLE device can only be connected and controlled by one mobile terminal. The principle of its realization is that a BLE device will no longer Send a connection request signal; the concept of multiple BLE device ad hoc networks is introduced here, that is, the slave device will intermittently send a signal to the master device to request to be connected.(3) General Access Protocol (GAP): In the BLE protocol framework, GAP is an application layer-oriented protocol, which defines two communication methods for BLE devices: connection communication and broadcast communication; at the same time, the master device and slave mentioned above The device is defined in the GAP specification, and functions such as scanning, connection, communication, and interruption of the device are realized through HCI commands. Among them, there are two implementation methods of broadcast communication, broadcast data and scan reply. The former is used as a signal generator to radiate and broadcast outward, and the latter realizes the processing of data from the GATT layer.2.2 Driver moduleThe programming of the smart device driver module involves the writing of Bluetooth protocol specifications and the realization of circuit functions by the software driver layer. The software used is CSRµEnergy SDK 2.4.5.13 (xIDE); the APP design is to program on the mobile terminal device to realize the exchange of user information. The Android4.3 system and the android studio programming environment are used here.(1) Driver module: The software driver module is divided into three parts: the implementation of protocol specifications, I/O port programming to realize circuit functions, and Mesh ad hoc network driver programming.(2) The writing of the protocol specification mainly includes GAP and GATT: the functions implemented by GAP: write the BLE device name into EEPROM gapWriteDeviceNameToNvm(), update the device name updateDeviceName(), read the GATT information GapHandleAccessRead( ), write operations on GATT information GapHandleAccessWrite(), etc.; the functions implemented by GATT include: setting broadcast parameters gattSetAdvertParams(), broadcast timer execution gattAdvertTimerHandler(), start broadcasting GattStartAdverts() and stop broadcasting GattStopAdverts(). As shown in Figure 4.11: This figure shows the flow chart of BLE smart device registration, broadcast and connection in the protocol specification.(3) I/O programming: first, initialize the clock, hardware, and data structure of the application, register the attributes of the firmware in the database, and write the system event driver; then, write the 12 PIO ports and some registers of the CPU chip, among which Including the setting of 4-way PWM, which is implemented by modulating the pulse frequency, period, and duty cycle to realize the control of the switching frequency of the triode circuit; and output the current in the form of a look-up table, that is, to look up the preset table. the corresponding output value.(4) Mesh ad-hoc network programming: mainly through several functional functions to process Mesh information, including data initialization, reading/writing GATT messages, notifying and replying to GATT slave devices, and writing Mesh events; BLE devices in Mesh The network has 3 states: not connected, connected, and connected, and the network key needs to be sent from the state of connecting to connected.2.3APP designThe function of the APP software is to realize the control of the functional circuit and the control of indoor positioning and navigation; the project uses a mobile terminal based on the android4. 4.3) The system provides functional modules such as BLE adapters and managers; the implementation steps are 1. Instantiate the BluetoothManager (BluetoothManager) object, 2. Obtain the instantiated object of the Bluetooth Adapter (BluetoothAdapter) through the BluetoothManager, 3. Turn on Bluetooth That is, enable the instantiated object of the adapter, 4. search for Bluetooth, 5. create a Bluetooth device, and connect.3. BLE smart device control system and functional architectureThe smallest system board designed by the CSR1010 chip is used as the control unit of the smart device, and the functional circuit is designed as a MESH lamp for smart lighting. The smallest system board is embedded in the functional circuit module to realize the control of the smart device by the mobile terminal; deploy smart control devices indoors As a BLE base station, and radiate signals to space, each base station transmits a broadcast signal with a unique UUID identification code, and realizes indoor positioning control and navigation through the RSSI network formed by different base stations. The system frame is followed by the mobile terminal, the minimum system board, and the functional lighting module. For complex indoor spaces, the distance between deploying BLE smart lighting devices is 8 meters, effectively controlling accuracy and cost.SummarizeThis article first introduces the design of the hardware circuit from the aspects of chip selection and functional structure, including the clock circuit, antenna circuit, functional circuit, and power drive circuit; then, the software first introduces the implementation of the BLE protocol stack from L2CAP, GATT, GAP, etc. and application, as well as the realization of function-driven module and Mesh ad hoc network, combined with the mobile phone terminal, briefly describes the principles of smart device control, indoor positioning navigation, path planning and other functions; finally, briefly outlines the architecture of the indoor positioning control system.The above are the BLE software and hardware modules and system components introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have Bluetooth product design and development needs, you can trust us. We have rich experience in custom development of smart electronic products. We can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, BLE Bluetooth IC, dual-mode Bluetooth module, wifi module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers and other products.