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.
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
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
- MSP430 MCU Register Summary - CPU Register
- A New Method of Expanding SRAM Externally in MCU
- CircuitPython 6.0.0 Beta 0 released!
- October 29 live broadcast review: ST Data Center and Communication Network Power Management Solutions (including video, presentation documents, Q&A)
- [NXP Rapid IoT Review] +NO.1 First Hands-On Experience---Small but Fully Complementary
- What parameters should be considered when evaluating and selecting SiC MOSFET devices?
- Challenge FreeRTOS learning + How to port FreeRTOS and create tasks for STM32F107
- Please analyze this circuit. What will the final waveform be?
- NFC chip selection and basic circuit framework
- 【McQueen Trial】Python Programming (2)