This setup measures voltage differences over two electrodes. The first one is wired up between two resistors to ground the system at half voltage relative to the other components, so we can measure voltage differences in both directions. The second electrode is separated from the first with a very high resistor so that it tends to middle voltage as well (and doesn't make the ADC drift).

This setup measures voltage differences over two electrodes. The first one is wired up between two resistors to ground the system at half voltage relative to the other components, so we can measure voltage differences in both directions. The second electrode is separated from the first with a very high resistor so that it tends to middle voltage as well (and doesn't make the ADC drift).

+

+

The Arduino ADC lists the input voltage as a value from 0-1023. Since we want to centre the ground voltage somewhere in the middle, a voltage divider sends the base voltage to 2.5V. In the code, we convert this by subtracting 512 from the sensor reading to get a value around zero. The result is then scaled logarithmically before being sent to a 7-unit led array.

=== Version 1 ===

=== Version 1 ===

−

[[Image:EMG-version1.png]]

+

[[File:ECG-version1.png]]

<pre>

<pre>

Line 46:

Line 48:

}

}

</pre>

</pre>

+

+

[[Category:Projects]]

+

[[Category:Arduino]]

Latest revision as of 21:34, 10 September 2013

This setup measures voltage differences over two electrodes. The first one is wired up between two resistors to ground the system at half voltage relative to the other components, so we can measure voltage differences in both directions. The second electrode is separated from the first with a very high resistor so that it tends to middle voltage as well (and doesn't make the ADC drift).

The Arduino ADC lists the input voltage as a value from 0-1023. Since we want to centre the ground voltage somewhere in the middle, a voltage divider sends the base voltage to 2.5V. In the code, we convert this by subtracting 512 from the sensor reading to get a value around zero. The result is then scaled logarithmically before being sent to a 7-unit led array.