BIWEEKLY REPORT - CS Course...

13
BIWEEKLY REPORT 29 TH MARCH 2004 Wearable wireless physiological sensors Daniel Bishop Josh Handley Phillip Hay Christina Hernandez Rosy Logioia Gouri Shintri Clayton Smith Adam Stevenson

Transcript of BIWEEKLY REPORT - CS Course...

Page 1: BIWEEKLY REPORT - CS Course Webpagescourses.cs.tamu.edu/rgutier/cpsc483_s04/reports/wearable-progress2.pdfBIWEEKLY REPORT 29TH MARCH 2004 ... GANTT CHART ... Project Assignment Key

BIWEEKLY REPORT29TH MARCH 2004

Wearable wireless physiological sensors

Daniel Bishop

Josh Handley

Phillip Hay

Christina Hernandez

Rosy Logioia

Gouri Shintri

Clayton Smith

Adam Stevenson

Page 2: BIWEEKLY REPORT - CS Course Webpagescourses.cs.tamu.edu/rgutier/cpsc483_s04/reports/wearable-progress2.pdfBIWEEKLY REPORT 29TH MARCH 2004 ... GANTT CHART ... Project Assignment Key

Sensors Team ..................................................................................................................................... 3GANTT CHART............................................................................................................................ 3SENSOR TEAM STATUS REPORT............................................................................................ 4

THERMOMETER...................................................................................................................... 4PULSE OXIMETER (detector).................................................................................................. 5GSR.............................................................................................................................................6

Board Team.........................................................................................................................................7GANTT CHART-BOARD TEAM.................................................................................................7BOARD TEAM STATUS REPORT..............................................................................................8BOARD TEAM- PARTS LIST...................................................................................................... 9BOARD DESIGN- BOARD TEAM............................................................................................ 10

Software Team.................................................................................................................................. 11GANTT CHART-SOFTWARE TEAM....................................................................................... 11SOFTWARE TEAM STATUS REPORT.................................................................................... 12CODE EXPLANATION...............................................................................................................12GRAPHICAL USER INTERFACE..............................................................................................13

Page 3: BIWEEKLY REPORT - CS Course Webpagescourses.cs.tamu.edu/rgutier/cpsc483_s04/reports/wearable-progress2.pdfBIWEEKLY REPORT 29TH MARCH 2004 ... GANTT CHART ... Project Assignment Key

Sensors Team

GANTT CHART

Page 4: BIWEEKLY REPORT - CS Course Webpagescourses.cs.tamu.edu/rgutier/cpsc483_s04/reports/wearable-progress2.pdfBIWEEKLY REPORT 29TH MARCH 2004 ... GANTT CHART ... Project Assignment Key

SENSOR TEAM STATUS REPORT

THERMOMETER

Not much work has been done on the temperature sensor since the last report because it is the moststable sensor we have at this time. The sensor was powered using 5V in the last report. To meetour size and power constraints, we tested the temperature sensor using only 3.5V to power it. Theoutput is stable, but we are yet to recalibrate the sensor and come up with a new equation that canbe used to calculate temperature. After this, we will need to verify we get the same results with thesensor using a 3.5V battery instead of a power supply.

Page 5: BIWEEKLY REPORT - CS Course Webpagescourses.cs.tamu.edu/rgutier/cpsc483_s04/reports/wearable-progress2.pdfBIWEEKLY REPORT 29TH MARCH 2004 ... GANTT CHART ... Project Assignment Key

PULSE OXIMETER (detector)

Since the last report, we have taken out the first order filter and included two second order filtersupon Dr. Cote’s advice. This was due to the fact that we were still seeing much of the 60 Hz noisefrequencies. Our filters now have a cutoff frequency of 3 Hz, instead of 5 Hz. We rebuilt theprototype using a low-powered quad-op amp in an effort to meet the design constraints we have.After much testing, we have a prototype that now operates on a quad-op amp that can be poweredusing only +-3.5V. This will allow us to use the 3.5V batteries we already have in our possession.The photodiode is now extremely sensitive to light and dark as can be seen in the oscilloscopeoutput. When the BVP sensor is being held against the finger, the person needs to sit extremelystill and wait about 5 minutes before any relevant data shows up on the oscilloscope. The outputstarts out at 2 Hz, but after some time it levels off at about 1.5 Hz. We often have to deal with theerror message, “Frequency not found”. Next on our agenda will be to directly hook up theprototype to a battery instead of using a power supply. We also need to make an effort to make theoutput more stable and reduce our “movement” problem so sensor users will not have to stay stillfor so long. We will look to Dr. Cote and Dr. Gutierrez for more advice on this matter.

Page 6: BIWEEKLY REPORT - CS Course Webpagescourses.cs.tamu.edu/rgutier/cpsc483_s04/reports/wearable-progress2.pdfBIWEEKLY REPORT 29TH MARCH 2004 ... GANTT CHART ... Project Assignment Key

GSR

In the first part of the procedure we attached a unit gain under the electrodes. The idea is to verifythat the circuit works correctly, in fact a unit gain under ideal conditions gives out a voltage equalto the input voltage. We attached the electrodes to the fingertips and measured the following values(bold values): V1 R1 R1Voltage Vout Rskin

3.7 volts 3.1MΩ 1.99 volts 1.68-1.75 volts 2.6MΩ3.7 volts 2.5MΩ 1.3 volts 2.4 volts 4.6MΩ

without unit gain: 3.7 volts 3.6MΩ 2.0 volts 1.9 volts 3.4MΩ

We also measured the resistance of our finger tips directly to the multimeter and our values werearound 8MΩ. If we reduce the input voltage to 0.5 volts than we measured 0.47 KΩ.We found some conflicting values researching about what should be an average skin resistance sowe will keep measuring values with and without the potentiometer and observe for a more usefulpattern.

Page 7: BIWEEKLY REPORT - CS Course Webpagescourses.cs.tamu.edu/rgutier/cpsc483_s04/reports/wearable-progress2.pdfBIWEEKLY REPORT 29TH MARCH 2004 ... GANTT CHART ... Project Assignment Key

Board Team

GANTT CHART-BOARD TEAM

The following Gantt Chart describes the tasks remaining for the board team, which consists ofChristina Hernandez, Clay Smith, and Adam Stevenson. Comparing this timeline with the timelinecreated for the Critical Design Review, the board team is about a week behind in receiving andtesting the board. This means that less time can be dedicated to debugging both Systems I and II ifthe project is to be completed by the first week of May 2004. While waiting for the board to bereceived, the board team is going to help the software team complete the code for transmission andreceiving of the wireless signal.

Page 8: BIWEEKLY REPORT - CS Course Webpagescourses.cs.tamu.edu/rgutier/cpsc483_s04/reports/wearable-progress2.pdfBIWEEKLY REPORT 29TH MARCH 2004 ... GANTT CHART ... Project Assignment Key

BOARD TEAM STATUS REPORT

The tasks which have been completed by the Board Team are as follows:

Board Schematic Design Completed Board Design Tested by Team Board Design Verified by Manufacturer Four 4-Layer Boards Sent for Manufacturing Parts List Compiled and Verified Parts Purchase Orders Completed Board Population Task Researched

The tasks which remain to be completed are as follows:

Order Parts Board Received and Tested Populate Board Using Manual Method * Connect Sensors to Board Design (System I) Debug System I Connect Software to System I (System II) Debug System II Add GUI to System II Test Final System / Completion of Project

A majority of the tasks which remain incomplete are to be done by the entire team. For this reason,“waiting” times are going to be spent helping the software team catch up to the point that when theboard and sensor teams are ready for the transmission and receiving software to be integrated, thesecomponents will be complete. This will occur after the parts have been ordered but before themanufactured boards have been received.

* The population of the board will be done manually through soldering method suggested by Dr.Liu’s team.

Page 9: BIWEEKLY REPORT - CS Course Webpagescourses.cs.tamu.edu/rgutier/cpsc483_s04/reports/wearable-progress2.pdfBIWEEKLY REPORT 29TH MARCH 2004 ... GANTT CHART ... Project Assignment Key

BOARD TEAM- PARTS LIST

Complete Part List

CapacitanceFamily Co. Cat. Page # Size Voltage Max Series Tolerance Count Total Order Amount Unit Amount Unit Price Total Part Number0.1uF SM DK-816 0402 10V X5R ± 10% 13 52 100 1 0.1509$ 15.09$ PCC2146CT-ND1uF SM DK-816 0402 6.3V X5R ±20% 8 32 40 1 0.1620$ 6.48$ PCC2257CT-ND10nF SM DK-816 0402 16V X7R ±10% 1 4 10 1 0.1830$ 1.83$ PCC103BQCT-ND10pF SM DK-815 0402 50V NP0 ±0.5pF 6 24 30 1 0.4990$ 14.97$ PCC2264CT-ND15uF Tantalum DK-762 4.5x7x2.5 mm 6.3V EF ± 10% 1 4 5 1 0.6900$ 3.45$ P2014-ND2.2uF SM DK-818 0603 6.3V X5R ±10% 1 4 10 1 0.2130$ 2.13$ PCC2273CT-ND22pF SM DK-815 0402 50V NP0 ±5% 2 8 10 1 0.2050$ 2.05$ PCC220CQCT-ND330uF Radial DK-723 See Spec 16V FC ±20% 1 4 10 1 0.3470$ 3.47$ P10246-ND33pF SM DK-815 0402 6.3V NP0 ± 5% 2 8 20 1 0.2050$ 4.10$ PCC330CQCT-ND4.7uF SM DK-826 0603 4V X5R ± 10% 1 4 10 1 0.2570$ 2.57$ PCC2318CT-ND68pF SM DK-816 0402 50V NP0 ±5% 3 12 20 1 0.2050$ 4.10$ PCC680CQCT-ND

Resistance Type Co. Cat. Page # Size Power Series Tolerance Count Total Order Amount Unit Amount Unit Price Total Part Number2.2 ohms SM DK-863 0402 1/16W SM ±5% 2 8 10 1 0.0840$ 0.84$ P2.0JCT-ND2.2 ohms SM DK-863 0402 1/16W SM ±5% 1 4 10 1 0.0840$ 0.84$ P2.2JCT-ND43k ohms SM DK-863 0402 1/16W SM ±5% 1 4 10 1 0.0840$ 0.84$ P43KJCT-ND4.7k ohms SM DK-863 0402 1/16W SM ±5% 1 4 10 1 0.0840$ 0.84$ P4.7KJCT-ND

Inductance Type Co. Cat. Page # Size Series Tolerance Count Total Order Amount Unit Amount Unit Price Total Part Number27nH SM DK-660 402 ELJ-Nk ± 3% 2 8 10 1 0.6200$ 6.20$ PCD1617CT-ND

Frequency Family Co. Cat. Page # Size Load Capac. Series Tolerance Count Total Order Amount Unit Amount Unit Price Total Part Number16.000MHz SM CW403-ND 25 16pF SM N/A 1 4 5 1 4.7300$ 23.65$ CW403-ND11.092 MHz SM X089-ND 100 20pF SM N/A 1 4 10 1 0.3600$ 3.60$ X089-ND

Misc Count Total Order Amount Unit Amount Unit Price Total Part Number2.1 mm Power Jack 1 4 5 1 0.3800$ 1.90$ CP-102A-ND2x5 Male Ribbon Connector 2 8 10 1 1.4800$ 14.80$ 517-2410-6122TB (Mouser) Diode 20V, 2.5A 1 4 5 1 0.4000$ 2.00$ MBR0520LCT-ND1.8 V, .5A Power Regulator 1 4 5 1 0.8800$ 4.40$ 511-LF18ABV (Mouser)3.3 V, .5A Power Regulator 1 4 5 1 0.8800$ 4.40$ 511-LF18ABV (Mouser)

Total 124.55$

Page 10: BIWEEKLY REPORT - CS Course Webpagescourses.cs.tamu.edu/rgutier/cpsc483_s04/reports/wearable-progress2.pdfBIWEEKLY REPORT 29TH MARCH 2004 ... GANTT CHART ... Project Assignment Key

BOARD DESIGN- BOARD TEAM

Page 11: BIWEEKLY REPORT - CS Course Webpagescourses.cs.tamu.edu/rgutier/cpsc483_s04/reports/wearable-progress2.pdfBIWEEKLY REPORT 29TH MARCH 2004 ... GANTT CHART ... Project Assignment Key

Software Team

GANTT CHART-SOFTWARE TEAM

The following Gantt Chart describes the tasks remaining for the transmission/receiving part of thesoftware team. As it stands, we are significantly behind schedule in getting the transmission andreceiving code working. This is due mostly to difficulties in interfacing with the Chipcontransceiver chip.

Weeks

Tasks

03/22to

03/29

03/28to

04/04

04/04to

04/11

04/11to

04/18

04/18to

04/25

04/25to

05/02

05/02to

05/09

Receiving Coding andTesting

Transmission Testing

USB Coding and Testing

GUI Coding and Testing

Integration of all Code

Connect Sensors to BoardDesign (System I)

Debug System I

Connect Software to SystemI (System II)

Debug System II

Connect GUI to System II

Testing of all Components

Completion of Final Project

Project Assignment KeySofware Team

Team

Page 12: BIWEEKLY REPORT - CS Course Webpagescourses.cs.tamu.edu/rgutier/cpsc483_s04/reports/wearable-progress2.pdfBIWEEKLY REPORT 29TH MARCH 2004 ... GANTT CHART ... Project Assignment Key

SOFTWARE TEAM STATUS REPORT

The tasks which have been completed by the Software Team are as follows:

Conversion of single analog signals to digital signals tested Multiple analog inputs tested at various voltages (between 0 and 3.3V)

The tasks which remain to be completed are as follows:

Receiving coding and testing Transmission testing USB coding and testing GUI coding and testing Integration of all code Connect Sensors to Board Design (System I) Debug System I Connect Software to System I (System II) Debug System II Add GUI to System II Test Final System / Completion of Project

Currently we are writing and testing the receiving portion of the code. This is because wehave had little success in debugging the sending code, and receiving relies less on writingsuccessfully to the Chipcon registers and can be tested more easily.

The test setup involves connecting two Chipcon evaluation boards to two separatecomputers, and configuring them to send and receive data respectively. The SI, SO, SCLk, andCSn pins on the receiving Chipcon board can then be monitored by the Cygnal MCU without theMCU having to actively set any values on the Chipcon board. From the values of these 4 pins, wewill be able to reconstruct the packets sent by the sending Chipcon board and compare ourreconstructed packets with the reconstruction of the same packets done by the SmartRF softwareon the receiving computer.

CODE EXPLANATION

The main loop first initializes all registers in the Cygnal microcontroller necessary forcollection of analog signals and connection with the Chipcon chip. It then calls the routinesnecessary to initialize the Chipcon's registers (assuming that the Chipcon is connected to thecorrect I/O pins on the Cygnal MCU). The main control loop consists of several statements thatessentially receive information from the analog pins, and use these values to transmit a packetconsisting of the 3 digital signals (when all analog inputs have been polled).

The MCU register initialization code is contained in the config(), TIMER3_Init(), andADC_Init() functions. The Chipcon initialization code is contained in the Chipcon_Init() andChipcon_Start() functions.

Page 13: BIWEEKLY REPORT - CS Course Webpagescourses.cs.tamu.edu/rgutier/cpsc483_s04/reports/wearable-progress2.pdfBIWEEKLY REPORT 29TH MARCH 2004 ... GANTT CHART ... Project Assignment Key

The analog input is implemented using a timer that generates an interrupt after a set numberof processing cycles. Once this interrupt is generated, the 3 analog inputs are polled and stored tomemory as digital values with the ADC0_ISR() routine.

Transmission is done by first initializing the chipcon registers to specific values (done inthe Chipcon_Init() function) and then calling the TX_Packet() function. This function calls severalother functions which write to the Chipcon's FIFO transmission/receiving queue, and sendcommand signals to several registers to indicate that the data is ready to be transmitted.

A more detailed explanation of the individual functions can be found in the commentsincluded within the code.

GRAPHICAL USER INTERFACE

The basic idea is that the main form will divided into 4 parts: 3 real-time line graphs for the sensorreadings and one panel that displays the session's averages. The average readings can be saved to aCSV file.

COMPLETED TASKS:

Created a Help/About popup box.

Created and debugged the class that will store the data for the graph.

Started work on the graphic display.

NEED TO DO:

Debug the ReadingGraph class. (It's not drawing lines like it's supposed to, which is a bigproblem.)

Debug the frequency detector for the pulse rate graph.

Implement the save functionality.