Hi. I am using EVAL-ADPD4100Z-PPG for heart rate monitoring.
Are you able to share an example configuration for heart rate monitoring using ADPD4100 (SPI)?
It would be a great help and really appreciate it.
ADPD4100
Recommended for New Designs
The ADPD4100/ADPD4101 operate as a complete multimodal sensor front end, stimulating up to eight light emitting diodes (LEDs) and measuring the return...
Datasheet
ADPD4100 on Analog.com
Hi. I am using EVAL-ADPD4100Z-PPG for heart rate monitoring.
Are you able to share an example configuration for heart rate monitoring using ADPD4100 (SPI)?
It would be a great help and really appreciate it.
This is a three timeslot example configuration. Green is typically used for heart rate.
################################################################
## ADPD4100 Reference Config File, single-ended
## Please review config file for your design. This is a generic config file.
0009 0080 # 32MHz trim - trim your own clock
000B 02B2 # 1MHz trim - trim your own clock
000C 0012 # 32kHz trim - trim your own clock
000D 2710 # 100 Hz
000F 0006 # enable 1MHz osc
0010 0200 # Three timeslots
0020 0004 # in1 connected to vc1 during sleep, everything else floating
0021 0000 # all inputs single ended, vc1 set to Vdd during sleep
0022 0003 # gpio0 is output, inverted
0023 0002 # intx to gpio0
0014 8000 # fifo thresh interrupt to intx
## timeslot A - continuous connect mode - green PPG
0100 0000 # Rin = 500, tsA offset = 0, skip subsample
0101 40DA # path = TIA + BPF + INT + ADC
0102 0001 # IN1 to channel 1, others disconnected
0103 5002 # precondition inputs to TIA_Vref, VC1 active state = V_delta
0104 03C0 # Rf = 200k Rint = 400k
0105 0707 # 11 mA on LED1A, 2A, 3A
0106 0007
0107 0140 # 64 pulses
0108 0000 # period set by automatic period of continuous connect mode
0109 0210 # led width= 2us led offset=16 us
010A 0003 # integrator width=3 us
010B 0210 # integrator offset=16.5 us - ADJUST FINE OFFSET
010C 0001 # no modulation
0110 0003 # signal size = 3 bytes
010D 0099 # -++- int pattern
010E 0000 # NO OFFSET - review if needed
010F 0000 # NO OFFSET - review if needed
0112 0000 # no decimation
## timeslot B - continuous connect mode - red PPG
0120 0000 # Rin = 500, tsA offset = 0, skip subsample
0121 40DA # path = TIA + BPF + INT + ADC
0122 0001 # IN1 to channel 1, others disconnected
0123 5002 # precondition inputs to TIA_Vref, VC1 active state = V_delta
0124 03C0 # Rf = 200k Rint = 400k
0125 0000 # 11 mA on LED3B
0126 0087
0127 0140 # 64 pulses
0128 0000 # period set by automatic period of continuous connect mode
0129 0210 # led width= 2us led offset=16 us
012A 0003 # integrator width=3 us
012B 0210 # integrator offset=16.5 us - ADJUST FINE OFFSET
012C 0001 # no modulation
0130 0003 # signal size = 3 bytes
012D 0099 # -++- int pattern
012E 0000 # NO OFFSET - review if needed
012F 0000 # NO OFFSET - review if needed
0132 0000 # no decimation
## timeslot C - continuous connect mode - IR PPG
0140 0000 # Rin = 500, tsA offset = 0, skip subsample
0141 40DA # path = TIA + BPF + INT + ADC
0142 0001 # IN1 to channel 1, others disconnected
0143 5002 # precondition inputs to TIA_Vref, VC1 active state = V_delta
0144 03C0 # Rf = 200k Rint = 400k
0145 0000 # 11 mA on LED4B
0146 8700
0147 0140 # 64 pulses
0148 0000 # period set by automatic period of continuous connect mode
0149 0210 # led width= 2us led offset=16 us
014A 0003 # integrator width=3 us
014B 0210 # integrator offset=16.5 us - ADJUST FINE OFFSET
014C 0001 # no modulation
0150 0003 # signal size = 3 bytes
014D 0099 # -++- int pattern
014E 0000 # NO OFFSET - review if needed
014F 0000 # NO OFFSET - review if needed
0152 0000 # no decimation
This is a three timeslot example configuration. Green is typically used for heart rate.
################################################################
## ADPD4100 Reference Config File, single-ended
## Please review config file for your design. This is a generic config file.
0009 0080 # 32MHz trim - trim your own clock
000B 02B2 # 1MHz trim - trim your own clock
000C 0012 # 32kHz trim - trim your own clock
000D 2710 # 100 Hz
000F 0006 # enable 1MHz osc
0010 0200 # Three timeslots
0020 0004 # in1 connected to vc1 during sleep, everything else floating
0021 0000 # all inputs single ended, vc1 set to Vdd during sleep
0022 0003 # gpio0 is output, inverted
0023 0002 # intx to gpio0
0014 8000 # fifo thresh interrupt to intx
## timeslot A - continuous connect mode - green PPG
0100 0000 # Rin = 500, tsA offset = 0, skip subsample
0101 40DA # path = TIA + BPF + INT + ADC
0102 0001 # IN1 to channel 1, others disconnected
0103 5002 # precondition inputs to TIA_Vref, VC1 active state = V_delta
0104 03C0 # Rf = 200k Rint = 400k
0105 0707 # 11 mA on LED1A, 2A, 3A
0106 0007
0107 0140 # 64 pulses
0108 0000 # period set by automatic period of continuous connect mode
0109 0210 # led width= 2us led offset=16 us
010A 0003 # integrator width=3 us
010B 0210 # integrator offset=16.5 us - ADJUST FINE OFFSET
010C 0001 # no modulation
0110 0003 # signal size = 3 bytes
010D 0099 # -++- int pattern
010E 0000 # NO OFFSET - review if needed
010F 0000 # NO OFFSET - review if needed
0112 0000 # no decimation
## timeslot B - continuous connect mode - red PPG
0120 0000 # Rin = 500, tsA offset = 0, skip subsample
0121 40DA # path = TIA + BPF + INT + ADC
0122 0001 # IN1 to channel 1, others disconnected
0123 5002 # precondition inputs to TIA_Vref, VC1 active state = V_delta
0124 03C0 # Rf = 200k Rint = 400k
0125 0000 # 11 mA on LED3B
0126 0087
0127 0140 # 64 pulses
0128 0000 # period set by automatic period of continuous connect mode
0129 0210 # led width= 2us led offset=16 us
012A 0003 # integrator width=3 us
012B 0210 # integrator offset=16.5 us - ADJUST FINE OFFSET
012C 0001 # no modulation
0130 0003 # signal size = 3 bytes
012D 0099 # -++- int pattern
012E 0000 # NO OFFSET - review if needed
012F 0000 # NO OFFSET - review if needed
0132 0000 # no decimation
## timeslot C - continuous connect mode - IR PPG
0140 0000 # Rin = 500, tsA offset = 0, skip subsample
0141 40DA # path = TIA + BPF + INT + ADC
0142 0001 # IN1 to channel 1, others disconnected
0143 5002 # precondition inputs to TIA_Vref, VC1 active state = V_delta
0144 03C0 # Rf = 200k Rint = 400k
0145 0000 # 11 mA on LED4B
0146 8700
0147 0140 # 64 pulses
0148 0000 # period set by automatic period of continuous connect mode
0149 0210 # led width= 2us led offset=16 us
014A 0003 # integrator width=3 us
014B 0210 # integrator offset=16.5 us - ADJUST FINE OFFSET
014C 0001 # no modulation
0150 0003 # signal size = 3 bytes
014D 0099 # -++- int pattern
014E 0000 # NO OFFSET - review if needed
014F 0000 # NO OFFSET - review if needed
0152 0000 # no decimation
Thank you for the configuration. Really appreciate the help.
0105 0707 # 11 mA on LED1A, 2A, 3A
Hi. is this line correct cos it only configures LED1A and LED2A?
0106 0007
Hi. sorry to trouble you. Just saw this line which configures LED3A.
No problem! Glad to help. Please let me know if you have any other question.
Hi. Sorry to disturb you.
I tried to read in FIFO but it gives me 0xFFFF.
I have checked the configurations they are correct.
Time slot A configuration
How do I read the output values?
I appreciate the help.
Thank you.
HI. I forgot an information. I am using Time Slot A configuration for heart rate reading.
Thank you.
Hi, please be advised this configuration (in terms of how to get the interrupt and reading data) assumes evaluation with Wavetool. Looks like you are currently using your own microcontroller and own platform. Please make sure that you understand the sections on pages 18 to 27 (starting from Datapath). It has info on FIFO and interrupts you may want to refer to.
https://www.analog.com/media/en/technical-documentation/data-sheets/adpd4100-4101.pdf
One very important note: Other than that, make sure that you are not saturating the TIA and/or ADC. Three green LEDs with 33 mA of total current and 200k TIA gain, along with potential ambient light in your system could be high enough to saturate. Please decrease the TIA gain and LED current, and check what you see.
Also, could you please check the mask version by reading register 0x0008?
Hi. Thanks for the reply. I will read up on the FIFO and interrupts in ADPD 4100/4101 datasheet and I will check whether the TIA and ADC is saturating. In addition, I will reduce the TIA gain and LED current and check the value in register 0x0008.
Hi. I forgot to set 1 to Go Mode. I changed the three green LEDs with each 8.2857mA . Therefore, total of 24.857mA. I changed the Rf to 100K ohms and Rint stay as 400K ohms to reduce the gain. Therefore, gain is 100k/400k = 0.25.
I have checked the mask version which is 1.
I am reading the Timeslot A Signal Lower half Channel 1 register.
The result is as follows:
When the three green LEDs are no covered:
When the three green LEDs are covered:
Is the results correct? I can see that the values stabilizes but I don't understand what the value represent.
Can I ask what does the two bytes represent in the Timeslot A Signal Lower half Channel 1 register?
Is the FIFO Data size = Signal size? cos the FIFO Threshold interrupt is always high after setting the FIFO Threshold to signal size and I have checked that INT_ACLEAR_FIFO is high by default.
Sorry to trouble you. I appreciate you have given me so far.
The result will change based on the photodiode current generated. There is no universal correct result in an optical system. The ADPD4100 measures the current generated on the photodiode and the reflected light could differ from measurement to measurement. Typically, to evaluate the system, a fixed reflector setup with a black cover to eliminate ambient light is used. You fix the board to a certain distance to the white cardboard and measure a fixed reflected signal so that the output just changes by the noise level of AFE. Therefore I unfortunately cannot tell exactly if this correct or not.
The value you are reading is the Timeslot A Signal Lower half Channel 1 register, which is the register for channel 1 of the Timeslot A that stores the lower half of the signal values. So it represents the lower half of the output LSBs.
FIFO data size is chosen by the user. (Refer to page 20 FIFO section)
It's not necessarily equal to signal size, you can allocate FIFO data to various different data (lit,dark,signal). It's up to the user how they manage FIFO, whereas register 30-8F stores them separately in different registers.
After FIFO is read, FIFO threshold interrupt is cleared as INT_ACLEAR_FIFO is enabled. But I guess you overflow the FIFO or do not even read it so it doesn't clear. You should check if you're reading FIFO appropriately. Please read the datasheet pages 20-21 for FIFO section. Reading register 30 is not necessarily equal to reading FIFO.
To check overflow, register 0x0000 bit 13 is the place to check.
I hope this will help. I am not sure if I understand the questions but I tried my best to answer to my understanding.