1 Introduction
In industrial sites, due to some harsh environments and inconvenient wiring, Bluetooth wireless communication technology can be used to achieve data communication. At the same time, there are many devices in industrial sites that are interconnected in different ways, including non-intelligent simple data connection units (I/O), intelligent devices (such as smart sensors, single-loop controllers and PLCs) and monitoring systems (used as HMI for data recording and monitoring). Most of these devices are interconnected by various communication protocols and media, some of which can be replaced by Bluetooth wireless technology. Taking this as an example, this article combines the BCM04 Bluetooth module to develop an industrial access point based on Bluetooth communication, and establishes a valve, flow meter, and temperature transmitter test system based on Bluetooth communication, realizing the communication between industrial equipment with Bluetooth communication modules and existing wired networks.
2 Introduction to Bluetooth Technology
Bluetooth is a short-range wireless communication technology. Electronic devices can be connected to each other through Bluetooth modules, eliminating the need for traditional wires. Through the wireless receiver on the chip, electronic products equipped with Bluetooth technology can communicate with each other within a distance of ten meters, and the transmission speed can reach 1 megabyte per second. At the same time, Bluetooth supports short-range communication between devices (generally within 10 meters). Wireless information exchange can be carried out between many devices including mobile phones, PDAs, wireless headphones, laptops, and related peripherals. The Bluetooth standard is IEEE802.15, which works in a frequency band with a bandwidth of 2.4GHZ 1Mb/s.
The application of Bluetooth technology in industrial sites can be roughly divided into four aspects:
(1) Replacement of serial cables. Wireless Bluetooth connection can replace the current serial cables.
(2) Combining Bluetooth and Internet technologies. Using the CPU processing power provided by Bluetooth, more functions can be added to the device, such as a built-in WEB user interface.
(3) Industrial access points: Access points are used to connect several Bluetooth devices to traditional wired networks, such as IP networks (such as Ethernet) or industrial fieldbus networks (such as Controlnet and Profibus).
(4) Wireless sensors and actuators. Use Bluetooth to connect devices that are most closely related to the physical process (sensors, actuators, and simple analog/digital IO devices) to the monitoring system.
3 System Design of Bluetooth Access Point
Wireless communication technology is used in industrial sites. This requires industrial equipment to use Bluetooth functions and be connected to existing Ethernet or industrial field bus networks. Here, the Bluetooth access point is like a "telephone switch", communicating with the host computer through Ethernet power supply equipment, and exchanging data with industrial field equipment through wireless means, so as to realize the data collection, monitoring and control of field equipment by the host computer. This paper divides the system design of Bluetooth access points into two parts: hardware architecture and software design. These two parts will be explained in detail below.
3.1 Hardware Architecture
The Bluetooth access point includes important components such as a microprocessor (AT91R40008), memory, Bluetooth communication module, network communication interface, and serial communication. In this design, the power supply uses an Ethernet power supply device, which is used for network communication and also provides the power required in the design. The power supply is converted to provide the required +3.3V and +1.8V power for the microprocessor, memory, Bluetooth communication module, etc. 32-bit microprocessor AT91R40008
3.1.1 Microprocessor AT91R40008
AT91R40008 is a 32-bit microcontroller series product of Atmel AT9116. It is based on the ARM7TDMI processor core. The processor has a high-performance 32-bit reduced instruction set and a high-density 16-bit instruction set, and has low energy consumption. AT91R40008 has on-chip SRAM or ROM, fully programmable external bus interface (EBI), 32 programmable I/O ports, 8 priorities, 4 external interrupts, 2 USARTs and 16-bit timer/counter. In addition, the internal registers can quickly handle abnormal situations, which can facilitate real-time control and application programming.
AT91R40008 features direct connection with external memory, which is connected by external FLASH, through a fully programmable external bus interface (EBI), an eight-bit priority vector interrupt controller, and an external data controller, greatly improving the real-time performance of the processor. AT91R40008 uses Atmel's high-density CMOS technology, and the ARM7TDMI processor core is combined with on-chip high-speed memory and its external devices, making it very powerful.
The design of the microprocessor part includes the startup and reset of the system hardware, the allocation and definition of the address bus and data bus, the reading and writing of the Bluetooth module through the serial line, etc.
The system uses an external 50M clock oscillator as the clock source to input the clock signal to the CPU. The reset circuit is composed of a 10uF capacitor, a 10K resistor and a button to form a low-level reset circuit. The reset circuit can realize automatic low-level reset or manual reset at power-on. The internal ROM is 128K, and the external memory can be expanded to a maximum of 64M. Due to design needs, a 2M-byte SST36VF160 is expanded in the design to store a large number of software programs. Since the SRAM contained in the AT91R40008 has reached 256K, it is enough for data storage, so there is no external RAM expansion. The network card chip AX88796 is connected to the CPU through the chip select line, interrupt line, read and write signal control line and address data bus to realize the network communication between the Bluetooth access point and the host computer. AT91R40008 realizes data exchange with the Bluetooth module through serial port 1, and realizes serial port debugging with the host computer through serial port 0.
3.1.2 FLASH memory SST36VF160
Since the system is applied to industrial field Ethernet, the corresponding Ethernet specification standards must be added to the software, so in the system design, a 2M-byte FLASH is expanded outside the CPU. SST39VF160 is a 1M×16 CMOS multi-function FLASH device, manufactured by SST's unique high-performance SuperFlash technology. SST39VF160 has low power consumption, an operating voltage of 3.3V, high-performance programming functions, and a word programming time of 14us. Based on these advantages of SST39F160, this FLASH is selected. In practice, it has been proved that this FLASH can meet the requirements of program configuration and data storage more conveniently and at a lower cost.
3.1.3 Bluetooth module BCM04 is an adaptive Bluetooth communication module that can exchange data and voice communication. It is small in size, 17.5×15.0×2.3mm;
The operating voltage is 1.8V, and the power consumption is low; UART is the main interface, and there are also voice interface, SPI interface, PIO port, etc. Its structural block diagram is shown in Figure 2; BCM04 integrates 16Kbits of EEPROM and 4Mbits of FLASH/ROM, and has rich memory resources.
In the design, the UART port of the Bluetooth module is connected to the serial port 1 of the microprocessor AT91R40008. The Bluetooth module sends and receives data to the wireless devices in the industrial field. The data is then transmitted to the host computer via the industrial Ethernet by the CPU, enabling the host computer to access and monitor the Bluetooth device.
3.1.4 Network Communication Interface In the design, a network interface is used to connect the Bluetooth access point to the industrial Ethernet. The data is transmitted from the Ethernet to the host computer, realizing the communication between the wireless devices at the industrial site and the host computer. The network isolator uses HR61H50L, and the network card chip uses AX88796.
AX88796 is a NE2000 compatible Fast Ethernet controller launched by Asix Corporation of Taiwan. It integrates 10/100 Mb/s adaptive physical layer transceiver and 8K×16-bit SRAM, and supports multiple CPU bus types such as MCS-51 series, 80186 series and MC68K series. AX88796 implements 10Mb/s and 100Mb/s Ethernet control functions based on IEEE802.3/IEEE802.3u LAN standards, and provides IEEE802.3u compatible media independent interface MII (Media Independent Interface) to support applications on other media. The address bus SA[9:0] and data bus SD[15:0] of AX88796 are connected to the address/data bus of CPU respectively. CPU controls the working state of AX88796 by reading and writing NE2000 registers through I/O, and exchanges data with the internal cache SRAM of AX88796 through remote DMA FIFOs. Local DMA is performed between SRAM and MAC core to send data to the MAC layer, and then sent to the RJ45 interface through the internal PHY layer, or sent to the external physical layer chip through the MII interface. The SEEPROM interface can be used to connect to the serial EEPROM. The EEPROM can be used to store the MAC address for AX88796 to read each time it is initialized.
3.1.5 Power supply
The power supply uses an Ethernet power supply device, which complies with the 802.3 powered device standard and outputs a standard +24V. After level conversion through the LM2576-5, AS1117-1.8 and AS1117-3.3 power chips, it outputs the 1.8V and 3.3V power required for the CPU, memory, network card chip and Bluetooth module on the Bluetooth access point.
3.1.6 Serial communication
The serial communication uses the MAX3232 chip. The serial communication interface is used here mainly to debug the communication between the Bluetooth module, CPU and the host computer, and to test its communication performance.
3.2 Software
In the software design part, the communication principle of the Bluetooth module is mainly introduced. First, initialize the Bluetooth module until the initialization is successful. Then define the various ports of the communication module. AT91R40008 has a 32-bit I/O port. When designing, we combine the actual situation, consider the specific ports used, and define these ports in combination with other communication modules. After defining the communication module port, it is immediately connected to the on-site wireless device. Subsequently, the Bluetooth access point starts to search for on-site devices, read and write on-site devices, receive Bluetooth instructions and update. The communication flow chart of its Bluetooth module is shown in Figure 3.
The Bluetooth access point broadcasts its own device declaration to the local subnet and receives device declarations from other devices. After initialization, it searches for neighbor devices in the subnet within 5 seconds. After the search is completed, it starts to build a neighbor table and add other slave devices in the neighbor table to the wireless scheduling list. After the network is established, the access point polls the slave device according to the deterministic scheduling algorithm. It also converts the Bluetooth data message into an industrial Ethernet message and puts it into the industrial
In the Ethernet scheduler. Device declaration message:
typedef struct _zgb_pkt_ann {
} zgb_pkt_ann;
Information distribution message:
typedef struct _zgb_distribute { INT8U devdesp[16]; INT8U mdata[16];
} zgb_distribute;
Token:
typedef struct _zgb_pass_token { INT8U ans;INT8U res[3]; // Device description, string // Master or slave? 0 Master device; 1 Slave device // Device status: 0 Device is not configured, free to send packets; // 1 Device is configured, get token to send packets // Reserved field
//Device description, string //Content of information distribution
//Confirm? 0: Not confirmed; 1: Confirm // Keep information
} zgb_pass_token;
4 Application of Bluetooth access points in industrial sites
In the design, a connection is established between the wired network of the industrial Ethernet and the wireless devices at the industrial site, as shown in Figure 4. The wireless devices at the industrial site transmit data to the Bluetooth access point through a Bluetooth-specific transmission protocol. The data is converted into a format that can be recognized and supported by the industrial Ethernet, and transmitted to a device in the industrial Ethernet that issues a command request. The host computer can also monitor the data through Ethernet. The wireless devices at the industrial site can also be connected to a handheld device with a Bluetooth module and a Bluetooth access point at the same time to access and collect data.
5 Summary
In the process of building the whole system and testing the communication performance of Bluetooth, it was found that the Bluetooth module uses wireless information transmission, so there is a lot of interference during the transmission process and the transmission distance is short. The installation environment of industrial field equipment is often harsh. How to make Bluetooth devices have better stability, lower power consumption, and a wider working range, all of which put forward higher requirements for hardware design and software optimization.
Previous article:Application of ARM9 system in intelligent monitoring system of wireless transmitter
Next article:Design of adaptive Ethernet communication interface for LPC23xx
Recommended ReadingLatest update time:2024-11-16 18:09
- Popular Resources
- Popular amplifiers
- Mission-oriented wireless communications for cooperative sensing in intelligent unmanned systems
- Practical Deep Neural Networks on Mobile Platforms: Principles, Architecture, and Optimization
- ARM Embedded System Principles and Applications (Wang Xiaofeng)
- ARM Cortex-M4+Wi-Fi MCU Application Guide (Embedded Technology and Application Series) (Guo Shujun)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- I am facing a problem during the debian burning process of the Sipeed LicheeRV 86 development board?
- FIFO problem of vivado2018.1
- [RT-Thread reading notes] (1) Thread initialization and linked list
- Regarding the peripheral circuit design of the LCD segment code screen, please provide relevant development information. Thank you.
- How big a power line is needed for a 250KW submersible pump?
- STM32f030 development code
- [National Technology N32WB452 Review]_Unboxing and RT-Thread Example Running
- 【GD32L233C-START Review】4. Porting RT-Thread to GD32L233
- Analog input and output buffers
- XMC4800 ECAT Evaluation Board First Experience - Unboxing Review