ecesd.engr.uconn.edu · Web viewPWM and ADC Test The next test we did incorporated a pulse width...

13
Hardware-in-the-Loop Testbed Project Report ECE 4901 – Senior Design I December 6 th , 2013 ECE Design Team 186 Ken Gobin Aaron Eaddy Douglas Pence Faculty Advisor Dr. Sung-Yeul Park

Transcript of ecesd.engr.uconn.edu · Web viewPWM and ADC Test The next test we did incorporated a pulse width...

Hardware-in-the-Loop Testbed

Project Report

 

ECE 4901 – Senior Design I

December 6th, 2013

ECE Design Team 186

Ken Gobin

Aaron Eaddy

Douglas Pence

Faculty Advisor

Dr. Sung-Yeul Park

Table of Contents

1.Summary

2.Introduction

2.1Proposal

2.2System Specifications

2.3Basic Flow Chart

3.Current Design and Analysis

3.1Sensor Circuit

3.2Software

3.2.1Simulation of Pulse Width Modulation (PWM)

3.3Operational Microcontroller Testing

3.3.1Digital Output Test

3.3.2PWM and ADC Test

4.Budget and Planning

4.1Budget

4.2Goals and Milestones

1.Summary

As mobile devices are becoming a very integral part of society, mobile device owners are beginning to rely on these devices and their battery life. The battery is one of the most important parts of mobile devices due to the fact that electronics cannot operate without power. The task at hand is to create a system that simultaneously charges and analyzes any battery function or behavior in real-time use. Our design team will attempt to use both hardware and software to implement the testbed. The software, written in MATLAB®, will be used to create the algorithms that will charge and test the battery, whereas the hardware will implement these algorithms and obtain feedback from the battery. The ultimate goal of this design project is to help in the understanding of batteries and their characteristics to in-turn improve future battery designs.

2.Introduction

2.1Proposal

This project is aimed at developing a proof-of-concept multi-functional diagnostic testbed for potential use in batteries, fuel cells and electronic energy storage devices.  Our system will focus on the development and implementation of a universal sensor circuit which will be operated in conjunction with battery charging technology developed by a previous senior design team.  This testbed will allow dynamic diagnostic monitoring through a digital interface with a micro-controller.  The aforementioned sensor circuit will relay useful diagnostic data related to the electronic storage device being monitored to a computer, where the data can be read and analyzed with ease.

2.2System Specifications

For our current design, we are using a testing platform similar to the requirements needed for a second research group. Team 187 is developing a hybrid go-kart which requires a 30 volt power supply achieved by using either 5 or 6 individual battery cells. These cells will most likely be based on sealed lead-acid battery technology. During the concept development, we will be using a standard 0 to 20 volt bench power supply to simulate the use of a battery.

The Texas Instruments® DSP F-28335 32-bit microcontroller in our design cannot exceed a 3 volt input and therefore the design includes a signal conditioner in the sensor circuit which will decrease any input source voltage within a safe range for the microcontroller to handle.

There will be multiple software and hardware interfaces in the final design. MATLAB® and Code Composer Studio® will make up the software interface to process and relay any information to and from the microcontroller. Battery status will be monitored in real-time including battery health, charge state, fault detection and analog-to-digital conversion (ADC) speed.

2.3Basic Flow Chart

Our simplified process flow chart, indicating all interface junctions and incorporation of hardware in the testing loop, is shown in Figure 1 below. There are multiple interfaces between hardware, software and signal flow.

Figure 1 - Basic System Flow Chart

3.Current Design and Analysis

3.1Sensor Circuit

The main purpose of our sensor circuit is to send information about battery current, voltage, and temperature to the computer to be processed, analyzed and used in determining the battery’s state of health and state of charge. The battery model we are using is team 187’s 30 volt design for their hybrid go-kart battery, therefore an important part of building the sensing circuit is conditioning the output signals from the battery to reach, but not exceed, the upper requirements of the microcontroller voltage limit. Since the battery is 30 volts, and the maximum voltage the ADC can handle is 3 volts, signal conditioning was necessary in order to scale the voltage low enough to give a health signal. Our voltage and current sensing circuit is borrowed from the previous senior design group, and features a voltage dividing circuit along with an operational amplifier to feed the signals to the ADC. The temperature sensing circuit contains two thermistors; one to measure ambient temperature and one to measure the surface temperature of the battery. There is also an operational amplifier included for signal conditioning. Final hardware components will be chosen and implemented on a ProtoBoard® before being implemented on a custom designed PCB. Figure 2 displays our current voltage and current sensor designs. Figure 3 shows our 10:1 ratio signal conditioner and Figure 4 shows the resulting simulation of our signal conditioner to verify our design efficiency and accuracy. Our simulation results were satisfactory.

Figure 2 – Voltage and Current Sensing Circuits

Figure 3 – 10:1 Signal Conditioner with Inverting Operational Amplifier

Figure 4 – Simulation Results of Signal Conditioner Circuit

3.2Software

The software for our project consists of MATLAB® 2013a and Code Composer Studio® v3.3. More specifically we use Simulink® in MATLAB®. With Simulink® we use the embedded coder library that contains blocks for the TI C2000 microcontroller. Each block in this library corresponds to an actual piece of hardware/peripheral on our microcontroller. Once our model is created MATLAB® then interfaces with Code Composer Studio® to generate C code to be written and run on the microcontroller. To this point we have been testing the different features of the microcontroller and its sampling time. These features include: digital input and output, pulse width modulation and the analog to digital converter. To test the digital input and output we sent a toggling signal to one of the LEDs and increased the switching time until it could not be recreated on the microcontroller.

3.2.1Simulation of Pulse Width Modulation (PWM)

Using Simulink®, we set up a mock circuit and simulated the process for PWM. Figure 5 shows the resulting output using 12500 clock cycles per pulse. Figure 6 shows the actual output display from the simulated oscilloscope. We are modeling our PWM usage with our microcontroller based on this model. The only big difference is the need to use specific blocks in the Simulink® design software related directly to the F28335 microcontroller.

Figure 5 - Pulse Width Modulation (PWM) Simulation Circuit

Figure 6 - Pulse Width Modulation (PWM) Resultant Output

3.3Operational Microcontroller Testing

3.3.1Digital Output Testing

We initially tested the Digital Output module using the F28335 microcontroller. The basic circuit we used to communicate with the board through Code Composer Studio® was comprised of a simple constant supply sent to a digital output block in Simulink®. The result of the test was a flashing red light emitting diode (LED) shown in Figure 7. Operation of the Digital Output function was verified to be satisfactory and as expected.

Figure 7 - Physical Verification of Digital Output Operation via Red Flashing LED

3.3.2PWM and ADC Test

The next test we did incorporated a pulse width modulation signal sent to a corresponding ADC unit block which then sent the result to a Digital Output block. We used a saw tooth input and a constant variable input. Each final signal was read, measured and displayed on an oscilloscope as shown in Figures 8 and 9 below. We are still in progress of measuring the actual speed and data transfer rate for our ADC capability.

Figure 8 - PWM and ADC Real-Time Test Result for Variable Constant

Figure 9 - PWM and ADC Real-Time Test Result for Saw Tooth

4.Budget and Planning

4.1Budget

The department of Electrical and Computer Engineering funded $1,000 for our project research and concept development. Our current and estimated planned expenditures are shown in Table 1. We have a current approximate surplus of $325 for use in potential altering or re-designing at a later date, if necessary.

Table 1 - Current Estimated Budget

Total Budget

$1,000

Sensor Circuit Parts

- $450

PCB Fabrication

- $200

Miscellaneous Wiring

- $25

Balance

+ $325

4.2Goals and Milestones

The following chart outlines our current goals for completion of our project. Currently we are approximately one to two weeks behind due to the software compatibility issues discussed in this report (Section 3.2 - Software).

Research Item

Oct

Nov

Dec

Jan

Feb

Mar

Apr

3

4

1

2

3

4

1

Prototype Design

Schematics + Part List

 x

 x

 

 

 

 

 

 

 

 

 

PCB Layout

 x

 

 

 

 

 

 

 

Parts Order

 

 

 

 

 x

 

 

 

 

 

PCB Order

 

 

 

 

 x

 

 

 

 

 

Board Assembly

 

 

 

 

 

 x

 

 

 

 

Board Testing

Hardware

 

 

 

 

 

 

 

 x

 

 

 

Functions

 

 

 

 

 

 

 

 x

 x

 

 

Algorithm

 

 

 

 

 

 

 

 x

 

Power Test

 

 

 

 

 

 

 

 

 

Revision

 

 

 

 

 

 

 

 

 

 x