Pulse Oximeters for home use

General Discussion on any topic relating to CPAP and/or Sleep Apnea.
User avatar
Roger...
Posts: 149
Joined: Thu Aug 18, 2005 12:01 pm
Location: San Jose, CA

Post by Roger... » Thu May 04, 2006 1:39 pm

Progress happens here, but it is often slower than I would like, so here is an update on the status of my Nellcor data project.
  • Cable to interface from Computer to Nellcor N-395: - DONE
  • Create a Simple COMM Program to capture Nellcor data: - DONE
  • Create a simple utility to parse Nellcor data into Excel: - DONE
  • Create code to interface with Encore PRO MS SQL Server: - DONE
As of today I’ve learned that the Nellcor will store ~45,762 oximeter readings. What this means is a Nellcor reading is taken every 4-seconds and is stored as a 6-field record kept alive by the Nellcor’s battery. With this amount of storage, a user can expect ~6-nights of readings will be stored before the memory begins to push data into oblivion.

Here are the stored fields:

Code: Select all

DATE - TIME                 %SPO2   BPM     PA     Status 
These records can be access by connecting a COMM program with text capture enabled on the PC to the rear port on the Nellcor, and then using the Nellcor’s PRINT command to push the historic data out the port. If the PRINT command isn’t enabled, the Nellcor just publishes the current record being recorded as it is read. When the PRINT command is pressed the entire memory of the NELLCOR is dumped into the PC where it can be saved.

Once the data is saved as a text file it can be read with any text-reading program like Window’s NotePad.

Data saved in the file will look something like this:

Code: Select all

N-395    VERSION 1.9.0.2     TREND  SpO2 Limit: 85-100%    PR Limit: 40-170BPM
                             ADULT          0SECS  
TIME                 %SPO2   BPM     PA
24-JAN-06 07:05:19    94      89     176
24-JAN-06 07:05:23    94      88     200
24-JAN-06 07:05:27    93      88     188
24-JAN-06 07:05:31    93      89      54
24-JAN-06 07:05:35    93      90      34
24-JAN-06 07:05:39    93      87      36
24-JAN-06 07:05:43    93      89      36
24-JAN-06 07:05:47    93      91      32
24-JAN-06 07:05:51    93      92      36
24-JAN-06 07:05:55    93      92      36
…
[SNIP]

or it will look like this if the Pulse Probe is not connected:
N-395    VERSION 1.9.0.2    CRC:2DF7  SpO2 Limit: 80-100%    PR Limit: 40-170BPM
                             ADULT            0SECS  
TIME                 %SPO2   BPM     PA     Status
03-MAY-06 11:22:22   ---     ---     ---    SO               
03-MAY-06 11:22:24   ---     ---     ---    SO               
03-MAY-06 11:22:26   ---     ---     ---    SO               
03-MAY-06 11:22:28   ---     ---     ---    SO               
03-MAY-06 11:22:30   ---     ---     ---    SO
…
[SNIP]
When this file is processed through a simple parsing process and saved as a CSV file to make is easier to use in EXCEL, the data then looks like this:

Code: Select all

24-JAN-06,07:05:19,94,89,176,85,40,170
24-JAN-06,07:05:23,94,88,200,85,40,170
24-JAN-06,07:05:27,93,88,188,85,40,170
24-JAN-06,07:05:31,93,89,54,85,40,170
24-JAN-06,07:05:35,93,90,34,85,40,170
24-JAN-06,07:05:39,93,87,36,85,40,170
24-JAN-06,07:05:43,93,89,36,85,40,170
24-JAN-06,07:05:47,93,91,32,85,40,170
24-JAN-06,07:05:51,93,92,36,85,40,170
24-JAN-06,07:05:55,93,92,36,85,40,170
…
[SNIP]
With the data in this format, it is easy for EXCEL to load it and create Charts or calculate other information by using the normal EXCEL functions.

What Next:
Right now my software is just a simple collection of utilities that use hard coded file paths. That will change as I finish work on a charting module that I can use to create graphs to view the data without EXCEL.

Unfortunately, this next phase of the project will take longer than doing the things that achieved this progress. It will take longer because I’ll need to roll my own graphing code if I hope to be able to stack chart data displays and use a mouse cursor to highlight and display connected time data. It will also be important to have an open code module when it is time to display Encore Pro’s event data in additional time connected graphs. Hopefully, by understanding what is happening with the OSA and how that is affecting the SPO2% and BPM, I’ll begin to get a better understanding of how the titration is helping, where it might need to be improved and how mask leaks are impacting the quality of my treatment.

So far none of this work has been hard or taken much time, but it is tedious work that only gets attention when life isn’t getting in the way. Still, it has been interesting and hopefully it will continue to be informative as more information is collected.

To see what a night of Nellcor data looks like in EXCEL, click on this link: Excel SPO2%-BPM Charts
Roger...

User avatar
NightHawkeye
Posts: 2431
Joined: Thu Dec 29, 2005 11:55 am
Location: Iowa - The Hawkeye State

Post by NightHawkeye » Thu May 04, 2006 1:52 pm

Excellent, Roger. Good to know progress is being made.
Roger... wrote: What this means is a Nellcor reading is taken every 4-seconds and is stored as a 6-field record kept alive by the Nellcor’s battery. With this amount of storage, a user can expect ~6-nights of readings will be stored before the memory begins to push data into oblivion.
I was trying to correlate your expected 6 nights with the 2 nights that I actually see. I think it might mean that the machine is always recording data, regardless of whether or not a probe is connected, and whether or not it is actually turned on. Therefore, the best you can do is two nights of data. I could be wrong though. . . Maybe, the Score software just doesn't download all of the available data.

Regards,
Bill

User avatar
Roger...
Posts: 149
Joined: Thu Aug 18, 2005 12:01 pm
Location: San Jose, CA

Post by Roger... » Thu May 04, 2006 2:28 pm

NightHawkeye wrote:I was trying to correlate your expected 6 nights with the 2 nights that I actually see.

I think it might mean that the machine is always recording data, regardless of whether or not a probe is connected, and whether or not it is actually turned on. Therefore, the best you can do is two nights of data. I could be wrong though. . . Maybe, the Score software just doesn't download all of the available data.
Hello Bill,
Yes, progress feels good.

When I read the documentation on the Nellcor N-395, it showed it recorded a reading every two seconds, but when the PC was connected to the Nellcor and the PRINT command wasn't pushing data out of the port, the PC showed the Nellcor was only creating a record every 4-seconds. This is also how it is keeping history and I don’t think it is doing anything more than taking the four-seconds to get an averaged result and to give the BPM counts improved accuracy with the longer time frame.

Why the manual says every 2-seconds is unknown, but every 4-seconds is more than enough information for oximeter information. 4-Seconds also correlates to the acquisition time for the probe. My probe never acquires data in 2-Seconds. Most often it take 4 or more seconds once it is first connected, and about 4-seconds if I move it enough to make it reacquire the pulse. Maybe someplace along the way the machine's codes got out of synch with the documentation and with the docs probably not being maintained on these older machines any longer, so the different information doesn’t go away. If the change was made after the manuals were originally produced, it probably was to improve the BPM accuracy. I came to that conclusion after watching the Beat Waves on the monitor. While they look similar, I can see where rate can change their duration and if rate is changing, the BPM rate calculation was probably causing an unnecessary error potential when the patient moves around and moves the probe.

To get to the 6-nights of 8-hour recordings, I used the number of seconds in an 8-hour period, 28,800, and divided that by 4 to reduce the time period to a record count value that gives us 7,200 records for a night. Then I looked at how many records I pulled from the core dump and removed all the title header and blank reading records. This left me with a conservative collection space of 45,782 records. Then using the nightly record count of 7,200 I find we can get 6.4 nights of readings from the machine before the data begins to truncate. This will probably be a soft number if the alarm gets hit a lot, but I don't know for sure because my alarms are out of my usual range.
Roger...

User avatar
snork1
Posts: 888
Joined: Thu Apr 28, 2005 9:36 pm
Location: Kirkland WA

Post by snork1 » Thu May 04, 2006 2:38 pm

Well I am more than a little impressed, Roger ....and out...

I have noticed the machine seems to keep recording even when its turned off, or even unplugged. In fact if I don't check the data in a timely manner, it rolls off the end of memory pretty quickly.

Now that I have a N-395 I am certainly paying closer attention to this thread. Is there a pin-out/wire chart listed in this thread for the output connector? Can this serial out, once a cable is made, be run through a serial to USB adapter cable like I do with my PB-420E?

The manuals mention "approved printers". Any chance the data could be pushed out to a "standard" printer through that serial out and directly into a USB printer via a serial to USB adapter? I am thinking in terms of an "old" Epson ink jet color printer that only works in black and white that I could dedicate to printing from the Nellcor until I get a better download interface.

Any ideas or answers?

Thanks!
Remember:
What you read above is only one data point based on one person's opinion.
I am not a doctor, nor do I even play one on TV.
Your mileage may vary.
Follow ANY advice or opinions at your own risk.
Not everything you read is true.

User avatar
Roger...
Posts: 149
Joined: Thu Aug 18, 2005 12:01 pm
Location: San Jose, CA

Post by Roger... » Thu May 04, 2006 4:30 pm

snork1 wrote:I have noticed the machine seems to keep recording even when its turned off, or even unplugged. In fact if I don't check the data in a timely manner, it rolls off the end of memory pretty quickly.
I didn't observe the machine recording when it was turned off. It will record when running on its internal battery through. I also found working with the internal graphing tools to be miserable. In fact if those were the only tools I had to work with, I wouldn't be overly happy with the oximeter.
snork1 wrote: Now that I have a N-395 I am certainly paying closer attention to this thread. Is there a pin-out/wire chart listed in this thread for the output connector? Can this serial out, once a cable is made, be run through a serial to USB adapter cable like I do with my PB-420E?
Yes, the pinouts are listed near the bottom of page-1 of this thread or at the top of page-2. In my message at the very top of page-2 I've outlined them in quotes

Here is what you'll find:
NightHawkeye wrote: Wiring it is pretty easy, Roger, so long as you don't mind soldering. The N-200 and N-395 use the same 15-pin interface. You only need to connect three wires to the computer 9-pin RS-232 interface.

Materials needed:
3-wire cable (I used 4-wire telephone cable.)
9-pin female DB-9 connector
15-pin male DB-15 connector

Hook-up
pin 2 of DB-9 connector to pin 3 of DB-15 connector
pin 3 of DB-9 connector to pin 2 of DB-15 connector
pin 5 of DB-9 connector to pin 5 of DB-15 connector

Note that pins 2 and 3 are reversed between connectors, just like a null modem cable. These are the RS-232 transmit and receive lines. Reversing them means that the transmit line from the N-395 connects to the receive line of your PC, and vice-versa. Pin 5 is simply the ground. One could shield the cable, but I'm using an eight foot cable which works fine without shielding.

For a cable, I think the link on page-1 where Bill mentioned they have a source is a great place to get one end of the cable 15-pin male cable. Radio shack is the place for the female DB-9 connector and connector jacket housing.
NightHawkeye wrote:... here's a place that sells an entire db-15 to db-15 cable cheap. (Shipping's reasonable, too.) You could lop off the connector from one end and replace it with a db-9.
http://www.winfordeng.com/products/ext15.php
Entire cost should be less than buying a simple RS-232 cable from RS. Of course, there's still the issue of waiting another week or two for the cable to arrive.
I bought my cable from them even after getting the connectors because I had trouble getting a modular connector to fit in the back of Nellcor. The cable above is an injection molded cable and doesn't have the housing protrusions that keep it from going into the Nellcor's rear panel DB-15 port. Cable arrived in 3-days from order, but shipping cost more than the cable. Go figure!

If you use the cable from Bill's source, I found the Red wire is DB-15 #3, Brown is DB-15 #2 and Yellow is DB-15 #5

If you use that same cable and because there are only three wires to fiddle with I found it only took about 15-minutes to splice in the DB-9 connector once I got started.
snork1 wrote: The manuals mention "approved printers". Any chance the data could be pushed out to a "standard" printer through that serial out and directly into a USB printer via a serial to USB adapter? I am thinking in terms of an "old" Epson ink jet color printer that only works in black and white that I could dedicate to printing from the Nellcor until I get a better download interface.
I think any standard serial port printer would work, but I don't know of many Serial port printers. In fact all the printers I have use a parallel port or network connection. However, any PC with the cable connected will accept the data dump. Initially I tried to use Hyper-Terminal, but it kept locking up my W98 Laptop. That is when I used a jumbled together quick COMM program. If you get stuck on the COMM program, rattle my cage and I'll see if I can make the program work without the bailing wires I used here. I can even cobble out a simple GUI to make the parsing utility work as well if you decide to go that far.
Roger...

User avatar
dsm
Posts: 6996
Joined: Mon Jun 20, 2005 6:53 am
Location: Near the coast.

Post by dsm » Fri May 05, 2006 2:43 am

Roger,

Great work glad you have made such good progress.

I am still wrapping up other projects & still haven't got started with my Nellcor.
I have managed to get some PO probes for my Ohmeda as well.

Cheers

DSM
xPAP and Quattro std mask (plus a pad-a-cheek anti-leak strap)