introduction
CAN (Controller Area Network) is a local area network mainly used for monitoring and controlling various devices. It was originally designed by Bosch of Germany for automobile monitoring systems. It has good functional characteristics and high reliability, and has strong anti-interference ability on site. The bus form is a serial data communication bus.
TI's 24X series chips have excellent processing performance (30MIPS), high peripheral integration, large program memory capacity, and fast A/D conversion speed. They are DSP (digital signal processing) chips designed for industrial control. LF2407A provides a digital motor control solution with its rich integrated peripherals. Its embedded CAN bus controller provides CAN communication functions based on CAN2.0B specification requirements, providing a solution for realizing distributed industrial monitoring local area networks.
Introduction to CAN Bus
CAN belongs to the category of fieldbus, which effectively supports serial communication networks for distributed control or real-time control. CAN has a wide range of applications, from high-speed networks to low-cost multi-channel boundaries. In the field of automation electronics, such as automotive engine control components, sensors, anti-skid systems, etc., the bit rate of CAN can be as high as 1Mbps.
Different from the traditional control system that uses a one-to-one connection method based on control loops, the field bus uses intelligent field devices with computing, control and communication functions. It can complete data collection, data analysis, control processing and other functions on site, and send relevant data to the host and other field devices to achieve thorough distributed control.
CAN bus features:
1. Openness of the system. 2. Field equipment has a high degree of autonomy and intelligence. 3. High degree of decentralization of the system. 4. Strong adaptability to the field environment.
Hierarchical structure of CAN nodes
.CAN object layer
.CAN transfer layer
.The physical layer
The object layer is responsible for message filtering and status and message processing. The transport layer is the core of the CAN protocol. It provides received messages to the object layer and receives messages from the object layer. The physical layer defines the actual signal transmission method. The role of the physical layer is to perform the actual transmission of bit information between different nodes based on all electrical properties.
Figure 1 CAN node layered structure
LF2407A Introduction
DSP (Digital Signal Processing) is the process of collecting, transforming, filtering, evaluating, enhancing, compressing, and identifying signals in digital form to obtain a signal form that meets people's needs. LF2407A is a new industrial control digital signal processing chip with the following features:
1. Chip features :
1) 32-bit CPU, 32-bit ALU, 16*16-bit parallel multiplier, 3 scaled shifters, 8 16-bit auxiliary registers; 544 words of on-chip data/program DARAM, 2K SARAM, 32K on-chip program FLASH, 64K data and memory addressing range;
2) Four-stage pipeline operation, eight-level hardware stack, five external interrupts;
3) Two event managers EVA and EVB, including: 16 PWM channels, 10 comparison CMP units, 4 16-bit general timing counters, 6 capture units CAP , 4 integral coded pulse QEP units ;
4) 16-channel 10-bit A/D conversion, conversion time is 500ns, and the maximum sampling rate is 1MHz;
5) 41 individually programmable multiplexed I/O pins; clock module based on phase-locked loop circuit (PLL); watchdog timer module (WATCH_DOG) with real-time interrupt; serial communication interface (SPI) and serial peripheral interface (SPI), and CAN communication module interface ;
6) 33ns instruction cycle, 30MIPS per second , system +3.3V power supply.
2. LF2407A Embedded CAN Controller
The LF2407A chip has a built-in CAN control module, which integrates a 16-bit control chip with full CAN functions. It is fully compatible with the CAN2.0B protocol and supports standard and extended formats. The CAN module of the LF2407A consists of two parts: the CAN control/status register and the CAN mailbox RAM area. Its structural block diagram is as follows:
Figure 2 LF2407-A CAN module block diagram
The CAN control/status register section contains 16 16-bit CAN control/status registers, namely control register, status register, interrupt register and receive mask register. It completes all the services and functions of the data link layer defined by the ISO/OSI model, including the object layer and the transport layer. It realizes the control frame structure, execution arbitration, error detection, error calibration, fault definition, etc.
CAN controller interface----PCA82C250: PCA82C250 is the interface between CAN protocol controller and physical bus. This device provides differential transmission capability to the bus and differential reception capability to the CAN controller, which complies with the "ISO11898" standard.
System Structure
This system is a motor control system based on the distributed field bus CAN bus for communication and DSP as the microcontroller. It is a distributed industrial control system that combines the high-speed processing capability of DSP with the high performance and high reliability of CAN bus communication. The main body of the system design is divided into two parts: the first is the execution component: LF2407-A controls the motor action; the second is network communication: CAN realizes distributed monitoring communication.
Node 1 Node
Figure 3 System structure diagram
Its system structure can be mainly divided into three layers: the first layer, the PC and CAN bus interface layer - realize the visual operation control between the PC and the CAN communication bus, which is realized by PC-CAN - the intelligent CAN bus communication adapter card; the second layer, the CAN bus and DSP controller LF2407 interface layer - realize the physical interface and communication between the CAN bus and the CAN controller of the LF2407-A board; the third layer, the I/O port of LF2407 and the drive interface of the stepper motor - realize the electrical isolation protection of the LF2407-A board and the high-current drive of the stepper motor, and complete the actual movement of the motor.
PC is the host computer of the system, which effectively utilizes the advantages of PC's strong computing power, large capacity and good human-machine interface. PC-CAN is an intelligent CAN bus communication adapter card with high performance and price ratio, which enables PC to be easily connected to CAN bus and realize high-speed data exchange between CAN bus and host PC. PC-CAN has built-in photoelectric isolation to protect PC from damage due to ground loop current and enhance the reliability of the system in harsh environment.
PCA82C250: It is the interface transceiver between LF2407 embedded CAN controller and CAN bus. 8-pin, high speed, up to 1Mbps transmission rate. It provides differential transmission capability to CAN bus and differential reception capability to CAN controller.
Figure 5 DSP 2407-A and stepper motor driver interface
The drive circuit interface realizes the electrical isolation between the DSP chip and the stepper motor, protects the safety of the DSP chip, and completes the conversion from the weak current (less than 10mA) output by the DSP to the large current (+1.5A) required for the stepper motor drive, providing the required drive current for the motor. Among them, TLP521 is the optoelectronic isolation coupler between the DSP and the stepper motor, which plays a role in level isolation, protects the DSP chip, and completes the signal conversion. RIF530 is a VMOS tube, which is the drive current switch of the stepper motor.
CAN bus physical layer : CAN's physical link communication medium can be twisted pair, coaxial cable or optical fiber. It adopts a non-destructive priority-based bus arbitration method. In this system, twisted pair is used as the communication medium.
Software Design
The software design of this system is the key to complete the distributed control system based on CAN bus. The multi-machine communication of CAN bus is realized by software programming to receive and send data. Two nodes communication is realized on two LF2407-A boards: one is the local node, which receives the request data frame from the remote node and sends the data frame; the other is the remote node, which sends a request frame to request the remote node to send data.
It is mainly divided into: 1. The whole motor control system---implements system initialization, generates motor control frequency signal, implements the modification of motor control word in interrupt mode, implements motor speed control by delay subroutine, and initializes CAN module. 2. CAN sends a remote frame request---initializes CAN request frame, makes CAN mailbox 3 the mailbox for sending request frame, and CAN mailbox 0 the mailbox for receiving data frame. Mailbox 3 sends a request frame to request motor control word data. When the received message flag is 1 (RMP=1), mailbox 0 receives data. 3. CAN initializes an automatic response remote frame request---initializes CAN to automatically respond to remote frame request, and makes CAN mailbox 3 the sending mailbox. When a remote request is received, a frame of data is sent. The following software program flow chart is given by taking CAN initializing an automatic response remote frame request as an example, see Figure 6.
Figure 6 CAN initialization of an automatic response remote frame request program flow chart
Conclusion
This paper studies the composition and implementation of a distributed motor control system based on the CAN bus. Combining the high-speed processing capability of DSP with the high reliability and high stability of the CAN field bus provides a good solution for building a new real-time, fast-response distributed industrial control network. In particular, the embedded modules of this industrial control chip LF2407A: pulse width coding PWM, comparison unit CMP, capture unit CAP, integral coding pulse QEP unit, etc. provide direct control applications for DC and AC motors, eliminating the large amount of tedious algorithm programming required in the past in the single-chip control system, and effectively speeding up the development and application of industrial control systems.
Previous article:Digital Thermometer and Temperature Controller DS7505 and Its Application
Next article:Sensorless AC motor control technology improves operating efficiency
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- 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
- 2005 National Undergraduate Electronic Design Competition Topic
- EEWORLD University----[High Precision Laboratory] Interface: HDMI
- How to Make DSP Digital Oscillator Generate Phase-Shifted Sine Wave
- Discuss one of the STM32H750
- Golang crawler language access proxy
- Selection of magnetic beads in circuit design
- Book an appointment to win a gift: Book an appointment for the live broadcast of power integrity design of ideal power distribution network, gain knowledge and win a Keysight gift
- How to use C2000 CLA and solutions to common CLA memory problems
- The first article GD32VF103C START development board unboxing running lights
- How to eliminate the influence of gravity acceleration on accelerometer