1

I have a circuit that pulses two LEDs on and off at the same frequency but out of phase. I would like to find a hardware solution for using one sensor to measure separately the intensity from each source. Is is possible to isolate the detector response from each of the sources? I would like to find a solution that is independent of MCU, so no careful timing of analog input pins.

enter image description here

I would like to design a rudimentary pulse oximeter that allows me to guide students through the principles of the measurement and does not rely on a premade sensor such as the max30100. In particular, the datasheet for the max30100 indicates that oxygen saturation is measured by monitoring two wavelengths (in the red and IR regions) where hemoglobin and oxygen-bound hemoglobin absorb light differently. The ratio of these two signals is related to the spO2 value. The block diagram of the MAX30100 indicates that there is only one sensor, and I am trying to come up with a way to reproduce that behavior (although I am not wedded to a single detector).

My target audience has limited electronic experience. They are familiar with microcontroller interfaces, LEDs, transistors and operational amplifiers. They have used both photoresistors and photodiodes as sensors. Therefore, my design constraints are bound by those components.

Ideally, one measures the light intensity at both wavelengths simultaneously. From this example a sampling rate higher than the highest expected heartrate will suffice. If we take the upper limit for heartrate to be 180 bpm, then I need a sampling rate high enough to characterize a 3 hz waveform for both sources.

I'm thinking - but have not yet tried - a sample and hold type design might allow me to isolate the two signals, but perhaps there are other solutions.

bobthechemist
  • 229
  • 3
  • 10
  • Are you talking about the speed of light? – jay Nov 10 '21 at 21:11
  • What kind of photosensor do you mean? Phototransistor? Photodiode? Photoresistor? – Justme Nov 10 '21 at 21:16
  • @Justme , the OP's last name is "chemist". Probably he can better explain in his terms. So, OP, would you like to share any info. you have acquired so far? – jay Nov 10 '21 at 21:26
  • 3
    Bob the chemist, why not talk more about the actual application? Sure, we get the idea that you've already latched onto the idea of an Arduino, writing code for it, and that this may be an easy segue into whatever the heck you are on about. But I worked my entire life developing scientific instrumentation -- it's what I do. And the very first thing I do is tell them to talk about their application and to stop trying to out-think or out-run ahead of the process. Just sit me down, explain, and then I can ask more questions. Think of engineers as intelligent and able to understand your work. – jonk Nov 10 '21 at 21:26
  • If you are using PWM then in reality the LEDs are either on or off, so using some kind of analog sensor to detect the "average" brightness is going to be difficult. Why would you want to add more hardware if the Arduino can do this job by itself? – Elliot Alderson Nov 10 '21 at 21:30
  • 1
    Your concept is valid. You could do it in hardware, but what you propose is the way I would approach the problem, but I wouldn’t use the Arduino’s pwm as you want the led control synchronised with the ADC. 490Hz is easily doable. – Kartman Nov 10 '21 at 21:30
  • 1
    I won't answer just yet - like jonk asked, I'd like to know why the light intensities need to be measured and will the PWM have varying duty if that is important to measure. No light sensor will be equally sensitive to green and red wavelength LEDs even if they had a matched optical output, and a photoresistor would have response time in the order of milliseconds to tens if not hundreds of milliseconds, so that would just average the measured brightnesses. – Justme Nov 10 '21 at 21:42
  • `extract the two signals programmatically` ... but there is only one signal ... the top LED follows the signal – jsotola Nov 10 '21 at 22:49
  • Thanks for the interest - I'll try to explain the application further in an update. – bobthechemist Nov 10 '21 at 23:37
  • 2
    In a commercial pulse oximeter, red (~630 nm) and IR (~ 860 nm) are used @EdV – bobthechemist Nov 11 '21 at 02:20
  • 2
    @bobthechemist Well, that's a huge clarification -- a pulseox. Darn glad I asked! – jonk Nov 12 '21 at 04:48
  • @bobthechemist Please ask a specific question (edit the question) – Voltage Spike Nov 22 '21 at 17:14
  • With respect to your edit, how about the second solution I posted a few weeks ago? If that doesn't work for you, should explain whatever additional requirements you have. – user1850479 Nov 23 '21 at 22:19
  • @user1850479 As I understand your answer, it is dependent on post-processing/coding on the microcontroller. As mentioned in the question, my target audience has limited programming experience and I would like the focus of this exercise to be building a hardware solution. – bobthechemist Nov 24 '21 at 15:47
  • You did not mention that your audience has limited programming experience in your question, actually you said that they're familiar with microcontrollers which sounds like the opposite. For what it's worth, it's not possible to build a pulse oximeter without writing a lot of code, and you have a microcontroller which must be doing something, so it's unclear to me what exactly your constraints and goals are. Could you put your requirements and goal exactly into your question? – user1850479 Nov 24 '21 at 17:17

2 Answers2

1

This question produced several approaches to driving the LEDs: Pulse oximeter design: How to drive a bi-polar LED having two different forward voltages?. That at least takes care of the first part of your question.

As for how they get away with just one sensor, the alternating LEDs allow time multiplex of the sensing. As the LEDs alternate, the sensor output swings between picking up the IR and RED LED.

What to do with the combined IR/RED sense signal? A microcontroller can tease it apart. It sees the sensor output as a DC signal with an AC component, which it samples with an ADC. Software then processes that signal to come up with a differential value for IR and RED optical transmission, from which SpO2 is derived.

If you wanted to have separate IR and RED sensors, perhaps you could employ optical filters on each sensor. But that probably raises other issues, like sensitivity and optical crosstalk.

hacktastical
  • 49,832
  • 2
  • 47
  • 138
  • Thanks for the useful reference - I missed that one. My primary interest is whether or not signal processing could be done without resorting to coding on the microcontroller. From what I'm hearing, this is not a trivial task. – bobthechemist Dec 07 '21 at 12:32
  • It could be possible to implement just the analog front end and feed this to a USB ADC, and do the post-process coding on a PC. This might be in the spirit of what you’re asking. Then you’d make the LED drive with an oscillator and some logic, using one of the analog approaches shown in the other question. – hacktastical Dec 07 '21 at 18:33
  • 1
    As a means to help isolate the parts of the sense waveform, you’d design the drive to have a ‘dark’ period, then IR, then RED. Your post processing would use the ‘dark’ to sync up. – hacktastical Dec 07 '21 at 18:49
  • my original idea was to have the microcontroller do nothing but provide the clock and read two analog inputs so that - at least in principle - the device could run without a MCU. – bobthechemist Dec 07 '21 at 19:03
  • A hardware solution could do the sequencing and control two sample/hold amplifiers to tease apart the two channels. A third sample/hold would record the ‘dark’ level as reference, which would be applied to the two ‘light’ channels to yield separate IR and RED signals. – hacktastical Dec 07 '21 at 19:45
  • Another thing to consider is that both transmissive LED to sensor waveforms vary with pulse. You can process this as well to derive pulse, but you also have to account for it in your waveform math to derive the IR vs. RED ratio to find SpO2. – hacktastical Dec 07 '21 at 22:00
0

If I have a circuit that pulses two LEDs on and off at the same frequency but out of phase, is it possible to extract the light intensities from a single photosensor?

Yes, this is easy. When the red LED is lit up, the signal you receive is from the red LED. When the IR LED is lit up, the signal you receive is from the IR LED. You can separate these in software or in hardware, but a very simple way to do this is to take your ADC clock rate, divide by two and then use that to drive your LEDs. If they are out of phase with each other, then your even samples contain one LED, your odd samples the other LED.

Alternatively, if you have two ADC channels, you can record both the photodiode signal and LED drive signal and then determine which samples are which color in postprocessing.

user1850479
  • 14,842
  • 1
  • 21
  • 43