Professional Documents
Culture Documents
Real-Time Signal Analysis With Labview/Micro-Processor: Eng 499 Capstone Project Course
Real-Time Signal Analysis With Labview/Micro-Processor: Eng 499 Capstone Project Course
STUDENT: SUPERVISOR:
Bachelor of Electronic Engineering SCHOOL OF SCIENCE AND TECHNOLOGY SIM UNIVERSITY November 2010
ACKNOWLEDGEMENTS
Firstly, I would like to express my sincere and heartfelt appreciation to my project supervisor, Mr. Qiang Ji for his exceptional guidance, invaluable advice and wholehearted support in matters of practical and theoretical nature throughout the project. His constant time check and meet ups had certainly motivated me in the completion of the project. Although he have been resigned from Uni Sim , he gave guidance through per mail and lead me to the correct part of project scope. Throughout my thesis-writing period, he provided encouragement, sound advice, good teaching, good company, and lots of good ideas. Thanks to him for his tolerance and patience to all my queries regardless be it an email or phone call, he had almost response to it with no delays. The completion of the Final Year Project would not be possible without his excellence supervision. I am gratefully appreciative of UniSIM capstone project instructors particularly Dr. Lim Teik Cheng for providing me the opportunity to study in Microcontroller application. I would like to thank UniSIM for providing the financial means and laboratory facilities. Lastly, I would like to thank all the lectures and friends in UniSIM and also to my loved ones who have given their fullest support in this Final Year Project.
-i-
ABSTRACT
Any electrical and mechanical system such as computer, power supply unit, amplifier, machinery room, vehicle interior generates heat during its operation. Most of the electrical and mechanical system are installed and assembled inside some of casing, housing or even a room to protect it from being touch or expose to unnecessary contact which may cause injury to the operator or malfunction to the system. The casing serve as protective housing for the system but it also accumulate and trap heat within the system without proper ventilation. An automatic Heat ventilation system model is build and studied the nature of the HVAC system. The model is using two temperature sensors one for exterior environment temperature and one for system interior temperature, heat source, LM 3S8962 Evaluation Board used as temperature acquisition and NI LabView were used as processing platform that try to match and maintain the interior temperature to the exterior temperature using ventilation fan. Thus the interior temperature set point is determined by the exterior environment temperature. The purpose of creating this project is to reduce comfortable and reliable environment, with minimum cost, with user-friendly interface, with less complexity and with effective area coverage from the components that are easily available in the market. The experiments are carried out and monitored the system model temperature. It was observed that during the heat source is turned on; the minimum temperature difference that can go down is 3 degree. And the temperature goes down within 7 minutes. When the heat source is off, it matches to exterior within 2 minutes.
List of Figures
Figure 1.1: Proposed Design...........................................................................................................3 Figure 2.1: Example of contact type sensor...................................................................................5 Figure 2.2: Example of Op-amp configuration..............................................................................7 Figure 2.3: LM3S8962 Evaluation Board Block Diagram..........................................................11 Figure 2.4: ARM Cortex M3 Architecture...................................................................................13 Figure 3.1: Gantt chart..................................................................................................................19 Figure 4.1: System Block Diagram..............................................................................................20 Figure 5.1: Stellaris LM3S8962 Evaluation Board Layout.........................................................22 Figure 5.2: Schematic for external sensor board..........................................................................24 Figure 5.3: Voltage regulator symbol...........................................................................................25 Figure 5.4: Schematic for checking regulator quality.................................................................26 Figure 5.5: Temperature sensor configuration.............................................................................27 Figure 5.6: Capacitor configuration..............................................................................................30 Figure 5.7: Diode specification.....................................................................................................31 Figure 5.8: Darlington transistor symbol......................................................................................33 Figure 5.9: Darlington transistor configuration............................................................................33 Figure 5.10: Internal Sensor board...............................................................................................35 Figure 6.1: Block diagram of conversion.....................................................................................36 Figure 6.2: Front panel of conversion..........................................................................................37 Figure 6.3: Internal Thermometer................................................................................................37 Figure 6.4: Block diagram of External Thermometer..................................................................38 Figure 6.5: Block diagram of Internal Temperature Monitor......................................................38 Figure 6.6: Block diagram of External Temperature Monitor.....................................................39 Figure 6.7: Block diagram of Internal and External Temperature...............................................39 Figure 6.8: Block diagram of Fan out..........................................................................................40 Figure 7.1: Final Front-panel for blinking LED VI.....................................................................42 Figure 7.2: Final Block Diagram for blinking LED VI...............................................................42 Figure 7.3: Setting Build Specification........................................................................................43 Figure 7.4: Blinking of LED on Evaluation board.......................................................................43 Figure 7.5: Testing on incoming voltage......................................................................................44 Figure 7.6: Output Voltage after LM7805...................................................................................44
- iii -
Figure 7.7: Output Voltage after LM3940...................................................................................45 Figure 7.8: Output Voltage of External/Outside Temperature sensor.........................................45 Figure 7.9: Output Voltage of Internal Temperature sensor........................................................46 Figure 7.10: Internal Thermometer..............................................................................................47 Figure 7.11: External Thermometer.............................................................................................48 Figure 7.12: Internal Temperature History in Fahrenheit............................................................48 Figure 7.13: Internal Temperature History in Celsius.................................................................49 Figure 7.14: External Temperature History in Fahrenheit...........................................................49 Figure 7.15: External Temperature History in Celsius................................................................50 Figure 7.16: Internal temperature monitor...................................................................................50 Figure 7.17: External temperature monitor..................................................................................51 Figure 8.1: Temperature history of inside and outside of the system model...............................52 Figure 8.2: The temperature difference after heat source is ON..................................................53 Figure 8.3: The minimum temperature difference.......................................................................53 Figure 9.1: Wrong Connection circuit for fan output..................................................................56 Figure 9.2: Corrected circuit for fan output.................................................................................56
List of Tables
Table 3.1: Total Cost for Project.................................................................................................16 Table 3.2: Detail Project Plan.......................................................................................................18 Table 5.1: LM35 Sensor Feature..................................................................................................27 Table 5.2: Resistor-band configuration........................................................................................29 Table 5.3: Diode Features.............................................................................................................31 Table 9.1: the ADC input Voltage................................................................................................55
- iv -
Table of Contents
ACKNOWLEDGEMENTS.............................................................................................................i ABSTRACT....................................................................................................................................ii List of Figures................................................................................................................................iii List of Tables.................................................................................................................................iv Chapter 1: Project Definition..........................................................................................................1 1.1 Project Objective..................................................................................................................1 1.2 Project Scope........................................................................................................................1 Project Background....................................................................................................................2 1.4 Proposed Approach and method to be employed.................................................................2 Chapter 2: Review of theory and previous work ...........................................................................4 2.1 Overview of Heat Ventilation system..................................................................................4 2.2 Overview of Temperature Sensor.........................................................................................4 2.3 Overview of Operational Amplifier.....................................................................................7 2.4 Overview of FFT nature.......................................................................................................8 2.5 Overview of Lab View.........................................................................................................8 2.5.1 Principles of LabVIEW.................................................................................................9 2.6 Overview of Stellaris LM 3S8962 Evaluation Board .......................................................11 2.7 Features of LM3S8962 Micro controller...........................................................................12 ......................................................................................................................................................13 2.8 ARM Cortex-M3 processor.........................................................................................13 2.8.1 Key Benefits................................................................................................................14 Chapter 3: Project Management...................................................................................................15 3.1 Required Resources............................................................................................................15 3.1.1 School Facility.............................................................................................................15 3.1.2 Internet Broadband ....................................................................................................15 3.1.3 Expenditure (COST) ...................................................................................................16 3.2 Planning .............................................................................................................................16 3.3 Cost for Development.........................................................................................................16 3.4 Project Task and Schedule ................................................................................................17 Chapter 4: Overall System Design...............................................................................................20 Chapter 5: Hardware Design and Specification...........................................................................21 5.1 Stellaris LM 3S8962 Evaluation Board ............................................................................21
5.1.1 LM3S8962 Microcontroller.........................................................................................23 5.1.2 Clocking.......................................................................................................................23 5.1.3 Reset.............................................................................................................................23 5.1.4 Power Supplies............................................................................................................23 5.2 External Sensor Board........................................................................................................23 5.2.1 Voltage Regulator.......................................................................................................24 5.2.2 Measures of regulator quality......................................................................................25 5.2.3 LM35 - Precision Centigrade Temperature Sensor....................................................26 5.2.4 Ohm's law....................................................................................................................28 5.2.5 Four-band resistors......................................................................................................28 5.2.6 Capacitor......................................................................................................................29 5.2.7 Diode............................................................................................................................30 5.2.8 Darlington transistor....................................................................................................33 5.3 Internal Sensor Board........................................................................................................35 Chapter 6: Software Development...............................................................................................36 6.1 Conversion of Degree Celsius to Fahrenheit.....................................................................36 6.2 Internal Thermometer.........................................................................................................37 6.3 External Thermometer........................................................................................................38 6.4 Internal Temperature Monitor............................................................................................38 6.5 External Temperature Monitor...........................................................................................38 6.6 Internal and External Temperature Monitor......................................................................39 6.7 Fan Out .............................................................................................................................40 Chapter 7: Integration and Testing...............................................................................................41 7.1 LM3S8962 Evaluation board Testing................................................................................41 7.2 Hardware Testing...............................................................................................................44 44 7.3 Software Testing.................................................................................................................47 7.3.1 Internal Thermometer..................................................................................................47 7.3.2 External Thermometer.................................................................................................47 7.3.3 Internal Temperature Monitor.....................................................................................48 7.3.4 External Temperature Monitor....................................................................................49 7.3.5 Internal and External Temperature Monitor...............................................................50 Chapter 8: Simulation and Result.................................................................................................52 Chapter 9: Problem Encountered .................................................................................................55 9.1 Choice of temperature sensor.............................................................................................55 9.2 Choice of Light bulb...........................................................................................................56 9.3 Connection on the Darlington transistor............................................................................56 Chapter 10: Conclusion and Recommendation............................................................................57 10.1 Conclusion........................................................................................................................57
- vi -
10.2 Future recommendations..................................................................................................57 Chapter 11: Critical Review and Reflection.................................................................................58 11.1 Review and Reflections....................................................................................................58 11.2 Skills Review....................................................................................................................59 References.....................................................................................................................................60 APPENDIXES..............................................................................................................................61
- vii -
PART 1
Chapter 1: Project Definition
1.1 Project Objective
The main objective is to build a Remote Radiant room temperature monitoring system based on signal capturing and analysis with Lab View This project requires the following tasks to achieve the main objective. Evaluate the different types of temperature sensor on the market and choose one as a platform to design a Remote Temperature& Energy monitor To capture external analogue signal, do the real time signal processing (FFT etc). To understand the various algorithms and functional of Signal Development of Temperature control function on laptop with Lab view.
The expected Outcome Waveform from functional Temperature Sensor will be sampled at the controller and do the assessment on Lab View software. Then user-programmable function will process the analog signal and resulting temperature and temperature chart will be displayed on PC.
-1-
Project Background
The automatic heat ventilation system is the primary element in controlling environmental temperatures of an enclosed area. The system will also provide fresh outdoor air to the enclosed area to dilute any contaminants in the air and to increase circulation. Systems will control and adjust temperatures to improve comfort and increase efficiency. By performing tests on the Remote Radiant system and improving the control, you will be able to optimize the performance of the system, provide the highest level of environmental comfort and increase energy efficiency. There are several benefits associated with building a test and control unit for your Heating, Ventilation and Air-Conditioning (HVAC) system. First and foremost, the objective is to create an optimal working environment. If the HVAC system is to be used to control the environment of an office building, you want to ensure that the workers are comfortable at all times of the day. An optimized HVAC system will properly control temperature, reduce humidity, and circular air throughout the building. [17] HVAC systems make up approximately 50% of energy usage in commercial and residential buildings. By testing the HVAC system, you will be able to determine if there are inefficient areas of the environment. Possible areas where the heating is lost or the cooling does not reach an important area, thus causing the system to work harder to meet desired set points. Being able to test your system, you can create custom controls that will increase reliability and performance of your system therefore making it more energy efficient. [14]
-2-
The prototype system consists of two analog semiconductor temperature sensors, a LM3S8962 evaluation kit, and a computer with LabVIEW and ventilation fan. The system use one temperature sensor to sense the interior temperature of a given system and another sensor to measure the exterior environment temperature than the heat ventilation system try to match the interior temperature to the exterior temperature by activating the ventilation fan to exhaust the heat air out from the system interior housing. Hence the system ventilation temperature set point is determined by the exterior temperature this allows the heat ventilation system to react and adapt to the environment temperature changes. NI LabVIEW will be used as processing platform that try to match and maintain the interior temperature to the exterior temperature using ventilation fan. Thus the interior temperature set point is determined by the exterior environment temperature. A small system model will be built to simulate a system that generates internal heat within a system. The system model was build with the dimension of 21cm x 12cm x 9cm. A 100W light bulb was use as internal heat source to simulate convection heat generate by the system. Two ventilation fans was place on both end of the model to exhaust heat out from the system.
-3-
-4-
system to highly sensitive semiconductor types that can control complex process control plants. Temperature Sensors measure the amount of heat energy or even coldness within an object or system, and can "sense" or detect any physical change to that temperature. There are many different types of Temperature Sensors available and all have different characteristics depending upon their actual application. Temperature sensors consist of two basic physical types: Contact Types These types of temperature sensors are required to be in physical contact with the object being sensed and used conduction to monitor changes in temperature. They can be used to detect solids, liquids or gases over a wide range of temperatures. Non-contact Types These types of temperature sensors detect the Radiant Energy being transmitted from the object in the form of Infra-red radiation. They can be used with any solid or liquid that emits radiant energy.
Figure 2.1: Example of contact type sensor Analogue sensors tend to produce output signals which are slow changing and very small in value so some form of amplification is required. Also analogue signals can be easily converted -5-
into Digital type signals for use in microcontroller systems by the use of Analogue to Digital Converters. Selecting the right temperature sensor depends on the process being measured, the temperature range stipulated, the response time desired, the accuracy required, and the operating environment encountered. Another important factor to consider is price, which varies with the accuracy rate and the mounting style of the device. Temperature sensors generate output signals in one of two ways: through a change in output voltage or through a change in resistance of the sensor's electrical circuit. Thermocouples and IR devices generate voltage output signals. RTDs and thermistors output signals via a change in resistance. Thermocouples These sensors have the widest operating range and are best suited for high temperatures. Thermocouples of noble metal alloys can be used for monitoring and controlling temperatures as high as 3100F. These devices are also best for applications requiring miniature sensor designs. RTDs. These are precision temperature-sensing devices. They're the ones to use when applications require accuracy, long-term electrical (resistance) stability, element linearity, and repeatability. The devices can work in a wide temperature rangesome platinum sensors handle temperatures from 328F to 1202F. Thermistors These sensors are sensitive to small temperature changes. These devices are best for lowtemperature applications over limited ranges. The element is small-thermistor beads can be the size of a pinhead for point sensing-and tends to become more stable with use. Depending on the grade and price of the thermistor performance can range anywhere from low accuracy to accuracy matching high-end RTDs.
-6-
-7-
-8-
Dataflow Programming The programming language used in LabVIEW, also referred to as G, is a dataflow programming language. Execution is determined by the structure of a graphical block diagram (the LV-source code) on which the programmer connects different function nodes by drawing wires. These wires propagate variables and any node can execute as soon as all its input data become available. Graphical Programming LabVIEW ties the creation of user interfaces (called front panels) into the development cycle. LabVIEW programs / subroutines are called Virtual Instruments (VIs). Each VI has three components: a block diagram, a front panel, and a connector panel. The last is used to represent the VI in the block diagrams of other, calling VIs. Controls and indicators on the front panel allow an operator to input data into or extract data from a running virtual instrument. However, the front panel can also serve as a programmatic interface. Thus a Virtual Instrument can either be run as a program, with the front panel serving as a user interface, or, when dropped as a node onto the block diagram, the front panel defines the inputs and outputs for the given node through the connector pane. This implies each VI can be easily tested before being embedded as a subroutine into a larger program. The graphical approach also allows non-programmers to build programs simply by dragging and dropping virtual representations of lab equipment with which they are already familiar. The LabVIEW programming environment, with the included examples and the documentation, makes it simple to create small applications. [5] \ To maintain clean and legible VI user interfaces keep these tips in mind: Keep panels simple and clean Maintain a consistent style Clean up wires where ever possible Use proper terminology when labeling controls and indicators
-9-
- 10 -
- 11 -
operating system functionality Integrated Nested Vectored Interrupt Controller (NVIC) 42 interrupt channels with eight priority levels.
256-KB single-cycle flash 64-KB single-cycle SRAM Four general-purpose 32-bit timers Integrated Ethernet MAC and PHY Controller area network (CAN) module Three fully programmable 16C550-type UARTs Four 10-bit ADC channels (inputs) when used as single-ended inputs One integrated analog comparator One I2C module Two PWM generator blocks One 16-bit counter Two comparators Produces two independent PWM signals One dead-band generator
Two QEI modules with position integrator for tracking encoder position Two synchronous serial interfaces (SSIs) 0 to 42 GPIOs, depending on user configuration On-chip low drop-out (LDO) voltage regulator
- 12 -
2.8.1
Key Benefits
The ARM Cortex-M3 processor offers significant benefits to system and software developers. Lower cost devices through smaller processing core, system and memories Ultra low power consumption and integrated sleep modes Outstanding processing performance for challenging applications Fast interrupt handling for critical control applications Enhanced system debug for faster development No assembler code requirement to ease system development Wide application envelope encompassing ultra-low cost microcontrollers and high performance SoC
Cortex-M3 Processor Applications The features of the Cortex-M3 processor make it ideal for a wide range of applications, including: Cost Sensitive Devices Generic MCUs, Smart Toys, Personal Electronics Low Power Devices ZigBee, PAN (Bluetooth), Medical Electronics High Performance Devices Ultra Low Cost Handsets, Automotive Systems, Mass Storage
- 14 -
The access to internet is very important as most researches could be done by a click of the mouse. It is especially essential as many datasheets are available in the World Wide Web for information. The Broadband connection will help speed up the downloading of the information we need.
- 15 -
In this final year project, some of the components are funded by UniSIM. It is rather costly for components like micro controller. Hence, my target is to get the best component and yet minimizing the cost spends on the project.
3.2 Planning
From the start of the project, proper planning is very important as it contributes the success of the project. Time management factor is the rule of having a good graded project. I need to juggle between both my project and my full-time job, having a well plan is not only my own contribution. Project Supervisor, Mr. Qiang Ji, also did his part to meet up and constantly reminding me as not to have lapsed on the planned schedule. [5]
Table 3.1: Total Cost for Project Above table shown is an estimated cost for the entire project. Under Miscellaneous Items are lists of smaller components include resistors, LEDS, capacitors and soldering iron, etc. The two main costly items are the PIC micro controller and the Axial fan
- 16 -
- 17 -
Web Resources (IEEE Journals, Past Thesis, NI website, Related reference Books)
LabView software
9.2 Prepare poster for presentation HVAC Control system 16-Nov-10 25-Nov-10 10 References
- 18 -
Week ACTIVITY 1. Project Consideration and Selection 2. Literature Search 2.1 Find relevant reference books and IEEE online journals 2.2 Review and study relevant books and journals 3. Preparation of Initial Report (TMA01) 4. Research on project components 4.1 Research on available temperature sensor
Jan 2 3
Feb 6 7
Mar 10 11
12
13
Apr 14 15
16
17
May 18 19
20
21
Jun 22 23 24 Duration
25
Jul 26 27
28
29
Aug 30 31
32
33
Sep 34 35
36
37
Oct 38 39
40
41
Nov 42 43
44
4.2 Design the temperature sensor circuit 5. Design of the simulation model 5.1 Study existing model 5.2 Create and modify the model for HV system 5.3 Evaluation of HV system model 6. Integration and interaction with LM3s8962 evaluation board 6.1 Study of existing labview programming 6.2 Programming and evaluate on the model 6.3 Evaluation of the design model 7. Evaluation and testing of heat ventilation system 8. Preparation of Final Report 8.1 Writing skeleton of final report 8.2 Writing Literature review 8.3 Writing Introduction of reort 8.4 Writing Main Body of report 8.5 Writing Conclusion and Further study 8.6 Finalizing and Amendments of reort 9. Preparation of oral presentation 9.1 Review and extract important notes for presentation 9.2 Create poster and prepare for presentation Main Task Legend Sub Task Actual
- 19 -
Figure 4.1: System Block Diagram A 12V dc adapter is continuously supplied to the system. When the system is powered up, internal sensor and external sensors are kept measuring of the temperature inside the container and outside temperature. And the light was turned ON to generate the heat source. When the temperature difference between internal and external reaches to 5 Degree, the fan was started to turn on to ventilate the air and let the internal room temperature to be comfortable temperature. User can monitor the temperature on the display by the choice of Degree Fahrenheit and Celsius.
- 20 -
- 21 -
Figure 5.1: Stellaris LM3S8962 Evaluation Board Layout The Stellaris LM3S8962 evaluation board includes a range of useful peripherals and an integrated in circuit debug interface (ICDI). The main features that includes in evaluation board are 1. LM3S8962 Microcontroller 2. Ethernet 3. CAN module 4. Clocking 5. Reset 6. Power Supplies 7. Debugging 8. Debugging Modes In this project, we do not need to configure specially for Microcontroller, Clocking, Reset and Power Supplies. It can be used from the evaluation kit.
- 22 -
5.1.1
LM3S8962 Microcontroller
The heart of the EVB is a Stellaris LM3s8962 ARM Cortex-M3-based microcontroller. The LM3S8962 offers 256-KB flash memory, 50-MHz operation, an Ethernet controller, a CAN module and wide range peripherals. [1] 5.1.2 Clocking
The LM3S8962 microcontroller has four on-chip oscillators; three are implemented on the EVB. An internal 12 MHz oscillator is the clock source the microcontroller uses during and following POR. An 8.0-MHz crystal completes the LM3S8962s main internal clock circuit. An internal PLL, configured in software, multiplies this clock to 50-MHz for core and peripheral timing. The internal 12 MHz oscillator is the primary clock source during start-up. A small, 25-MHz crystal is used by the LM3S8962 microcontroller for Ethernet physical layer timing. 5.1.3 Reset The LM3S8962 microcontroller shares its external reset is input with OLED display. External reset is asserted (active low) under any one of the three conditions. Power-on reset Reset push switch SW1 held down Internal debug mode- By the USB device controller (U4 FT2232) when instructed by debugger. 5.1.4 Power Supplies
The LM3S8962 is powered from a +3.3-V supply. A low drop-out (LDO) regulator regulates +5V power from the USV cable to +3.3-V. +3.3-V power is available for powering external circuits. A +15-V rail is available when the OLED display power supply is active. The speaker and the OLED display boost-converter operate from the +5-V rail.
- 23 -
External sensor board (ESB) consists of two voltage regulator, External sensor, Resistor, Capacitor, on/off switch that can be powered from a wall adapter, Darlington transistor and Diode.
Figure 5.2: Schematic for external sensor board. The input voltage from 12-V adapter is reduced down by the voltage regulator LM7805 and the voltage is supplied to the internal and external sensor. After that output voltage is crossed to the LM3940 voltage regulator and gives the output around 3.3-V. Darlington transistors are used as electronic switches in this project. In a grounded-emitter transistor circuit, such as the light-switch circuit shown, as the base voltage raises the base and collector current rise exponentially. If VCE could fall to 0 (perfect closed switch) then Ic could go no higher than VCC / RC, even with higher base voltage and current. The transistor is then said to be saturated. Hence, values of input voltage can be chosen such that the output is either completely off. Therefore the transistor is acting as a switch. 5.2.1 Voltage Regulator
- 24 -
A voltage regulator is an electrical regulator designed to automatically maintain a constant voltage level. It may use an electromechanical mechanism, or passive or active electronic components. Depending on the design, it may be used to regulate one or more AC or DC voltages. With the exception of passive shunt regulators, all modern electronic voltage regulators operate by comparing the actual output voltage to some internal fixed reference voltage. Any difference is amplified and used to control the regulation element in such a way as to reduce the voltage error. This forms a negative feedback control loop; increasing the open-loop gain tends to increase regulation accuracy but reduce stability (avoidance of oscillation, or ringing during step changes). There will also be a trade-off between stability and the speed of the response to changes. If the output voltage is too low (perhaps due to input voltage reducing or load current increasing), the regulation element is commanded, up to a point, to produce a higher output voltage - by dropping less of the input voltage (for linear series regulators and buck switching regulators), or to draw input current for longer periods (boost-type switching regulators); if the output voltage is too high, the regulation element will normally be commanded to produce a lower voltage. However, many regulators have over-current protection; so that they will entirely stop sourcing current (or limit the current in some way) if the output current is too high, and some regulators may also shut down if the input voltage is outside a given range.
The output voltage can only be held roughly constant; the regulation is specified by two measurements: Load regulation is the change in output voltage for a given change in load current (for example: "typically 15mV, maximum 100mV for load currents between 5mA and 1.4A, at some specified temperature and input voltage").
- 25 -
line regulation or input regulation is the degree to which output voltage changes with input (supply) voltage changes - as a ratio of output to input change (for example "typically 13mV/V"), or the output voltage change over the entire specified input voltage range (for example "plus or minus 2% for input voltages between 90V and 260V, 50-60Hz").
Figure 5.4: Schematic for checking regulator quality 5.2.3 LM35 - Precision Centigrade Temperature Sensor
The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature. The LM35 thus has an advantage over linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large constant voltage from its output to obtain convenient Centigrade scaling. The LM35 does not require any external calibration or trimming to provide typical accuracies of 14C at room temperature and 34C over a full 55 to +150C temperature range. Low cost is assured by trimming and calibration at the wafer level. The LM35s low output impedance, linear output, and precise inherent calibration make interfacing to readout or control circuitry especially easy. It can be used with single power supplies, or with plus and minus supplies. As it draws only 60 A from its supply, it has very low self-heating, less than 0.1C in still air. The LM35 is rated to operate over a 55 to +150C temperature range,while the LM35C is rated for a 40 to +110C range (10with improved accuracy). The LM35 series is available packaged in hermetic TO-46 transistor packages, while the LM35C, LM35CA, and LM35D are
- 26 -
also available in the plastic TO-92 transistor package. The LM35D is also available in an 8lead surface mount small outline package and a plastic TO-220 package.
- 27 -
5.2.4
Ohm's law
The behavior of an ideal resistor is dictated by the relationship specified in Ohm's law:Ohm's law states that the voltage (V) across a resistor is proportional to the current (I) through it where the constant of proportionality is the resistance (R). Equivalently, Ohm's law can be stated: This formulation of Ohm's law states that, when a voltage (V) is maintained across a resistance (R), a current (I) will flow through the resistance. [10] 5.2.5 Four-band resistors Four-band identification is the most commonly used color-coding scheme on resistors. It consists of four colored bands that are painted around the body of the resistor. The first two bands encode the first two significant digits of the resistance value, the third is a power-of-ten - 28 -
multiplier or number-of-zeroes, and the fourth is the tolerance accuracy, or acceptable error, of the value. The first three bands are equally spaced along the resistor; the spacing to the fourth band is wider. Sometimes a fifth band identifies the thermal coefficient, but this must be distinguished from the true 5-color system, with 3 significant digits. For example, green-blue-yellow-red is 56104 = 560 k 2%. An easier description can be as followed: the first band, green, has a value of 5 and the second band, blue, has a value of 6, and is counted as 56. The third band, yellow, has a value of 104, which adds four 0's to the end, creating 560,000 at 2% tolerance accuracy. 560,000 changes to 560 k 2% (as a kilo- is 103). Each color corresponds to a certain digit, progressing from darker to lighter colors, as shown in the chart below. [10]
Table 5.2: Resistor-band configuration 5.2.6 Capacitor A capacitor (formerly known as condenser) is a passive electronic component consisting of a pair of conductors separated by a dielectric (insulator). When there is a potential difference (voltage) across the conductors a static electric field develops in the dielectric that stores energy and produces a mechanical force between the conductors. An ideal capacitor is
- 29 -
characterized by a single constant value, capacitance, measured in farads. This is the ratio of the electric charge on each conductor to the potential difference between them. A capacitor is assumed to be self-contained and isolated, with no net electric charge and no influence from any external electric field. The conductors thus hold equal and opposite charges on their facing surfaces, and the dielectric develops an electric field. In SI units, a capacitance of one farad means that one coulomb of charge on each conductor causes a voltage of one volt across the device. The capacitor is a reasonably general model for electric fields within electric circuits. An ideal capacitor is wholly characterized by a constant capacitance C, defined as the ratio of charge Q on each conductor to the voltage V between them. Sometimes charge build-up affects the capacitor mechanically, causing its capacitance to vary. In this case, capacitance is defined in terms of incremental changes. [11]
A diode is a two-terminal electronic component that conducts electric current in only one direction. The term usually refers to a semiconductor diode, the most common type today. This is a crystalline piece of semiconductor material connected to two electrical terminals. [1] A vacuum tube diode (now little used except in some high-power technologies) is a vacuum tube with two electrodes: a plate and a cathode.
- 30 -
The most common function of a diode is to allow an electric current to pass in one direction (called the diode's forward direction) while blocking current in the opposite direction (the reverse direction). Thus, the diode can be thought of as an electronic version of a check valve. This unidirectional behavior is called rectification, and is used to convert alternating current to direct current, and to extract modulation from radio signals in radio receivers. However, diodes can have more complicated behavior than this simple on-off action, due to their complex non-linear electrical characteristics, which can be tailored by varying the construction of their P-N junction. These are exploited in special purpose diodes that perform many different functions. For example, specialized diodes are used to regulate voltage (Zener diodes), to electronically tune radio and TV receivers (varactor diodes), to generate radio frequency oscillations (tunnel diodes), and to produce light (light emitting diodes). Features
- 32 -
Darlington transistor (often called a Darlington pair) is a compound structure consisting of two bipolar transistors (either integrated or separated devices) connected in such a way that the current amplified by the first transistor is amplified further by the second one. This configuration gives a much higher current gain (written , hfe, or hFE) than each transistor taken separately and, in the case of integrated devices, can take less space than two individual transistors because they can use a shared collector. Integrated Darlington pairs come packaged singly in transistor-like packages or as an array of devices (usually eight) in an integrated circuit. [16]
This device is designed for applications requiring extremely high current gain at currents to 1.0A.
- 33 -
- 34 -
- 35 -
- 36 -
In order to display the users choice of the Degree Celsius and Fahrenheit, block diagram for conversion VI is constructed as in Figure 5.1. Degree Fahrenheit is converted by using the 9 formula [ F ] = [ C ] + 32 . This VI will be used in another VI as a selection of Celsius or 5 Fahrenheit. As a user interface (the front panel) will be shown as in below figure.
Figure 6.3: Internal Thermometer. Internal temperature sensor is connected via Analogue to Digital Converter pin (ADC1) of Micro-controller. As the temperature sensor (LM35) gives the changes of 10mV per degree Celsius, the output of the sensor is multiplied by 100 to get the temperature reading. Conversion of Temperature VI is embedded into it for the user to select in terms of Degree Celsius or Degree Fahrenheit. And the temperature is displayed on the thermometer and value as a user interface. - 37 -
- 38 -
- 40 -
The finished Front Panel and Block Diagram will look like in below figure.
- 41 -
It needs to ensure that the Enable Debugging check box is selected and under Debug options that it is selected to Run on target using ULINK2 at EK-LM3S8962 Build Specification.
- 42 -
Figure 7.3: Setting Build Specification After running the VI, You will observe that the LED on the hardware itself is blinking. The rate of the blinking is due to the Wait (ms) function in the Block Diagram. You can stop the VI, change the value and run again. Click Stop button when you want to stop the VI. Or press reset button on the EK-LM3S8962 board.
Figure 7.4: Blinking of LED on Evaluation board From the above test, we can conclude that EK-LM3S8962 Evaluation board is functionally working. - 43 -
Figure 7.5: Testing on incoming voltage After the current goes through the regulator, it will step down incoming 12 V to 5V.
After the current goes through the second regulator, expected voltage is around 3V as the stand-by supply for the micro-controller. .
Figure 7.7: Output Voltage after LM3940 After the output voltage testing is confirmed, the supply to the temperature is applied and tested the output voltage of the external temperature sensor. As the temperature is calibrated to 10mV per 1 degree Celsius, the output of the temperature is measured about 291mV as shown in below figure.
- 45 -
The internal heat source is applied by using 12 V and the output of the internal temperature is measured as follow figure.
- 46 -
After running the block diagram, we can monitor the internal temperature as thermometer and temperature value. Depend on the choice of user; the temperature can be toggled as Degree Fahrenheit or Degree Celsius. The front panel screen can be seen as follows.
The external thermometer is constructed as the same flow with the internal thermometer. The outside temperature sensor that connected through the ADC pin of the microcontroller is monitored by using the following front panel.
- 47 -
Figure 7.11: External Thermometer 7.3.3 Internal Temperature Monitor In order to know the fluctuation of the temperature, the history of the temperature can be monitored on the Internal Temp History chart. From the front-panel, user can monitor the temperature in terms of Degree Fahrenheit or Celsius as shown in below figures.
- 48 -
After toggling the Temp Scale, the temperature changes from around 85 Degree Fahrenheit to around 31 Degree Celsius.
Figure 7.13: Internal Temperature History in Celsius 7.3.4 External Temperature Monitor
From the user interface of the front-panel, the history of the external temperature can be monitored in terms of Degree Fahrenheit or Celsius. By defining the time interval in Labview VI, the history of the temperature is monitored as followed.
- 49 -
Figure 7.15: External Temperature History in Celsius 7.3.5 Internal and External Temperature Monitor
For the convenience of user, VI for monitoring the external temperature and internal temperature is constructed and can be observed from below figures.
- 50 -
Figure 7.17: External temperature monitor The history of the temperature and the current temperature can be examined in terms of Fahrenheit or Celsius.
- 51 -
Figure 8.1: Temperature history of inside and outside of the system model To monitor the basic of the HVAC system, a 12 V 10W light bulb is used as a heat source and monitored the temperature. Before the light bulb is turned on, the difference between internal and external temperature is set to 5 degree Celsius. After the heat source is ON, the temperature is increased gradually and the fan will not turned on until it reaches to 5 degree difference. When the voltage difference reaches to around 4.9 degree, the fan is started to move according to the hardware design using the Darlington transistor. The temperature history difference can be seen as shown in below figure.
- 52 -
Figure 8.2: The temperature difference after heat source is ON When the internal temperature is reached to 5 degree difference, the fan ventilation is initiated. By adjusting the temperature difference, it can be reduced to temperature. The minimum temperature difference that can go down during the heat source is ON is around 3 degree Celsius. That makes the things inside of the system model to stay at comfortable temperature. It was observed that time taken to reach to comfortable temperature is about 7 minutes.
- 53 -
Once the heat source is turned off the interior temperature drops from 35 degree Celsius to 32 degree Celsius in 2 minutes and the fan is automatically deactivated. Since the interior temperature already matches the exterior temperature, ventilation is not required anymore. That gives the energy saving. The next experiment is to turn on again the internal heat source, once the interior temperature rise more than 2 degree Celsius difference. And then the fan start to activate and prevent the interior further rising , the interior temperature is maintain around 33 degree Celsius after two minutes with this the heat ventilation system maintain the minimum possible interior temperature as the set point temperature is determine by the exterior temperature and adapt accordingly to the environment temperature changes.
- 54 -
And the output of the sensor is 10 mV per degree. So 0.3 degree will be changed in every 3 mV. For Differential input, the minimum resolution = 1.5 = 1.5 mV . 1024
And the output of the sensor is 10 mV per degree. So 0.15 degree will be changed in every 1.5 mV. From above calculation, we can conclude that we do not need the Op-amp because 0.3 degree in temperature change is good enough to provide the good accuracy.
- 55 -
Solution By calculating the current for the light bulb, it gives that
P = VI
I=
away from what the current of the adapter can be supplied So by calculating the power that the adapter can be supplied, it gives that P = VI
Therefore, the light bulb which has 12 V 10W was chosen as a heat source.
R2 J5 J4 D3 Darlington Transistor
Figure 9.1: Wrong Connection circuit for fan output When the transistor turns on, it pulls down the output voltage of the collector to zero voltage. After verifying the circuit and connected as below, it can be measured for output voltage for fan.
R2 J5 5V D3 J4 Darlington Transistor J6
- 56 -
- 57 -
- 58 -
- 59 -
References
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] LabVIEW Programming, Data Acquisition and Analysis (with CD-ROM) Jeffrey Y. Beyon Engineering Circuit Analysis, 7th Edition Principles of Electronic Materials and Devices ( Third Edition ) by S.O.Kasap The Definitive Guide to the ARM Cortex-M3 by Joseph Yiu ENG 301 Microprocessor Programming PMJ 300- Project Management Applied Electromagnetism and Materials Andr Moliton M. James, Microcontroller cookbook, Published 2001 by Oxford Newnes http://en.wikipedia.org/wiki/Microprocessor http://en.wikipedia.org/wiki/Resistor http://en.wikipedia.org/wiki/Capacitor http://www.farnell.com http://chrisgammell.com/2008/12/16/circuit-board-design-and-how-it-haschanged/ http://www.ni.com/arm http://www.arm.com
- 60 -
APPENDIXES
1. LM35 - Precision Centigrade Temperature Sensor Electrical Characteristics
Note 1: Unless otherwise noted, these specifications apply: 55CTJ+150C for the LM35 and LM35A; 40TJ+110C for the LM35C and LM35CA; and 0TJ+100C for the LM35D. VS=+5Vdc and ILOAD=50 A, in the circuit of Figure 2. These specifications also apply from +2C to TMAX in the circuit of Figure 1. Specifications in boldface apply over the full rated temperature range. Note 2: Thermal resistance of the TO-46 package is 400C/W, junction to ambient, and 24C/W junction to case. Thermal resistance of the TO-92 package is 180C/W junction to ambient. Thermal resistance of the small outline molded package is 220C/W junction to ambient. Thermal resistance of the TO-220 package is 90C/W junction to ambient. For additional thermal resistance information see table in the Applications section. Note 3: Regulation is measured at constant junction temperature, using pulse testing with a low duty cycle. Changes in output due to heating effects can be computed by multiplying the internal dissipation by the thermal resistance. Note 4: Tested Limits are guaranteed and 100% tested in production. Note 5: Design Limits are guaranteed (but not 100% production tested) over the indicated temperature and supply voltage ranges. These limits are not used to calculate outgoing quality levels. Note 6: Specifications in boldface apply over the full rated temperature range. Note 7: Accuracy is defined as the error between the output voltage and 10mv/C times the devices case temperature, at specified conditions of voltage, current, and temperature (expressed in C).
- 61 -
Note 8: Nonlinearity is defined as the deviation of the output-voltage-versus-temperature curve from the best-fit straight line, over the devices rated temperature range. Note 9: Quiescent current is defined in the circuit of Figure 1. Note 10: Absolute Maximum Ratings indicate limits beyond which damage to the device may occur. DC and AC electrical specifications do not apply when operating 2. Tools Palette of Labview 1. The Tools palette is available on the front panel and the block diagram.A tool is a special operating mode of the mouse cursor. The cursorcorresponds to the icon of the tool you select on the palette. 2. Use the toolsto operate and modify front panel and block diagram objects. 3. If automatic tool selection is enabled and you move the cursor over objects on the front panel or block diagram, LabVIEW automatically selects the corresponding tool from the Tools palette.Select ViewTools Palette to display the Tools palette. LabVIEW retains the Tools palette position so when you restart LabVIEW, the palette appears in the same position. Tip Press the <Shift> key and right-click to display a temporary version of the Tools palette at the location of the cursor.
- 62 -
Nodes are objects on the block diagram that have inputs and/or outputs and perform operations when a VI runs. They are analogous to statements,operators, functions, and subroutines in textbased programming languages. The Add and Subtract functions in the previous figure are
4.Wires of Labview You transfer data among block diagram objects through wires. In the previous figure, wires connect the control and indicator terminals to the Add and Subtract functions. Each wire has a single data source, but you can wire it to many VIs and functions that read the data. Wires are different colors, styles, and thicknesses, depending on their data types. A broken wire appears as a dashed black line with a red X in the middle. Broken wiresoccur for a variety of reasons, such as when you try to wire two objects with incompatible data types.
- 63 -
Real-Time Signal Analysis with LabView/Micro-processor Motion control Factory automation Fire and security HVAC and building control Power and energy Transportation Test and measurement equipment Medical instrumentation
6. LM3S8962 Evaluation Kit Power On-chip Low Drop-Out (LDO) voltage regulator, with programmable output useradjustable from 2.25 V to 2.75 V Battery-backed hibernation module with real-time clock and 256- bytes of non-volatile memory 3.3-V supply brown-out detection Low-power options on controller: Sleep and Deep-sleep modes Low-power options for peripherals: software controls shutdown of individual peripherals User-enabled LDO unregulated voltage detection and automatic reset On-chip temperature sensor
- 64 -