2025-11-11 11:48 AM
I'd like to validate ST1VAFE3BX vAFE measurement data against test signals as part of hardware design validation of a custom ECG sensor design based on ST1VAFE3BX.
I intend to input reference signals (differential or single ended) into the two bio channels of the ST1VAFE6BX, capture the raw ADC data, convert to mV, and then compare to the reference signals.
- Conducting this test will help validate the data processing, especially reading and interpreting vAFE data from the FIFO, which is different than if reading from registers.
Are there any documents or guides for how to do such tests?
Currently the vAFE waveforms I capture look correct except for the amplitude.
2025-11-12 6:56 AM
2025-11-12 1:10 PM
Hi @Federica Bossi ,
Thanks for the reply. I have seen the code. I'm after other details such as: description of test setup, input signals, ST1VAFE3BX configuration and expected results.
Other information:
- configure device in signal-ended configuration, or differential configuration?
- should I attach a signal generator to the electrodes directly, or via ECG pads?
Thank you!
2025-12-16 10:49 AM
Hi @Federica Bossi , here is an example of an experiment I did.
Setup:
- Directly attach signal generator to the ECG electrode pads with alligator clips.
- Signal generator output set to sine wave, 1Hz frequency, amplitude specified in the tests below (2mV to 250mV peak-peak)
- Signal generator configured for "High Z" load, differential signal outputs (to match the ST1VAFE3BX electrode configuration of differential mode).
ST1VAFE3BX configuration:
I am trying to make sense of these results with the information in the datasheet:
The data sheet says the input range is +/- 25mV with a gain of 16, but my results show I needed 150/2 or +/-75 mV to span the full range of ADC codes.
In another thread it is discussed that:
https://community.st.com/t5/mems-sensors/st1vafe3bx-vafe-sensitivity-and-sample-bit-depth/m-p/807763
the vAFE data when read from the FIFO is 16-bits with resolution 1311 LSB/mV, or 0.0007627 mV/LSB
But as shown above I'm getting 0.002289 mV/LSB, which is about 3x the expected value.
Assuming the datasheet is correct, it seems my ADC counts are much smaller than I expect.
I should be able to input a 50mVp-p sine wave and span the full -32,768 and 32,767 count range of the vAFE ADC.
Any thoughts on why I'm seeing such differences?
2025-12-16 3:06 PM
I did another test to confirm the conversion of vAFE data from the FIFO to mV value is correct.
Procedure:
1. I duplicated this conversion procedure from ST Github into my code, and added a `LOG()` statement to output the mV values to the console:
st1vafe3bx_fifo_data_t test;
test.ah_bio.raw = (int16_t)fifo_data[j + 1] + (int16_t)fifo_data[j + 2] * 256U;
test.ah_bio.mv = st1vafe3bx_from_lsb_to_mv(test.ah_bio.raw);
LOG_INF("%2i: vAFE: %0.4f", i, test.ah_bio.mv);[00:02:34.119,323] <inf> st1vafe3bx: 1: vAFE: 22.8871
[00:02:34.119,384] <inf> st1vafe3bx: 2: vAFE: 22.8993
[00:02:34.119,445] <inf> st1vafe3bx: 3: vAFE: 22.9153
[00:02:34.119,476] <inf> st1vafe3bx: 4: vAFE: 22.9275I plot the vAFE mV values.
2. Simultaneously I collected the ADC counts (using same method as my previous message, which does not use the console) and converted the results to mV using the scaling factor "1311 LSB/mV". I plot the ADC counts and mV values.
The following graph shows all results with 150mVp-p sine waveform applied to the ECG electrodes.
- There is a horizontal offset between the data sets, so please ignore that the individual plots are not time aligned.
- Left axis = ECG raw (ADC counts) (dark blue)
- Right axis = ECG ST (red) and ECG C2G (mV) (light blue)
The ECG ST and ECG C2G show the same vertical range; approx +/- 25mV or 50mVp-p.
From this result I believe the conversion from ADC counts to mV I am doing is correct; my mV values match those exactly from ST.
My issue is the input signal to the ECG electrodes was 150mVp-p, and I've found here the data shows it as approx 50mVp-p. Somehow the amplitude is 1/3 of what it should be.
Could my circuit be doing this, or can vAFE ADC somehow be reducing the ADC counts in some way when the FIFO is configured based on output data rate (ODR) or bandwidth etc?
Thank you for any suggestions.
2025-12-18 7:51 AM
@casadeib Hope you might be able to offer some insight here.