Coal Gangue Sorting System Based on ARM and CAN Bus

Publisher:tony520Latest update time:2012-11-02 Source: 21ic Keywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Introduction

With the continuous development of embedded technology, the ARM microcontroller of 32-bit RISC chip with high performance, low power consumption and low price has shown a strong development trend. The combination of embedded system and fieldbus technology, combining the advantages of both, provides a new transformation plan for traditional coal preparation technology. By integrating embedded technology and fieldbus technology, a new online identification and automatic sorting system for coal blocks and gangue is designed.

Online identification and automatic sorting system for coal gangue

The principle block diagram of the online identification and automatic sorting system for coal blocks and gangue is shown in Figure 1. According to the requirements of coal preparation process, this system is mainly composed of the following three parts:






Figure 1 Block diagram of the online automatic sorting system for gangue

(1) Detection part: It consists of a feed hopper, conveyor belt, CCD camera, image data acquisition circuit, etc. The mined raw coal often contains gangue, which must be picked out from the conveyor belt. The CCD camera sends the coal and gangue images to the image data acquisition circuit for conversion. The converted information is sent to the ARM microcontroller and transmitted to the PC through the CAN bus network for processing.

(2) Identification and control part: It consists of a computer, an ARM microcontroller and measurement and control equipment, which is the core of the entire system. The ash content of coal and gangue is calculated according to the pattern recognition algorithm. After the ARM microcontroller identifies and determines whether it is gangue, it completes the control action. If it is determined to be coal, the control part does not act, and the raw coal naturally falls into the coal hopper and is transported away from the coal block channel. If it is determined to be gangue, a control signal is sent to open the valve to allow the gangue to fall into the gangue channel.

(3) Sorting mechanism: It is composed of valves, material hoppers and system power supply equipment, etc. It completes the automatic sorting and transportation of coal and gangue in multiple channels through the CAN bus network.

Chip introduction

AT91M40800
AT91M40800 is a chip with high cost performance in ATMEL's 16-bit/32-bit microcontroller series based on the ARM7TDMI core. Its core is a high-performance 32-bit RISC (Reduced Introduction Set Computer) architecture and has a 16-bit (thumb) instruction set. It is directly connected to various off-chip memories including FLASH through the programmable external bus interface (EBI). The 8-priority interrupt vector controller and the on-chip peripheral data controller significantly improve the real-time performance of the device. AT91M40800 integrates ARM7DMIARMThumb processor core, provides 8kB on-chip SRAM, 8 chip select lines, 32 programmable I/O ports, software programmable 8-bit or 16-bit data bus, maximum addressable space 64MB, two USARTs, each USART has two dedicated peripheral data controller channels, built-in programmable watchdog timer, 8 priority and individually maskable vector interrupt controllers, 4 external interrupt control registers, 4 external interrupts, including a high priority, low latency interrupt request, 3 external clock inputs, 3-channel 16-bit timer/counter.

SJA1000
requires centralized management and information processing because the coal bunker, gangue mountain and sorting workshop are each at a certain distance. Fieldbus technology can turn single scattered measurement and control equipment into network nodes, and use the bus as a link to connect them into a network system and control system that can communicate information with each other and jointly complete automatic control tasks. CAN communication rate can reach up to 1Mbps, direct transmission distance can reach up to 10km (rate below 5kbps), can connect up to 110 devices, and can complete multi-channel simultaneous sorting and transportation tasks. SJA1000 is an independent CAN bus controller produced by Philips, used for controller area networks in automobiles and general industrial environments. It is a replacement for Philips semiconductor PCA82C200CAN controller (BasicCAN), adding a new working mode (PeliCAN mode), which can be easily connected to processors of different modes to form a CAN control network.

Hardware interface circuit design

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





Figure 2 Schematic diagram of the interface circuit between SJA1000 and AT91M40800 [page]

EPM7128 is used to complete the conversion and configuration of signals between interfaces. The input of EPM7128 comes from the chip select signal NCS2, data lines D0~D7, address A0~A1, read signal NRD, write signal NWE and system reset signal RST of AT91M40800. After internal logic synthesis processing, the functional signals required by SJA1000 are generated. According to the requirements of each chip signal line and the allocation of port addresses, the input/output logic relationship expression of the CAN bus transceiver can be written as follows:

CAN=NCS2·A0
CANALE=NCS2?A0?(NRD+NWE)
CANRD=NRD
CANWR=NWE
CANRST=NCS2+RST

The address port of SJA1000 is selected as 400000H, the data port address is 400001H and the reset port address is 400002H. Since the address data of the CAN controller SJA1000 is multiplexed, the address signal on the bus can be latched through the falling edge of the ALE signal. However, the address bus and data bus of the AT91M40800 are provided separately and cannot be directly connected to the address data bus of the SJA1000. Therefore, the key to solving the interface problem between the SJA1000 and the AT91M40800 is how to send the signal required to access the SJA1000. The method used here is to complete the I/O operation in two times. The first time, the address value is sent to the address port 400000H as the unit address of the SJA1000. At this time, the chip select is not selected, and the data is latched on the AD0~AD7 bus. When accessing the data port 400001H for the second time, the SJA1000 is selected, and the first address value is written to the SJA1000 under the action of the ALE signal, and the CPU performs read/write operations on the SJA1000. Reset can be divided into system reset and program reset. The system reset signal RST and the program reset signal are logically or operated in EPM7128. If either of them is valid, SJA1000 can be reliably reset.

In order to ensure the reliability of data communication, a 120Ω terminal reflection resistor is connected to each CAN bus terminal to match the bus impedance. The TX1 pin of SJA1000 is grounded through a 10k8 resistor, and the RX1 pin level must be maintained above 0.5Vcc. Otherwise, the logic level required by the CAN bus cannot be formed. If the communication distance is short and the environmental interference is small, the photoelectric isolation circuit 6N137 can be omitted. At this time, the VREF of 82C251 can be directly connected to the RX1 pin, thereby simplifying the circuit.

Data communication between ARM microcontroller and CAN bus

AT91M40800 generates signals for accessing off-chip memory and external devices through the external bus interface (EBI). EBI supports different access protocols and can achieve single-cycle access to external devices. The settings of EBI in the design are: (1) Select 8-bit data bus; (2) Select standard read protocol; (3) Select 8-cycle waiting time; (4) The base address of chip select line NCS2 is 400000H. All programs are written in C language of AT91 library, which has the advantages of strong readability, easy transplantation, simple development and convenient debugging. Correct initialization is the basis for the normal operation of the program. The initialization of the system is mainly the initialization of AT91M40800 microprocessor and SJA1000 (SJA1000 working crystal oscillator 16M). The initialization process is shown in Figure 3.






Figure 3 Communication software initialization flow chart

Conclusion

The gangue online identification and automatic sorting system composed of ARM microcontroller AT91M40800 chip and CAN bus controller SJA1000 is a novel CAN bus network system compared with the traditional MCU-controlled CAN bus network. The embedded system based on ARM microcontroller and CAN bus processing system has good real-time performance, reliability and flexibility, providing a new method for backward coal preparation technology.
Keywords:ARM Reference address:Coal Gangue Sorting System Based on ARM and CAN Bus

Previous article:JTAG Basic Principles and Emulator Performance Comparison
Next article:Design and implementation of GSM SMS alarm system based on STM32

Recommended ReadingLatest update time:2024-11-16 18:03

ARM cortex-M3 exception handling analysis
1. The possible states of the processor before entering the exception are: 1.handler 2. Thread, MSP 3. Thread, PSP   2. When an exception occurs: 1. There is a stack push process. When an exception occurs, PSP is used and pushed into PSP. When an exception occurs, MSP is used and pushed into MSP. 2. The value of LR wi
[Microcontroller]
Keil4 compiles when RL-ARM is not allowed with this license
Recently, when I used MDK to compile someone else's project, I got the following prompt: The reason is that Real-Time OS is not registered; Solution: Open the MDK registration machine, set it as above, generate a serial number, and register Real-Time OS; Note: CID is copied from file- license Management of MD
[Microcontroller]
Keil4 compiles when RL-ARM is not allowed with this license
Introduction to ARM GPIO (Exynos4412 platform)
GPIO Overview: GPIO stands for General-Purpose Input/Output. A "general-purpose programmable IO interface" is generally provided on a microcontroller chip. The interface has at least two registers, namely the "general-purpose IO control register" and the "general-purpose IO data register". characteristic 46 interr
[Microcontroller]
Introduction to ARM GPIO (Exynos4412 platform)
It is rumored that Arm has transferred all of its shares in Anmou China
British chip design giant Arm Ltd. has transferred its shares in its Chinese joint venture Arm China to a special purpose vehicle (SPV) under its parent company SoftBank Group to accelerate Arm's initial public offering (IPO) plans, NIKKEI Asia reported, citing Caixin. According to reports, Arm has been trying to re
[Semiconductor design/manufacturing]
Design of matrix keyboard based on ARM and its linux driver implementation
  1. Introduction   ARM microprocessors have been widely used in industrial control, consumer electronics, communication systems and other fields. Matrix keyboard is a commonly used keyboard form, which designs the keys into M rows and N columns, so that a total of M+N signal lines are required, but M×N keys can be
[Microcontroller]
Design of matrix keyboard based on ARM and its linux driver implementation
What is an instruction set? What impact will the ARM ban have on Huawei?
After continuous development, computer language is divided into three levels: high-level language, assembly language and machine language. 1. Machine language We humans are used to using the decimal system when calculating numbers, which is said to be because humans have 10 fingers. However, computers rely on high a
[Microcontroller]
What is an instruction set? What impact will the ARM ban have on Huawei?
Remote update of distribution transformer monitoring terminal program based on IAP function of ARM processor
1 Introduction to LPC2378 chip LPC2378 is a 32-bit processor based on ARM7TDMI-S. It has 512 KB of on-chip Flash program memory, 32 KB of static RAM (SRAM), as well as In-System Programming (ISP) and In-Application Programming (IAP) functions. Since the program has a large memory requirement, a 64 KB SRAM is added
[Microcontroller]
Remote update of distribution transformer monitoring terminal program based on IAP function of ARM processor
ARM's technology is superior to others - ARM Cortex-M3 and M4 microcontrollers
introduction Many embedded developers are familiar with the ARM Cortex processor architecture, but few are able to fully understand this popular architecture and take advantage of its unique features and performance. This is especially true of the new ARM Cortex-M4 processor, which boasts an enhanced architecture, n
[Microcontroller]
ARM's technology is superior to others - ARM Cortex-M3 and M4 microcontrollers
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号