PART 1: DESCRIPTION OF THE DIGITAL CONTROL SYSTEM

Similar documents
USER MANUAL FOR THE LM2901 QUAD VOLTAGE COMPARATOR FUNCTIONAL MODULE

EEE3410 Microcontroller Applications Department of Electrical Engineering. Lecture 10. Analogue Interfacing. Vocational Training Council, Hong Kong.

Microprocessors B Lab 4 Spring Motor Control Using Pulse Width Modulation (PWM)

Hello, and welcome to the TI Precision Labs video series discussing comparator applications. The comparator s job is to compare two analog input

Control System Circuits with Opamps

Embedded Control. Week 3 (7/13/11)

Laboratory Experiments in Instrumentation and Control

b b Fig. 1 Transistor symbols

HAW-Arduino. Sensors and Arduino F. Schubert HAW - Arduino 1

The answer is R= 471 ohms. So we can use a 470 ohm or the next higher one, a 560 ohm.

SCHEMATIC OF GRAYMARK 808 POWERED BREADBOARD

EET 438a Automatic Control Systems Technology Laboratory 1 Analog Sensor Signal Conditioning

Dedan Kimathi University of technology. Department of Electrical and Electronic Engineering. EEE2406: Instrumentation. Lab 2

ET 438B Sequential Digital Control and Data Acquisition Laboratory 4 Analog Measurement and Digital Control Integration Using LabVIEW

ES330 Laboratory Experiment No. 9 Bipolar Differential Amplifier [Reference: Sedra/Smith (Chapter 9; Section 9.2; pp )]

Motor Control Development Kit

Prelab: Introduction and Greenhouse Construction

EXPERIMENT 5 CURRENT AND VOLTAGE CHARACTERISTICS OF BJT

Last Time. P and N type semiconductors Diode internals Transistors NPN PNP

Lab 2: Common Emitter Design: Part 2

Concepts to be Covered

BASIC Stamp I Application Notes

CYD8945 High Reliability Hall Effect Switch IC

Outline. Analog/Digital Conversion

DS1801 Dual Audio Taper Potentiometer

Data Conversion and Lab Lab 1 Fall Operational Amplifiers

University of Pittsburgh

ME 461 Laboratory #5 Characterization and Control of PMDC Motors

Lecture 4: Basic Electronics. Lecture 4 Brief Introduction to Electronics and the Arduino

Lab 2: Discrete BJT Op-Amps (Part I)

BME/ISE 3512 Bioelectronics. Laboratory Five - Operational Amplifiers

Development of a MATLAB Data Acquisition and Control Toolbox for BASIC Stamp Microcontrollers

ECE 363 FINAL (F16) 6 problems for 100 pts Problem #1: Fuel Pump Controller (18 pts)

Resistors and voltage. CSE1010 Jeffrey A. Meunier

DS1802 Dual Audio Taper Potentiometer With Pushbutton Control

INA169 Breakout Board Hookup Guide

BME 3512 Bioelectronics Laboratory Five - Operational Amplifiers

UNIVERSITI MALAYSIA PERLIS

MARMARA UNIVERSITY CSE315 DIGITAL DESIGN LABORATORY MANUAL. EXPERIMENT 7: Analog-to-Digital Conversion. Research Assistant Müzeyyen KARAMANOĞLU

University of Portland EE 271 Electrical Circuits Laboratory. Experiment: Op Amps

Lab 2: Blinkie Lab. Objectives. Materials. Theory

A 3-STAGE 5W AUDIO AMPLIFIER

SCRIPT. Voltage Dividers

Each question is worth 4 points. ST07 One-hour Quiz #2 1 3/20/2007

Module 9C: The Voltage Comparator (Application: PWM Control via a Reference Voltage)

// Parts of a Multimeter

ECE 2010 Laboratory # 5 J.P.O Rourke

INTERNATIONAL JOURNAL OF ELECTRONICS AND COMMUNICATION ENGINEERING & TECHNOLOGY (IJECET)

L9: Analog Building Blocks (OpAmps,, A/D, D/A)

Differential Amplifier : input. resistance. Differential amplifiers are widely used in engineering instrumentation

.dc Vcc Ib 0 50uA 5uA

Technical Note. Rb 2

νµθωερτψυιοπασδφγηϕκλζξχϖβνµθωερτ ψυιοπασδφγηϕκλζξχϖβνµθωερτψυιοπα σδφγηϕκλζξχϖβνµθωερτψυιοπασδφγηϕκ χϖβνµθωερτψυιοπασδφγηϕκλζξχϖβνµθ

CENG4480 Embedded System Development and Applications The Chinese University of Hong Kong Laboratory 1: Op Amp (I)

Training Schedule. Robotic System Design using Arduino Platform

Lab 8: SWITCHED CAPACITOR CIRCUITS

Autonomous Robot Control Circuit

Lecture Week 5. Quiz #2 Ohm s Law Homework Power Review Shorthand Notation Active Components Ideal Op-amps

ESE 350 Microcontroller Laboratory Lab 5: Sensor-Actuator Lab

= V IN. and V CE. = the supply voltage 0.7 V, the transistor is on, V BE. = 0.7 V and V CE. until saturation is reached.

ML ML Bit A/D Converters With Serial Interface

Jaguar Motor Controller (Stellaris Brushed DC Motor Control Module with CAN)

TRAC020LH TOTALLY RE-CONFIGURABLE ANALOG CIRCUIT - TRAC. Issue 2 - MARCH 1999

FDDI on Copper with AMD PHY Components

Isolated Industrial Current Loop Using the IL300 Linear Optocoupler Appnote 54

Arduino STEAM Academy Arduino STEM Academy Art without Engineering is dreaming. Engineering without Art is calculating. - Steven K.

Laboratory 3 W. Liu, by A. Shakouri and K. Pedrotti. Introduction to Bipolar Junction Transistors

Logic Families. Describes Process used to implement devices Input and output structure of the device. Four general categories.

OP5340-1/OP USER GUIDE

8-Bit A/D Converter AD673 REV. A FUNCTIONAL BLOCK DIAGRAM

DS1267B Dual Digital Potentiometer

Figure 1: Basic Relationships for a Comparator. For example: Figure 2: Example of Basic Relationships for a Comparator

Fig 1: The symbol for a comparator

DS1868B Dual Digital Potentiometer

University of Michigan EECS 311: Electronic Circuits Fall 2009 LAB 2 NON IDEAL OPAMPS

LABORATORY 5 v3 OPERATIONAL AMPLIFIER

EE223 Laboratory #4. Comparators

ECE 203 LAB 6: INVERTED PENDULUM

Learning Objectives:

Laboration: AD-conversion and the Thevenin theorem.

Experiment #8: Designing and Measuring a Common-Collector Amplifier

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino

Tel: Fax:

Analog I/O. ECE 153B Sensor & Peripheral Interface Design Winter 2016

Lab Exercise # 9 Operational Amplifier Circuits

Laboratory 8 Operational Amplifiers and Analog Computers

EE283 Electrical Measurement Laboratory Laboratory Exercise #7: Digital Counter

Experiment 8: Semiconductor Devices

Practical 2P12 Semiconductor Devices

Introduction to the Op-Amp

Section 2 Lab Experiments

L10: Analog Building Blocks (OpAmps,, A/D, D/A)

Bend Sensor Technology Electronic Interface Design Guide

Activity P56: Transistor Lab 2 Current Gain: The NPN Emitter-Follower Amplifier (Power Output, Voltage Sensor)

ME218a Midterm Exam Due by 4pm on 10/25/96. I Certify that I have taken this examination in compliance with the Stanford University Honor Code.

EE 330 Laboratory 8 Discrete Semiconductor Amplifiers

Appendix C, Paper 3 C-17

Well we know that the battery Vcc must be 9V, so that is taken care of.

I2C Demonstration Board I 2 C-bus Protocol

ECE 454 Homework #1 Due 11/28/2018 This Wednesday In Lab

Transcription:

ELECTRICAL ENGINEERING TECHNOLOGY PROGRAM EET 433 CONTROL SYSTEMS ANALYSIS AND DESIGN LABORATORY EXPERIENCES INTRODUCTION TO DIGITAL CONTROL PART 1: DESCRIPTION OF THE DIGITAL CONTROL SYSTEM 1. INTRODUCTION This set of experiments deal with the subject of Digital Control. Because of time limitations, the lectures in the EET 433 course do not address this type of control. However, I believe that because its importance in industry, students will benefit from being exposed to its principles. I have designed these experiments with the goal of giving students a basic overview of the subject. These experiences are not a substitute for a formal and thorough learning of the theory behind Digital Control. Albert Lozano, July 2008 2.- THE DIGITAL CONTROL SYSTEM The control system that we will be using for these experiences is based on a Basic Stamp module built around a PIC 16C57C microcontroller manufactured by Microchip as seen in the figure below. EET 433 PID Control Part 1 page 1

The Basic Stamp module is based interpreting the code rather than compiling it. This means that when running the program, the Basic Stamp module reads each instruction from its memory in an EEPROM, interprets it and performs the instruction. Once it finishes, it moves to the next instruction and so on. Therefore, a large amount of CPU time is used in reading instructions. On the other hand, it has the advantage of being able to use a very simple language, a form of BASIC that is very easy to learn and use. Given that the goal of this course is not on optimizing code and most control systems have relatively large response times (when compared to the time needed to execute an instruction), it makes sense to use it in these experiments to shift the emphasis on the issues related to control systems rather than programming and using microcontrollers. In an industrial setting, the step to take after having built and developed the appropriate code for a given control system to meet certain specifications using the Basic Stamp module would be to migrate it to a single microcontroller (for example the PIC 16C57). This will result in faster execution times and more importantly, will reduce the cost associated to the hardware for the control system. EET 433 PID Control Part 1 page 2

For these experiments, students will receive the source code and an explanation of how it works. Their interaction with the software will be limited to changing several parameters (constants) and evaluating how they affect the response of the system. 3.- THE GOAL OF THE DIGITAL CONTROL SYSTEM The goal of the digital control system used in this experiment is to maintain a certain environment at a given temperature. In our case, the environment to control is the temperature inside a film canister. There are two elements inside the film canister: - A resistor will be used to apply heat to the interior of the canister. - A LM34 temperature sensor (the same sensor used in one of the labs in EET 331) will be used to monitor the temperature of the canister. The figure below shows a picture of the environment for which we want to control its temperature. EET 433 PID Control Part 1 page 3

Once again, the goal of the system is to maintain a temperature as constant as possible inside the canister even with the presence of external perturbations. We will simulate external perturbations using a small fan as shown below: Controlling temperature is one of the most common requirements in several industrial processes. Industry applications as different as poultry incubators, mixing several molten metals, food processing, cryogenics, etc., rely on systems to measure and evaluate temperature as well as taking the appropriate actions to maintain that temperature in compliance with a set of specifications. 4.- THE ELEMENTS OF THE CONTROL SYSTEM Each one of the modules that make up the digital control system is described in the next sections. Because we will be using the same control system, it is better to leave it built in your breadboard. EET 433 PID Control Part 1 page 4

4.1 The Microcontroller Board As mentioned earlier, the core of this control system is a microcontroller board. It has 16 I/O Ports (P0 to P15). Each port can be configured as an input or as an output. The board is powered by 5 Vdc as shown below. BASIC STAMP MODULE PIC 16C57 Vdd Vss Vin RES P0 P1... P14 P15 5 V PB0 Each one of the pins is labeled in the microcontroller board. These names are reproduced in the figure above. Leave the input labeled as Vin not connected. The microcontroller board communicates with the host computer via a serial cable. PB0 is a normally-open pushbutton. When momentarily pressed, it brings the signal RES to ground, causing a reset in the program being executed by the microcontroller. That is, once it is depressed, the microcontroller will start executing the first program line. Build the circuit shown in the figure above. At this point, you don t connect any of the I/O ports. We will connect the appropriate I/O ports to the appropriate circuits as we build each module that will be used in the control system. EET 433 PID Control Part 1 page 5

4.2 The Heater Heating the canister is controlled by Port8 of the microcontroller as shown below. When P8 is high, there is enough current through the base of the transistor to saturate it, causing the collector voltage to be very close to zero volts. Therefore, the current flowing through the 47 Ω generates power that is dissipated as heat inside the canister. This situation also causes current flowing through LED1, that serves as an indicator of heat ON. 9V 5 47Ω Heating Resistor inside canister 4 To P8 2 470Ω 1 220Ω 3 LED1 0 0 When P8 is low the transistor cannot conduct current and therefore there is no current flowing through the heating resistance. In this case, there is no heat being produced inside the canister. When P8 is low, LED1 is also OFF. Notice that because the microcontroller cannot source or sink the current needed to generate the required heat, it is necessary to use a transistor. In this case, the transistor acts like a current amplifier. This approach is very common for the output ports of a microcontroller as it protects them against over current. Question 1: Calculate the power dissipated by the 47 Ω heating resistor. Question 2: What is the power rating Question 3: How can you reconcile the answers in Questions 1 and 2? What do you expect to happen? EET 433 PID Control Part 1 page 6

Build this module using the schematic above. Connect the 470 Ω and 220 Ω resistors to Port 8 of the microcontroller board. The 47 Ω heating resistor is located inside the canister. Connect one of the wires from the resistor to the 9 Vdc source and the other wire to the collector of the transistor. The following is the pinout for the NPN transistor. 4.3 Manual heat control During the first experiments, when characterizing the system to control (canister), we will turn the heat ON or OFF manually. This is accomplished by the following module: 5V VCC PB1 To P1 6 10kΩ 0 EET 433 PID Control Part 1 page 7

Build the circuit shown above. The 10 kω resistor is connected to Port 1 of the microcontroller (P1). When PB1 is open, there is no current flowing through the resistance and therefore P1 is at zero volts. When PB1 is closed, P1 is directly connected to 5 Volts. This is a widely used circuit to produce digital inputs to the microcontroller. 4.4 The temperature sensor and the Analog-to-Digital converter Temperature is sensed by the LM34 that has a sensitivity of 10 mv/f as you had experienced in the EET 331 laboratory experiences. This temperature sensor is located inside the canister. The color code for the three wires that come out from the canister is: - Red: 5 Vdc - Black: Ground - White: Vout (10 mv/f) Build the circuit shown in the figure below. Connect the three appropriate terminals to ports P3, P4 and P5 of the microcontroller board. RED Temperature sensor inside canister WHITE BLACK The core of this circuit is the ADC 0831 Analog-to-Digital converter. Contrary to the typical A/D converters studied in class, in which the output consists of 8 bits in parallel, the output of this A/D converter is streamed in serial mode through pin 6 (Dout). Although this structure has the drawback of being 8 times slower than a comparable parallel converter, serial A/D converters EET 433 PID Control Part 1 page 8

are normally used when using microcontrollers as it only needs one port of the microcontroller. A parallel A/D converter would need to use 8 microcontroller ports. Pin 1 (CS) is a select pin controlled by port P3 and pin 7 (CLK) is the clock signal generated by the microcontroller to synchronize the transfer of bits. As shown in the circuit above, this A/D converter is a differential converter. This means that the voltage that is actually converted is the difference between pins 2 and 3. We will use this fact to extend the dynamic range for our control system. If we assume that the temperature in the canister will not fall below 70 F (or if it is below this temperature, we will constantly apply heat until it reaches 70 F), the voltage that we will convert in the ADC will be the difference between the voltage at the output of the temperature transducer and the equivalent voltage that is 0.7 V. Adjust the potentiometer connected to Pin3 to 0.70 V. If using this circuit in different days, ensure that the voltage in Pin3 is 0.70 V before starting to work. This sets the zero point at 70 F, and the software will add 70 F to the equivalent readout at the output of the converter. Pin 5 (Vref) is used to set the temperature span. Because we do not expect to expect 120 F, we will set the temperature span to 50 F. Adjust the potentiometer connect to Pin5 to 0.50 V. Once again, ensure that the voltage is 0.50 V each day that you will work with this circuit. In summary, the microcontroller will read a digital value that corresponds to the temperature inside the canister. Moreover, the range of temperatures that are considered valid by this control system are from 70 F to 120 F. 4.5 The brushless fan to create disturbances We will create temperature disturbances by connecting directly the brushless fan to 5 Vdc or to 9 Vdc as indicated by the experiment outline. Do not connect the fan at this moment. EET 433 PID Control Part 1 page 9