Torso position determined via accelerometer!

General Discussion on any topic relating to CPAP and/or Sleep Apnea.
User avatar
tschultz
Posts: 257
Joined: Sun Dec 19, 2010 9:36 pm
Location: Toronto, ON, Canada, Earth, Milky Way Galaxy

Re: Torso position determined via accelerometer!

Post by tschultz » Sun Jun 17, 2012 11:48 am

MaxDarkside wrote:Yes, BDG, I would say for me this accelerometer information is as important as the data from my Zeo, maybe more so. Below is a shot of my events, mask pressure and my positions, with "on my back" noted by the high red line on the accel graph at the bottom, inside the blue boxes. Being on my back explains 100% of my apnea events. Now to seek out a large Pugsy-recommended buck-wheat pillow to see if I can prevent or reduce my rolling over...

Image

I'll come up with a scheme to chompulate the XYZ transitions and sum their quantity per night as a metric of "restfulness" or "sleep tranquility". Some movement is necessary for fluid dynamics in the body, but last night the number of my position changes were higher than the others.
Good work!

What you are seeing is what I expect to see as well. I am quite sure that the majority of my events are when I am on my back. I'm also looking forward to seeing what happens with body temperature as I am hoping that may give me more information when I next see my family doctor.

Yesterday I bought a pillow that is "supposed" to be cooler as it wicks away some heat and sweat. Last night was typical so will have to see if the pillow makes any difference.

_________________
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: Currenlty using Auto 15-20, EPR 1 with medium response; 95% pressure is 16.8
Adjusting to life with OSA and being pressurized each night ...

User avatar
MaxDarkside
Posts: 1199
Joined: Sun Dec 18, 2011 4:21 pm
Location: Minneapolis, MN

Re: Torso position determined via accelerometer!

Post by MaxDarkside » Sun Jun 17, 2012 11:31 pm

Pugsy wrote:I am leaning towards the small body pillow offered at 72 beans.
Thanks for all the pillow info, Pugsy. Of course, I could use those cute pink fuzzy handcuffs my wife got us and shackle my left hand to the left side of the bed to keep me from rolling over (snickers... JUST KIDDING about the handcuffs! Just being silly. LOL)
tschultz wrote:Good work! ... I'm also looking forward to seeing what happens with body temperature
Thanks! This accelerometer records temperature in each data file, but after some experimentation with its configuration, I find the temp recorded is only when the device is started at the beginning of sleep, not re-measured with each file recorded (drat) because otherwise I could have it start a new file every few minutes and get a regular body temp reading, well, head temp since I'm wearing it on my head (LOL), but alas no.

_________________
Mask: Quattro™ FX Full Face CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: CMS-50E Oximeter, Zeo Bedside, Software: Comm'l grade AI analytics server & tools & SleepyHead
Do or Die... Sleep Apnea killed me, but I came back. Click for my story
Please visit my My Apnea Analytics blog. Maybe we can help each other.
54 yrs, 6' 1", 160->172 lbs

User avatar
BasementDwellingGeek
Posts: 262
Joined: Sat Nov 05, 2011 12:54 pm
Location: N Billerica, MA, USA
Contact:

Re: Torso position determined via accelerometer!

Post by BasementDwellingGeek » Mon Jun 18, 2012 5:50 am

I find the temp recorded is only when the device is started at the beginning
That is unfortunate. My X16-1c quit last night in the middle of writing a sample. The logger reported
;Temperature, 19.50, deg C, Vbat, 1216, mv
at the start. I was thinking about reducing samples per file to cause more to be written and find out what voltage is too low. But since temp and volts are on the same line it seems kind of moot.

_________________
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: own home grown SW to make it all work together, SH too.
bdg
(PR System One REMstar Pro CPAP Machine with C-Flex Plus and related humidifier as backup)

There are two types of people in this world. Those that can extrapolate from incomplete data

User avatar
MaxDarkside
Posts: 1199
Joined: Sun Dec 18, 2011 4:21 pm
Location: Minneapolis, MN

Re: Torso position determined via accelerometer!

Post by MaxDarkside » Mon Jun 18, 2012 12:44 pm

BasementDwellingGeek wrote:That is unfortunate. My X16-1c quit last night in the middle of writing a sample. The logger reported
;Temperature, 19.50, deg C, Vbat, 1216, mv
at the start. I was thinking about reducing samples per file to cause more to be written and find out what voltage is too low. But since temp and volts are on the same line it seems kind of moot.
You can try my experiment by setting the records per file to a small number, say 100 or 250, and running it for a while and see if it is read once when you push the little black button and if your temp and voltage remain unchanged file-to-file.

_________________
Mask: Quattro™ FX Full Face CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: CMS-50E Oximeter, Zeo Bedside, Software: Comm'l grade AI analytics server & tools & SleepyHead
Do or Die... Sleep Apnea killed me, but I came back. Click for my story
Please visit my My Apnea Analytics blog. Maybe we can help each other.
54 yrs, 6' 1", 160->172 lbs

User avatar
MaxDarkside
Posts: 1199
Joined: Sun Dec 18, 2011 4:21 pm
Location: Minneapolis, MN

Re: Torso position determined via accelerometer!

Post by MaxDarkside » Tue Jun 19, 2012 9:53 am

BasementDwellingGeek wrote:
I find the temp recorded is only when the device is started at the beginning
That is unfortunate.
I'm having an email exchange with them and I've asked if there is some way to get the temperature read when each file is created, or if not, would they please consider adding that feature.

_________________
Mask: Quattro™ FX Full Face CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: CMS-50E Oximeter, Zeo Bedside, Software: Comm'l grade AI analytics server & tools & SleepyHead
Do or Die... Sleep Apnea killed me, but I came back. Click for my story
Please visit my My Apnea Analytics blog. Maybe we can help each other.
54 yrs, 6' 1", 160->172 lbs

User avatar
MaxDarkside
Posts: 1199
Joined: Sun Dec 18, 2011 4:21 pm
Location: Minneapolis, MN

Re: Torso position determined via accelerometer!

Post by MaxDarkside » Tue Jun 19, 2012 11:15 am

MaxDarkside wrote:I'm having an email exchange with them and I've asked if there is some way to get the temperature read when each file is created, or if not, would they please consider adding that feature.
Vendor claims the temp is read when each file is created. I must have done some config wrong? I'll try my experiment again.

_________________
Mask: Quattro™ FX Full Face CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: CMS-50E Oximeter, Zeo Bedside, Software: Comm'l grade AI analytics server & tools & SleepyHead
Do or Die... Sleep Apnea killed me, but I came back. Click for my story
Please visit my My Apnea Analytics blog. Maybe we can help each other.
54 yrs, 6' 1", 160->172 lbs

User avatar
BasementDwellingGeek
Posts: 262
Joined: Sat Nov 05, 2011 12:54 pm
Location: N Billerica, MA, USA
Contact:

Re: Torso position determined via accelerometer!

Post by BasementDwellingGeek » Wed Jun 20, 2012 8:57 am

For the last two nights I've had my samplesPerFile at 200. This generated approximately 150 files. I spot checked and most were around 190 seconds long, others only 50 seconds due to more activity. All that I checked had temperature and voltage. Somehow I manged to pooch the time with the configuration change which caused a bit of grief assimilating the data.

Image
The JAVA tool will allow loading a bunch of the CSV files and plotting the temperature but doesn't give and view of battery voltage.

I added some more code to my application to merge the bunch of files and few more check boxes to allow showing Temp. or battery or both. Here we see a 3 OA cluster seemingly triggered by a position change. SpO2 peaked at 99 and bottomed out at 86. Made me thing of Get Smart.
Image

Image

Image

Image

I'm not sure that I don't have a bug. The first night it took 40 minutes for the temperature to change from 21 degrees C to 34.75. There were intermediate steps. After the initial change the temperature behaved more rationally, up or down a degree or two at a time for the rest of the night. Night two had in initial temperature of 26, jumped to 35.75 at one hour and waffled around between 35.75 and 37.5 for the rest of the night.

The battery voltage waffled much more than the temperature.

_________________
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: own home grown SW to make it all work together, SH too.
bdg
(PR System One REMstar Pro CPAP Machine with C-Flex Plus and related humidifier as backup)

There are two types of people in this world. Those that can extrapolate from incomplete data

User avatar
MaxDarkside
Posts: 1199
Joined: Sun Dec 18, 2011 4:21 pm
Location: Minneapolis, MN

Re: Torso position determined via accelerometer!

Post by MaxDarkside » Wed Jun 20, 2012 9:42 am

BasementDwellingGeek wrote:...All that I checked had temperature and voltage.
Good that yours is working, thanks. I'll inform the vendor your temps change, mind don't. My unit may be defective or I have a different firmware that has a bug (pretty much the words of the vendor in an email yesterday).

_________________
Mask: Quattro™ FX Full Face CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: CMS-50E Oximeter, Zeo Bedside, Software: Comm'l grade AI analytics server & tools & SleepyHead
Do or Die... Sleep Apnea killed me, but I came back. Click for my story
Please visit my My Apnea Analytics blog. Maybe we can help each other.
54 yrs, 6' 1", 160->172 lbs

Mikeb1369
Posts: 4
Joined: Wed Jun 20, 2012 9:46 am

Re: Torso position determined via accelerometer!

Post by Mikeb1369 » Wed Jun 20, 2012 9:51 am

For EncoreAnywhere, does anyone have an idea on what the resolution is of the detailed breath by breath data (5hz, 1hz, 0.01 hz?).
How much data is captured. How often is it captured? One night every 7 days? Is it on the smartCard or is it wireless?
How long is that data stored? Forever? 1 year? 1 month?

Any answers to any one of these questions is most appreciated!!!!

User avatar
BasementDwellingGeek
Posts: 262
Joined: Sat Nov 05, 2011 12:54 pm
Location: N Billerica, MA, USA
Contact:

Re: Torso position determined via accelerometer!

Post by BasementDwellingGeek » Wed Jun 20, 2012 10:54 am

My firmware build
;Version, 1409, Build num, 0x21E, Build date, 20120404 13:16:08,
Mike1369: I replied in your other thread.

_________________
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: own home grown SW to make it all work together, SH too.
bdg
(PR System One REMstar Pro CPAP Machine with C-Flex Plus and related humidifier as backup)

There are two types of people in this world. Those that can extrapolate from incomplete data

User avatar
MaxDarkside
Posts: 1199
Joined: Sun Dec 18, 2011 4:21 pm
Location: Minneapolis, MN

Re: Torso position determined via accelerometer!

Post by MaxDarkside » Wed Jun 20, 2012 11:03 am

BasementDwellingGeek wrote:My firmware build
;Version, 1409, Build num, 0x21E, Build date, 20120404 13:16:08,
Mine: ;Version, 1409, Build num, 0x21E, Build date, 20120404 13:16:08
Thanks. Hummm... same as mine. Mystery deepens... Maybe I have a temp sensor issue. It reads on button push, but fails thereafter, returning the same value. My batt voltage varies file to file.

_________________
Mask: Quattro™ FX Full Face CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: CMS-50E Oximeter, Zeo Bedside, Software: Comm'l grade AI analytics server & tools & SleepyHead
Do or Die... Sleep Apnea killed me, but I came back. Click for my story
Please visit my My Apnea Analytics blog. Maybe we can help each other.
54 yrs, 6' 1", 160->172 lbs

User avatar
BasementDwellingGeek
Posts: 262
Joined: Sat Nov 05, 2011 12:54 pm
Location: N Billerica, MA, USA
Contact:

Re: Torso position determined via accelerometer!

Post by BasementDwellingGeek » Wed Jun 20, 2012 1:05 pm

How many files were in your test? How long a time frame? I noted a consistent reading for 40 to 60 minutes which baffled me a bit. Suddenly the temp jumped from room temp to body temp without ramping up along the way. After looking at the data again in the JAVA tool I kind of wonder if the temperature is only updated on the hour. Is it a bug or was there some other reason to only sample the temperature on the hour? I did a dump on the headers of the csv files and feel pretty confident that the temperature is only be sample on the hour. They should be able to confirm.

I broke out the magnifying glass and examined the numbers on the chips when I changed the battery. Some were too small to read but I figured out most of the the larger parts. U1, 2c32a, is a Xilinx 32 macrocell pld, glue logic. U8, 345b Accelerometer. U2, c8051f340, micro-controller. U5, ds3231s, real-time clock with txco. It seems sensible that they would be using the "free" temperature sensor that is integral to this chip.

This excerpt from the ds3231s datasheet:
Temperature Registers (11h–12h)
Temperature is represented as a 10-bit code with a resolution
of 0.25°C and is accessible at location 11h and
12h. The temperature is encoded in two’s complement
format. The upper 8 bits, the integer portion, are at
location 11h and the lower 2 bits, the fractional portion,
are in the upper nibble at location 12h. For example,
00011001 01b = +25.25°C. Upon power reset, the registers
are set to a default temperature of 0°C and the
controller starts a temperature conversion. The temperature
is read on initial application of VCC or I2C access
on VBAT and once every 64 seconds afterwards. The
temperature registers are updated after each user-initiated
conversion and on every 64-second conversion.
The temperature registers are read-only.
suggests that the temperature is available for update about once minute. How often the micro-controller reads it the telling part.

_________________
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: own home grown SW to make it all work together, SH too.
Last edited by BasementDwellingGeek on Thu Jun 21, 2012 4:36 am, edited 2 times in total.
bdg
(PR System One REMstar Pro CPAP Machine with C-Flex Plus and related humidifier as backup)

There are two types of people in this world. Those that can extrapolate from incomplete data

User avatar
MaxDarkside
Posts: 1199
Joined: Sun Dec 18, 2011 4:21 pm
Location: Minneapolis, MN

Re: Torso position determined via accelerometer!

Post by MaxDarkside » Wed Jun 20, 2012 1:17 pm

BasementDwellingGeek wrote:How many files were in your test? How long a time frame? I noted a consistent reading for 40 to 60 minutes which baffled me a bit.
My test was 32 minutes, 20 files. They seem to think it should have changed during that time, but your anecdotal evidence above may suggest that my test was not long enough and there may indeed be a common bug. I'll give it a try again, only longer this time...

_________________
Mask: Quattro™ FX Full Face CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: CMS-50E Oximeter, Zeo Bedside, Software: Comm'l grade AI analytics server & tools & SleepyHead
Do or Die... Sleep Apnea killed me, but I came back. Click for my story
Please visit my My Apnea Analytics blog. Maybe we can help each other.
54 yrs, 6' 1", 160->172 lbs

User avatar
BasementDwellingGeek
Posts: 262
Joined: Sat Nov 05, 2011 12:54 pm
Location: N Billerica, MA, USA
Contact:

Re: Torso position determined via accelerometer!

Post by BasementDwellingGeek » Wed Jun 20, 2012 1:22 pm

Be sure you straddle the hour change.

_________________
Mask: Swift™ FX Nasal Pillow CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: own home grown SW to make it all work together, SH too.
bdg
(PR System One REMstar Pro CPAP Machine with C-Flex Plus and related humidifier as backup)

There are two types of people in this world. Those that can extrapolate from incomplete data

User avatar
MaxDarkside
Posts: 1199
Joined: Sun Dec 18, 2011 4:21 pm
Location: Minneapolis, MN

Re: Torso position determined via accelerometer!

Post by MaxDarkside » Wed Jun 20, 2012 3:25 pm

BasementDwellingGeek wrote:Be sure you straddle the hour change.
Bingo! You got it. I won't show all the file headers, but here's the first, the one that changed but on the next hour the temp didn't change (it was in m shirt pocket) I find that odd, because I would not think my body temp kept with 0.25C (0.45 F). Maybe it did.
Start:
;Start_time, 2012-06-20, 13:25:09.001
;Temperature, 23.25, deg C, Vbat, 1410, mv

First Temp change:
;Start_time, 2012-06-20, 14:06:02.356 <==== BINGO... on the Hour.
;Temperature, 31.75, deg C, Vbat, 1406, mv

End:
;Start_time, 2012-06-20, 15:09:17.230
;Temperature, 31.75, deg C, Vbat, 1415, mv
I'll monkey with it a bit more...

_________________
Mask: Quattro™ FX Full Face CPAP Mask with Headgear
Humidifier: S9™ Series H5i™ Heated Humidifier with Climate Control
Additional Comments: CMS-50E Oximeter, Zeo Bedside, Software: Comm'l grade AI analytics server & tools & SleepyHead
Do or Die... Sleep Apnea killed me, but I came back. Click for my story
Please visit my My Apnea Analytics blog. Maybe we can help each other.
54 yrs, 6' 1", 160->172 lbs