Welcome, Guest

Author Topic: ekg emg shield meaning of output value  (Read 2143 times)

fiara

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
ekg emg shield meaning of output value
« on: March 21, 2017, 10:43:38 AM »
Hello all !

I am reading & seding the output value from the ekg - emg shield to the computer such that I dinamically plot it in a custom based .net application (using ms control from Windows Forms).

I read from the shield with int sensorValue = analogRead(analogInPin);

I noticed i get values from [0,1024]. Is there a way to convert these integers to voltage values such that I can label my Y-axis in my application ?

Thanks,
Fiara.

LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1812
  • Karma: +46/-2
Re: ekg emg shield meaning of output value
« Reply #1 on: April 06, 2017, 11:59:08 AM »
This is not very related to SHIELD-EKG-EMG. This depends on the main board that you use (what is the ADC of the board; what is the voltage of the board). It is a general analog read approach as described here: https://www.arduino.cc/en/Reference/analogRead

If you don't understand what is going on, please also let us know what is the specific board that you use with SHIELD-EKG-EMG.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

fiara

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: ekg emg shield meaning of output value
« Reply #2 on: April 06, 2017, 01:36:46 PM »
Hi !

Well, I am using the official Arduino Uno with the  ATmega328P microcontroller.

Fiara.

LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1812
  • Karma: +46/-2
Re: ekg emg shield meaning of output value
« Reply #3 on: April 07, 2017, 09:17:15 AM »
Hey,

The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution (i.e. 1024 different values). The important part is that the ADC is 10 bits, which means 2^10, which is 1024 (0-1023).

The other important part is that Arduino UNO works at 5V.

So:

1. You need to make sure to set SHIELD-EKG-EMG to 5V mode of operation.
2. To calculate voltage per unit:

5 volts / 1024 units = 0.0049 volts (4.9 mV) per unit.

Other boards have other ADC resolution (for example, 12-bit or 16-bit). Other boards can work at 3.3V too. That is why I needed to know the board to be able to calculate it.

Best regards,
Lub/OLIMEX
« Last Edit: April 07, 2017, 11:35:08 AM by LubOlimex »
Technical support and documentation manager at Olimex