I use SparFan AD8232 and Arduino nano BLE 3.3 for getting ECG data
I get data from sample code
// send the value of analog input 0:
Serial.println(analogRead(A0));
However, there is some waveform data that seems to exceed 1023, in which case the data value falls within 10 bits. Is there a simple way to reduce the sensitivity, or is it possible to make an appropriate calibration so that max falls within 1024?
The easiest solution is probably to map() it to 0-1023 but you'd be throwing-away 2-bits of resolution. (Probably not a big deal in this application where you have noise & variability anyway.)
In the above code, the analogRead() function is used to read data from analog pin 0, and the analogRead() function returns a value that assumes a range of 0 to 1023.
However, in this case, I assume that when there is an analog value input at the power level, the upper bits of the portion exceeded by the error are discarded by the comparator processing on sparkfan's board due to the ref level issue.
Therefore, I think there is a way to lower the analog input value by voltage divider or to increase the ref voltage of the comparator.
"The Nano 33 BLE has a 12-bit ADC (0-4092)." Thanks good news!
Shouldn't there be some setting or another function other than the analogRead() function?
Is there a problem with sparkfan's board processing that the upper bits are discarded?
I assume that there is not a problem with the Nano BLE ADC-resolution
But please tell me what Number-port has a 12-bit ADC (0-4092) and how to use 12bit-resolution.
And how to set ADC ref-level setting.