230 likes | 382 Vues
General Purpose Controller (GPC) Embedded Application. Andrew Blauch, Ph.D. Assistant Professor of Engineering Padnos College of Engineering and Computing Grand Valley State University. Overview. Background Software Development Course Example Summary. Background.
E N D
General Purpose Controller (GPC)Embedded Application Andrew Blauch, Ph.D. Assistant Professor of Engineering Padnos College of Engineering and Computing Grand Valley State University
Overview • Background • Software Development • Course Example • Summary
Background • Industry Experience / Interests • Controls • Programming • Microcontrollers • Courses • Automatic Controls • Design of Microcontroller Applications
Background • Objective • Develop an embedded application for implementing a robust and flexible controller with data collection capabilities and easy user interface • General Purpose Controller (GPC)
Software Development • Layered Design • Controller Design • User Interface • 68HC11 Port
Software DevelopmentLayered Design • Modules • Hardware • Process • Application
Software DevelopmentLayered Design • Advantaged • Modular, reusable code • Robust testing • Easy to port to other platforms • Disadvantages • Extra time and memory overhead
Software DevelopmentController Design • Configurations • Input: direct, analog, waveform • Feedback: analog, encoder • Control: open/closed-loop, P/PI • Output: uni/bi-directional PWM • Integer math • Resolution/range constraints
Software DevelopmentUser Interface GPCImageBoot Version: 3.02 Created: Jan 25 2006, 13:04:23 Type ? for help GPC> NPMON Name NPGET Name NPSET Name Value SPGET Name SPSET Name Value DCGET DCARM DELAY Time[1,<1000>,10000] INFO MSTEP Amplitude[-255,<0>,255] DBCOMP X1[-255,<0>,255] X2[-255,<0>,255] RESET VER QUIT GPC>
Software DevelopmentUser Interface GPC>reset GPC>nps tupdate 5 TUPDATE = 5 GPC>sps itype direct ITYPE = DIRECT GPC>sps ftype danalog FTYPE = DANALOG GPC>sps otype bipwm OTYPE = BIPWM GPC>sps ctype pc CTYPE = PC GPC>nps gfb 16 GFB = 16 GPC>dbcomp 150 250 DBPOS = 71 GPC>dbcomp -150 -250 DBNEG = -93 GPC>
Software DevelopmentUser Interface GPC>mstep 100 Executing Step... GPC>dcg 0 100 0 100 143 152 159 143 143 5 100 2 98 142 151 159 144 142 10 100 2 98 142 162 162 144 142 15 100 7 93 138 146 162 146 139 20 100 10 90 136 147 160 148 138 25 100 13 87 134 160 158 150 137 30 100 16 84 132 147 160 151 135 35 100 17 83 131 151 158 151 134 40 100 18 82 130 152 156 152 134 45 100 21 79 128 155 155 154 133 50 100 21 79 128 149 154 154 133 55 100 24 76 126 154 156 155 131 60 100 21 79 128 154 156 153 132 65 100 22 78 127 159 157 154 132 70 100 20 80 129 150 161 153 133 … GPC>
Software Development68HC11 Port • CME11E9-EVBU • 32K external RAM • 32K external EEPROM • Software Versions • RAM • EEPROM (boot image)
Software Development68HC11 Port • Timing/Interrupt issues • PWM generation • 30% CPU usage, 127.5 s period • Serial buffer • Asynchronous input/output • Control routine • Allow interruptions • Detect starvation
Course Example • Experimental Setup • Simulation Model • Theoretical Model • Results
Course ExampleExperimental Setup Velocity-controlled DC motor with tachometer feedback
Summary • Excellent teaching tool • Embedded application • Interface methods/circuits • Analog/digital control • Work in progress • Increase I/O capabilities • Port to other platforms (AVR, ARM) • Command interface libraries