modular programming ilab 7

ECET340 Lab 7 Procedures     

Title: HVAC Controller

 

I.          OBJECTIVES

1.     To become familiar with the thermistor

2.     To use integrated modular programming techniques in developing the project

3.     To write a report document for the HVAC Controller

 

II.         PARTS LIST

Equipment: 
     
IBM PC or Compatible with Windows 2000 or Higher

            Freescale Tower assembly

            CodeWarrior IDE

 

III.           INTRODUCTION

The purpose of this lab project is to utilize information presented within the lecture material to develop software code to operate the HVAC Controller.     

 

 

IV.          PROCEDURE

1.  Create a new project (named Lab 7) for the assembled Freescale Tower using CodeWarrior.

 

2.  The software code for this lab project will be developed by you in compliance with the project requirements stated in Category V (requirements).

 

3.  Add your name, date accomplished, course number, and professor name to the top of the code as a comment statement.

 

4.  Compile the Lab7 program.

 

5.  Observe the results. On campus: demonstrate to your professor.

                                Online: take a picture of the project and include it in the iLab Cover report.

 

6.  Generate a formal lab report in compliance with the report document guidelines specified in Category VI (report). Campus students will submit the report as the course professor requires. Online students will submit the report in the homework Dropbox. 


 

V.           Requirements

1.  The thermistor will be read. The data is to be displayed on the LCD in degrees Celsius.

 

2.  The temperature to activate the heater is entered by the user through the keypad or the potentiometer.

 

3.  The temperature to activate the air conditioner is entered by the user through the keypad or the potentiometer. Note that you can simply set one temperature, and then set the mode to Heat or A/C

 

4.  The fan (indicated by the LED) is on when either the heater is on or the air conditioner is on. The fan is off when both the heater and air conditioner is off.

 

5.  The LEDs (active low) will be used to indicate the status of the HVAC Controller.

     LED4 indicates that the heater is activated.

     LED3 indicates that the HVAC fan is on.

     LED2 indicates that the air conditioner is activated.

     LED1 indicates that the HVAC system is set for heat (LED on) or A/C (LED off).

 

6.  The Heat/A/C control should allow for user input.


 

VI.          Report

The report will be graded by the following categories:

 

1.  Presentation Quality of Manual

a.  Spelling

b.  Organization

c.  Overall Neatness

d.  Legibility

 

2.  Technical Accuracy

a.  Are all required documents and sign offs present?

b.  Are specifications adequate and correct?

c.  Hardware and software documentation make sense.

 

For campus students: All items should be printed using a letter quality printer. Poor print quality or handwritten (or hand printed) pages will be downgraded accordingly.

 

 

Report REQUIREMENTS

 

All reports are required to contain the following sections

AND PLACED IN THIS ORDER!

 

  1. Title Page
  2. Table of Contents (by page numbers)
  3. Table of Illustrations (by page or illustration number)
  4. Product Specification
  5. Written Description of Project Operation/User’s Manual
  6. All Hardware and Software Support Documentation
  7. Appendix (Data Sheets, Reference Material, etc.)

 

The following pages describe each of the above requirements. If you have additional questions, ask your professor about them.

 


 

DESCRIPTION OF SECTIONS

 

1.  TITLE PAGE

 

Should use one full sheet of paper with the following information centered and each line triple spaced on the page starting on approximately line 20 (of a 66 line sheet):

 

 

Sample

 

Project Title/Name of Project

 

 

ECET340

 

Professor

 

 

Completion Date

 

by

 

Your Name

 

 

2.  TABLE OF CONTENTS

 

The table of contents should list the page numbers of each of the listed sections. 

Page numbers should be located at the bottom center of each page.

 

3.  TABLE OF ILLUSTRATIONS

 

The table of illustrations should list all figures, schematics and illustrations by figure, and page numbers. Page number requirements apply to all illustrations as well.

 

4.  PRODUCT SPECIFICATION 

 

This is a detailed description of your project. The requirements for some categories will vary depending on whether your project is primarily hardware or software.  

 

The product specification will include the following:

 

  1. Project Description
  2. Hardware Block Diagram
  3. I/O Map
  4. Input/Output Definition
  5. Hardware Theory of Operation
  6. Software Documentation and/or Flow Chart
  7. Software Theory of Operation

 

4.1 Project Description

 

This should be an updated version of the original project requirements, reflecting all changes made to the project that differ from the original Category V.

 

4.2 Hardware Block Diagram

 

The block diagram should show the data flow (input and/or output) and control architecture of the project on a high level functional level.

Embedded Microcontroller example:

 

9S12G128 Microcontroller

Input Device—Thermistor (could include the keypad)

Output Devices—LCD, 4 LEDs

A/D Converter

 

4.3 I/O Maps

 

Embedded Microcontroller

 

You should list what ports and what pins on what ports, as well as pin type: input, output, or bidirectional.

Example:

Status LEDS

       Heater Active LED 4 (Red): Port T, Pin 7, Output

       4 Bit Binary Output LEDs (Green): Port B, Pins 3:0, Outputs

4.4 Input/Output Specification

 

Inputs and outputs should be thought of as any signal that either comes from the outside world into your project (inputs) or signals that leave your project to be available to the outside world.  All inputs and outputs should have the physical parameters listed as well.

 

Examples:

 

1.  Power supply voltages and currents (power input).

2.  Line level input for an effects processor (input).

3.  Temperature sensor for a digital thermostat (input).

4.  Line level output from an effects processor (output).

5.  Ultrasonic distance sensor (output/input).

6.     X Y axis mirror controls voltage/degree for a laser (outputs).

7.     USB barcode reader (input)

8.     LCD Display (output)

9.     Ethernet network adapter (input/output)

 

Detailed Examples:

 

Temperature Senor

     Part Number

     5VDC Supply @ 5 ma max

     10 mV per degree Centigrade

     Voltage at 0 degree Centigrade

 

Character LCD Display

     3 Row by 16 Column

     Parallel Interface

     5 VDC Supply @ 50 ma max.

     Red LED backlight

 

 

If you have any questions, ask.

 

The electrical and electronic section should specify all applicable parameters for each input and output. 

 

1.  Voltage levels or ranges (maximums, minimums)

2.  Impedance (typical, maximum, or minimum, depending on input)

3.     Frequency ranges, minimum and maximum frequency 3dB points

4.     The function of each input and output

5.     Specify digital or analog

6.     Data protocol (for networks, USB, serial, and parallel devices)

7.     If applicable, do not forget to list the system input voltages and current

requirements.

8.  Power supplies and regulators should list type (linear, switching, etc.), input voltage, output voltage, voltage percent tolerance, and maximum output current at the regulated output voltage.

 

 

SAMPLE INPUT/OUTPUT SPECIFICATIONS

 

INPUT: Thermistor/Temperature Sensor

 

TYPE:  Analog

 

SUPPLY: 5VDC

 

OUTPUT: Thermistor: 10mV/°C

 

RANGE: 0VDC =        0°C          (min input)

              5VDC =    100°C          (max input)

 

A/D CONVERTER: Conversion Span:     0 5VDC, linear, monotonic

                              Resolution:             1 bit = 0.0196 VDC = 0.392°C

 

                                                                                    0.0 VDC = 00H

                                                                                    2.5 VDC = 80H

                                                                                    5.0 VDC = FFH

 

 

4.5 Hardware Theory of Operation

 

Each project I/O device or process is required to have a written technical description of its operation.  This should reference the system block diagram. This should be a description of the signal and/or information flow in your project on a functional basis. Describe how the input is obtained, how it is conditioned (either electronically or by software) and what decisions or new output(s) are generated as a result. Each module or circuit of the project should be described to the extent that the reader gains an understanding of the design intent of the module (or circuit).

 

 

SAMPLE THEORY OF OPERATIONS

(Theory for above Sample Temperature Input I/O)

 

TEMPERATURE INPUT

 

The temperature information is obtained by the microprocessor reading a thermistor via an 8 bit A/D converter. The thermistor outputs a voltage proportional to the temperature at 10mV/°C. This output is not amplified. The performance is by the thermistor output range.

 

The thermistor signal is then read by the microprocessor through the 10 bit A/D converter at a sampling rate 0.1 Hz (once every 10 seconds). The system reads, computes, and stores the current temperature in the variable TEMP_SUM. Once the reading has been made, the digital value is converted to the corresponding integer temperature in degrees Celsius. This temperature is then converted to a three digit ASCII value and output to the LCD in a formatted text string. The temperature is compared to the A/C temperature threshold or the heater temperature threshold. Activate the appropriate LED indicators.

 

 All variables are then cleared and the process is repeated.

 

The system is capable of reading temperatures from 0°C to 100°C with a resolution of +/ 1°C.

 

 

4.6 Software Documentation, Pseudocode, and/or Flow Chart

 

Even though individual task sign offs may include some source code for sign off documentation, your technical manual should have a section that contains the final and well documented version of all project software.

 

Embedded controller software should consist of the following three sections.

 

1.     High level block diagram

 

a)     Lists all files written for project

 

2.     List what type of file (C++, Assembler, etc.)

a)     List what development environment is used for each file

 

b)    Visual C++.NET, AVR Studio, etc.

 

c)     Each file should list all functions contained in the file

 

(1)   Should describe what each function does

(2)   List what data are passed or returned by the function

 

3.     Procedurally Oriented programs should include:

 

a)     A flow chart or pseudocode of the final version of all functions and modules of the program

 

i)      List of all function or modules

 

ii)     Should briefly describe what the function or module does

 

(1)   Should list all data arguments and return types

 

4.7 Software Theory of Operation

 

This section should be used to describe what operations the software performs as it relates to the control, configuration, operation and processing of the data, and components of your project. 

 

You should use either your flow chart (embedded controller) or your activity diagram (Visual, C++, PC) as the basis for your theory of operation description.

 

Example: void Temp_Conversion(void)

 

This function reads a 10 bit binary value, which represents the ambient temperature in degrees F, from the Atmel mega16 channel 0 A/D converter. Each bit represents 0.124 degrees F, and this routine converts the binary information and saves the resulting three digit value into the three byte character string, cTemperature, with byte 0 representing the hundreds digit, byte 1 representing the tens digit, and byte 2 representing the ones digit. All byte values are saved in ASCII format for later use with the character LCD display function, void Write_LCD(char [ ] ).

 

5.  USER’S MANUAL

 

This section should be a written description or “tour” of the operation and function of your project. It should start with how the system should be powered on and then a step by step description of all menus, LCD screens, PC displays, user input, system operations, saving data, and recalling data.

 

1.  Give a very brief summary of the features of your system.

 

2.  How the user starts (turns on) the system

 

3.  A step by step description of all possible LCD or PC displays

 

A.  Provide a sample of the display seen by the user

 

B.  Describe each field of the display

 

C.  Describe what input is required of the user

 

D.  For each possible user input, describe what effect that has on the system (What happens when I push the big red button?)

 

 

6.  SOFTWARE SUPPORT DOCUMENTATION

 

Software

 

1.     A printout of all source code files that you wrote

 

a)     Complete listing of all assembly and high level language source files

 

i)      All files should include documentation comments

 

(1)   Each separate file

(2)   Each function

(a)   Assembler code should have descriptive comments for each line of code.

(b)   High level code should have each function, module, and all variables described.

 

Legibility, neatness, correctness, and formatting of the documents will be graded.

 

7.  APPENDICES (DATA SHEETS, REFERENCE MATERIAL, ETC.)

 

This section includes all project specific data sheets or reference material that a person of comparable background (BSEET, BSCET, BSBMET, BSREET graduate) would need in order to maintain, repair, or support your project.

 

You do not need to include data sheets or reference material on common parts, such as 74 series logic, resistors, capacitors, etc.

 

Any data sheets more than 20 pages should be listed, but not included.

 

If you’re not sure what needs to be included, ask.

 

 

 

 

 this link http://soyfantasma.com/DeVry/ECET 340/index.html has a link under home for the boards an kit being used here is a link to the peripheral board TWR DEV PERIPH | Axiom Manufacturing | Electronic Manufacturing Design Development PCB Assembly

 
Looking for a similar assignment? Our writers will offer you original work free from plagiarism. We follow the assignment instructions to the letter and always deliver on time. Be assured of a quality paper that will raise your grade. Order now and Get a 15% Discount! Use Coupon Code "Newclient"