Design of Bluetooth-based real-time data acquisition system based on ARM

Design of Bluetooth-based real-time data acquisition system based on ARM

Abstract: This paper presents a Bluetooth wireless data acquisition system based on ARM. Combining the advantages of embedded technology and Bluetooth technology, the traditional industrial field data acquisition system cannot solve the problems of low power consumption, low price and high performance, as well as cable wiring restrictions and inconvenience. The use of Bluetooth wireless communication technology to achieve data collection makes data collection and remote monitoring easier and more convenient, and improves the anti-interference performance of data collection.

1 Introduction

With the development of computer technology, especially wireless technology has been widely penetrated into all aspects of people's lives, and people's lives have undergone profound changes. In the field of industrial data collection and measurement, due to the large variety of measurements, the large amount of data, and the presence of many conditions that are difficult for people to reach or cannot stay at, they occasionally collect some field data, which not only requires a lot of labor, material and Financial resources to maintain the equipment, while bringing a lot of unnecessary trouble to the collection.

In order to solve the above problems, this paper proposes a Bluetooth-based real-time data acquisition system based on ARM. The embedded operating system Windows CE is used to collect, control, display, and process data collected by sensors centralized via Bluetooth wireless transmission, and realize industrial real-time data collection. The ARM technology provides a short instruction cycle, strong processing power, and rich interfaces in the core microcontroller. It can successfully run the operating system and provide a good platform for the application development of the control system. At the same time, it is small in size, low in power consumption, excellent in running performance, and can be well applied to industrial control applications. The Bluetooth technology is a short-range, low-power wireless communication technology that uses a frequency hopping mechanism for data transmission, so it can greatly improve the anti-interference performance of data transmission. For the application of data acquisition systems, the combination of the two greatly simplifies the cumbersome configuration and system complexity of the distributed acquisition equipment, and greatly reduces power consumption and volume. The system flexibility brought by it makes the system more widely used. The system fully embodies the advantages of embedded systems and Bluetooth technology, and has certain practical value.

2 Overall system design

The ARM-based Bluetooth real-time data acquisition system is composed of three parts: an ARM-based data center, a single-chip intelligent node, and a Bluetooth wireless communication link. The data center uses a hardware platform based on the ARM9 microprocessor S3C2410 and runs the Windows CE embedded operating system, which can provide a friendly and convenient user interface for the operator to manage the field data and control the target equipment; the single-chip node is responsible for collecting field data and passing The Bluetooth wireless communication link receives data center commands and uploads the data to the data center; the Bluetooth wireless communication link is realized by the Bluetooth module installed in the data center and the single-chip node. Considering the scalability of the system, the system can also realize data communication between the ARM data center and the PC through the RS-232 interface. The overall composition of the system is shown in Figure 1.

3 System hardware design

The hardware design of the Bluetooth-based real-time data acquisition system based on ARM includes three parts: Bluetooth module antenna and peripheral circuit, ARM-based data center, and single-chip node. Now give a brief introduction to each main module.

3.1 Bluetooth module antenna and peripheral circuits

The Bluetooth module is the basis of Bluetooth communication, and the embedded Bluetooth module DFBM-CS120 is adopted here. It integrates the Bluetooth standard communication protocol, provides users with a full-duplex UART interface and radio frequency signal output, so that users can operate through the UART control module and transmit the radio frequency signal carrying data through the antenna.

The peripheral circuit design of the Bluetooth module mainly includes antenna design, power supply design and UART interface design, as shown in Figure 2.

Among them, the performance of the antenna is directly related to whether the entire Bluetooth communication system can normally transmit data, and the design method of the radio frequency circuit must be adopted for targeted design. Here, because the DFBM-CS120 has an antenna pin Antenna, which outputs 2.402 ~ 2.480GHz radio frequency signals, the output impedance of the antenna pin is 50Ω. According to the maximum power transmission theorem, an AT3216 multilayer ceramic antenna with an impedance of 50Ω is externally connected to the antenna pins. Considering the possible signal attenuation due to errors between manufacturing parameters and design parameters, a π-type network composed of an inductor and two capacitors is added between the antenna pin of the module and the Bluetooth antenna to amplify the RF signal . The block diagram of the antenna circuit is shown in Figure 3.

3.2 ARM-based data center

The basic requirements of the ARM-based data center are small size, low power consumption, beautiful interface, convenient operation, powerful communication function, and good system scalability. Specific to the hardware, the basic requirements for the ARM system are to support the Windows CE operating system, support the color LCD, support the touch screen, support USB, support Ethernet, and support the Bluetooth module communication interface. According to the requirements, combined with the popular development platform in the embedded system industry, the hardware platform based on the ARM9 processor S3C2410 is selected as the data center. The Bluetooth module is installed as a UART peripheral of the S3C2410 hardware platform, and the data center has the Bluetooth communication function.


The design of S3C2410 hardware platform is divided into two parts: core system design and peripheral design. The core system of the platform includes CPU, SDRAM and Flash, where SDRAM is the memory of the platform, and Flash is equivalent to the hard disk of the platform; the platform peripherals include LCD and touch screen interface circuits, Ethernet controller, USB and UART.

The overall design of the hardware platform is shown in Figure 4.

3.3 SCM node

The single-chip microcomputer node is the bottom equipment of the system. When it works normally, it acts as the general controller to coordinate and control the work of other monitoring devices or modules to complete tasks such as data collection, measurement, processing, communication with the data center, receiving commands and data transmission. In this system, the MPU of the single-chip node module uses Winbond W77E58, and its serial port communicates with the UART of the Bluetooth communication module.

Compatible with 8051 core, large on-chip Flash, and dual serial ports are the three outstanding features of W77E58. The first two points mean that the MCU node software can be designed in C51 language, and there is no need to use assembly language because of worrying about the code is too large; dual serial ports mean that you can use an independent serial port to connect with the PC to debug the Bluetooth communication software written after debugging Then transplant it to the serial port that communicates with the Bluetooth module without changing any hardware for software debugging, which greatly reduces the complexity of the hardware and increases the speed of software development.

4 System software design

The software design of the Bluetooth-based real-time data acquisition system based on ARM consists of three parts. The first part is the construction of the Windows CE embedded operating system platform; the second part is based on the Windows CE operating system, running in the design of the Bluetooth data acquisition application in the data center; the third part is the implementation of the Bluetooth communication software of the single-chip node.

4.1 Construction of Windows CE Embedded Operating System

Windows CE (WinCE for short) is the most widely used among mainstream embedded operating systems on the market today. It is a 32-bit real-time embedded window operating system that supports multiple hardware platforms, open core code, and components that can be cut. It has high reliability, good real-time performance, modularity and small memory footprint, supports multiple wireless and wired connections, It supports multiple hardware platforms, multiple wireless and wired connections, and is widely used in the development of various embedded smart devices.

Because the embedded intelligent platform is diverse in both CPU architecture and peripheral hardware, transplanting WinCE requires developers to modify and customize the system according to the specific platform requirements. There are two main parts to transplant WinCE operating system: one is to customize BSP code, including Bootloader, OAL and driver; the other is to run and debug WinCE operating system, mainly to use development tools to compile, download, run and debug operating system images.

4.2 Design of Bluetooth data acquisition program based on Windows CE

Because the DFBM-CS120 Bluetooth module communicates through the serial port, and the WinCE driver has encapsulated the serial port in the form of "file", developers do not need to write code to operate the serial port hardware, so there is no need to design the driver for the Bluetooth data acquisition program. Just consider designing the application. In this system, the Bluetooth data acquisition program based on WinCE adopts the Embedded Visual C ++ integrated development environment, based on the MFC library, and adopts the object-oriented design method. The main task of the Bluetooth data acquisition program is to send and receive data through the serial port, so serial port programming is the part that must be implemented to design the Bluetooth data acquisition program. The WinCE driver has encapsulated the serial port in the form of "file". Therefore, the serial port programming based on WinCE does not need to write code to directly operate the UART hardware, as long as the file API function provided by WinCE can be used to open and read and write the serial port. These API functions are: CreateFile, ReadFile, and WriteFile.

4.3 SCM node programming

The single-chip microcomputer node is responsible for collecting data and sending the data to the data center through the Bluetooth module. The focus of program design is to realize Bluetooth data communication. The MCU program is written in C51 language under Keil μVision2 development environment. SCM node programming includes the following parts: 1. Configure the serial port; 2. Design the MCU-Bluetooth module communication program according to the serial port interrupt program; 3. Design the communication frame format.

After the connection between the MCU node and the data center, the serial port interrupt program receives and recognizes the commands of the data center. Because the data and commands are transparently transmitted, a communication protocol must be designed between the MCU node and the data center, specifying the frame header of the command frame and data frame, Only the information such as frame end, frame length, frame type, check, etc. can transfer data to each other. The communication frame format is designed as follows:

5 Conclusion

This paper applies Bluetooth communication technology and ARM embedded system to industrial data collection, and develops a novel wireless data collection system. The system includes three parts: data center, Bluetooth communication and single-chip node. The data center has powerful hardware and software functions. It is designed based on the hardware platform with ARM9 processor S3C2410 as the core, runs the Windows CE operating system, and develops a Bluetooth data acquisition application program based on Windows CE. Through the Bluetooth module of the data center and the single-chip node, the data center can easily exchange commands and data with the intelligent node at any position within a radius of about 10 meters from the single-chip node, regardless of the transmission angle and the installation position of the node.

The author of this article is innovative: in the embedded data acquisition system with the ARM9 chip as the core, the Bluetooth wireless communication DFBM-CS120 chip is used to achieve high-speed real-time data signal acquisition and wireless data transmission. Compared with wired data transmission, it is more convenient and flexible, and has higher reliability. In the software design, Windows CE real-time multi-task system is used to implement system initialization, data acquisition, wireless communication and other tasks for scheduling and management. The test results show that the system has simple hardware circuit, strong reliability, and reasonable software design, which meets the requirements of real-time signal acquisition and wireless data transmission.

Brushless Dc Motor Controllers

Dc Servo Controller,Dc Servo Motor Controller,Dc Electric Motor Controller,Brushless Dc Motor Controllers

Jinan Keya Electron Science And Technology Co., Ltd. , https://www.keyaservo.com