Page 5 of 6
Re: Torso position determined via accelerometer!
Posted: Sun Jun 17, 2012 11:48 am
by tschultz
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...
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.
Re: Torso position determined via accelerometer!
Posted: Sun Jun 17, 2012 11:31 pm
by MaxDarkside
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.
Re: Torso position determined via accelerometer!
Posted: Mon Jun 18, 2012 5:50 am
by BasementDwellingGeek
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.
Re: Torso position determined via accelerometer!
Posted: Mon Jun 18, 2012 12:44 pm
by MaxDarkside
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.
Re: Torso position determined via accelerometer!
Posted: Tue Jun 19, 2012 9:53 am
by MaxDarkside
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.
Re: Torso position determined via accelerometer!
Posted: Tue Jun 19, 2012 11:15 am
by MaxDarkside
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.
Re: Torso position determined via accelerometer!
Posted: Wed Jun 20, 2012 8:57 am
by BasementDwellingGeek
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.

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.
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.
Re: Torso position determined via accelerometer!
Posted: Wed Jun 20, 2012 9:42 am
by MaxDarkside
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).
Re: Torso position determined via accelerometer!
Posted: Wed Jun 20, 2012 9:51 am
by Mikeb1369
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!!!!
Re: Torso position determined via accelerometer!
Posted: Wed Jun 20, 2012 10:54 am
by BasementDwellingGeek
My firmware build
;Version, 1409, Build num, 0x21E, Build date, 20120404 13:16:08,
Mike1369: I replied in your other thread.
Re: Torso position determined via accelerometer!
Posted: Wed Jun 20, 2012 11:03 am
by MaxDarkside
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.
Re: Torso position determined via accelerometer!
Posted: Wed Jun 20, 2012 1:05 pm
by BasementDwellingGeek
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.
Re: Torso position determined via accelerometer!
Posted: Wed Jun 20, 2012 1:17 pm
by MaxDarkside
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...
Re: Torso position determined via accelerometer!
Posted: Wed Jun 20, 2012 1:22 pm
by BasementDwellingGeek
Be sure you straddle the hour change.
Re: Torso position determined via accelerometer!
Posted: Wed Jun 20, 2012 3:25 pm
by MaxDarkside
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...