Renewable Energy Data Logger - Messiah College...Most data logging products available today are...

65
Renewable Energy Data Logger SENIOR PROJECT Final Written Report May 9, 2005 Peter Allen Stephen Frank Adam Smallcomb Jeffrey Strickland Messiah College Engineering Department Advisor – Doctor Gray Client – Ergatai Wind & Sun i

Transcript of Renewable Energy Data Logger - Messiah College...Most data logging products available today are...

Page 1: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Renewable Energy Data Logger

SENIOR PROJECT Final Written Report

May 9, 2005

Peter Allen Stephen Frank

Adam Smallcomb Jeffrey Strickland

Messiah College Engineering Department

Advisor – Doctor Gray Client – Ergatai Wind & Sun

i

Page 2: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Abstract

The renewable energy data logger team designed and prototyped a data logger for

renewable energy systems. The data logger is designed specifically for use with solar and

wind renewable energy systems. It measures all key parameters in a solar, wind, or hybrid

renewable energy system. These values are both available for display locally on an LCD

screen and for data logging to a compact flash card. Other key features include ease of use,

low cost, and low power consumption. Peter Allen, Stephen Frank, Adam Smallcomb, and

Jeffrey Strickland were the members of the student design team. The faculty advisor was Dr.

David Gray, and the client contact was Mr. Matthew Walsh with Ergatai Wind & Sun.

ii

Page 3: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Table of Contents

1. Introduction 1.1 Description 1 1.2 Literature Review 1 1.3 Solution 4 2. Design Process 6 3. Implementation 3.1 Construction 8 3.2 Operation 8 4. Schedule 10 5. Budget 11 6. Conclusion 12 7. Recommendations for Future Work 16 8. References and Bibliography 18 9. Appendices 9.1 Gantt Chart 19 9.2 Specifications 25 9.3 Schematics 27 9.4 Ultiboard Layout 34 9.5 Firmware Flowcharts 39 9.6 Budget 61 9.7 Team Member Resumes 65 9.8 Project Resources CD 72

iii

Page 4: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Acknowledgements

The Data Logger project team would like to thank the following individuals and organizations for their support, ideas, and contributions to this project: Dr. David Gray Dr. Donald Pratt Mr. Matthew Walsh Mr. Michael Smallcomb Mr. Chad O’Toole Ms. Rebecca Westcott Ergatai Wind and Sun Dokimoi Ergatai mikroElektronika MicroChip Maxim IC SMSC Analog Devices

iv

Page 5: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

1 Introduction 1.1 Description

Ergatai Wind and Sun (EWS) is a company dedicated to advancing renewable energy solutions throughout the world. EWS requested the design of a data logger system that will be cost-efficient, user-friendly, and allow for real-time data-collection, monitoring and storage of all important parameters in a renewable energy system. These parameters include system voltages and currents, ambient temperature, solar insolation, and wind speed. The data logger also provides several calculated parameters such as battery state of charge. A complete description of all parameters is included the specifications (Section 9.2). In addition, the data logger system functions as a current-compensated low voltage disconnect.

Real-time monitoring of a renewable energy system is desirable for many reasons. First, the performance of the components that constitute the energy system can diminish over time. Once a component has failed, it is often difficult to determine where, and when, the decrease in performance occurred that led to failure. In addition, many of the components, specifically the batteries, can benefit from the assurance that the operation of the system will be within specified parameters. Monitoring and accounting for fluctuations within, or operation outside of these parameters can provide greater protection, performance, and increase the life of the system components. Finally, without a data logger, it is difficult, or impossible to acquire the information required for optimizing the overall operation of the system.

The component of renewable energy systems referred to as the low-voltage disconnect, or LVD, is integral to the system for the protection of the batteries. Systems utilizing rechargeable batteries require that they be protected from over discharging. Commercial LVD’s are available, and are generally simple devices that measure the voltage of the battery pack and disconnect the load if this voltage drops below a given set point. This project provides a unique, sophisticated method for accounting for the actually battery state of charge during disconnect; a software routine will compute the theoretical open circuit battery voltage based on the system current. This prevents unnecessary disconnects which result in power interruption.

1.2 Literature Review

Data logging for Photovoltaic Systems Data acquisition and logging technology is such a broad field that it is impossible to give a

complete review in only a few pages. Therefore, this review will concentrate on data acquisition as it applies to renewable energy systems, especially standalone photovoltaic systems. Many data logging products exist, but few apply directly to renewable energy systems. Similarly, many monitors and meters have been designed to work with renewable energy systems, but only a few have data logging capabilities. Of those

Data acquisition has evolved from chart recorders and magnetic tape drives to the sophisticated multi-node data networks available today. Modern data loggers have very high sampling rates (into the 10-100 kHz range) and fast connectivity to other computers (via USB, FireWire, or Ethernet). A standard industrial grade data logger in today’s world includes multiple channels of at least 12-bit resolution, sampling rates of at least 10 kHz, high-speed

1

Page 6: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

computer connectivity, and onboard storage of hundreds of thousands of data points. The most recent developments have been towards web-connected devices that do not store the data locally at all, but rather stream it to a central location for processing and storage.

Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common, even though a company could get a low-end personal computer for that price. Some commercial grade, low-end data loggers are available. Usually they have much lower sampling rates and fewer channels than their industrial counterparts. These low-cost data loggers almost always have generic inputs (e.g. 0-5V). Presumably this is because a generic data logger can be adapted to any application and will therefore sell more units than an application-specific device. In addition, many of these devices require the purchase a software package to download and process the data.

For our application we require a standalone system with local data storage. The following list has a sampling of general purpose data loggers currently on the market, including some that require a connection to a personal computer:

Product & Manufacturer Description Price DT8001

dataTaker High end standalone data logger with up to 48 channels, USB and Ethernet connectivity, Flash card memory storage, and remote monitoring and control. 13-16 bit resolution.

$3695

DI-710-UHS2

Dataq Instruments 16-channel standalone industrial data logger with SD card flash memory storage and USB or Ethernet connectivity. 14 bit resolution.

$599

PicoTech ADC-223

Pico Technology Limited 12-channel, parallel port connected data acquisition unit. Requires a PC running the included software to function as a data logger. 10 bit resolution, generic 0-5V inputs.

$374

HOBO U12 4 External4Onset Computer Corporation

4-channel standalone data logger with 12 bit resolution. Boxcar software sold separately.

$95

All of the above devices have generic inputs, so all would require additional external

circuitry and software to interpret the specific measurements present in a photovoltaic system. In contrast, existing meters for photovoltaic systems include the hardware to directly measure battery voltage, battery current, etc. Unfortunately, few have data logging capabilities.

The Link 10 battery meter by Xantrex (formerly known as the E-Meter, $335 with RS232 connection5) has become the de facto standard for monitoring photovoltaic systems. It is widely used and recommended by renewable energy enthusiasts, and is also the only standalone meter with data logging capability. The data logging is limited to a serial output data stream in RS232 format. This data may be logged by a computer or by a standalone

1 dataTaker, http://www.computeraidedsolutions.com/Products/dataTaker.htm, accessed April 2, 2005 2 Dataq Instruments, http://www.dataq.com/products/hardware/di710.htm, accessed April 2, 2005 3 Pico Technology Limited, http://www.picotech.com/data-acquisition.html, accessed April 2, 2005 4 Onset Computer Corporation, http://www.onsetcomp.com/Products/Product_Pages/hobo_u12_loggers/U12_family_data_loggers.html, accessed April 2, 2005 5 http://www.xantrex.com/web/id/97/p/1/pt/1/product.asp, http://www.energyoutfitters.com/default.htm?http://www.energyoutfitters.com/products/p_m_electronics/xantrex_link10.shtm, accessed April 2, 2005

2

Page 7: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

logger. Dokimoi Ergatai (a service organization on Messiah College campus) has used the Link 10 meter with an RS232 standalone logger before, and has found the device performance inconsistent and the interface difficult to use. In addition, the data logger to accompany the Link 10 is very difficult to find.

The most recent movement in logging for renewable energy systems has been integrating data logging into charge controllers and inverters. In particular, Outback Power Systems has incorporated data logging capabilities into its Mate system monitor. The Mate allows real-time display of system parameters and offers limited logging capability. In the future, Outback hopes to upgrade the data logging capabilities of the Mate. Nevertheless, the Mate is unusable without a corresponding Outback MX or FX device to actually do the monitoring.6

Low Voltage Disconnect Commercial low voltage disconnects (LVDs) for lead-acid batteries are readily available.

These disconnect circuits vary in functionality (and price) from simple circuits with a single preset disconnect/reconnect voltage to more complex circuits with a delayed disconnect and separately adjustable disconnect and reconnect voltages. Most LVD products are designed for a specific application, such as the NewMar LVD7 for marine battery systems and the SurePower battery saving devices8 for vehicle batteries. Other models, such as the Xenotronix LVD9 circuit, are designed for use with a wide variety of battery systems.

One feature that is not present in any available low voltage disconnect is a method for current compensation. When a high current is drawn from a battery pack, the internal resistance of the battery depresses the battery output voltage. As a result, the battery voltages measures as if it were at a lower state of charge. LVDs that lack current compensation will disconnect batteries that are under high load even if they are still at an adequate state of charge. Presently available LVDs try to circumvent the problem by allowing a delay before disconnect, but this method does not address prolonged high load currents.

Conclusion While many data logging, monitoring, and low voltage disconnect products are available,

none of them integrate all the features that we propose to include in the data logger design for our senior project. Generic data loggers cannot be quickly and inexpensively adapted to measure parameters on photovoltaic systems, and presently available renewable energy system meters do not include adequate data logging capabilities. There is a niche in the present market for a low to moderately priced data logger with specific application in renewable energy. No other device specifically targets this market, and neither does any other device include a current compensated low voltage disconnect.

6 Outback Power Systems, http://www.outbackpower.com/MATE.pdf, accessed April 2, 2005 7 http://www.newmarpower.com/lowvoltdiscnct/ldv.html, accessed April 2, 2005 8 http://www.surepower.com/power.html, accessed April 2, 2005 9 http://www.xenotronix.com/products/lvdc.htm, accessed April 2, 2005

3

Page 8: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

1.3 Solution

When we began the project we saw three possible alternatives for designing a data logger to meet our project objectives:

1) Adapt an existing data logger

In this approach, we would buy an existing data logger with the required precision and storage, then create custom hardware to interface its inputs with a photovoltaic system.

2) Use a PC-based logging system In this approach, we would use a PC-based data acquisition device, such as those manufactured by Pico Technology. The device would connect to a laptop, which would then function as the data storage location.

3) Design a new standalone data logger In this approach, we would design a new product that fulfills the design specifications.

The following tables summarize the pros and cons of the various design alternatives.

1) Adaptation of Existing Data logger Pros Cons • Less hardware design required • No need to design memory and computer

interfaces

• Neither hardware nor software is user friendly

• Custom sensors would be required • Custom software wrappers may be required • No integrated low voltage disconnect • Multiple loggers may be needed • High cost

2) Use of a PC-based Logging System Pros Cons • Easy to implement • Data collection and analysis on one platform • Less hardware design required

• The hardware interface would not be user friendly

• PC based logging systems are adversely affected by instability in and aging of the PC operating system

• Relatively high cost • Custom sensors would be required • Consumes large amounts of electricity • No integrated low voltage disconnect •

4

Page 9: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

3) Creation of a New Standalone Data logger Product Pros Cons • Will meet our specifications exactly • No need to accommodate an existing

interface • Has the greatest possibility of further

marketability • Allows greatest amount of design flexibility • Allows greatest amount of expandability

• Greatest amount of design work required • Difficulty of a ground-up design • Possibility of encountering an

unconquerable problem

We chose alternative 3, the creation of a new product. Although we knew it would require

much more effort than the other alternatives, only alternative 3 allowed us to integrate all the features desired by our client into a single device. In particular, the other two approaches did not include the option for an integrated low voltage disconnect. Finally, we believed that designing our own data logging device would provide the greatest amount of adaptability and flexibility in the final product, and also would provide the greatest opportunity for us to learn product design.

5

Page 10: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

2 Design Process The hardware design of the data logger system can be broken into 4 segments: main

central processing unit, LCD/button control interface, compact flash controller, and external hardware (USB interface, sensor scaling, power conditioning, etc.)

Central Processing Unit

At the core of the data logger system design is a central processing unit (CPU) that reads the data at user-defined intervals and then transmits the collected data to the compact flash controller for storage. The task of this processor is to communicate with a flash memory microcontroller, a real time clock that provides accurate time-keeping, an external analog to digital converter for precise data acquisition, a LCD screen for data display, and a USB-Serial converter interface for PC connectivity. The CPU also manages various user inputs via interrupt lines and controls the overall system response (including the LVD).

During the research design phase, two separate CPU processors were considered. The original design that we proposed in September used a Motorola HCS12 microprocessor as the central processing unit. As of December 2004 we switched from the HCS12 to the PIC18F452 microcontroller as the main microprocessor. Although Microchip’s PIC controllers do not have as many I/O lines or as much interrupt flexibility as the HCS12 chips, they offer several distinct advantages. First, they all come with standard pinouts, which makes interchanging one PIC for another very easy. Second, most PICs are available in a DIP format, which makes prototyping extremely easy. Third, Mikroelektronika’s mikroBasic development system allows rapid prototyping for PIC controllers in a higher level language. This same system has built in routines for SPI, I²C, 10-bit internal analog to digital conversions, and USART (or SCI). Finally, PIC controllers are widely used by hobbyists so much information on their use is readily available online.

Compact Flash Controller

The design of the hardware for the memory controller was based on the need to support the insertion and removal of compact flash cards and to write a FAT16 file structure to allow for interfacing with a Windows based PC. To meet these criteria, we considered two possible design paths. The first would have utilized a Motorola MC9S12UF32 processor chip because of its capabilities as a USB 2.0 interface and Compact Flash card host controller. The design path that we chose utilizes Microchip’s PIC 18F452 with its capabilities of integrating external flash memory and ease of implementation.

The PIC comes in a 40-pin DIP package, thus making it readily usable for prototype design and testing. In contrast, the Motorola UF32 was only available in a 100-pin Low Quad Flat Pack (LQFP) surface mount package, which is difficult to mount given the equipment available to us. The PIC is also beneficial because of the ease with which the chip can be programmed via the USB port of the computer. It is programmed in a higher-level language called MikroBasic (a derivative of the BASIC programming language). This benefit means many hardware and software designs can be tested quickly and easily. Although it does not have USB 2.0 connectivity, the PIC 18F452 is more cost effective than the Motorola chip, bringing the overall device cost down.

6

Page 11: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Using the PIC 18F452 as the Compact Flash hardware controller required two of its output ports, leaving two other ports available. Part of one of the available ports was utilized for the communication with the main processor via USART, thus leaving a free port for future expansion.

LCD/Button Control Interface

For the display we wanted a device with low power consumption. For this reason we decided to use a character LCD display. We chose a 2-line, 24 character display so that we could display 2 channels of data (including the channel name, the numerical value, and the associated units). We also wanted an easy-to-program display. We chose a screen that contained a HD44780 diver (which is the same driver used on both of our development boards). The final display that we chose was the DMC24201 from www.allelectronics.com, which is a 24-character by 2-line display with a HD44780 diver. This display satisfied our design requirements.

External Hardware

The external hardware encompassed all hardware not related to the Main CPU, the compact flash controller, or the LCD screen. The external hardware for the data logger was: real time clock and Oscillator, external Analog-to-Digital (A/D) converters, sensor scaling/conditioning, and a serial-USB interface.

We chose the DS1307 real time clock for four reasons. First, this clock chip uses the industry standard I²C interface, which makes it very easy to use with existing microprocessors. Second, it stores the time in BCD format rather than a binary counter format, which makes it easier to convert the stored time to text for display or for storage in a data file. Third, the DS1307 is available in both DIP and surface mount packages, making it useful both for initial bread boarding and later size optimization. Fourth, the DS1307 supports a 1 Hz interrupt output line, which makes it easy to time data samples to one second intervals.

We chose the MAX127 analog to digital converter to supplement the internal analog to digital converter present on the main PIC microprocessor. The MAX127’s 12-bit resolution is precise enough to sample the most critical values in the specification to within the precision required. The MAX127 also has a full range input (negative and positive input voltages are acceptable). This enables the MAX127 to sample inputs that may return positive or negative values (such as net battery current). Finally, the MAX127 also uses the standard I²C interface.

For the USB-to-Serial Interface, we chose to use a chipset from Future Technology Devices, Inc. called the FT232BM. This chip converts a standard serial protocol (variously named SCI, UART, or RS232 depending on the specific application) to a USB protocol. Using this chip enabled us to have a device with USB connectivity while still using a simple protocol that is familiar to our team. To the computer, the USB device appears to be a serial port, which simplifies programming from the computer side as well. This USB to serial converter chip will provide a convenient method of allowing a PC to set the settings on the data logger. It also will provide a means of streaming live data to the computer if desired. We experimented with several different package types of this chipset. The DLP-TX-RX package was convenient in that it had USB connectivity on one end, and transmit/receive pins on the other (which was all we needed for our application).

Finally, we required some analog circuit design at the inputs of the sensors to scale the levels coming into the analog to digital converters. Analog Devices AD-622 instrumentation

7

Page 12: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

amplifiers were used to precisely scale the analog signals to a range suitable for the analog to digital converters. Half hertz filters were also added to reduce the sinusoidal affect of AC voltage on the input signal.

3 Implementation 3.1 Construction Constructing the software for the data logger began in the first semester and continued through the second semester. Initially the software was being written for the Motorola 68HC12 microcontroller but due to the complexity of the software as well as cost analysis and time constraints, late in the first semester software began being written for PIC processors using a form of BASIC called mikroBASIC. Using a higher level language allowed us to develop programs much more quickly. The most important thing that we learned through all of this is that for complex programs it is beneficial to use a higher level compiler. We also started the programming for a single processor but as the code was developed it became obvious that we would need multiple processors in order to be capable to allow the device to have the functionality we desired. In the end we are using three separate processors. Physical construction of the data logger began early the second semester. We started the process by constructing circuit boards for each section of the project including two boards for the sensor conditioning circuits, a Compact Flash control board, a main processor board with the real time clock, an LCD control board with control buttons, and a power supply board. After assembling these boards and assuring that they worked completely we began the process of constructing the four final boards that mount in our case. After these boards were designed and milled the boards had all of their components soldered to the board and adjustments were made until the boards were fully functional and fit into the desired enclosure. Our enclosure was purchased from allied electronics and then professionally painted a red color by Mr. Smallcomb in order to fit with the project name RED-14. A cover for the enclosure was then designed using Auto-Cad and milled by Chad O’Toole in the shop.

We learned many helpful hints during the milling and assembly of these first prototype boards. On of the most important was that making the pads larger as well as the traces and leaving large clearances between them allowed for easier assembly when the time came to solder the components in place. This was taken into account when the final boards where being designed and milled. Also we found it beneficial to place header pins for programming the microprocessors as well as including the ability to reset all of the processors simultaneously. 3.2 Operation The initial testing of each section was completed on each individual board early in the semester; they all met with great success. Recently we have also completed testing of the project with all of the parts together which, after many revisions to the communication scheme, was very successful. Once the basic operation was established we produced a final

8

Page 13: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

prototype and began testing with it. Overall the functionality of the final prototype was good. However when we tested the sensor inputs we discovered that we had significant noise on the lines. When we connected an oscilloscope we observed that the noise signal was repetitive at 125 kHz which happens to be the frequency of the 5 volt switching power supply. We propose that shielding of the power supply would solve most of this problem and additional notch filters could also be used if necessary. The first objective was mostly met in that 14 channels can be measured at a sampling rate of 1 second; however the desired accuracy of 1% was not possible to be verified due to the fact that the resolution was not at a desired level as can be seen in the following graph.

21

21.5

22

22.5

23

23.5

24

24.5

6:13:41

6:14:24

6:15:07

6:15:50

6:16:34

6:17:17

6:18:00

6:18:43

Time

Tem

pera

ture

The second objective was completely met; the device was able to store data to a removable flash device for more than two weeks at a sampling interval of one second. In fact if the sampling interval was one second it would be able to exceed the two week mark and with other sampling rates using min/max/average the time could be extended many years. The third objective was mostly achieved; a USB interface was included and tested, it worked well however the ability to set settings through the computer was not achieved. The user interface was tested with several individuals and several changes were made at their recommendation. The individuals conveyed to us that the controls were in fact intuitive and easy to use but would take some getting used to before truly comfortable maneuvering within the operating system. The testing of the device for ruggedness through temperature humidity and dropping was not conducted due to the expense and time consumed in the construction of the devices. It would be desirable when and if more resources are available to perform these tests. The final objective was not met either since we dropped it from the scope of the project late in the fall semester when we realized that it deserved to be a separate project on its own. Overall our testing was beneficial in showing that the device was capable of performing the basic operations that it was designed to be capable of doing.

9

Page 14: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

4 Schedule Our project has gone through many scheduling changes since its inception in August

2004. Appendix 9.1 contains three major versions of the Gantt chart, and many more intermediate versions were generated during project work. The original full year Gantt chart written in August scheduled the first prototype for completion by December 2004. As is typical of Senior Project teams, our team greatly underestimated the effort needed to produce a prototype, and by the end of the fall semester we had rescheduled the prototyping work to the middle of the spring semester.

One major factor in this delay was the decision to use a higher-level programming language. By November the team had realized that the project would be nearly impossible in assembly language and we decided to use mikroElektronika’s mikroBasic programming language. Unfortunately, we only had one development board at the time and were forced to wait for the arrival of a second board before continuing the programming full force. The board took six weeks to arrive. The result was that the majority of the programming work had to wait until the spring semester. One major accomplishment in the fall that was completed on time was the high-level schematic. By November of 2004 we knew what the major system components for the data logger would be, and those have not changed since that time.

The original spring semester Gantt chart (developed in December of 2004) was very different from the actual spring semester progress. The primary difference is that the original Gantt chart had planned different design stages very sequentially where as the stages actually progressed simultaneously. We were to develop the breadboard prototype, then a complete PCB prototype, and finally a display prototype. The manual and project report were to be completed after all actual design work was finished. In actual practice, the software and digital interface developed slowly because of hardware problems and communications difficulties. Therefore, we developed PCB prototypes of individual pieces as we were developing the breadboard prototype. The display prototype, including the box and interface design, developed simultaneously as well. The reason for this is that each of us worked on the display prototype whenever we were temporarily at an impasse with the other program development.

One shortcoming we did encounter was the inability to do extensive testing at the end of the project. We were hoping to have a solid month of testing, but troubleshooting the design was necessary first and ended up using up that month of testing time. Thus, we have been able to test for functionality but not for long-term performance.

For a complete layout of the project schedule, reference the three Gantt charts in Appendix 9.1.

10

Page 15: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

5 Budget Following is a summary of the production budget (per unit). Even though our production model cost around $330, there were several additional expenditures for research and development. For example, development boards were purchased to program both the HCS12 microcontroller and the PIC Processors. The engineering department purchased 2 HSC12 development kits (Dragon-12 Plus from EVB) for $140 each. For the purposes of our prototype, however, most integrated circuits and miscellaneous components were obtained as samples from the manufactures website. Please refer to Appendix 9.7 for a more detailed production budget. Note: the production budget is based on individual component purchasing. This price can be reduced when items are purchased in bulk quantities.

Item Category Cost Integrated Circuits $ 175.00 LCD/Button Interface $ 14.00 Connectors $ 50.00 Box $ 30.00 PCB Manufacturing $ 30.00 Misc. Components $ 32.00

Total Cost (per unit) $ 331.00

11

Page 16: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

6 Conclusion Through the course of working on this project, we have determined that our initial design objectives, which may have been ambitious given the constraints of time and money placed on this project, were attainable. Although the initial design has undergone several modifications, the overall objectives that were established on November 9, 2004, are still applicable. Here are the original project objectives: Objectives 1. To measure 14 channels of data at a 1 second sampling interval to within an accuracy of

1% of the real value. 2. To implement a removable flash memory device for data storage capable of storing at

least 14 days of data when recorded at a 1 second sampling interval (approximately 512MB of storage space).

3. To implement a USB interface for active monitoring of the data logger from a PC and configuration of the device settings.

4. To ensure that the device has user-friendly display and control interfaces by testing them with at least five individuals unfamiliar with the project.

5. To ensure the robustness and reliability of our design by testing it for 2 weeks across a temperature range of 0°C to 50°C and 0% to 100% non-condensing relative humidity.

6. To develop a post-processing data analysis program that presents voltage, current, and power trends in graphical format for rapid analysis, as well as Excel-compatible spreadsheet format.

Project Results Compared to Initial Objectives We are pleased to report that at the completion of this project we have successfully met the most significant aspects of these initial objectives. As for the objectives, or parts of the objectives that have not been fully realized, the team still considers them attainable, and with added resources of time, money and manufacturing ability, this project represents a completely marketable, consumer product.

Objective 1 • Our completed hardware design has fourteen A/D converters channels capable of

sampling and storing acquired analog signals at a variable sampling rate. This functionality is more than capable of running at the objective’s requirement of a 1 Hz sampling rate. Although the device’s maximum sampling rate is limited by the rate of internal communication and processing, which we have determined experimentally to be less than one third of a second, a sampling rate faster than one second is not required for this application.

12

Page 17: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

• During the latter part of April we tested the data logger for resolution and accuracy. We were unable to determine how good the accuracy of the device is because we encountered a noise problem that prevented us from resolving the value to a precision of 1%. (This is the same noise problem documented with graph in section 3.) Because of the noise, the effective resolution of our device is approximately 2.5%. We presume that the device is accurate within these bounds, because the expected value for each sensor fell within the range of measured values. However, complete accuracy testing to 1% cannot be completed until the resolution of the device is good to 1%. This problem has been addressed in the future work section.

Objective 2 • RED-14 has fully realized this objective with its ability to store all captured data to

a removable flash memory. The device uses Compact Flash memory, which is robust, low in cost and has a well defined standardized of specifications. Given the set-and-forget nature of the data logger device, it was important to design the device so that it efficiently uses memory to ensure that logging could occur over an extended period.

• The objective for a storage time of fourteen days, given a sampling rate of one second and a 512Mb compact flash card, was met successfully. The data logger stores approximately 52bytes per sample period. At the 1Hz sampling rate, the device is capable of operating for 15 days before filling a 512Mb compact flash card. For slower sampling rates, the device is capable of measuring and storing the minimum, maximum, and average values that occur over the sample period. At a sampling rate of 10 seconds, with “Min Max Average” enabled, the device can log continuously for over 150 days before reaching its memory limit. Interestingly, at a sampling rate of 5 minutes, the device is capable of logging for over 30 years, which approaches the reasonable lifetime of the device itself!

• Actual sample time capacity based related to card size.

Storage Time Based on Sampling Interval and Card Size

Min Max Average Years

Sample Interval 1Gb 512Mb 256Mb

5 sec 0.54 0.28 0.14

10 sec 1.08 0.56 0.28

30 sec 3.25 1.67 0.83

1 min 6.50 3.33 1.67

5 min 32.52 16.67 8.34

10 min 65.04 33.34 16.67

13

Page 18: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Without Min Max Average Years Sample Interval 1Gb 512Mb 256Mb

1 sec 0.26 0.13 0.075 sec 1.28 0.65 0.33

10 sec 2.55 1.31 0.65

Objective 3 • RED-14 utilizes a RS-232/USB interface chip manufactured by FTDI, which

allows for a USB connection to a host PC. Although the communication on the line is simply the standardized serial RS-232 protocol, the connection operates seamlessly as a USB device to the user.

• The USB connection to a host PC facilitates a number of added functions. This connection allows the user to adjust the data logger’s settings, such as sampling rate, which channels to record, or whether or not to store “Min Max Average” values from within a Windows based GUI. Also contained in the host PC program is the ability to monitor the data in real time.

Objective 4 • In order to verify this objective we had six people interact with the device. From

the feedback of these tests, a few design modifications were made. We also included an option for changing the language of the interface so that the channel information can be displayed in French as well as English. The user display has a power-save sleep mode, which will turn off the backlight and the screen after five minutes of inactivity. The display returns from sleep mode if any button is depressed.

Objective 5 • Due to time constraints, we are unable to test the data logger for a continuous two-

week period. In addition, due to the difficulty of producing the final design prototype, we are not prepared to test the durability of the prototype to the range of temperatures and humidity as described in the initial objective. In spite of this, we are aware that all of the components are rated to handle a wide range of operating conditions and the robustness of both the internal processors, and the storage medium, is sufficient to meet this objective.

Objective 6 • The development of a complete software analysis program is sufficient to warrant

an entire project of this magnitude in itself. To meet this objective however, we have developed a preliminary PC interface program. This program is capable of displaying the real time data from the data logger in a user friendly GUI.

14

Page 19: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Through the work of the design process, the entire project group has gained a large amount of knowledge and expertise related to the development of embedded systems. We have had to endure several significant design changes. One of the most significant of which, was the choice to use a processor, that prior to the project none of the members were familiar with. This choice, which initially required us to repeat some of the tasks that had been completed for use with the Motorola processor, has in the end, facilitated the completion of this project. The entire team is impressed by the robustness, speed, and ease of programming that we have experienced with Microchip’s PIC processor. The choice to utilize MikroElektronika’s development board and proprietary compiler, mikroBasic, was also an extremely significant aid toward the completion of this project.

The team has also benefited from the initial incentive to produce a functioning prototype as early as possible. Through constant revisions to the Gantt chart and large numbers of work hours spent each week, we have actually reached the level of completion that we did not expect at the beginning of this project.

15

Page 20: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

7 Recommendation for Future Work While we accomplished many of our semester objectives, the data logger prototype that

we developed is far from a finished product. The primary thing that we learned through working on this project is that one team can’t do it all. A project this complex requires more than four people and a budget of much more than $500. With limited personnel we were able to focus on a few elements of the project and do them well, to the neglect of the others. We concentrated on the development of the device functionality, especially the digital functionality. This has left us with a very well developed digital design and analog interface, but only basic sensors and a PC interface that does not have all the features we originally hoped for.

Fortunately, this means that instead of having a complete but poorly executed project, we have a partially completed but well done project. This leaves a lot of room for future improvements. Future work falls generally into five areas: (1) sensor design, (2) cost reduction and design for robust operation, (3) improvement of digital system features, and (4) expansion of PC analysis capabilities. Possible subtasks for each category include the following: 1) Sensor Design

• Design low-cost, linear wind speed and direction sensor • Design low-cost, linear solar insolation sensor • Design low-cost, linear AC and DC current sensors (preferably hall effect sensors) • Test sensors for effects of long lead wires and redesign as necessary (4-20mA sensors

may be required to eliminate noise) • Test all sensors for range, accuracy, and linearity.

2) Cost Reduction and Design for Robust Operation • Cost-optimize system components, particularly connectors • Design static protection for all sensor inputs • Design over-voltage protection for all sensor inputs and the power supply • “Idiot-proof” the design by providing reverse polarity protection, and keyed input

receptacles for DC power and all sensors • Perform rigorous environmental testing to ensure that the data logger will meet the

environmental specifications set forth in our original design objectives

3) Improvement of Digital System Features • Improve or redesign the digital communications scheme to provide more flexibility

and faster device operation • Upgrade the device for the possibility of logging at 10 samples/second • Add a wind direction parameter to the list of sampled values • Add Ethernet output for real-time data streaming over the internet • Addition of a graphic LCD screen for improved local data display

16

Page 21: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

• Improvement of file management on compact flash cards, including ability to delete log files, write the same file multiple times, and recall previously stored data for local review

• Implementation of an on-board USB mass storage device so that the compact flash card does not need to be removed to retrieve the data

4) Expansion of PC Analysis Capabilities

• Expansion of software’s analysis routines • Ability to graph data and automatically analyze for trends • Design of a web page to receive the Ethernet broadcast from the data logger In summary, the next major step for this project is the development of the data logger

design to the point of manufacturability. This includes adding features requested by the client, completing the sensor interface, cost optimizing the design, and designing protective circuitry for all data logger interfaces.

17

Page 22: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

8 References and Bibliography Dataq Instruments – DI-710 Data logger System.

http://www.dataq.com/products/hardware/di710.htm?source=googledl

dataTaker Data loggers. http://www.datataker.com/

Fuller, Bruce. “Portable data acquisition: Zeroing in on the right device.” Instrumentation & Control Systems 72 no5 39-44. May 1999. http://www.icsmagazine.com.

Labs, Wayne. “Data acquisition: Microprocessors, software and communications still set the pace.” Instrumentation & Control Systems 72 no10 40. 9 October 1999. http://www.icsmagazine.com.

Lecklider, Tom. “Data loggers and Recorders Deserve More Respect.” Evaluation Engineering 41 no10 20-4. 26 October 2002.

NewMar Electronic Power Products. http://www.newmarpower.com/

Onset Computer Corporation – HOBO Data loggers. http://www.onsetcomp.com/

Outback Power Systems. http://www.outbackpower.com/

Pico Technology Limited. http://www.picotech.com/

Sure Power Industries, Inc. http://www.surepower.com/

Xantrex Technology Inc. http://www.xantrex.com

Xenotronix. http://www.xenotronix.com/

18

Page 23: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

9 Appendices 9.1 Gantt Chart

The following six pages display three Gantt charts:

• Original Gantt Chart The first two pages display the original full year Gantt chart. (Note that it is not well developed for the second semester).

• Fall Semester Gantt Chart (As Executed) The middle two pages display the Gantt chart for the fall semester as it was actually executed during the semester. Note that we were not able to complete the sensor interface as originally scheduled. (Those tasks are not checked as completed.)

• Spring Semester Gantt Chart (As Executed)

The final two pages display the Gantt chart for the spring semester as planned and executed. The lighter gray blocks represent the times when tasks were planned, the darker gray blocks represent times when the tasks were executed. As was mentioned before, originally the tasks were planned sequentially, but in the end they were executed simultaneously. Also note that for this semester all tasks were completed, although not to the original schedule.

Each Gantt chart contains substantially more detail than is displayed here. To view the entire version of each Gantt chart, open the Gantt chart files contained on the CD in appendix 9.9 in Microsoft Project.

Available in print version only

19

Page 24: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

9.2 Specifications Data Channel Specifications Designation Measurement Range Precision Solar PV PVV Solar Array Voltage 0-200Vdc +/- 0.05V PVI Solar Array Current 0-100Adc +/- 0.1A CCI Charge Controller Output Current 0-100Adc +/- 0.1A BAV Battery Voltage 0-60Vdc +/- 0.01V NBI Net Battery Current (500)-500Adc +/- 1A IOV Inverter Output Voltage 0-500Vac +/- 0.1V IOI Inverter Output Current 0-50Aac +/- 0.1A PVT Solar Array Temp 0-60degC +/- 0.1degC BAT Battery Temp 0-60degC +/- 0.1degC Wind Power WTV Wind Turbine Voltage 0-200Vdc +/- 0.05V WTI Wind Turbine Current 0-100Adc +/- 0.1A Environment AMT Ambient Temp 0-60degC +/- 0.1degC SII Solar Insolation 0-1200W/m2 +/- 10W/m2 WIS Wind Speed 0-50mph +/- 0.5mph Recording Specifications • Include a time-stamp for each data set • Auto detect nominal battery voltage and adjust calculations accordingly • Auto detect battery internal resistance via calibration procedure • All current measurements made with current transducers, not shunts • User-selectable sampling intervals of up to 5 minutes in 1 second increments • 14 days of data when recorded at a 1 second sampling interval • 2 years of data when recorded at a 1 minute sampling interval • All channels are user-selectable on/off Data Manipulation Specifications • Calculated Data Values:

• Battery % State-of-Charge (shown on LED display) [+/- 5%] • Solar Array Power [+/- 1W] • MPPT % Gain [+/- 1%] • Inverter Efficiency [+/- 1%]

• User-selectable memory wrap option (FIFO) • For any recording interval longer than 1 second, include the option to record a

min/max/average value for each channel rather than an instantaneous value. Interface and Display Specifications • User-selectable display of any two channels (measured or calculated values)

simultaneously on LCD character display.

25

Page 25: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

• LED Graphic “Fuel Gauge” type display of battery state of charge using at least 10 LED segments (a precision of 10% SOC)

• Recording Stop/Run switch to control when the logger is taking data. • Data stored on a Compact Flash removable memory card in ASCII text format with

individual values delimited by tabs or commas. • Data files shall be named after the start and stop dates and times. • Use standard USB protocol for communication between the computer and the device • Physical switch to allow the device to run or download data from the flash card to a

personal computer • In run mode, PC has a live connection to the logger for viewing and adjusting settings or

seeing a live data feed. • In download mode, PC has a direct connection to the flash card using a traditional card

reader.

Low Voltage Disconnect Specifications • Current-compensated voltage calculation: the logger uses the battery’s internal resistance

to determine what the voltage would be if the battery were open circuited. • User-selectable disconnect and reconnect voltages, settable in PC software by either

voltage or desired battery state of charge. • User selectable disconnect delay in 1 second increments between 1 second and 5 minutes. • User selectable reconnect delay in 1 second increments between 1 second and 5 minutes. • LED Alarm indicator when LVD activated. • LVD physically implemented by external relay connected to a 5V/0V logic line coming

from the logger. Physical and Environmental Specifications • Size less than or equal to 9” x 6” x 3” • Weight less than 3 lbs. • LED battery state of charge display, LCD data display, and user button controls easily

accessible • USB “B” connector, Compact Flash connector, and standard DC power connector on rear

of device • Headphone-jack or terminal block connectors for sensor inputs • Operating range: 0-50° C, 100% RH, non-condensing “Day Two” Upgrades (outside of this project’s scope, but the device should be built with these future upgrades in mind) • 10+ sps diagnostic mode logging • Wizard for software installation and initializing the device settings • Amp-hour meter w/ auto-reset • Alarms when Array Current is not zero and Array Voltage is zero • Alarms when Array Current is positive and Charge Controller Current is zero • Alarms when Wind Speed is not zero and Wind Turbine Current is zero

26

Page 26: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

9.3 Schematics Complete AutoCAD schematics for the device are included in appendix 9.9.10 The following pages display printouts of selected portions of those schematics:

• Main Processor • USB Connection • LCD Processor • CF Processor • Portions of Actual Signal Conditioning Circuitry • Proposed Future Modifications to Signal Conditioning Circuitry

10 The one exception to this is the power supply schematic. The power supply schematic was never drafted in AutoCAD. It may be found in Stephen Frank’s project notebook on pages 78-82.

27

Page 27: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Main Processor

28

Page 28: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

29

USB Connection

Page 29: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

LCD Processor

30

Page 30: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Compact Flash

31

Page 31: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Signal Conditioning (Actual)

32

Page 32: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Signal Conditioning (Future)

33

Page 33: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

9.4 UltiBoard Layouts Following are the UltiBoard design schematics for the final printed circuit boards. There were four printed circuit boards used in the final design.

• Main Processor and Sensors 1 (MAX127) • Compact Flash and Sensors 2 • Power Supply • LCD Processor and Buttons Interface

34

Page 34: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Main Processor and Sensors 1

35 35

Page 35: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Compact Flash and Sensors 2

36 36

Page 36: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Power Supply

37

Page 37: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

LCD Processor and Button Interface

38

Page 38: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

9.5 Firmware Flowcharts The following pages display high-level flowcharts for the following processors:

• Main Processor Three flowcharts are included for the operation of the main processor. The first shows the initialization routine for the main processor. The second shows the main program loop. This loop checks for events (interrupts) to occur and calls the appropriate routines to process each event. The third flowchart displays the routine governing the most important event: the one second interrupt. This routine acquires new data each second and sends the data to the appropriate destinations, including the LCD screen (via the LCD processor) and the compact flash card (via the CF processor).

• LCD Display Processor Seven pages of flowcharts for this processor display all major program operations, including button presses and communications routines. The first flowchart is a high-level flowchart displaying overall operation. The second flowchart displays the initialization block, and the third and subsequent flowcharts display interrupt processing.

• Compact Flash Processor

Included are ten flowcharts of the compact flash interface processor operating system. The level of detail includes a high level response to the instructions received from the main processor. The operating system begins with an initialization routine, and then runs an infinite loop which both polls the incoming interrupt line, and handles transmitted instructions.

Many of the blocks included in these flowcharts contain much more detailed operation, but for simplicity only the highest level logical operations have been included here.

39

Page 39: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Main Processor Initialization Routine

RESET

Clear RAM

Setup Hardware

and I/O Ports

Get Date and

Time from Real Time Clock

Send Settings &

Timestamp to LCD Processor

Send Settings &

Timestamp to CF Processor

Setup Interrupts MAIN PROGRAM

Load Settings from EEPROM

40

Page 40: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Main Processor Main Program Loop

INTERRUPT

WAIT FOR

INTERRUPT

Communicate

w/ PC

PC Request

To Send Information?

Y N

Clear Interrupt Flag

Process and Display Alert

Alert From CF

Processor? Y N

Clear Interrupt Flag

Call One Second Interrupt Routine

One Second

Interrupt Occurred?

Y N

Clear Interrupt Flag

Begin or End

Logging

Logging Button

Pressed? Y N

Clear Interrupt Flag

41

Page 41: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Main Processor One Second Interrupt Routine

CALL

Update

Timestamp

Compute

Min/Max/Avg

Update LCD Display With

New Data

Sample and Scale Data

Compute

Calculated Values

Min/Max/Avg

Enabled?

N Y

Update and Store Time

New Time From LCD Processor?

N Y

Update and

Store Settings

New Settings

From LCD Processor?

N Y

42

Page 42: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

RETURN

Log Data to

CF Processor

Logging?

N Y

Logging Interval

Reached?

N Y

Start New

Logging Interval

43

Page 43: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

LCD Processor Overview

Initialize

Interrupt?

Start

No

Yes

Button?

No

Yes

Service interrupt

from button

Update Display

Service Interrupt from Main Processor

44

Page 44: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

LCD Processor Initialization Routine

Initialize

Ports

Start

Initialize Variables

Initialize LCD Screen

Create Custom

Characters in LCD Screen

Turn display on

Main Loop

45

Page 45: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

LCD Processor Button Processing

Back light Button?

Yes from Interrupt?

Yes

Scroll left 1st line?

No

Scroll right 1st line?

Scroll left 2nd line?

Scroll right 2nd line?

Function Button?

Yes

No

Yes

No

Yes

No

Yes

No

Toggle LCD

Backlight on/off

Service scroll left first line Button

Service scroll right first line Button

Service scroll left

second line Button

Service scroll right second line

Button

Service Function Button

Update Display

Yes

46

Page 46: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

LCD Processor Communications Processing

47

Received “R”?

No from Button?

Yes

Received “G”?

No

Received “U”?

Received “T”?

Received “S”?

Received “D”?

Yes

No

Yes

No

Yes

No

Yes

No

Receive new time

Receive

new settings

Receive new channel

settings

Update Display

New Settings?

New Time?

New Alert?

No

Yes

Send Alert

No

Yes

Send new time

No

Yes

Send new settings

Page 47: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

LCD Processor Scroll Button Processing (1 of 2)

Main menu?

Yes form Scroll left first line?

Yes

Options menu?

No

Set time menu?

Channel settings menu?

Yes

No

Yes

No

Yes

Scroll First

line left once

Change

which option is displayed

Move curser to next time

segment

Change which

channel is displayed

Update Display

Yes from Scroll right first line?

Same as above only everything changes in opposite direction

48

Page 48: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

LCD Processor Scroll Button Processing (2 of 2)

Main menu?

Yes from Scroll right

second line?

Yes

Options menu?

No

Set time menu?

Channel settings menu?

Yes

No

Yes

No

Yes

Scroll second line right once

Change the value of the

option displayed

Increment time

segment where

curser is

Change the value of channel

displayed

Update Display

Yes from Scroll left

second line?

Same as above only everything changes in opposite direction

49

Page 49: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

LCD Processor Function Button Processing

Main menu?

Yes from Function Button?

Yes

Options menu?

No

Set time menu?

Channel settings menu?

Yes

No

Yes

No

Yes

Go to Options menu

Go to set

time menu

Go to

Channel settings menu

Go to main

menu

Update Display

50

Page 50: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

CF Processor Initialization

Initialize Ports

Initialize Compact Flash

Initialize USART Communication

Initialize File Index Number

Set File Currently Open Flag to

FAL

51

SE

Initialize Min Max Average to

be OFF

Begin Main Program Infinite

Loop

Page 51: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

CF Processor Main Program Loop

Poll Main Processor

Interrupt Line

Is the line High?

NoYes

Clear Communications

Buffer

Send Acknowledge to Main Processor

Wait for Transmitted Instruction

Read in Instruction

Process Instruction with

Evaluate Routine

52

Page 52: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

CF Processor Instruction Evaluation Routine

Case Structure

53

Process “Begin Logging”

Instruction “B”?

Instruction “D”? Process “Data”

Instruction “V”?

Process “Min Max Average

Data”

Process End Logging

Instruction “E”?

Process “Card Full?”

Instruction “F”?

Instruction “T”?

Process “Time/Date”

Unknown Instruction

Return to Main Loop

Instruction “S”?

Process “Settings”

Page 53: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

CF Processor “Begin Logging” Process

Is the File Open Flag Clear?

Is the CF Card Present

Open New File

Transmit “y” for no errors

Return to Main Program Loop

No

Transmit “x” for no card

No

Send Acknowledge

54

Page 54: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

CF Processor “Receive Data” Instruction Routine

55

Read in 42 bytes of data

Send Acknowledge

Write Data to File

Send Acknowledge

Return to Main Program Loop

Page 55: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

CF Processor “Receive Min Max Average Data” Instruction Routine

56

Read in 42 bytes of data (Min)

Send Acknowledge

Write Data to File

Return to Main Program Loop

Send Acknowledge

Read in 42 bytes of data (Max)

Send Acknowledge

Send Acknowledge

Read in 42 bytes of data (Avg)

Send Acknowledge

Page 56: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

CF Processor “End Logging” Instruction Routine

57

Close File

Send Acknowledge

Send “y”

Return to Main Program Loop

Page 57: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

CF Processor “Card Percent Full” Instruction Routine

58

Transmit Card Size

Send Acknowledge

Wait for Acknowledge

Transmit Card Percent Full

Wait for Acknowledge

Return to Main Program Loop

Page 58: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

CF Processor “Receive Time/Data” Instruction Routine

59

Receive 8 bytes of Time/Date Information

Send Acknowledge

Send Acknowledge

Return to Main Program Loop

Page 59: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Receive MinMaxAvg Flag

Send Acknowledge

Receive File Wrap Flag

Receive 21 Channel Settings

Send Acknowledge

CF Processor “Receive Settings” Instruction Routine

Return to Main Program Loop

60

Page 60: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

9.6 Budget Following is a comprehensive budget for the production of one model. It is important to note that the cost will be considerably cheaper when products are purchased in bulk.

Category Value (if applicable) Description Quantity Price Per Total Unit ($) Price ($)

Integrated Circuits PIC18F452 PIC Microcontroller - Main 1 5.70 5.70Integrated Circuits MAX127 Bipolar, 12-bit A-D Converter 1 9.25 9.25Integrated Circuits DS1307 Real Time Clock 1 1.36 1.36Integrated Circuits DS32kHz Temperature Compe. 32 kHz Osc 1 3.75 3.75Integrated Circuits AD622 Differential Inst.Amplifier 10 3.71 37.10Integrated Circuits LM741 Operational Amplifier 4 0.54 2.16Integrated Circuits DLP2232-M Dual USB-Serial/UART converter 1 33.43 33.43Integrated Circuits OP490 Quad Operational Amplifier 4 8.32 33.28Integrated Circuits M74HC126 Quad positive enable tristate buffer 1 0.57 0.57Integrated Circuits M74HC126 Quad positive enable tristate buffer 1 0.57 0.57Integrated Circuits OP490 Quad Operational Amplifier 1 8.32 8.32Integrated Circuits OP490 Quad Operational Amplifier 1 8.32 8.32Integrated Circuits OP490 Quad Operational Amplifier 1 8.32 8.32Integrated Circuits PIC18F452 PIC Microcontroller - CF 1 5.70 5.70Integrated Circuits MAX5035 5V Regulator 1 1.90 1.90Integrated Circuits MAX732 12V Regulator 1 2.76 2.76Integrated Circuits MAX736 Negative 12V Regulator 1 2.75 2.75Integrated Circuits 18F252 PIC Microcontroller - LCD 1 5.15 5.15 Resistors 576 Ω Op-Amp Gain Resistor 1 0.05 0.05Resistors 16.5 kΩ Op-Amp Gain Resistor 1 0.05 0.05Resistors 16.5 kΩ Op-Amp Gain Resistor 1 0.05 0.05Resistors 16.5 kΩ Op-Amp Gain Resistor 1 0.05 0.05Resistors 820 kΩ Voltage Divider Resistor 1 0.05 0.05Resistors 15 kΩ Voltage Divider Resistor 1 0.05 0.05Resistors 560 kΩ Voltage Divider Resistor 1 0.05 0.05Resistors 68 kΩ Voltage Divider Resistor 1 0.05 0.05Resistors 820 kΩ Voltage Divider Resistor 1 0.05 0.05Resistors 1 kΩ Voltage Divider Resistor 1 0.05 0.05Resistors 820 kΩ Voltage Divider Resistor 1 0.05 0.05Resistors 15 kΩ Voltage Divider Resistor 1 0.05 0.05Resistors 61.9 kΩ Half-Hertz Filter Resistors 32 0.05 1.60Resistors 3.3 kΩ Current Limiting Resistor 1 0.05 0.05Resistors 20 kΩ Pulldown Resistor 1 0.05 0.05Resistors 20 kΩ Pulldown Resistor 1 0.05 0.05Resistors 20 kΩ Pulldown Resistor 1 0.05 0.05Resistors 20 kΩ Pullup Resistor 1 0.05 0.05Resistors 20 kΩ USART Pullup Resistor 1 0.05 0.05Resistors 20 kΩ USART Pullup Resistor 1 0.05 0.05Resistors 20 kΩ USART Pullup Resistor 1 0.05 0.05Resistors 10 kΩ Pullup Resistor 1 0.05 0.05Resistors 10 kΩ I²C Pullup Resistor 1 0.05 0.05Resistors 10 kΩ I²C Pullup Resistor 1 0.05 0.05

61

Page 61: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Resistors 5 kΩ Pullup Resistor 1 0.05 0.05Resistors 68 kΩ Current Limiting Resistor 1 0.05 0.05Resistors 0.05Resistors 0.05 0.05Resistors 240 0.05 0.05Resistors 1.24 kΩ Op-Amp Gain Resistor 1 05

n Resistor

sistors

sistors sistors sistors sistors sistors

ypass Cap EFADJ) EF) rs citor 100V citor apacitor apacitor citor citor

240 kΩ Negative Rail for LM35 Sensors 1 0.05 240 kΩ Negative Rail for LM35 Sensors 1

kΩ Negative Rail for LM35 Sensors 1 0.05 0.05

0.0.05Resistors 1.24 kΩ Op-Amp Gai 1

Resistors 576 Ω Op-Amp Gain Resistor 1 0.05 0.05Resistors 1.24 kΩ Op-Amp Gain Resistor

istor 1 0.05 0.05

Resistors 21 kΩ Op-Amp Gain Res 1 0.05 0.05Resistors 6.98 kΩ Op-Amp Gain Resistor

1 0.05 0.05

Resistors 61.9 kΩ Half-Hertz Filter Resistors 24 0.05 1.20Resistors 10 kΩ Pull-Up Resistor 1 0.05 0.05Resistors 10 kΩ Pull-Up Resistor 1 0.05 0.05Resistors 1 MΩ Power Supply Resistor 1 0.05 0.05Resistors 384 kΩ Power Supply Resistor 1 0.05 0.05 Trimpot Resistors 100 Ω Trimpot Gain Resistors 1 0.52 0.52Trimpot Resistors 500 Ω Trimpot Gain Resistors 1 0.52 0.52Trimpot Resistors 500 Ω Trimpot Gain Resistors 1 0.52 0.52Trimpot Resistors 500 Ω Trimpot Gain Resistors

sistors 1 0.52 0.52

Trimpot Resistors 50 kΩ Trimpot Gain Re 1 0.52 0.52Trimpot Resistors 50 kΩ Trimpot Gain Re 1 0.52 0.52Trimpot Resistors 50 kΩ Trimpot Gain Resistors 1 0.52 0.52Trimpot Resistors

rimpot Resistors 50 kΩ

00 Ω Trimpot Trimpot Gain Resistors

Gain Resistors 1 0.52

0.52 0.520.52T 1 1

Trimpot Re 100 Ω Trimpot Gain Resistors 1 0.52 0.52Trimpot Re 100 Ω Trimpot Gain Resistors 1 0.52 0.52Trimpot Re 100 Ω Trimpot Gain Resistors 1 0.52 0.52Trimpot Re 1 kΩ Trimpot Gain Resistors 1 0.52 0.52Trimpot Re 500 Ω Trimpot Gain Resistors 1 0.52 0.52 Capacitors 0.1 μF MAX127 Power Supply B 1 0.15 0.15Capacitors 10 nF MAX127 Ref. Capacitor (R 1 0.15 0.15Capacitors 4.7 μF MAX127 Ref. Capacitor (R 1 0.15 0.15Capacitors 10 μF Half-Hertz Filter Capacito 8 0.24 1.92Capacitors 18 pF Oscillator Drive Capacitor 1 0.18 0.18Capacitors 18 pF Oscillator Drive Capacitor 1 0.18 0.18Capacitors 10 μF Half-Hertz Filter Capacitors 6 0.24 1.44Capacitors 18 pF Oscillator Drive Capacitor

acitor1 0.18 0.18

Capacitors 18 pF Oscillator Drive Cap 1 0.18 0.18Capacitors 0.1 μF Power Supply Capa 1 0.15 0.15Capacitors 68 μF Power Supply Capa 1 0.88 0.88Capacitors 0.1 μF Power Supply C 1 0.15 0.15Capacitors 68 μF Power Supply Capacitor 1 0.88 0.88Capacitors 22 μF Power Supply Capacitor 1 0.15 0.15Capacitors 0.1 μF Power Supply Capacitor 1 0.15 0.15Capacitors 1.0 μF Power Supply C 1 0.15 0.15Capacitors 150 μF Power Supply Capa 1 0.56 0.56Capacitors 150 μF Power Supply Capa 1 0.56 0.56

62

Page 62: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Capacitors apacitor

0

uctor

ence

h utton ssed) utton/Cap ttons

t Power Connector rnd, Vs+,

eader w x 5 pin eader w x 5 pin

eader eader w x 5 pin

Header eader

onnectors 0 Pin Header oard Interconnect - 2 row x 5 pin 0.25 0.25eader Header

t Flash Connector

ut

nector

Header (90 Deg.) l Header (90 Deg.) nal Header (90 Deg.) Header (90 Deg.) Header (90 Deg.) Header (90 Deg.) nal Header (90 Deg.) nal Header (90 Deg.) nal

Terminals 5.00 2P Header (90 Deg.) Large 2-pin Sensor Terminal 1 0.49 0.49

0.1 μF Power Supply C 1 0.15 0.15Capacitors 2.2 nF Power Supply Capacitor 1 0.15 0.15Capacitors 10 nF Power Supply Capacitor 1 0.15 0.15Capacitors 150 nF Power Supply Capacitor 1 0.15 0.15Capacitors 0.1 μF Power Supply Capacitor 1 0.15 0.15Capacitors 150 μF Power Supply Capacitor 1 0.56 0.56Capacitors 150 μF Power Supply Capacitor 1 0.56 0.56Capacitors 150 μF Power Supply Capacitor 1 0.56 0.56 Diodes 50SQ10 Power Supply Diode 1 1.92 1.92Diodes 1N5818 Power Supply Diode 1 0.68 0.68Diodes 1N5818 Power Supply Diode 1 0.68 0.68 Inductors 100 μH Power Supply Ind 1 1.85 1.85Inductors 50 μH Power Supply Inductor 1 1.85 1.85Inductors 10 μH Power Supply Inductor 1 1.85 1.85 Transistors 5V Zener Precision 5V refer 1 1.20 1.20 Switches/Buttons SPDT Switc Program/Run Switch 1 0.15 0.15Switches/Buttons Push B Reset Push Button (rece 1 0.10 0.10Switches/Buttons Push B User Controls - Push Bu 7 0.50 3.50

Connectors 4 Socke4-Pin Power Input (5v, GVs-) 1 0.84 0.84

Connectors 10 Pin H Board Interconnect - 2 ro 1 0.25 0.25Connectors 10 Pin H Board Interconnect - 2 ro 1 0.25 0.25Connectors 5 Pin H Programming Jumper 1 0.10 0.10Connectors 10 Pin H Board Interconnect - 2 ro 1 0.25 0.25Connectors 3 Pin Max127 Jumper 1 0.10 0.10Connectors 3 Pin H Max127 Jumper 1 0.10 0.10C 1 B 1 Connectors 5 Pin H Programming Jumper 1 0.10 0.10Connectors 10 Pin Board Interconnect - 2 row x 5 pin 1 0.25 0.25Connectors Compac Compact Flash Card Connector 1 1.99 1.99 Oscillators 8 MHz Crystal Oscillator, Parallel Cut 1 0.94 0.94Oscillators 8 MHz Crystal Oscillator, Parallel Cut 1 0.94 0.94Oscillators 8 MHz Crystal Oscillator, Parallel C 1 0.94 0.94 Battery Con 3V Standard Battery Terminal 1 1.18 1.18 Terminals 3.81 2P Small 2-pin LVD Termina 1 0.57 0.57Terminals 3.81 2P Small 2-pin Sensor Termi 1 0.57 0.57Terminals 3.81 3P 3-pin Sensor Terminal 1 0.85 0.85Terminals 3.81 3P 3-pin Sensor Terminal 1 0.85 0.85Terminals 3.81 3P 3-pin Sensor Terminal 1 0.85 0.85Terminals 5.00 2P Large 2-pin Sensor Termi 1 0.49 0.49Terminals 5.00 2P Large 2-pin Sensor Termi 1 0.49 0.49Terminals 5.00 2P Large 2-pin Sensor Termi 1 0.49 0.49

63

Page 63: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

Terminals 3.81 2P Header (90 Deg.) nal Header (90 Deg.) nal Header (90 Deg.) nal Header (90 Deg.) nal Header (90 Deg.) nal Header (90 Deg.) nal

nnectors on Cable (10 pin)

umpers/Connectors .81 2P Female (90 Deg.) mall 2-pin Female Connector 1.63 9.78/Connectors male (90 Deg.) onnector /Connectors emale (90 Deg.) onnector

ox roduct Box 30.88 30.88

n ard Board g Bits 1

311.52

Small 2-pin Sensor Termi 1 0.57 0.57Terminals 3.81 2P Small 2-pin Sensor Termi 1 0.57 0.57Terminals 3.81 2P Small 2-pin Sensor Termi 1 0.57 0.57Terminals 3.81 2P Small 2-pin Sensor Termi 1 0.57 0.57Terminals 5.00 2P Large 2-pin Sensor Termi 1 0.49 0.49Terminals 5.00 2P Large 2-pin Sensor Termi 1 0.49 0.49 Jumpers/Co 12" Ribb Board Interconnectors 3 2.17 6.51J 3 S 6 Jumpers 3.81 2P Fe Small 3-pin Female C 3 2.44 7.32Jumpers 3.81 2P F Large 3-pin Female C 6 1.40 8.40 B P 1 LCD Scree LCD Screen 1 9.50 9.50Copper Bo Copper Copper Board and Millin 1 15.00 5.00

64

Page 64: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

9.7 Team The following six pages contain the bers who p ticipated in this project.

Member Resumes

resumes of the team mem ar

Available in print version only

65

Page 65: Renewable Energy Data Logger - Messiah College...Most data logging products available today are industrial grade, at industrial prices. Pricing of over $1000 for a single unit is common,

9.8 Project Resources CD This CD contains complete copies of all documentation and resources used for this project, including:

• Project Gantt Charts

• Complete Schematics • Complete UltiBoard Layouts • Flowcharts • Complete Source Code (Firmware and PC Software) • Powerpoint Presentations • Testing Documents • CSV Files Produced During Testing • Project Photographs • Component Data Sheets • Other Product Literature

All material is organized in folders first according to type and sub-folders according to date or product, whichever is applicable.

• Specifications

Available in print version only

72