Shop OBEX P1 Docs P2 Docs Learn Events
Pulse Oximetry Sensor Interface — Parallax Forums

Pulse Oximetry Sensor Interface

Duane DegnDuane Degn Posts: 10,588
edited 2013-01-08 08:40 in Robotics
This first post of this project thread will contain a summary of the project so far.

The most recent version of software generated by this project will be attached to this first post. There isn't any software posted yet for this project.

The following three posts will contain additional information about the completed project.
Chronological posts about progress on this project will begin with post #5.

Partial Index of Thread

Post #5 Beginning of chronological entries.
Post #10 Pulse oximetry and photodiode links.

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-07-13 22:36
    2 of 5 reserved
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-07-13 22:36
    3 of 5 reserved
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-07-13 22:36
    4 of 5 reserved
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-10-31 04:21
    In this thread, Ken asked for help in interfacing with some (SpO2) pulse oximetry sensors.

    SPO2%20Sensors.jpg

    To add to the fun, the sensors don't have datasheets (at least that I've been able to find).

    After probing the pins with my voltmeter (and cutting the wires on one sensor), it became clear that the units had bidirectional LEDs. The anode to the red LED was the cathode of the IR LED and vise versa.

    Here's the pinout for the sensor.

    attachment.php?attachmentid=94170&d=1342247322

    The multimeter gives 1.64V as the red LED's forward voltage and 1.12V as the IR LED's forward voltage. These reading are of course lower than the actual forward voltages since the multimeter uses very low currents to test the diodes' forward voltages.

    After careful study I was able to deduce which side of the earclip held the LEDs.

    attachment.php?attachmentid=94166&d=1342244665

    The red LED looks kind of white in this photo. It's a deeper red in real life.

    SpO2EarLedRed120713a.jpg


    The IR LED didn't shine as brightly for the camera as the red LED had. I had to shield the room light in order to pick up the IR light.

    SpO2EarLedIr120713a.jpg


    I'm still in the process of learning about photodiodes. If I understand them correctly, there is a positive voltage produced on the photodiode's anode in the presence of light.

    SpO2EarPd120713a.jpg


    I measure about 230mV across the photodiode with the room's light shining on the sensor.

    To aid in figuring out which pin did what, I cut the connector off the sensor (don't tell Ken). Here's my makeshift replacement connector.

    SpO2EarHackConn120713a.jpg


    What's kind of odd is there are two wires (yellow and blue) that don't appear to be connected to anything. They aren't connected to any of the pins on the original connector.

    I found a pinout diagram for a different SpO2 sensor which included a "sensor ID" pin. I think pin #4 is one of these sensor ID pins which uses a 2K resistor (I believe inside the connector body) to identify this particular sensor to the host machine.

    After seeing an Arduino pulse oximeter project that displayed pulse blips to a terminal window, I knew this project needed some sort of graphic pulse readout in real time.

    I was very pleased to find Andy Lindsay's PST oscilloscope method as I was learning how to use the PropBOE's ADC and DAC.

    As you can see from the video, I'm using a modified version of Andy Lindsay's object to display voltage reading from the PropBOE's ADC.



    I wasn't able to pickup any meaningful fluctuations in the voltage levels with the sensor clipped to my ear. I don't know if I just have things wired incorrectly or if I'll need a better amplifier circuit for the photodiode's signal.

    I'll also describe the opamp circuit in more detail later.

    I'm pretty sure I'll need help with this project. Along with describing my attempts so far to read meaningful information from the photodiodes signal, I'll also try to ask an intellegent question about amplifying the signal tomorrow.
    475 x 653 - 117K
    390 x 374 - 37K
    756 x 715 - 190K
    573 x 521 - 117K
    520 x 545 - 99K
    641 x 645 - 242K
  • LeonLeon Posts: 7,620
    edited 2012-07-14 03:22
    Photodiodes are usually operated in reverse-bias, rather than photovoltaic mode.
  • OppaErichOppaErich Posts: 48
    edited 2012-07-14 05:34
  • RS_JimRS_Jim Posts: 1,766
    edited 2012-07-14 06:05
    Duane,
    Ck out Analog Devices for samples of the necessary op amps.
    Jim
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-07-14 10:24
    Leon wrote: »
    Photodiodes are usually operated in reverse-bias, rather than photovoltaic mode.

    Leon, yes, I read this several places on the internet. I don't know how much voltage to use and how much current would be safe with this sensor. I believe even when reverse-biased, the sensor output will require amplification.
    OppaErich wrote: »

    OppaErich, no, I hadn't seen that document. I've seen similar appnotes. The one you list has a lot of good information. Thank you.

    Edit: I see this document is listed from the TI page I have listed in post #10 of this thread (the TI page is the first link of the list).
    RS_Jim wrote: »
    Duane,
    Ck out Analog Devices for samples of the necessary op amps.
    Jim

    Jim, I think my problem is figuring out which op-amp to use and how to use it.

    This project is part of the preparation Parallax is making to co-sponsor a medical equipment / medical training contest with the Army (I think). Ken and Invent-O-Doc gave a presentation about it at the last UPEW(Parallax Expo).

    I hoping to use parts Parallax currently sells to read from these sensors. The dual op-amp LM358 is used in the Understanding Signals 1.0 book. I think this same op-amp is used in other Parallax kits. If possible, I'd like to use this op-amp to amplify the signal from the photodiode.

    I'd really like to avoid exotic or expensive parts.

    I'm also hoping to make use of the PropBOE's peripherals in this project. I think the PropBOE's ADC is fast enough to read multiple times within a single pulse but I don't know if it's precise enough to allow blood oxygen levels to be computed. I think the PropBOE's ADC should be precise enough to detect a pulse from a properly conditioned photodiode signal.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-07-14 10:54
    Here are a couple of relavent circuits.

    This first circuit comes from the TI paper OppaErich suggested.

    attachment.php?attachmentid=94184&d=1342287909

    This second circuit is from the "What you need to know . . ." document I linked to above.

    attachment.php?attachmentid=94185&d=1342287926

    This second circuit is much simplier than the first. I'd like to try starting out with a simple circuit but the circuit uses a -15V supply. I'd like to limit the voltages to 5V, 3.3V and ground for my circuit. I'm not opposed to using a voltage divider to access intermediate voltages but I'd prefer not to use additional voltage regulators.

    I'm going to try to design a circuit that places the photodiode in reverse-bias (as Leon suggested) which is then applified by a LM358 op-amp. I'll post a schematic here prior to testing it so you all can warn me if I'm likely to fry some component.

    Thanks for all the help so far. I know I'll need a lot more.
    1024 x 483 - 46K
    721 x 413 - 24K
  • LawsonLawson Posts: 870
    edited 2012-07-14 12:51
    Biasing a photo-diode at zero volts is just fine. The tradeoff is more photo-diode capacitance in exchange for minimum leakage current. Perfectly acceptable in this case. A simple way to think of a photo-diode is as a light dependent current source in parallel with a switching diode.

    Lawson
  • tdlivingstdlivings Posts: 437
    edited 2012-07-14 13:04
    Duane
    As shown in your circuit above you are measuring the change in current in the photo diode as a function
    of the light intensity on it. You need a current to voltage converter circuit. Just applying a reverse voltage and
    feeding the voltage into an op amp will not work.
    I found a doc that talks about it
    Tom
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-07-15 07:15
    Thanks Lawson and Tom for the help.

    The "PhotodiodeAmplifiers.pdf" has a lot of useful information.

    I thought the "Conclusions:" section interesting. Here's the first four points:
    - Photodiode amplifiers are tricky.
    - The design should be tailored for the application, DC, Data, etc.
    - The design requires a lot of trial and error.
    - Be prepared to do a lot of study.

    I'm beginning to think there isn't a easy solution to for extracting the very small pulse/oxygen fluctuations from the overal signal.

    I think this would be much easier (reading pulse and possibly oxygen levels) if I were to use a TAOS light to freqency sensor.

    I tried using a TSL230R chip last night with a high power LED and was able to get very good resolution. I don't know if I can detect my pulse with this sensor, but I think it's likely to be much easier to make a DIY pulse oximeter with one of the TOAS sensors than trying to isolate and amplify the AC portion from the photodiode.

    Parallax no long sells the TSL230R chips, but they do sell a three pin light to frequency sensor that might produce similar results.

    I'm going to spend a bit of time seeing how well these light to frequency chips work for this application.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-07-15 11:48
    Hi Duane,

    Good luck with this project! I looked at your video, but I'm not sure what circuit you were using on that breadboard.

    Could you do a simple little experiment? If you have a sensitive µA range on your multimeter, hook it up to the photodiode black and white leads to measure its intrinsic output current at different light levels. Then with the sensor on the ear/finger, and the red or IR led driven with something like 20mA, and measure the current output by the photodiode. I'm just trying to get a ballpark idea of the offset current you will need to deal with. If the meter is not sensitive enough, it may take a simple transconductance amplifier to get that number.

    The signal will be a small current riding on the offset current. The offset current has to be subtracted. In analog approaches, that is usually done by integrating the output and feeding it back, servo style, to subtract from the input signal. Or, if the ADC is high res (like 24 bits) the subtraction can be done in firmware. The picture is complicated by the fact that the LEDs will be pulsed, alternating red and IR, and the pulses may be narrow, and may be driven at a current far above the allowed continuous DC current. That has to repeat many times within one heartbeat, and then the ratio of red signal/IR signal has to be compared with the calibration table. You've already realized that it can get fun pretty fast!

    With regard to the 2k resistor and the cable shield, purposed as a device ID is reasonable. Another possibility would have to do with the fact that photodiodes out on the end of cables have special problems, especially when more bandwidth is needed for response to pulses, without adding noise. Active drive of the cable shield can help with that.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-07-15 15:57
    I looked at your video, but I'm not sure what circuit you were using on that breadboard.

    Tracy, thanks for your help.
    I think the circuit in the video used both of the op-amps in the LM358. I used one op-amp as a buffer. I used this circuit from page 102 of Understanding Signals V1.0.

    attachment.php?attachmentid=94207&d=1342379258

    I used the second op-amp pins 7, 6 & 5 of the chip instead of 1, 2 & 3 as labelled in the above circuit. The cathode of the photodiode was connected to ground and the anode was connected to pin 5 (+ of second op-amp).

    The output at from pin 7 (labelled 1) was then connected to pin 3 of the LM358 chip. The first op-amp was used as a "non-inverting voltage amplifier" as found on page 104 of Understanding Signals. Here's the amplifier circuit.

    attachment.php?attachmentid=94206&d=1342378968
    As I said, I used the output of the buffer circuit as the "signal" of this circuit.

    I think I used a 1K resistor for Ri and a 10K pot (as a variable resistor) for Rf. The output from this circuit (pin 1) was connected to the PropBOE's ADC. I turned the pot up until the output was around 3.2V.

    The information from the amplifier plus buffer circuit didn't look any more meaning full than the information from the amplifier circuit alone.

    Edit: In the above schematics, I used 5V for Vcc and ground for Vss and Vee.
    Could you do a simple little experiment? If you have a sensitive µA range on your multimeter, hook it up to the photodiode black and white leads to measure its intrinsic output current at different light levels. Then with the sensor on the ear/finger, and the red or IR led driven with something like 20mA, and measure the current output by the photodiode. I'm just trying to get a ballpark idea of the offset current you will need to deal with.

    My meter displays current down to 0.01uA precision.

    I'm powering the red LED at 21.5mA.

    With the ear clip closed on itself the current measures 133.8uA and continues to slowly fall.
    With the sensor clipped to my ear, I get 18uA. It flucuates about 0.2uA up and down slowly and (based on the period of oscillations) about 0.06uA of the fluctuation could possibly be caused by my pulse.

    The IR LED (using the same 66.7 ohm resistor) is powered by 29.2mA. (I'll likely go back to a 100ohm resistor for the IR LED to keep the current at a safer level.)
    With the ear clip closed on itself the current measures 184.74uA +- 0.04ua. This value stays pretty constant while I'm watching it.
    Clipped to my ear the current drops to about 21uA and slowly climbs. It flucutates relatively quickly by about 0.3uA.
    It'sm now up to 24.4 uA.

    I get about 400mV across the photodiode with the ear clip closed on itself (red LED). Clipped to my ear the voltage is about 300mV. My multimeter is acting up (it says the battery is low but I just replaced its battery). I'll needd to conduct additional tests later.

    From a test I did yesterday, I think the AC component of the voltage is about 0.4mV (very rough guess).
    The signal will be a small current riding on the offset current. The offset current has to be subtracted. In analog approaches, that is usually done by integrating the output and feeding it back, servo style, to subtract from the input signal. Or, if the ADC is high res (like 24 bits) the subtraction can be done in firmware. The picture is complicated by the fact that the LEDs will be pulsed, alternating red and IR, and the pulses may be narrow, and may be driven at a current far above the allowed continuous DC current. That has to repeat many times within one heartbeat, and then the ratio of red signal/IR signal has to be compared with the calibration table. You've already realized that it can get fun pretty fast!

    This is a bit over my head but it's stuff I'd like to learn about. I do agree it's fun.

    I have a 16-bit ADC chip that I thought might be useful if I could use it near its lower voltage limit (2.7V). One problem with this 16-bit ADC is it can only sample at 8Hz at the full 16-bit resolution.

    I also have a couple of different op-amps besides the LM358. I have four LCM6041 op-amps and one LCM6001 ultra low input current op-amp.

    The LCM6041 chips aren't too expensive but the LCM6001 is about $12 a chip. I purchased these op-amps for a pH meter project I never really started. I wouldn't mind using these chips in this project, but I'm pretty sure Ken doesn't want a solution that reads from these sensors to cost very much.

    While I don't mind figuring out how to do all this with analog circuits (at least I wont admit to minding) I think I ought to check with Ken to see how complicated this circuit can be and still be acceptable.

    My initial tests with a light to freqency sensor were very promising. I think I'll pursue these tests as I try to figure out what combination of circuits I'll need to read useful information from the photodiode.
    With regard to the 2k resistor and the cable shield, purposed as a device ID is reasonable. Another possibility would have to do with the fact that photodiodes out on the end of cables have special problems, especially when more bandwidth is needed for response to pulses, without adding noise. Active drive of the cable shield can help with that.

    Apparently my ignorance includes active drives of cable shielding. I thought the shielding was generally connected to ground.

    What was the fourth conclusion from the National photodiode sheet? Oh yes,
    - Be prepared to do a lot of study.

    Thank you very much Tracy for all your help.
    603 x 219 - 18K
    566 x 180 - 16K
  • smithdavidpsmithdavidp Posts: 146
    edited 2012-07-16 12:01
    This is 2 kewl for a fool. I was just gonna hack the pulse ox that I bought at Walgreens. It's digital so I just decided to use the output, with the Prop Controller, to build the patients vitals output file. Never thought of building one. Nice work D.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-07-16 12:43
    Duane, thanks for the measurements. So, the offset current will be on the order of 18 µA and the signal will be something most likely less than 1µA. Here is a first pass circuit, but not one that you would use in practice. Conceptually it is better to take it one step at a time.

    x-cond-oxi2.png


    The photodiode is placed in a transconductance circuit that has a 1MΩ feedback resistor, so that a 1µA change in current at the input causes an 1V change in voltage at the output. The photodiode as shown sinks current, so brighter light on the photodiode makes the output voltage increase at pin 1 of the op-amp. The voltage at pin 2 stays at 1.25 V, held there by the feedback, so that it matches the constant 1.25V on pin 3. Forget about R4 and the hookup to the 10k pot for a moment. If you just had the 18 µA baseline current of the photodiode clipped to your ear, that would imply an output of over 18 volts at the output, so the amplifier would simply saturate, as close as it could get to its 5V supply rail. Now add R4 and the potentiometer. R4 also supplies current to the summing junction at pin 2. If the potentiometer is adjusted to give 3.05V with respect to Vss, then the voltage across the 100kΩ resistor is (3.05V - 1.25V) = 1.8V. The current through the resistor will be 1.8V/100k = 18µA. That exactly balances the baseline current sinking to ground through the photodiode, so the the output from the op-amp will be 1.25V. With that adjusted, now small fluctuations in the photodiode current on the order of 1µA cause fluctuations of 1V at the output. You can look for small changes due to arterial pulsations. If the baseline current is too far from 18µA, well, you have to adjust the potentiometer until the output of the op-amp is again within range of 1 or 2 volts. To much this way, it pegs toward +5, too much the other way, it pegs as Vss.

    Again, this is just a conceptual circuit, and while it should work, Ken won't want to ship you along with each package to make a fine adjustment on the potentiometer. The next step circuit after this replaces the manual adjustment with an error amplifier/integrator. An integrator watches the output, and if it differs from 1.25V, it adds current at the input to bring it back into balance. The integrator can be set up to have a time constant much longer than the pulsation period, so that it automatically adjusts for slower changes like position on the ear. The time constant has to be adaptive, so the larger the error, the faster the response.

    It is also possible to set this up with the photodiode interfaced directly to the sigma-delta circuit on the Prop, and the integrator feedback too all digital. I don't know if you want to get into that. It takes special care with layout of smt parts on a Prop dedicated to that purpose, and I don't know if it could achieve the necessary signal/noise performance.

    Interface to the digital output of a cheap digital output meter might be the easier way to go!
    516 x 364 - 16K
    516 x 364 - 16K
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-07-21 16:38
    Tracy, Thanks for the detailed reply. I can't believe I hadn't seen you post until know. I thought I clicked "What's New?" frequently enough not to miss anything.

    I was about to post a progress report here and I was very surprised to find two posts I hadn't seen before.
    It is also possible to set this up with the photodiode interfaced directly to the sigma-delta circuit on the Prop, and the integrator feedback too all digital. I don't know if you want to get into that. It takes special care with layout of smt parts on a Prop dedicated to that purpose, and I don't know if it could achieve the necessary signal/noise performance.

    From the datasheets I've read, I'm under the impression that care needs to be taken when designing low current amplifiers in general.

    Would the op-amp circuit you describe work on a breadboard, or would I need to create a PCB for the circuit?

    I've wondered about soldering some components to a QuickStart board to for a sigma-delta circuit but I don't presently have any idea of what values I should use for the components.
    Interface to the digital output of a cheap digital output meter might be the easier way to go!

    This is the approach I've been working on. I've been using a TAOS TSL230R as the light sensor. The output from these sensor can vary dramatically so I needed to update the PST o'scope software to automatically scale the graphs. I just finished uploading a video showing the data from the TSL230R being graphed.

    I just wanted to apologize for not acknowledging your last post, before I starting my update post. Thank you very much for your help.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-07-21 16:51
    I was just gonna hack the pulse ox that I bought at Walgreens. It's digital so I just decided to use the output, with the Prop Controller, to build the patients vitals output file. Never thought of building one. Nice work D.

    Thanks Dave.

    Just to be clear, I'm far from having built a pulse oximeter. I've wondered if hacking a pre-built device might be the easiest way of getting this data. I've seen some units that cost arount $30 which is inexpensive enough (to me) to qualify as a possible alternative to building one from scratch. I don't know how accurate the inexpensive unitis are though.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-07-21 18:45
    Before proceeding with an analog solution to reading light levels, I wanted to see how well an inexpensive digital sensor would perform.

    I had a TAOS TSL230R left over from an earlier project. Since both the LEDs and the photodiode are removable from the ear clip SpO2 sensor, I make a small adapter board that would hold the TSL230R chip in the same position as the photodiode would normally be.

    I used a small piece of this proto board from SparkFun to hold the top of the sensor chip flush with one side of the board. Below is a picture of the original photodiode light sensor.

    SpO2EarPd120713a.jpg


    Here's a picture of the TSL230R chip in my adapter board being used in the same ear clip.

    SpO2AltSensor120721d.jpg


    There are surface mount solder pads on one side of the proto board. I was able to solder the sholder of the pins to these pads to secure the board to the chip.

    attachment.php?attachmentid=94350&d=1342914897

    SpO2AltSensor120721b.jpg


    Besides data and power connections, I also wanted to use all the scale and sensitivity adjustment pins on the chip. I soldered four of the seven wires to the chip before adding a second layer of proto board. After adding a small piece of perf board, I soldered the remaining three wires to finish making all the connections need to the chip. I tied the enable pin low since I wouldn't need to turn the chip on and off. I suppose if one were making a low power device, it might be a good idea to bring this pin out separately.

    The two proto board sandwich made it a convenient slot for securing the sensor to the ear clip.

    attachment.php?attachmentid=94348&d=1342914868

    I used the original LEDs of the sensor. I powered the LEDs directly from two Prop I/O pins with a 100 ohm resistor to limit the current. The two Prop pins would alternate between sourcing and sinking current to drive the LEDs.

    As I mentioned previously, the TSL230R has a very wide output range. In order to visually represent the data as a graph, I had to add an automatic scaling ability to the PST o'scope software. I also added a rudimentary trigger feature.

    Here's the video.

    Sorry about the clicking sound. I hadn't secured the lens cap very well and it caused a loud noise to be recorded with each bump.

    The TSL230R was set to x10 sensitivity and 100 scale factor. As I mentioned in the video the LED's cycled between the two colors at 20Hz. With each LED turned on for 1/40 second at a time. After waiting a millisecond, a counter was zeroed which then accumulated the pulses from the chip's output for 24ms. The number of pluses received in this time is what is being graphed.

    The transmitted lighty from both the red and IR LEDs are affected by the pulse. The top graph is shows the light transmitted with the red LED and the bottom graph shows the IR light transmitted.

    I chose these various settings in an attempt to get a nice looking graph on with the PST o'scope. I now need to experiement with other settings to find the best combination in order to maximize the precision and accuracy of the sensor.

    I'm still not sure if this sensor has enough precision to measure O2 levels in the blood.

    I am pleased with how easy it is to get data from this TSL230R chip. It sure seems like these is a much easier method than trying to use op-amps to magnify the small current from the photodiode. While this method is an easy way to measure the light, I'm not completely convienced it's the best way to make a pulse oximeter.

    My next step will be to see if I can get enough resolution from this setup to use in the calculations used to compute O2 levels.

    I also want to make the pulse frequency calculations a bit smarter so it can tolerate non-ideal waveforms when computing pulse rates.
    786 x 441 - 125K
    443 x 343 - 128K
    436 x 312 - 123K
    463 x 397 - 58K
    520 x 545 - 99K
  • smithdavidpsmithdavidp Posts: 146
    edited 2012-07-22 06:12
    To be honest I steered clear of the inexpensive ones. The one I have now was purchased when I was going through Cardio Rehab. It ws about $69.00. I use to carry all of my medical measuring devices in a small med kit. This included the glucose monitor and the blood pressure monitor. The EKG (ECG) came later but I did get the chance to compare the readings, of the other three monitors, with the readings of the Hospitals equipment and the readings were spot on. The pulse ox monitor I am using for the Robot is distributed by the ChoiceMed company. It is the "OxyWatch model C20 and the case has a small square hole in the back where I intend to run the wiring to connect it to my system. It is fully digital so, once again, all I have to do is sipon off the data.

    I am still building the Speech Interface which is taking me a bit longer than I would like. Building a voice control menu is as hard as they say it is. Can't use the SAPI because it hears, and responds, to other voices (i.e. it tried to talk to the television). To make use of the Kinects microphone array, and its ability to be programed to my voice frequency, I have to use the Microsoft Speech Recognition engine 11. Building the grammers, and the diferent menu levels, has become quite a challenge. In any case I am still going to watch your progress with the pulse ox project. It may be a better solution for me then the way I am headed. I say this because I could use your pulse ox as a service from the Prop instead of slowing the PC down with another added task.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-07-22 20:37
    Nice work Duane!

    From the oscillograph, it looks like there are about 6 to 10 steps in the pulse from trough to peak. Are those steps actually integer counts, and what are the actual counts? It is hard to tell, with the automatic scaling and the blur of the on-screen printing.

    Working backward from the TSL230 data sheet, at x10 sensitivity and /100 divider, the output of the TSL230 would be 10kHz at 13mW/cm2. In 1/40 of a second for the gate, that would be a full scale count of 250. Not enough resolution I think. The Prop should be able to count with the /2 divisor or even the /1 divisor, which should give a lot more steps to work with. At 1MHz, that would be 600 to 1000 steps. Determination of pO2 is going to depend on the ratio of red/ir signals taken at the troughs vs the same ratio taken at the peaks.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-07-23 06:00
    From the oscillograph, it looks like there are about 6 to 10 steps in the pulse from trough to peak. Are those steps actually integer counts, and what are the actual counts? It is hard to tell, with the automatic scaling and the blur of the on-screen printing.

    I had tried to optimize the settings in hopes of being able to get a visual indication of the pulse being detected. I haven't figured out what kind of meaningful resolution I can get from the TSL230 sensor. I plan to test this today.

    If I can't get the resolution required with the current setup, I might try to use brighter LEDs. When I initially tested the TSL230, I used a super bright LED that drew over 100mA of current. I recall getting a very large fluctuation of values with each pulse. While I think brighter LEDs might work well for sensor resolution, I'm concerned such high powered LEDs would cause discomfort to anyone wearing the sensor for prolonged periods of time.

    I'll see what the resolution is with these original LEDs before trying the brighter versions.

    I think I'll want to use the /1 divisor as you suggest. I also want to see if I increase the sensitivity to x100 if the increase in resolution will be meaningful or not.

    As your post suggests, there will be a trade off between many of the parameters. I know the appNotes I read include adjusting the brightness of the LEDs as part of the flow chart when making these measurements. I'll need to take another look at the appNotes so see how many times a second they alternated be red and IR light. I'm pretty sure the amount of time used to sample of the light will be an important parameter in all of this.

    I'll try to get some meaningful measurements of the resolution the TSL230 can achieve today.

    I haven't tried the transconductance circuit you suggested yet. Will a LM358 work as the op-amp in the curcuit?

    Thank you very much for your continued help.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-07-23 06:10
    To be honest I steered clear of the inexpensive ones.

    Some of the reviews on Amazon for the inexpensive units say they agree with the reading they get when check against the meters at their doctor's office.
    I am still building the Speech Interface which is taking me a bit longer than I would like. Building a voice control menu is as hard as they say it is.

    Have you considered using a SayIt? I don't think Parallax sells SayIt modules anymore but modules used in the SayIt are still available. I think they're called VRbot and EasyVR. I doubt they would be "better" than what a PC could do, but they might be easier to interface with these units than interfacing with the PC software.
  • smithdavidpsmithdavidp Posts: 146
    edited 2012-07-23 12:01
    I will look into that. Thanks :smile:
  • smithdavidpsmithdavidp Posts: 146
    edited 2012-07-23 12:08
    I have spent about a week writting rules, and testing, for various Grammers.
  • RS_JimRS_Jim Posts: 1,766
    edited 2013-01-07 15:58
    Duane,
    Did you ever finish this project?
    Jim
  • smithdavidpsmithdavidp Posts: 146
    edited 2013-01-08 05:04
    I'd like to know that too. Granted I am still working on the house I bought and have little time for much of anything else. I am getting closer to building the Robotics shop though. lol (Gotta remember to send Ken pictures of it)
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-01-08 08:40
    RS_Jim wrote: »
    Duane,
    Did you ever finish this project?
    Jim

    Short answer no.

    Longer answer:

    While I think it's very possible to use these sensors for measuring blood oxygen, I think there are easier ways to do this for the hobbiest.

    If you can use brighter LEDs and a different light sensor (like the TSL230 above), I believe it gets much easier to detect the small differences in the light absorbed by the two different frequencies of light (IR and red).

    After checking prices on some of the small retail sensors, I've pretty much decided the easiest route to have machine access to blood oxygen levels is to hack one of these retail units. I purchased two of these units a while back with the intention of hacking them.

    I got side tracked from this project after catching quadcopter fever (I blame Ken (who started the craze) and Jeff (who sold me an ELEV-8)).

    I'm got too much going on this week to do a proper update.

    Next week I'll take some pictures and update this thread properly.
Sign In or Register to comment.