Research and Application of CAN bus in the smart meter system
- Author
- XiangKe
- Advisor
- WenFang
- School
- Guizhou University
- Major
- Detection Technology and Automation
- Classification
- TP273.5 Computer control, computer control system
- Degree
- Master's thesis
- Year
- 2007
- Downloads
- 612
- Citations
- 3
Abstract
In this paper, based on the study of intelligent instrumentation and CAN bus, at home and abroad in recent years, academic and other professional information collection, analysis discusses about the performance characteristics of the fieldbus technology and CAN protocol specification, design smart meters CAN bus communication specific ways. Not add more cost, space and resources limited instrument exploration, and gradually perfect the instrument function, and to increase its competitiveness in the market. Paper describes in detail the process of the realization of the CAN bus communication instrument, explore PIC18F458 microcontroller and its integrated CAN controller hardware and software design, and it is the processor, CAN bus communication more intuitive. Instrumentation system design of the system, the structure is simple, small size, high reliability and stability, and easy to use, flexible application, to achieve the purpose of the minimum cost to complete its task, greatly accelerating the application areas of intelligent scientific and standardized process. In this paper, the following innovative or improved the first in the Asia-Pacific region: ◆ PIC18F458 microprocessor embedded CAN controller for smart meter system. ◆ CAN bus communication design: the concrete implementation of the CAN protocol on the PIC18F458 microprocessor the selected embedded CAN bus controller design point is two-way communication system CAN bus. ◆ lower machine LCD display design: serial communication between the PIC and MCS-51 microcontroller to extended The PIC18F458's I / O port to drive the LCD measurement and setting temperature value and verify the feasibility of different types of microprocessors exchanging data in the smart meter system. ◆ lower machine digital tube display design: the use of the PIC18F458 microprocessor SPI module functions and 74HC595 chip embedded in the string into and out of the characteristics drive digital display voltage. ◆ PC machine and lower machine serial communication design: completed by PIC18F458 microprocessor serial communication between the PC and the CAN bus so that the PC and microprocessor can send and receive data. ◆ on the conditioning circuit design of the K-type temperature sensor: the analog signal acquisition, filtering, amplification and transmission display. ◆: PID digital temperature sensor DS18B20 temperature measurement, temperature control circuit design calculation, the PWM output to control the temperature. ◆ PC machine design and remote control: measuring voltage and temperature displayed on the host computer (PC), and compared with the setting of the voltage and temperature values ??to control the executive body movements constitute a CAN bus monitoring and control network. ◆ Microsoft Visual Studio. NET to call Matlab design: dynamic curve of the data set in order to draw the two sets of measurements of temperature, pressure, and show them the value of the different time points in the Microsoft Visual Studio. NET to call Matlab Engine and Matlab function Plot.
Table of contents
Abstract 6-7
Abstract 7-8
first chapter 8-12
1.1 subject background and significance - 10
1.2 status and trends of the development of intelligent instruments at home and abroad 10-11
1.2.1 development of domestic smart meter 10
1.2.2 abroad smart meter development 1.3 In this paper, the main work of the 10-11
11-12
Chapter II Controller Local Area Network (CAN) 12-31 <br / > 2.1 Field bus and its classification 12-15
2.1.1 Fieldbus [21] [22] 12-13
2.1.2 Several influential fieldbus [47] [48] 13-15
2.2 CAN bus communication protocol 15-21
2.2.1 CAN bus technology of application status [56] [46] 15-16
2.2.2 CAN bus protocol technical specifications [19] [42] 16
2.2.3 CAN bus architecture 16-17
2.2.4 CAN bus protocol hierarchy [50] 17-21
2.2.4.1 CAN bus protocol data link layer 18-20
2.2. 4.2 CAN bus protocol physical layer nbsp the CAN bus some basic concepts 20-21
2.3; 21-22
2.4 CAN bus message frame format [22] [ 34] 22-25
2.4.1 CAN bus packets of data frames [25] [29] 22-24
2.4.2 CAN bus messages remote frame 24
2.4.3 CAN bus packet error frame 24
2.4.4 CAN bus message overload frame 24
2.4.5 CAN bus messages interframe gap 24-25
2.5 CAN bus error types defined nbsp in; 25-26
2.6 CAN redundant 26 < br /> 2.7 CAN bus the basic rules of the Organization the 26-27
2.8 CAN bus of performance characteristics 27-28
2.9 channel utilization performance analysis 28 -29
2.9.1 CSMA and CSMA / CD Overview the 28-29 2.9.2 CAN bus arbitration mechanism
29
2.10 CAN bus applications and prospects 29-31
Chapter embedded CAN controller microprocessor PIC18F458 the 3.1 PIC MCU About 31-38
31-33
3.1.1 Reduced Instruction Set Computer structures 31-32
3.1.2 Harvard (Harvard) dual bus structure 32
3.1.3 register set 32
3.1.4 OTP (One Time Program) technology 32-33
3.2 features and application of the PIC18F458 microcontroller series 33-34
3.2.1 PIC18F458, Series MCU Features 33
3.2.2 PIC18F458 the series microcontroller technology support 33-34
3.3 PIC18F458 microcontroller structural features the 34-35 3.3.1
external structure characteristics [27] [58] 34
3.3.2 internal structure and features 34-35
3.4 The design functional modules 35-36 < br /> 3.4.1 I / O port module 35
3.4.2 timer TMR0 module 35
3.4.3 A / D converter (or ADC) module 35
3.4.4 Capture / Compare / PWM module the 35-36
3.4.5 CAN controller module 36
3.5 PIC18F458 development tools nbsp 36-38
3.5.1 MPLAB integrated development environment (IDE); 36
3.5.2 HI-TECH PICC18 compiler [1] [32] 36-37
3.5.3 MPLAB-ICD2-line debugger [60] [61] 37-38
Chapter the smart instrumentation systems based on CAN bus hardware design 38-52
4.1 overall smart meter system hardware circuit design 38-39
4.2 devices introduced 39-44
4.2.1 High-speed CAN control is MCP2551 About [57] [59] 39-40
4.2.2 shift register 74HC595 Introduction 40-41
4.2.3 LCD display FM12864 About 41-44
4.3 CAN communication hardware circuit design the 44-46 4.3.1 hardware system composed
principle and the communication process 44-45
4.3.2 CAN bus system node configuration [49] [52] 45
4.3.3 CAN bus communication interface circuit 45-46
4.4 PC machine the PIC18F458 serial communication circuit design 46-47
4.5 digital display voltage circuit design 47-48
4.6 YM12684F LCD temperature circuit design 48
4.7 crystal oscillator circuit and switch control circuit design 48-49
4.8 K type thermocouple temperature conditioning circuit design 49-50
4.9 digital temperature sensor DS18B20 temperature measurement, temperature control circuit design 50
4.10 hardware anti-jamming measures 50-52
Chapter V software design applications in the smart meter system based on CAN bus 52-71
5.1 SCM software part of the design 52
5.2 master node procedures designed 52-58
5.2.1 master node CAN communication software design 54-57
5.2.1.1 CAN node initialization 54-56
5.2.1.2 CAN node information sent 56
5.2.1.3 CAN node information received 56-57
5.2.2 PC serial master node the communication initialization Design the 5.2.3 master node 57
low-priority interrupt programming 57-58
5.3 temperature control (intelligent node) programming 58-66
5.3.1 A / D conversion initialization subroutine 61
5.3.2 high priority interrupt subroutine 61-63
5.3.3 of the TMR0 initialization subroutine 63-64
5.3.4 PIC18F458 with AT89C51 serial communications program LCD 64-65
5.3.5 YM12684F program 65-66
5.4 voltage control (intelligent node b) program design 66-71
5.4.1 Voltage the AD data processing subroutine 68-70
5.4.2 Digital tube the display voltage subroutine 70-71
Chapter VI design of the host computer (PC) with the experimental results 71-81
6.1 PC and the next bit machine PIC18F458 communication 71-73
6.1.1 host computer using VC 7.0 user interface. 72
6.1.2 communication port initialization program design: 72-73
6.2 PC machine and remote control design 73-75
75
6.3 Microsoft Visual Studio.NET the 6.2.1 PC machine programming: 74-75
6.2.2 Temperature and pressure control program: called Matlab design 75-77
6.4 Experimental results The 77-81
Chapter VII Conclusion 81-82 the
Acknowledgements 82-83 <br / > References 83-85
Appendix (published papers) 85-86
Related dissertations
- Vehicle Air Conditioner Controller in the Loop Simulation Research
- Parts Control System in Product Line
- The Design of Small Coal Mine Remote Monitoring System Based on ARM
- The Design and Realization of Extended System in Distributed Firealarm System Based on Microcontroller
- The Design of Monitoring System for the Photovoltaic Plant Based on DSP
- Design and Application of the Distributed Monitoring System Based on Embedded Web
- The Design of Hybrid Electric Bus Data Acquisition and Test System
- Industrial Field Data Acquisition System Design Based on CAN Bus
- Design of the Hazard Source Monitoring System Based on CAN Bus
- The Design of Displacement Detection System Based on CPLD Grating Subdividing Technology
- Research on Data Acquisition System of Can Bus
- The Design and Implementation of Vehicle Data Acquisition and Communication Device Based on CAN Bus
- Design of Remote Monitoring System of Agricultural Field Information Based on GPRS Network
- Design and Implementation of Intelligent Wiring Hardness Detection System
- Research on Indoor Localization System for Intelligent Wheelchair
- Research on CAN Bus Communication and Application Experiments
- Based on Can Field-bus Technology and Web Service Home Intelligent Control System Design and Realization
- Research of Fieldbus Relay Basing on CAN Bus
- Research and Realization of Fieldbus Conversion and Monitoring System Based on ARM
- CAN Network Development of Commercial Vehicle