Ellips BV, Eindhoven, the Netherlands Coach : Ir
Total Page:16
File Type:pdf, Size:1020Kb
Eindhoven University of Technology MASTER An intelligent sensor controller using Profibus Zinken, P.J.H. Award date: 1998 Link to publication Disclaimer This document contains a student thesis (bachelor's or master's), as authored by a student at Eindhoven University of Technology. Student theses are made available in the TU/e repository upon obtaining the required degree. The grade received is not published on the document as presented in the repository. The required complexity or quality of research of student theses may vary by program, and the required minimum study period may vary in duration. General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain ~ ICSlEB691 Technische UniversiteittUJ Eindhoven Faculty ofElectrical Engineering ICS (EB) Section of Information and Communication Systems Master's Thesis: An intelligent sensor controller using Profibus P.l.H. Zinken Id.nr.403715 Location : Ellips BV, Eindhoven, The Netherlands Coach : Ir. H.P.E. Stox Supervisor : Prof. Ir. M.PJ. Stevens ~ Period : August 1997 - July 1998 ELLIPS The Faculty of Electrical Engineering of Eindhoven University of Technology does not accept any responsibility regarding the contents of Master's Theses. An intelligent sensor controller using Profibus E~ SUMMARY The new fruit grading system that is currently developed by Ellips B.V. is based on a Profibus DP (PROcess FIeldBUS Decentralised Peripheral) environment. The system consists of one master computer and several intelligent slaves; an I/O controller, a weight controller, a sensor controller and a diameter- and color measurement system. In this document the design of the sensor controller card will be discussed. The sensor controller board is a multifunctional board for the decentralised handling of position measurement, static/dynamic weight measurement, input/output control and fruit roll measurement. It features two high-resolution rotary encoders, a 24-bit sigma delta analog/digital converter, 8 isolated analog inputs and 4 isolated digital outputs. The sensor controller board is an embedded system based on an 80C310 micro controller, it interfaces to the Profibus by a SPC4 Profibus controller. A Quicklogic FPGA is used to implement most of the Memory Management, the position decoding and to glue all other parts together. In this design the position measurement must be as accurate as 1I20th cup. The static weight measurement is performed with a peak-peak resolution of 16 bits, so accuracy is better than 0.2 gram. Dynamic operation can be performed at 14 bits and an accuracy of better than 1 gram. (Based on a 10 kg bridge.) The input circuitry can handle most industrial encoders, proximity sensors and photo switches. The output circuitry is designed for the switching of relays up to 1.8 Ampere. 2 ~ An intelligent sensor controller using Profibus ELLIPS TABLE OF CONTENTS 1. INTRODUCTION 6 2. CONTROLLER CONCEPT 7 2.1 OVERVIEW 7 2.2 THE FRUIT GRADING SYSTEM 9 2.2.1 Mechanical structure 9 2.2.2 Communication model 12 2.2.3 Profibus 14 2.2.4 Profibus-DP 15 2.2.5 Timing Specifications 19 3. EMBEDDED SYSTEM DESIGN 23 3.1 SPECIFICATIONS 23 3.2 DESIGN 24 3.2.1 Profibus 1nterface 24 3.2.2 Microcontroller 25 3.2.3 Memory Management 30 3.2.4 Glue 34 3.2.5 Power-supply & watchdog 37 3.3 TEST RESULTS 38 4. POSITION MEASUREMENT 39 4.1 SPECIFICATIONS 39 4.2 ROTARY ENCODERS 40 4.3 DESIGN 43 4.4 METASTABILITY 48 4.5 TEST RESULTS 49 5. WEIGHT MEASUREMENT 50 5.1 SPECIFICATIONS 50 5.1.1 STATIC 51 5.1.2 SEMI-DYNAMIC 51 5.2 STRAIN GAUGE TRANSDUCER 52 5.3 DATA ACQUISITION 53 5.3.1 Sigma delta ADC's 54 5.3.2 Analog Devices compared to Burr Brown 55 5.4 ANALOG DEVICES AD7730 59 5.4.1 1nterfacing the weight-bridge 60 5.4.2 Configuration ofthe AD7730 62 5.5 DESIGN 67 5.5.1 Static 67 5.5.2 Semi-dynamic 68 5.5.3 Converter settings 69 5.6 TEST RESULTS 71 6. I/O CONTROL 75 6.1 SPECIFICATIONS 75 6.2 DESIGN 77 6.3 TEST RESULTS 79 3 An intelligent sensor controller using Profibus E~ 7. SOFTWARE 80 7.1 PROFIBUS PROTOCOL SOFIWARE 80 7.2 SENSOR CONTROLLER SOFIWARE 82 7.2.1 Sensor Input Handling 82 7.2.2 Decoder software 83 7.2.3 Data Acquisition Software 84 8. CONCLUSIONS & RECOMMENDATIONS 87 8.1 CONCLUSIONS 87 8.2 RECOMMENDATIONS 87 9. BIBLIOGRAPHY 88 10. ACKNOWLEDGEMENT 90 APPENDIX A: NOMENCLATURE 91 APPENDIX B: PROFIBUS PERFORMANCE 92 APPENDIX C: ENCODER CALCULATIONS 94 APPENDIX D: ADC CALCULATIONS 95 APPENDIX E: SIGMA DELTA AID CONVERTERS 96 APPENDIX F: ADC COMMUNICATION 100 APPENDIX G: MMU TIMING REQUIREMENTS I04 APPENDIX H: VHDL DECODER PACKAGE 107 APPENDIX I: VHDL SOURCE GLUE 112 LIST OF TABLES TABLE 3.1: GLUE MEMORY CONFIGURATION 35 TABLE 3.2: MMU SIGNALS OF THE GLUE 35 TABLE 3.3: I/O SIGNALS OF THE GLUE 36 TABLE 3.4: ADDITIONAL SIGNALS OF THE GLUE 36 TABLE 4.1: ELECTRICAL ENCODER SPECIFICATIONS 40 TABLE 4.2: MECHANICAL ENCODER SPECIFICATIONS 40 TABLE 4.3 : ENVIRONMENTAL ENCODER SPECIFICATIONS 41 TABLE 4.4: VENDOR SPECIFIC ENCODER SPECIFICATIONS 43 TABLE 4.5: ENCODER STATE TRANSITIONS 44 TABLE 5.1: ADC TYPE COMPARISON 54 TABLE 5.2: ANALOG DEVICES VERSUS BURR BROWN 58 TABLE 5.3: FILTER REGISTER SETTINGS 69 TABLE 5.4: MODE REGISTER SETTINGS 69 TABLE 5.5: CALIBRATION DURATIONS 70 TABLE 6.1: SENSOR INPUT CONFIGURATIONS 75 TABLE 7.1: CONTROL SIGNALS FOR THE WEIGHT STATE MACHINE 85 4 E~ An intelligent sensor controller using Profibus LIST OF FIGURES FiGURE 2.1: SENSOR CONTROlLER CORE 8 FIGURE 2.2: LINE SYSTEM 9 FIGURE 2.3: STATIC WEIGHT SYSTEM 10 FIGURE 2.4: ROLL SYSTEM 11 FIGURE 2.5: PROFIBUS COMMUNICATION MODEL 12 FIGURE 2.6: PROFIBUS PRODUCT GRAPH 14 FIGURE 2.7: TELEGRAM-SEQUENCE IN THE PROFIBUS-DP-SYSTEM 16 FIGURE 2.8: PROFIBUS-DP-sLAVE STATE MACHINE 17 FiGURE 2.9: PROFIBUS MESSAGE CYCLE TIME 19 FIGURE 2.10: SYSTEM REACTION TIME VERSUS N 21 FIGURE 2.11: ENCODER RESOLUTION VERSUS N 21 FIGURE 2.12: ENCODER RESOLUTION VERSUS UPDATE RATE 22 FIGURE 3.1: DESCRIPTION PROFIBUS-INTERFACE 24 FIGURE 3.2: DS80C320-MICROCONTROlLER FROM DALLAS 26 FIGURE 3.3: MEMORY-ORGANISATION OF THE MICROCONTROLLER 27 FIGURE 3.4: 80C32 INTERRUPT-MODEL 28 FIGURE 3.5: INTERRUPT-SCHEME 80C320 29 FiGURE 3.6: MEMORY CONFIGURATION OF THE 80C31O/320 32 FiGURE 4.1: ENCODER OUTPUT SIGNALS 42 FIGURE 4.2: STATE DIAGRAM OF THE DECODER 44 FIGURE 4.3: COUNTER HYSTERESIS WINDOW 46 FiGURE 4.4: SNAPSHOT OF POSITION ENCODING SIMULATION 49 FiGURE 5.2: GAUSS DISTRIBUTED P-P NOISE 56 FIGURE 5.3: GAUSSIAN DISTRIBUTION 57 FIGURE 5.4: FUNCTIONAL BLOCK DIAGRAM OF THE AD7730 59 FIGURE 5.5: AC-EXCITED BRIDGE APPLICATION 61 sT FIGURE 5.6, FREQUENCY RESPONSE 1 STAGE FILTER 62 FIGURE 5.7, FIR-FILTER RESPONSE 63 FIGURE 5.8: STEP RESPONSE FOR FASTSTEP AND NORMAL OPERATION 64 FIGURE 5.9: PEAK TO PEAK RESOLUTIONS (CHOPPING MODE) 67 FIGURE 5.10: PEAK TO PEAK RESOLUTIONS (NON-CHOPPING MODE) 68 FIGURE5.11: JAPIE 1,2,3 73 FIGURE 5.12: JAPIE4 ON THE 110 BOARD 73 FIGURE5.13:JAPIE5 74 FIGURE 6.1: IDS-UDS CHARACTERISTIC BF556c 77 FIGURE 6.2: SINGLE INPUT CIRCUIT 78 FIGURE 6.3: DC (UPPER) AND AC (LOWER) OUTPUT CONFIGURATIONS 79 FIGURE 7.1: SENSOR CONTROlLER SOFTWARE 82 FIGURE 7.3: WEIGHT MACHINE 84 FIGURE 7.2: SENSOR STATE MACHINE FOR WEIGHT 86 5 E~ An intelligent sensor controller using Profibus 1. INTRODUCTION With this work the last step is taken for graduation at the faculty Electrical Engineering of the Eindhoven University of Technology. For the five-year curriculum it consists of a nine-month period of work in one out of five sections at either the university itself or, external, in a company. This graduation work is supervised by the section Information and Communication Systems (ICS), it consists of two research chairs: Computer and Communication Systems and Design Technology. This work is done in labour of the section "Computer and Communication Systems", which focuses on analysis and specification methods, design, realisation, and application of digital information and communication systems. These are extremely complex systems with high communication speeds, a large number of operations per time unit, special memory structures, etc. The realisation is based on a (formal) design process, in which an optimal architecture is developed with a proper balance between hardware and software. The choice was made to do this graduation work external, namely at Ellips B.V. Eindhoven. Ellips B.V. is specialised in designing electronic control systems, including all relevant software, for vision applications. In real time images are processed from industrial and natural products such as raw materials, fruit, vegetables, etc. Dimensions, contour characteristics, position, colour and quality are calculated in order to classify these products in terms of control parameters for the production process. One of the systems Ellips B.V. is working on is a machine control unit for the grading of fruit and vegetables on several criteria, e.g., size, shape, weight and colour. Fruit is passing by at speeds of up to 20 pieces a second per line.