Converting BITalino’s Output Values into their Real Units

Connection, ECG, EMG, EDA, etc.
PGoncalves
Posts: 48
Joined: Wed Mar 12, 2014 2:13 pm

Converting BITalino’s Output Values into their Real Units

Postby PGoncalves » Wed Mar 12, 2014 4:04 pm

The following equations may be used to convert the output values from BITalino into their standard units of measure.

EMG [-1.65 mV : 1.65 mV]

EMGV = (EMGB * Vcc / 2^n - Vcc / 2) / GEMG
EMGmV = EMGV * 1000

Where:
EMGV – EMG value in Volts (V)
EMGmV - EMG value in miliVolts (mV)
EMGB – EMG value obtained from BITalino
Vcc – Operating Voltage (V)
n – number of bits (bit)
GEMG – EMG Sensor Gain

Values:
Vcc = 3.3 (V)
GEMG = 1000
n = See Number of Bits section

ECG [-1.5 mV : 1.5 mV]

ECGV = (ECGB * Vcc / 2^n - Vcc / 2) / GECG
ECGmV = ECGV * 1000

Where:
ECGV – ECG value in Volts (V)
ECGmV - ECG value in miliVolts (mV)
ECGB – ECG value obtained from BITalino
Vcc – Operating Voltage (V)
n – number of bits (bit)
GECG – ECG Sensor Gain

Values:
Vcc = 3.3 (V)
GECG = 1100
n = See Number of Bits section

EDA [1 µS : ∞ µS]

RMOhm = 1 - EDAB / 2^n
EDAµS = 1 / RMOhm

Where:
EDAµS – EDA value in micro Siemens (µS)
EDAB – EDA value obtained from BITalino
RMOhm - Sensor resistance in megaOhms(MOhm)
n – number of bits (bit)

Values:
n = See Number of Bits section

ACC [-3 g : 3 g]

ACCg = 2 * ((ACCB - Cm) / (CM - Cm)) - 1

Where:
ACCg – ACC value in g-force (g)
ACCB – ACC value obtained from BITalino
Cm – Calibration Value (Minimum)
CM – Calibration Value (Maximum)

Values:
Cm* = 208
CM* = 312

*Cm and CM may be calculated by slow rotation of the board (or accelerometer itself) to force the accelerometer’s axis to rotate 360º.

LUX [0 % : 100 %]

LUX% = 100 * (LUXB / 2^n)

Where:
LUX% – LUX value in percentage (%)
LUXB – LUX value obtained from BITalino
n – number of bits (bit)

Values:
n = See Number of Bits section

Number of Bits: The number of bits for each channel depends on its position in the "acquire channel" request (ex. BITalino().start([0,2,3,5])):
- If it is one of the four initial channels, its resolution will be: 10 bit.
- If it is one of the two last channels, its resolution will be: 6 bit.
Last edited by PGoncalves on Fri May 23, 2014 3:32 pm, edited 8 times in total.

pires
Posts: 32
Joined: Wed Sep 18, 2013 2:20 pm
Contact:

Re: Converting BITalino’s Output Values into their Real Unit

Postby pires » Mon Mar 17, 2014 12:12 am

We're missing EDA (Electrodermal activity). Can you confirm the following, please?

EDA [0 uS : 1 uS]

EDAuS = EDAB * GEDA / 10^6

Where:
EDAuS = EDA value in uS (micro-Siemens)
EDAB = EDA value obtained from BITalino
GEDA = EDA Sensor Gain

Values:
GEDA = 1031.25

PGoncalves
Posts: 48
Joined: Wed Mar 12, 2014 2:13 pm

Re: Converting BITalino’s Output Values into their Real Unit

Postby PGoncalves » Mon Mar 17, 2014 5:15 pm

EDA added to main post.

pires
Posts: 32
Joined: Wed Sep 18, 2013 2:20 pm
Contact:

Re: Converting BITalino’s Output Values into their Real Unit

Postby pires » Mon Mar 17, 2014 7:04 pm

PGoncalves wrote:EDA added to main post.


The formula you're providing doesn't make sense to me. Imagine the following examples:

EDAµS = 1 / (1 - 1023 / 1023) = 1 / 0 = Can't divide by zero
EDAµS = 1 / (1 - 512 / 1023) = 1 / 0.5 = 2µS, so the range maximum limit is crossed
EDAµS = 1 / (1 - 0 / 1023) = 1 / 1 = 1µS, so the minimum readable value actually maps to the maximum possible result?

Can you clarify, please?

PGoncalves
Posts: 48
Joined: Wed Mar 12, 2014 2:13 pm

Re: Converting BITalino’s Output Values into their Real Unit

Postby PGoncalves » Tue Mar 18, 2014 2:34 pm

The formula you're providing doesn't make sense to me. Imagine the following examples:

EDAµS = 1 / (1 - 1023 / 1023) = 1 / 0 = Can't divide by zero
EDAµS = 1 / (1 - 512 / 1023) = 1 / 0.5 = 2µS, so the range maximum limit is crossed
EDAµS = 1 / (1 - 0 / 1023) = 1 / 1 = 1µS, so the minimum readable value actually maps to the maximum possible result?

Can you clarify, please?


You stand correct, the previously inserted range was wrong ([0 µS : 1 µS] - now correctly updated to [1 µS : ∞ µS] in the main post).

Moreover, the formula for EDA may be represented as:

RMOhm = 1 - EDAB / 2^n
EDAµS = 1 / RMOhm

Where:
EDAµS – EDA value in micro Siemens (µS)
EDAB – EDA value obtained from BITalino
RMOhm - Sensor resistance in megaOhms(MOhm)
n – number of bits (bit)

Values:
n = 10 (bit)

Therefore, RMOhm is a negative slope line with a minimum value of 0 (MOhm) for EDAB = 1023 and a maximum value of 1 (MOhm) for EDAB = 0.
Such renders EDAµS to a growing function (non-linear grow with EDAB) with a minimum value of 1 (µS) for EDAB = 0 and a maximum value of ∞ for EDAB = 1023.

pires
Posts: 32
Joined: Wed Sep 18, 2013 2:20 pm
Contact:

Re: Converting BITalino’s Output Values into their Real Unit

Postby pires » Tue Mar 18, 2014 3:35 pm

Thank you, PGoncalves. It's perfectly clear now :-)

Phil
Posts: 5
Joined: Fri Jun 20, 2014 11:17 am

Re: Converting BITalino’s Output Values into their Real Unit

Postby Phil » Wed Jun 25, 2014 9:30 am

Hi and thank you for these formulas.
I have one question though about the number of bits. Do I understand that correctly that if I just connect the sensors and using the opensignals software I take 10 bit (since you have written "initial")?

I am a bit confused about how those channels could be changed. Is that if I solder a sensor to analog input 5 or 6 or can that happen in software as well?

Thank you very much for your anwer.
Phil

BITalino
Site Admin
Posts: 567
Joined: Tue Aug 27, 2013 3:47 pm

Re: Converting BITalino’s Output Values into their Real Unit

Postby BITalino » Wed Jun 25, 2014 1:05 pm

Phil wrote:Hi and thank you for these formulas.
I have one question though about the number of bits. Do I understand that correctly that if I just connect the sensors and using the opensignals software I take 10 bit (since you have written "initial")?

I am a bit confused about how those channels could be changed. Is that if I solder a sensor to analog input 5 or 6 or can that happen in software as well?

Thank you very much for your anwer.
Phil


Hi Phil,

We've posted the generic formulas in attempt to allow people to apply them even when using BITalino sensors with 3rd-party systems having higher-resolution ADCs.

In BITalino channels A1-A4 have 10-bit and channels A5-A6 have 6-bit resolution. Its not a user-driven change but instead a feature of the firmware on the MCU.

Best regards,
The BITalino Team

Phil
Posts: 5
Joined: Fri Jun 20, 2014 11:17 am

Re: Converting BITalino’s Output Values into their Real Unit

Postby Phil » Wed Jul 09, 2014 1:56 pm

Hi and thank you for your answer.

Do I understand correctly that the values in the 0-1023 range are the most sensitive information that I can get? E.g. when I convert the EMG values to µV one step results in a change of over 3.5 µV. Is there any way to get a higher resolution with this sensor or is this the highest precision possible? I just want to cover all bases and check if I understand and calculate correctly :D

Thank you for your answer
Phil

BITalino
Site Admin
Posts: 567
Joined: Tue Aug 27, 2013 3:47 pm

Re: Converting BITalino’s Output Values into their Real Unit

Postby BITalino » Wed Jul 09, 2014 8:25 pm

Phil wrote:Hi and thank you for your answer.

Do I understand correctly that the values in the 0-1023 range are the most sensitive information that I can get? E.g. when I convert the EMG values to µV one step results in a change of over 3.5 µV. Is there any way to get a higher resolution with this sensor or is this the highest precision possible? I just want to cover all bases and check if I understand and calculate correctly :D

Thank you for your answer
Phil


Hi Phil,

Yes, 0-1023 is the highest resolution possible. The EMG sensor has an analog output, reason for which if you use it with a system with an ADC with higher resolution, you'll be able to have more values. One example of such equipment is the biosignalsplux line, for which you can find additional information at: http://www.biosignalsplux.com

Best regards,
The BITalino Team


Return to “Sensors”




cron