Closed weihangChen closed 4 years ago
Hi Marc,
Thank you for your message. I am not sure that I have fully understood your question. If the following does not clarify your doubts please do not hesitate to tell me so.
I assume that you are using a respiration sensor. If that's the case and you are looking to obtain data in specific units, such as electric tension (V), you just need to use the transfer function that you can find on the sensor datasheet. You may visit biosignalsplux website to check further information regarding this and other sensors.
To define one source you just need to set which port you wish to use, the resolution, the channel mask, and the frequency divisor. Regarding the channel mask, you can find some notes on the sample app. In most cases the channel mask should be set to 0x01. Other cases are applied, for example, when you are using digital sensors. These sensors require only one connection but provide multiple output signals. The number of desired output signals determines which channel mask must be used.
Best regards, Vanessa Ramos
Hi Vanessa
Now I have taken some pictures so hopefully it will make the communication easier. so step1, we do a connect to the device, and we only plugin the sensor to connector 1
step2: I modify the source code sources.add(new Source(1, 16, (byte) 0x01, 100));
in order to get analogdata out, and here the value range is 32712 to 32960, when i stretch the sensor, I assume the value should go up a lot, but it does not.
step3: So i replay the sensor with a small one, so you see the value when i do not bend it, it is 22768,
step4: I start to bend the sensor, and i get a value of 34656
so here are my questions
sources.add(new Source(1, 16, (byte) 0x01, 100));
Hi again,
Thank your for the detailed explanation and the pictures.
Answering your questions:
Those are two different sensors: piezoelectric respiration (PZT) sensor and an inductive respiration (RIP) sensor. Having different working principles it is normal to get the differences that you are seeing.
To get the converted values such as the ones on the graph that you sent you need to apply the following transfer function:
n - sampling resolution (16 in your case)
ADC - value samples from the sensor (such as 32712)
VCC - operating voltage (3V in your case)
Gpzt - sensor gain (which is 1 as it is not an amplified signal)
thanks, it works....
if possible would you mind taking a look at the other issue that I opened? it always got into an exception at start and the device stops sending info.plux.android.sample.DeviceActivity.FRAME
after 32 seconds
i have purchased the biosignalplux kit and experiment using the android app for the following code to get the frame
frameStr returns
but i have no idea how to interpret the analogdata number there, when i drag and press the sensor, in the opensignal app, i can see the value goes up and down but here in the android app, the number varies very little. also in the documentation it is not very clear about how the source should be defined.
sources.add(new Source(1, 16, (byte) 0x01, 100));
where is the documentation about the port and mask? here i dont see much, https://biosignalsplux.com/downloads/apis/PLUX_Android.pdf
the channel we have is RESP, while the sensor is connected to the first connector.