CAN bus based on ARM core and the gangue separation system

Abstract: This paper briefly introduces the ARM (Advanced RISCM achines) micro-controllers and CAN (Controlle rArea Network) bus technology constitute the gangue-line identification and automatic sorting system, given AT91M40800 ARM microcontrollers with CAN bus controller SJA1000 connected between the hardware circuit, discusses the data communication between the hardware interface implementation technology, data communication software gives the design process. CPLD (EPM7128) is used to adjust the timing and realization of online changes.

Introduction

With the continuous development of embedded technology, high performance, low power, low price of 32-bit RISC chip, the ARM microcontroller shown strong growth trend, embedded systems and field bus technologies, combined with the advantages of both, Preparation for the traditional technology provides a new reform program. Embedded technology and field bus technology and fusion, has designed a new coal and gangue-line identification and automatic sorting system.

Gangue-line identification and automatic sorting system

Coal and gangue-line identification and automatic sorting system block diagram shown in Figure 1. Requirements under the cleaning process, the system consists of the following three major sections:

CAN bus based on ARM core and the gangue separation system

Figure 1 gangue-line diagram of automatic sorting system

(1) detection of section: from the into the hopper, conveyor, CCD camera, image data acquisition circuitry and other components. Out of the coal mining often contain waste rock, waste rock must be selected from the conveyor belt. CCD camera image of coal and waste rock to send image data acquisition circuit to convert the converted information into the ARM microcontroller, via CAN bus network to the PC, for processing.

(2) to identify and control parts: by the computer, ARM micro-controller and monitoring of facilities, it is the core of the system. Based pattern recognition algorithm to calculate the ash content of coal and gangue, ARM micro-controller to identify and determine the gangue, the complete control of movement. If it is determined for the coal, the control part of the non-action, natural raw coal into coal hopper, channel removed from the coal. If it is determined for the waste rock, the control signals, open the valve so that waste rock into waste rock channel.

(3) Sorting by: the valve, power supply equipment, materials and systems bucket etc., by CAN-bus network, the completion of multiple channels of coal and gangue in the automatic sorting and transport.

Chip Description

AT91M40800

ATMEL Corporation AT91M40800 is based on ARM7TDMI core 16-bit / 32-bit microcontroller family with high cost of a chip, the core of the high-performance 32-bit RISC (Reduced Intro-duction Set Computer) architecture, and has 16 bit (thumb) instruction set. Programmable external bus interface (EBI), including direct connection to include a variety of off-chip FLASH memory, 8-level priority interrupt vector controller and the on-chip peripheral data controller, the device significantly improved real-time performance. AT91M40800 integrated ARM7DMIARMThumb processor core, provides a 8kB of on-chip SRAM, 8-chip select lines, 32 programmable I / O port, software-programmable 8-bit or 16-bit data bus, the maximum addressable space 64MB , 2 USART, each USART has two dedicated peripheral data controller channels, built-in programmable watchdog timer, 8 has priority, individually shielded vector interrupt controller, four external interrupt control registers, four external interrupt, including a high-priority, low latency interrupt request, three external clock inputs, 3-channel 16-bit timer / counter.

SJA1000

As the coal bunker, and sorting waste dump at some distance from their shop, need to focus on management and information processing. The field bus technology to a single distributed measurement control device into a network node to the bus as a link, to connect them into each other exchange information, jointly completed the task of network automation and control system. CAN communication speed up to 1Mbps, direct transmission distances of up to 10km (rate 5kbps below), can mount up to 110 devices can be completed at the same time multi-channel sorting and transport tasks. Philips SJA1000 is an independent company based CAN bus controller for automotive and general industrial environment, controller area network, which is Philips Semiconductor PCA82C200CAN controller (BasicCAN) alternative products, has added a new mode (PeliCAN mode), and different models can be easily connected to the processor to form a CAN control network.

Hardware interface circuit design

Figure 2 is AT91M40800 SJA1000 chip transceiver and the interface circuit diagram.

CAN bus based on ARM core and the gangue separation system

Figure 2 SJA1000 AT91M40800 interface circuit schematic and

EPM7128 interfaces between the signals used to complete the conversion and configuration, EPM7128 AT91M40800 input from the chip select signal NCS2, data lines D0 ~ D7, address A0 ~ A1, read signal NRD, write signal NWE and the system reset signal RST, through internal the logic synthesis processing to produce the required functionality SJA1000 signal. Chip signal lines according to the requirements and the allocation of port addresses, you can write a CAN bus transceiver input / output logic expression as follows:

CAN based on ARM core and the CAN bus gangue separation system = NCS2 · A0 based on ARM core and the CAN bus gangue separation system
CANALE = NCS2 • A0 • CAN bus based on ARM core and the gangue separation system (NRD NWE)

CANRD = NRD

CANWR = NWE

CANRST = NCS2 based on ARM core and the CAN bus RST gangue separation system

Selected SJA1000 address port 400000H, data port and reset the address for the port address 400001H 400002H. As the CAN controller SJA1000 address data is multiplexed by the falling edge of ALE signal can be latched address signals on the bus. However AT91M40800 address bus and data bus are available separately, and not directly with the SJA1000 address data bus. So to solve the interface AT91M40800 SJA1000 and the key is how to access the necessary signals into one SJA1000. The approach here is in two I / O operation is complete, the first address to the address port 400000H into the cell address value as the SJA1000. At this point, the chip-select based on ARM core and CAN bus gangue separation system is not gated, there is data lock AD0 ~ AD7 bus. The second visit when the data port 400001H, SJA1000 is selected, the ALE signal the first time under the action of the address value written SJA1000, CPU on the SJA1000 to read / write operations. Reset the system reset and the process can be divided into two kinds of reset. System reset signal RST reset signal in EPM7128 and procedures in a logical or operation, one of the two can be so effective and reliable reset SJA1000.

To ensure reliability of data communication, the connection terminal in the CAN bus terminal reflection of a 120Ω resistor to the bus impedance matching. SJA1000 the TX1 pin through the resistor 10k8 ground, RX1 pin level must be maintained over the 0.5Vcc. Otherwise, do not create the necessary CAN bus logic level. If the short distance communication, less environmental interference, you can not use optical isolation circuit 6N137, then, can 82C251's VREF pin is connected directly with the RX1, thus simplifying the circuit.

ARM micro-controller and CAN bus data communication

AT91M40800 external bus interface (EBI) produce access memory chip and external components of the signal, EBI supports different access protocols, to achieve single-cycle access to external devices, the design of EBI's set to: (1) Select 8-bit data bus; (2) selection criteria, read the agreement; (3) Select 8 cycle latency; (4) chip select lines NCS2 base address 400000H. All procedures are used AT91 Library of C language, it has a readable, easy to transplant, development of simple, convenient debugging. Correct initialization is the basis for normal operation procedure, the system initialization AT91M40800 main microprocessor and the initialization of SJA1000 (SJA1000 working crystal 16M), initialization process shown in Figure 3.

CAN bus based on ARM core and the gangue separation system

Initialization flow chart of Figure 3 Communications Software

Conclusion

AT91M40800 using ARM microcontrollers and CAN bus controller SJA1000 chip consisting of gangue-line identification and automatic sorting system, the traditional MCU with CAN-bus network as compared to control, is a new CAN-bus network system. ARM-based microcontrollers with embedded CAN bus system has good real-time processing system, reliability and flexibility, as the backward coal preparation technology provides a new method.

Declined comment