Sei sulla pagina 1di 22

Example Lab Report and structure Monash Uni

The lab report


The laboratory report is an important form of writing for scientists as it provides a record of experiments completed. Depending on the type of task or investigation you carry out, the sections of the written piece may vary, but a lab report or project report will usually have a title page, abstract, introduction and methods, results, discussion sections, a conclusion and references test section.

Section Title page + ID details

Description

displays your name and student ID number the title gives a precise description of what is in the report (this may be supplied by the lecturer). placed at the beginning of the report provides a summary of the entire paper (about 5% of the whole text) including: o the problem and its importance o what was done (the experiment) o how it was done (the method) o what resulted (the most important results) o what this research contributes to the field (significance) NB: The abstract does not include figures or tables.

Abstract

Introduction

gives the background or scope of study includes background information so that the reader 1. understands the question behind the research 2. how it relates to other work in the field, and 3. why it is worth investigating. describes the methods and procedures used clearly explains the methodology so that it could be replicated (repeated) by another researcher. presents the results of the experiment uses an equation editor with correct mathematical symbols if the results involve numbers and equations includes clearly labelled figures, tables and graphs where appropriate. analyses and interprets the results, showing how these relate to the scope of study states conclusions about how the results confirm, verify, or support the hypothesis, or refute, negate, or contradict it. NB: The word "prove" is not used except in very specific contexts (eg in mathematics).

Methods

Results

Discussion

Conclusion References

summarises the conclusions of the study. lists all references cited in the text.

Laboratory Reports

Sample Reports: Virginia Tech (1) Virginia Tech (2) Virginia Tech (3) Lab Report Links: Toronto Wisconsin Site Links: Writing Guidelines Writing Exercises

Laboratory reports are written for several reasons. One reason is to communicate the laboratory work to management. In such situations, management often bases company decisions on the results of the report. Another reason to write laboratory reports is to archive the work so that the work will not have to be done in the future. This web page presents a commonly used organization for laboratory reports: Abstract, Introduction, Procedures, Results and Discussion, Conclusions, and Appendices. You should not assume, though, that this organization will serve all your laboratory reports. In other words, one organization does not "fit" all experiments. Rather, you should pay attention to the organization requested by your instructor who has chosen an organization that best serves your experiments.

Abstract The abstract presents a synopsis of the experiment. The following guidelines for preparing an abstract arise from the American Institute of Aeronautics and Astronautics (AIAA). Note that although your instructor may define the term "abstract" differently, these guidelines still give you a sense of the stylistic issues, such as whether to include numerical data, that distinguish abstracts:
The abstract should be written concisely in normal rather than highly abbreviated English. The author should assume that the reader has some knowledge of the subject but has not read the paper. Thus, the abstract should be intelligible and complete in itself; particularly it should not cite figures, tables, or sections of the paper. The opening sentence or two should, in general, indicate the subjects dealt with in the paper and should state the objectives of the investigation. It is also desirable to describe the treatment by one or more such terms as brief, exhaustive, theoretical, experimental, and so forth. The body of the abstract should indicate newly observed facts and the conclusions of the experiment or argument discussed in the paper. It should contain new numerical data presented in the paper if space permits; otherwise, attention should be drawn to the nature of such data. In the case of experimental results, the abstract should indicate the methods used in obtaining them; for new methods the

basic principle, range of operation, and degree of accuracy should be given. The abstract should be typed as one paragraph. Its optimum length will vary somewhat with the nature and extent of the paper, but it should not exceed 200 words.

Included here is a sample abstract for a laboratory report. Note that because this abstract serves a long report rather than a journal article, the abstract is somewhat longer than 200 words recommended by the AIAA.

Introduction The "Introduction" of a laboratory report identifies the experiment to be undertaken, the objectives of the experiment, the importance of the experiment, and overall background for understanding the experiment. The objectives of the experiment are important to state because these objectives are usually analyzed in the conclusion to determine whether the experiment succeeded. The background often includes theoretical predictions for what the results should be. (See a sample "Introduction.")

Procedures The "Procedures," often called the "Methods," discusses how the experiment occurred. Documenting the procedures of your laboratory experiment is important not only so that others can repeat your results but also so that you can replicate the work later, if the need arises. Historically, laboratory procedures have been written as first-person narratives as opposed to second-person sets of instructions. Because your audience expects you to write the procedures as a narrative, you should do so. Achieving a proper depth in laboratory procedures is challenging. In general, you should give the audience enough information that they could replicate your results. For that reason, you should include those details that affect the outcome. Consider as an example the procedure for using a manometer and strain indicator to find the static calibration of a pressure transducer. Because calibrations are considered standard, you can assume that your audience will have access to many details such as possible arrangements of the valves and tubes. What you would want to include, then, would be those details that might cause your results to differ from those of your audience. Such details would include the model number of the pressure transducer and the pressure range for which you calibrated the transducer. Should you have any anomalies, such as unusual ambient temperature, during your measurements, you would want to include those. When the procedure is not standard, the audience would expect more detail including theoretical justification for the steps. Given below is such a procedure--this one for an experiment devised to determine whether the frictional torque associated with a multi-turn film potentiometer is strictly the Coulomb friction between the slider and the film [Counts, 1999]. The test performed on the potentiometer was accomplished by

winding a string around the potentiometer shaft, attaching a mass to the string, and letting the mass fall. The change in resistance of the potentiometer with time indicated the acceleration of the mass. In this experiment it was assumed that the constant Coulomb friction torque was the only friction affecting the potentiometer. If this assumption were true, the friction force from the torque would be Ff = T/r (where T is the torque and r is the radius of the potentiometer's shaft). Likewise, the gravity force would be Fg = mg (where m is the mass tied to the string and g is the gravitational acceleration). A force balance then gives T = mr (g-a), where a is the acceleration of the mass. If the assumption holds that the only friction affecting the potentiometer was constant Coulomb friction, then each mass would undergo a constant acceleration. The potentiometer measured voltage versus time for the masses as they dropped, but the measurement of interest to us was position versus time. For that reason, a 'calibration' was performed before we measured any data. In the calibration, the potentiometer's initial voltage was measured. Then the string was pulled a set distance (2 inches), and the voltage was recorded. This process of pulling the string a set distance and recording the voltage continued another two times (see Appendix A for the results). To determine the relationship between voltage and position, the differences in the voltages were averaged and divided by the length. The resulting relationship was 0.9661 volts/inch. Five different masses were used to test the assumption of constant acceleration. For each mass, the string was rolled up on the shaft, the oscilloscope was triggered, and the shaft was released. As each mass dropped, the oscilloscope collected the potentiometer's voltage versus the time. After obtaining plots for each mass, we used the voltage-position relationship, mentioned above, to convert the data from the form voltage versus time to the form position versus time squared.The residuals of the data determined whether the assumption of constant acceleration was valid.

Results and Discussion The heart of a laboratory report is the presentation of the results and the discussion of those results. In some formats, "Results" and "Discussion" appear as separate sections. However, P.B. Medawar [1979] makes a strong case that the two should appear together, particularly when you have many results to present (otherwise, the audience is faced with a "dump" of information that is impossible to synthesize). Much here depends upon your experiment and the purpose of your laboratory report. Therefore, pay attention to what your laboratory instructor requests. Also, use your judgment. For instance, combine these sections when the discussion of your

first result is needed to understand your second result, but separate these sections when it is useful to discuss the results as a whole after all results are reported. In discussing the results, you should not only analyze the results, but also discuss the implications of those results. Moreover, pay attention to the errors that existed in the experiment, both where they originated and what their significance is for interpreting the the reliability of conclusions. One important way to present numerical results is to show them in graphs. (See a sample "Results and Discussion" section.)

Conclusions In longer laboratory reports, a "Conclusion" section often appears. Whereas the "Results and Discussion" section has discussed the results individually, the "Conclusion" section discusses the results in the context of the entire experiment. Usually, the objectives mentioned in the "Introduction" are examined to determined whether the experiment succeeded. If the objectives were not met, you should analyze why the results were not as predicted. Note that in shorter reports or in reports where "Discussion" is a separate section from "Results," you often do not have a "Conclusion" section. (See a sample "Conclusions" section.)

Appendices In a laboratory report, appendices often are included. One type of appendix that appears in laboratory reports presents information that is too detailed to be placed into the report's text. For example, if you had a long table giving voltage-current measurements for an RLC circuit, you might place this tabular information in an appendix and include a graph of the data in the report's text. Another type of appendix that often appears in laboratory reports presents tangential information that does not directly concern the experiment's objectives. If the appendix is "formal," it should contain a beginning, middle, and ending. For example, if the appendix contains tables of test data, the appendix should not only contain the tabular data, but also formally introduce those tables, discuss why they have been included, and explain the unusual aspects that might confuse the reader. Because of time constraints, your instructor might allow you to include "informal" appendices with calculations and supplemental information. For such "informal" situations, having a clear beginning, middle, and ending is not necessary. However, you should still title the appendix, place a heading on each table, place a caption beneath each figure, and insert comments necessary for reader understanding. (See a sample appendix.)

Last updated 07/04 http://writing.eng.vt.edu/

http://www.writing.eng.vt.edu/workbooks/laboratory.html

Sample Laboratory Report #1

Supporting Links: Lab Reports Sample Lab Report #2 Site Links: Writing Guidelines Writing Exercises

This web page presents a sample report [Herwald, 1999] written in a microprocessor laboratory course at Virginia Tech. In this report, carets (>) are given to reveal the line spacings in the report's format (in an actual report, these carets would not appear). Also, in this report, the actual appendices are not complete (in an actual report, these appendices would be complete, and each would begin on a separate page). Moreover, an aspect of format that is probably not reflected by your browser is that the report's title and appendices' titles are in 14-point type, the subheadings and text are in 12-point type, and the figure captions are in 10-point type. Note that instructors of other laboratory courses may have different expectations as far as the format and style of lab reports in their classes. For instance, the guidelines for many laboratory reports call for an abstract to appear in the report's beginning. Moreover, some instructors frown on the use of the first person (I or we).

> > >

Design of a Temperature Measurement and Display System Using the 68HC11 Microcontroller
>

> Introduction > This report presents a design of a temperature measurement and display system that incorporated the Motorola 68HC11 microcontroller, simply referred to here as the HC11. This design was a valuable experience because similar temperature measurement and display systems often are used in buildings and vehicles [Spasov, 1996]. The design presented in this report made use of the HC11's analog-to-digital (A/D) converter and the serial subsystems. As shown in Figure 1, the design included a temperature sensor connected to one of the HC11's A/D input pins on Port E, and light emitting diodes (LEDs) connected to Port B. These LEDs acted as temperature indicators. Additionally, the design included a connection between the HC11 and a remote personal computer (PC). This connection served to send messages regarding temperature to the PC. An assembly software program developed for this design performed various functions for using the added hardware. The design had two main objectives. The first objective was to use the HC11 to measure temperature. Included in this objective was the task of connecting the temperature sensor and the LEDs to the HC11. Also included in this objective was the task of designing software to do the following: initialize the A/D converter and serial subsystems; control the measurement and storage of temperature in a RAM variable called TEMP; and control the display of temperature on the LED outputs. The second objective of the design was to use the HC11 to indicate if the temperature went outside of prescribed limits: below 20 degrees Fahrenheit or above 90 degrees Fahrenheit. Included in this objective was the task of connecting the HC11 to a remote PC terminal through an RS-232 connection. Another task within this objective was developing software to initialize the serial subsystem. The final task of this objective was to create subroutines for the software program of the first objective to have the HC11 send a message to the PC if the measured temperature went outside the stated limits. This report first presents the procedures for and assessment of the design to have the HC11 measure temperature. Then the report discusses the procedures for and assessment of adding a serial output to the HC11 design to communicate whether the temperature is outside of prescribed limits.

Figure 1. Temperature measurement and display system developed for the Motorolla 68HC11 microcontroller, which is attached to a universal evaluation board (EVBU).

> > Connecting a Temperature Measurement Circuit to the HC11 > Connecting a temperature measurement circuit to the HC11 microcontroller involved both hardware and software. Hardware was added to control the measurement and display of the temperature. Software served to control this added hardware. In performing the testing and design for this part of the project, my laboratory partner and I divided the work in the following way. My partner assumed the lead role in connecting the hardware, and I assumed the lead role in writing the programs. Although one of us had a lead role in performing either the hardware or the software, we worked collaboratively in checking both the hardware and software and in troubleshooting any problems. > Procedures for Design. The hardware for the temperature measurement circuit included both a temperature sensor attached to Port E and LEDs attached to Port B. The circuit, which is shown in Figure A-1 of Appendix A, was designed according to the specifications obtained from the Computer Engineering Laboratories web site for ECPE 4535 [Lineberry, 2001]. Within the circuit was an LM3911 temperature controller integrated circuit (IC), the output of which we connected to a non-inverting op-amp. The output of this op-amp attached to the HC11 A/D input pin E2 through a 1000-ohm resistor. The circuitry was scaled so that 0 volts out corresponded to 0 degrees and 5 volts out corresponded to 110 degrees. To each of the output pins of Port B, we connected LEDs using a 74HC244 buffer IC and 330-ohm current limiting resistors, all of which are shown in Figure A-1. The LEDs were located in the breadboard area of the trainer kits. To control this added hardware, we programmed the HC11 following the pseudo code and program listing given in Appendices B and C, respectively. The program shown in Appendix C consisted of three subroutines that were called from the main

program (Main). The three subroutines were named Startup, GetTemp, and SetDisp. The Startup subroutine was used to enable the A/D converter subsystem. First the A/D charge pump was powered up by setting bit 7 of the Option register. Then, bit 6 was cleared so that the charge pump used the system E-clock [Spasov, 1996]. After a 100 microsecond delay to allow the charge pump to stabilize, the control word $22 was written to the ADCTL register to start continuous, singlescan conversions on pin E2 of Port E. The subroutine GetTemp was used to input and scale the analog voltage from the temperature sensor circuit. The register ADR3 held the result of the A/D conversions, which was treated as an 8-bit binary fraction between 0 and 1. This value was loaded into accumulator A and then multiplied by a scale factor of 110 using the MUL instruction. The result of this multiplication was a 16-bit number between 0 and 110, with an 8-bit integer portion stored in accumulator A and an 8bit fractional portion stored in accumulator B. The integer portion of the temperature was then stored in the RAM variable TEMP. The subroutine SetDisp controlled the lighting of the LEDs connected to Port B. The amount of lighting was based on the present value of TEMP. First, TEMP was loaded into accumulator A and compared with the value 20, the designated cut-off for low temperature. Accumulator B was cleared to zero and represented the initial value to be written to Port B. If the value in accumulator A was greater than or equal to 20, then the value in accumulator B was shifted one position left and incremented, and 10 was subtracted from accumulator A. The process then repeated itself as long as the value in accumulator A was greater than or equal to 20. An abbreviated form of this process appears in Figure 2 (the complete process appears in Appendix C). After the number of LEDs to turn on were determined, as shown in Figure 2, the number of bits indicated by the count value in accumulator B were set high on Port B beginning with bit 0 [Motorola, 1991].

Figure 2. Flowchart illustrating the determination of the number of Port B bits to enable for the LED display.

> > Assessment of Design. To test the operation of the GetTemp and SetDisp subroutines, we measured the actual temperature with a temperature probe and compared that with the measured value represented by the LED display indicators

at several different temperature settings. Table 1 shows the results of the measurement comparison, where the actual temperatures measured are shown on the left, and the temperatures represented by the number of LEDs lit are shown on the right. From Table 1, we verified that the developed hardware and software for this part of the lab were functioning properly. Overall, this section of the laboratory went smoothly. Table 1. Comparison of temperature measurements.
Actual Temperature 15F 28F 33F 56F 110F Number of LEDs Lit 0 1 2 4 8

> > Adding Serial Output to the HC11 > This section presents the addition of four subroutines to the existing software developed in the previous section. The added subroutines, listed in Appendix D, were called InitSCI, SendChar, SendMsg, and CheckLimits. The InitSCI subroutine initialized the serial subsystem of the HC11 so that it could communicate with the host PC at 9600 baud [Spasov, 1996]. This initialization was done by writing control words to the BAUD, SCCR1, and SCCR2 control registers in the HC11 as shown in Appendix C. In performing the testing and design for this part of the project, my laboratory partner and I divided the work in the following way. My partner assumed the lead role in connecting the hardware, and I assumed the lead role in writing the programs. Although one of us had a lead role in performing either the hardware or the software, we worked collaboratively in checking both the hardware and software and in troubleshooting any problems. > Procedures for Design. The first subroutine, SendChar, was added to send a single data byte from the HC11 to the remote PC terminal. The data byte to be sent was contained in accumulator A. After waiting for the TDRE bit in the SCSR register to be set, indicating that the HC11 is ready to transmit another byte, the value in accumulator A was written to the SCDR register to begin the transmission [Motorola, 1991]. The second subroutine, SendMsg, used the SendChar subroutine to write character strings to the remote PC terminal. Before calling SendMsg, the X index register was set to point to the beginning of the character string to be sent. The SendMsg subroutine then sent out the string by calling SendChar for each character until the NULL character was reached, which marked the end of a string. The third and final subroutine, CheckLimits, was added to the existing software

program to check the temperature range. The subroutine CheckLimits called SendMsg to print the following message if TEMP was less than 20 degrees Fahrenheit: "Temperature is very low." If TEMP was greater that 90 degrees Fahrenheit, CheckLimits called SendMsg to print the following message: "Temperature is very high." If TEMP was between 20 and 90 degrees Farenheit, CheckLimits called SendMsg to print the following message: "Temperature is acceptable." A flag variable called FLG ensured that the messages were not repeatedly sent for each entry into the very hot, very cold, or acceptable temperature regions. FLG was set to zero if TEMP was between 20 and 90 degrees, one if TEMP was less than 20 degrees, and two if TEMP was greater than 90 degrees. > Assessment of Design. While developing the design presented in this section, several mistakes and difficulties were encountered. The initial setup of the serial subsystem of the 68HC11 involved some troubleshooting. We also had problems with sending the alarm messages more than one time because a flag variable was not set. The diagnosis and solutions to these problems are discussed in this section. Initially, the serial writes from the 68HC11 to the host PC did not work properly because the SendChar routine did not check the TDRE bit before writing to the SCDR register. This caused characters to be dropped when sending a message. We also had a problem sending out messages using SendMsg because we did not terminate the message strings correctly with the NULL zero. By adding the NULL zero to the end of the strings, the sending of messages worked as expected. A final problem was the output rate of the alarm messages. At first, we did not set a flag to indicate to the program that a message had already been sent to the PC. This failure caused messages to be continually sent to the PC terminal when the temperature was outside of the normal operating region. This problem was fixed by making a variable called FLG that was set as soon as the alarm message was sent and then cleared when the temperature returned to the normal operating region. > > Conclusions > This report has discussed the development of a temperature measurement and display system. The objectives of this lab were to develop the necessary hardware and software to have the HC11 measure temperature and indicate whether that temperature fell outside of prescribed limits. Both objectives were met. By keeping track of the measured temperature, the HC11 was able to control an LED temperature display. Also, if the temperature became very cold or hot, the HC11 sent an alarm message to a host PC terminal. This lab has introduced us to the important topics of A/D conversion and serial communications. In the lab, an A/D converter allowed us access to analog inputs of temperature from a remote computer. Besides temperature measurement, A/D converters have many applications in automatic control systems and factory automation. For example, in an electric motor drive, the phase currents and flux are continually measured by using scaling circuitry and an A/D converter input to a microprocessor. >

> >

Appendix A: Hardware Schematic


> > Figure A-1 presents the hardware schematic for the temperature circuit. The circuit was designed according to the specifications obtained from the Computer Engineering Laboratories web site for ECPE 4535 [Lineberry, 2001].

Figure A-1. Hardware schematic for the temperature measurement circuit designed for this lab. In an actual report, all the connections, pin numbers, and pin labels should be shown.

> > >

Appendix B: Pseudocode for the Software Developed


> > XXXXXXXXXXXXXXXXXX* XXXXXXXXXX XXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXXXXXXXX XXXXXXXXXX XXXXXXXXX XXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXX XXXXXXXXXXXX


*In an actual report, the pseudocode would appear here. Also note that some professors allow you to substitute an appendix with program flow charts for this appendix.

> > >

Appendix C: Program Listing


> >
Assembler release TER_2.0 version 2.09 (c) Motorola (free ware) 0001 ;************************************************** 0002 ; Temp_Monitor: This program implements a temperature 0003 ; measurement and display system. The A/D system is 0004 ; used to read an analog temperature. The value is 0005 ; scaled to Farenheit, and displayed on an LED bar 0006 ; display. If the temperature is above 90 or below 0007 ; 20, a message is transmitted over the serial link. 0008 ; Programmer: JMB 0009 ;************************************************* 0010 0011 ; Define some I/O registers 0012 1004 PORTB EQU $1004 0013 102b BAUD EQU $102B 0014 102c SCCR1 EQU $102C 0015 102d SCCR2 EQU $102D 0016 102e SCSR EQU $102E 0017 102f SCDR EQU $102F 0018 1030 ADCTL EQU $1030 0019 1031 ADR1 EQU $1031 0020 1032 ADR2 EQU $1032 0021 1033 ADR3 EQU $1033 0022 1034 ADR4 EQU $1034 0023 1039 OPTION EQU $1039 0024 0025 ; Define some constants

0026 005a UPPER_LIMIT EQU 90 ; upper temperature limit 0027 0014 LOWER_LIMIT EQU 20 ; lower temperature limit 0028 0002 HOT EQU 2 ; flag value indicating 0029 ; temperature UPPER_LIMIT 0030 0001 COLD EQU 1 ; flag value indicating 0031 ; temperature < LOWER_LIMIT 0032 0000 OK EQU 0 ; flag value indicating 0033 ; temperature is within limits 0034 000d CR EQU $0D ; ASCII code for carraige return 0035 000a LF EQU $0A ; ASCII code for line feed 0036 0037 ; Variables 0038 0100 ORG $100 ; place in RAM area 0039 0100 TEMP rmb 1 ; current temperature 0040 0101 FLAG rmb 1 ; flag indicating system state 0041 ; (HOT, COLD, or OK) 0042 0043 b600 ORG $B600 ; EEPROM area 0044 ;*************************************************** 0045 ; Temp_Monitor: This routine initializes the system, and 0046 ; then enters an endless loop. In this loop, it reads 0047 ; the current temperature, updates the LEDs, and then 0048 ; sends a message to the serial link, if necessary. 0049 ; Input: none 0050 ; Output: none 0051 ; Registers/variables modified: ACCA, ACCB, CCR, TEMP, FLAG 0052 ;**************************************************** 0053 Temp_Monitor: 0054 b600 8e 01 ff lds #$1FF ; initialize stack pointer 0055 b603 bd b6 11 jsr Startup ; initialize A/D and SCI, 0056 ; initialize RAM variables 0057 Main: 0058 b606 bd b6 1d jsr GetTemp ; get current temperature 0059 b609 bd b6 29 jsr SetDisp ; update LED display 0060 b60c bd b6 3c jsr CheckLimits ; check upper and lower limits 0061 b60f 20 f5 bra Main ; repeat

0062 0063 0064 0065 ;**************************************************** 0066 ; Startup: This routine initializes the system. It calls 0067 ; other routines to initialize the A/D system and the 0068 ; SCI system. It also initializes the FLAG variable. 0069 ; Input: none 0070 ; Output: none 0071 ; Registers/variables modified: ACCA, IX, CCR, FLAG 0072 ;**************************************************** 0073 Startup: 0074 b611 bd b6 7c jsr InitAD ; power up the A/D system 0075 b614 bd b6 a2 jsr InitSCI ; initialize the serial interface 0076 0077 b617 86 00 ldaa #OK ; initialize FLAG 0078 b619 b7 01 01 staa FLAG 0079 0080 b61c 39 rts 0081 0082 ;**************************************************** 0083 ; GetTemp: This routine gets the current temperature. 0084 ; It reads the A/D value, converts it to Farenheit, 0085 ; and stores the result in TEMP. An A/D value of $00 0086 ; corresponds to 0 degrees, and $FF (actually $100) 0087 ; is 110 degrees, so the A/D value is multiplied by 0088 ; 110 to convert to temperature. 0089 ; Input: none 0090 ; Output: New temperature stored in TEMP 0091 ; Registers/variables modified: ACCA, ACCB, CCR, TEMP 0092 ;**************************************************** 0093 GetTemp: 0094 b61d b6 10 31 ldaa ADR1 ; read A/D value 0095 b620 c6 6e ldab #110 ; multiply by 110 0096 b622 3d mul ; to get temperature 0097 b623 89 00 adca #$00 ; round to 8 bits 0098 0099 b625 b7 01 00 staa TEMP ; store new temperature 0100 0101 b628 39 rts 0102 0103 ;****************************************************

0104 ; SetDisp: This routine updates the LEDs to display 0105 ; the current temperature. The LEDs are arranged as a 0106 ; bar display with a range of 20 - 90 degrees, in 10 0107 ; degree steps. This routine determines how many of the 0108 ; LEDs should be turned on based on the current temperature. 0109 ; Input: TEMP variable 0110 ; Output: none 0111 ; Registers/variables modified: ACCA, ACCB, CCR 0112 ;**************************************************** 0113 SetDisp: 0114 b629 c6 00 ldab #$00 ; all LEDs off initially 0115 b62b b6 01 00 ldaa TEMP ; get current temperature 0116 0117 SD_Loop: 0118 b62e 81 14 cmpa #20 ; is value 20? 0119 b630 25 06 blo Update_LEDs ; branch if not 0120 b632 58 lslb ; else, turn on next LED 0121 b633 5c incb 0122 b634 80 0a suba #10 ; value = value - 10 0123 b636 20 f6 bra SD_Loop ; repeat 0124 0125 Update_LEDs: 0126 b638 f7 10 04 stab PORTB ; update the LEDs 0127 0128 b63b 39 rts 0129 0130 ;**************************************************** 0131 ; CheckLimits: This routine checks to see if the current 0132 ; temperature is within the upper and lower limits. If 0133 ; not, then a warning message is transmitted over the 0134 ; serial link. 0135 ; Input: TEMP, FLAG 0136 ; Output: none 0137 ; Register/variables modified: ACCA, ACCB, IX, CCR 0138 ;**************************************************** 0139 CheckLimits: 0140 b63c b6 01 00 ldaa TEMP ; get current temperature 0141 b63f 81 5a cmpa #UPPER_LIMIT ; temp upper limit? 0142 b641 23 12 bls Check_Lower ; branch if not 0143 b643 c6 02 ldab #HOT ; have we already sent a 0144 ; warning for this? 0145 b645 f1 01 01 cmpb FLAG ; (i.e., is FLAG == HOT?)

0146 b648 repeat 0147 0148 b64a 0149 b64d message 0150 b650 0151 b653 0152 0153 0154 b655

27 31 f7 01 01 ce b6 e2 bd b6 c5 20 26 81 14

beq stab ldx jsr bra

CL_Exit FLAG #HOT_MSG SendMsg CL_Exit

; branch if so (don't ; warning message) ; update flag ; send "hot" warning ; and exit ; temp $102F

Check_Lower: cmpa #LOWER_LIMIT

> > >

References
> > Lineberry, Bob, "Computer Engineering Laboratories Website at Virginia Tech,"http://www.ee.vt.edu/cel (Blacksburg, VA: ECE Department, 1998), ECpE 4535: Laboratory Assignments, Lab X. > Motorola Corporation, M68HC11 E Series: Reference Manual, rev. 3 (Oak Hill, Texas: Motorola Corp. 1991), chapters 9 and 12. > Spasov, Peter, Microcontroller Technology: The 68HC11, 2nd ed. (Englewood Cliffs, NJ: Prentice Hall, 1996), pp. 107, 355-359, 460.

Last updated 1/00 http://writing.eng.vt.edu/

Sample Laboratory Report #2

Sample Reports: Lab Handout Sample Lab Report #1

This web page presents a sample laboratory report written in a thermal fluids course (ME 2984) at Virginia Tech.

Contents: Introduction Procedures Results and Discussion Appendix Site Links: Writing Guidelines Writing Exercises

Accompanying this report is a Lab Handout that states what the instructors expected as far as the scope of the experiment and the depth and organization of the report.

Temperature and Pressure Measurements of an Ideal Gas That Is Heated in a Closed Container
Introduction This report discusses an experiment to study the relationship of temperature and pressure of an ideal gas (air) that was heated in a closed container. Because the ideal gas was in a closed container, its volume remained constant. The objective of the experiment is to test whether the ideal equation of state holds. In the equation, pV = mRT, where p is the pressure the gas, V is the volume, m is the mass, R is a constant, and T is temperature. This report presents the procedures for the experiment, the experiment's results, and an analysis of those results.

Procedures In this experiment, air (an ideal gas) was heated in a pressure vessel with a volume of 1 liter. Attached to this pressure vessel was a pressure transducer and thermocouple to measure the pressure and the temperature, respectively, of the air inside the vessel. Both of these transducers produced voltage signals (in Volts) that were calibrated to the pressure (kPa) and temperature (K) of the air (the atmospheric pressure for where the experiment occurred is assumed to be 13.6 psia). In addition, the theoretical temperature (K) of air was calculated as a function of the measured pressured values (kPa).

Results and Discussion This section analyses the results of the experiment. The experiment went as expected with no unusual events that would have introduced error. The voltages as measured for the pressure and temperature transducers appear in Table A-1 of the Appendix.

Also included in the Appendix are the equations used for calibrating those voltages with the actual pressures and temperatures. These equations led to the values of pressure and temperature that are shown the third and fourth columns of Table A-1. From these values, a graph between temperature (K) and pressure (kPa) was created (Figure A-1). As can be seen from the graph, the relationship of temperature versus pressure is roughly linear. As part of this experiment, the theoretical values of temperature were calculated for each measured pressure value. In this calculation, which used the ideal gas equation, the volume and mass were assumed to be constant. These theoretical values of temperature are shown in the final column of Table A-1. From this final column arose Figure A-2, a graph of ideal temperature (K) versus pressure (kPa). As shown in this graph, the relationship between temperature and pressure is exactly linear. A comparison between the graph showing measured data (Figure A-1) and the graph showing theoretical data (Figure A-2) reveals differences. In general, the measured values of temperature are lower than the ideal values, and the measured values are not exactly linear. Several errors could explain the differences: precision errors in the pressure transducer and the thermocouple; bias errors in the calibration curve for the pressure transducer and the thermocouple; and imprecision in the atmospheric pressure assumed for the locale. The bias errors might arise from the large temperature range considered. Given that the temperature and pressure ranges are large, the calibration equations between the voltage signals and the actual temperatures and pressures might not be precise for that entire range. The last type of error mentioned, the error in the atmospheric error for the locale where the experiment occurred is a bias error that could be quite significant, depending on the difference in conditions between the time of the experiment and the time that the reference measurement was made.

Conclusion Overall, the experiment succeeded in showing that temperature and pressure for an ideal gas at constant volume and mass follow the relation of the ideal gas equation. Differences existed in the experimental graph of temperature versus and pressure and the theoretical curve of temperature versus pressure. These differences, however, can be accounted for by experimental error.

Appendix: Experimental Data and Plots


This appendix presents the data, calculations, and graphs from the experiment to verify the ideal gas equation. The first two columns of Table A-1 show the measured voltages from the pressure transducer and the temperature transducer. Column three shows the measured values of pressures calculated from the following calibration curve for the pressure transducer: p = 4.3087(VV) - 13.1176V + 10.7276 where V equals the voltage output (volts) from pressure transducer, and p equals the

absolute pressure (kPa). Column four presents the measured values of temperature (K) calculated from the calibration curve for the thermocouple: T = Tref + V/S where Tref equals the ice bath reference temperature (0C), V equals the voltage (volts) measured across the thermocouple pair, and S equals the thermocouple constant, 42.4 V/C. Finally, column 5 presents the ideal values of temperature for the corresponding measured values of pressure. These ideal values arise from the ideal gas equation (PV=mrt). Figure A-1 shows the graph of temperature (K) versus pressure (kPa) for the measured case. Figure A-2 shows the graph of temperature versus pressure for the ideal case. Table A-1.Data From Experiment Voltagepres( Voltagetemp( Pressuremeas(k V) V) Pa) 6.32 6.39 6.78 7.31 7.17 7.35 7.45 7.56 7.66 8.06 8.10 8.34 0.0011 0.0020 0.0031 0.0046 0.0052 0.0064 0.0073 0.0078 0.0097 0.0107 0.0114 0.0130 99.90 102.81 119.82 145.04 138.14 147.04 152.11 157.78 163.02 184.86 187.12 200.97 Temperaturemeas Temperatureideal (K) (K) 298.94 320.32 346.26 381.64 395.79 424.09 445.32 457.11 501.92 525.51 542.02 579.75 312.17 321.28 374.44 453.24 431.69 459.50 475.32 493.04 509.43 577.69 584.75 628.03

Figure A-1. Temperature versus pressure, as measured by the transducers.

Figure A-2. Temperature versus pressure, as calculated from the ideal gas equation.

Last updated 1/00 http://writing.eng.vt.edu/

Potrebbero piacerti anche