Design and Application of Bluetooth Access Point Based on ARM7

Publisher:WhisperingWindsLatest update time:2010-07-26 Source: 微计算机信息 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Reference address:Design and Application of Bluetooth Access Point Based on ARM7

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

Design of SoC Voice Processing System Based on ARM7 TDMI
introduction With the rapid development of microelectronics and computer technology, many embedded application systems have emerged. Among them, various speech processing systems have been continuously developed and widely used in various industries, such as voice station announcers, automatic interpretatio
[Microcontroller]
Design of SoC Voice Processing System Based on ARM7 TDMI
ARM7 Getting Started 1, Marquee Experiment
Program made with keil uvision3 and proteus. Main program: /******************************************************************************/ /*  This file is part of the uVision/ARM development tools                    */ /*  Copyright KEIL ELEKTRONIK GmbH 2002-2004                                  */ /*******
[Microcontroller]
ARM7 Getting Started 1, Marquee Experiment
ARM core pipeline - ARM7, ARM9E, ARM11, Cortex-A series processors
This article mainly introduces the pipeline of ARM7, ARM9E, ARM11 and Cortex-A series processors, from instruction fetch, instruction decoding to each stage of instruction execution. Refer to ARM's website http://www.arm.com/about/company-profile/index.php. ARM was founded in 1990 and has sold more than 15 billion chi
[Microcontroller]
Design of large dust removal controller for power plants based on ARM7, AVR and UCOSII
The control objects are 540 pulse control valves, 20 butterfly valves, 3 temperature detection points, and 2 cooling unit control points. Party A requires that the controller should have a human-machine interface, the temperature control points should be adjustable, the pulse valve working time should be adjustable,
[Microcontroller]
Design of large dust removal controller for power plants based on ARM7, AVR and UCOSII
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号