Shop OBEX P1 Docs P2 Docs Learn Events
Help needed with mV input BS2 project - Page 2 — Parallax Forums

Help needed with mV input BS2 project

2»

Comments

  • RDL2004RDL2004 Posts: 2,554
    edited 2012-05-16 01:08
    Ah yes, the AD622 is not "rail-to-rail" but the AD623 is. The output of your sensor is to low for the 622. You may actually need a dual polarity power supply. Fortunately, this is not hard to do since lots of current is not necessary.
  • willembadwillembad Posts: 47
    edited 2012-05-16 11:56
    LOTS of mucking about - zero progress. I'm convinced that my noise level is too high and signal too low for me to make it work. Is there anyone on here that freelances and would like to design the amp circuit for me? PM me details of compensation for your time and effort.
  • RDL2004RDL2004 Posts: 2,554
    edited 2012-05-16 20:24
    I played around a bit today with a lowly LM301 that had a +/- 5 volt supply, but results were erratic. I wonder if the ADC alone can read that low. I made a thermometer demo a few years ago that used an ADC0831 reading an LM34 between 60 and 188 millivolts and it worked fine. 60 mV is getting down near where your sensor works. I might have an LM324 somewhere, if I can find it I may experiment with that tomorrow (if I have time).
  • RDL2004RDL2004 Posts: 2,554
    edited 2012-05-17 12:01
    I hooked up a BS2 to an ADC0831 this morning and did some experimenting. It's possible it may be made to work "well enough". The 12 bit ADC you were looking at may do okay also.

    I set up the ADC0831 for 25.6 mV full scale and set the input to about 12 mV. The noise down there is pretty bad on a BoE breadboard, but the results were surprisingly not that bad. The was a lot of fluctuation, but at 12.06 mV on my meter the ADC readings mostly stayed between about 10 and 13 mV.

    I tried varying the input over the full range and the readings agreed reasonably well with my multimeter. I would be curious to see what the signal you're getting now from the sensor looks like (with respect to noise and such).

    I had the scope probes attached to the breadboard through 6 inch pieces of jumper wire and there are fluorescent lights, radios, and a PC with USB running everywhere close by, so the noise may not actually be as bad as it looks in the picture.
    568 x 449 - 19K
    1024 x 681 - 215K
    320 x 234 - 6K
  • willembadwillembad Posts: 47
    edited 2012-05-17 12:47
    Thanks for the effort. I had considered doing that but the actual "working" range (where most of my use would be) will be between 9mV and 15mV. That's a 6 mV swing and I have to be able to read that in a minimum of 120 steps. Think that would work? What would be the best way to set the adc to such a small range?

    I did find a schematic online for a similar application and all they were using was a single dual-supply, rail-rail op-amp. The specific amp is discontinued but I ordered an equivalent and will copy that circuit to see what I get. Should have the new goodies in a few days.

    Thanks again for the help. It is a TON of reading but I'm slowly getting my head around it.
  • RDL2004RDL2004 Posts: 2,554
    edited 2012-05-17 13:29
    The ADC0831 TLC0831 is 8 bit, so 256 steps. I had it set up for 0-25.6 mV, so resolution was 0.1 mV. You can pretty much set it up for any range you want between 0 and 5 volts. As I pointed out, the biggest issue is the noise. An op amp pre-amplifier is probably necessary, but even with an op amp, you are going to have to be very careful getting the signal into the amp with as little noise as possible. Some sort of precision voltage reference may be needed instead of just using the power supply.

    Also, I'm not sure what kind of equipment you're using now to measure the sensor output, but I'm thinking you need to take them "with a grain of salt" so to speak.
  • davejamesdavejames Posts: 4,047
    edited 2012-05-17 14:28
    Willem - are there any specs (any at all) for this transducer? As mentioned earlier, I couldn't find any on the related website.

    I'm wondering what kind of circuit loading the transducer can tolerate (capacitive, resistive, etc.).

    Gaining up the transducer's ouptut so that it fits into a reasonable range on the ADC would be advantageous.


    For not having a lot of experience for this sort of effort, you sure picked a good one to teeth on!! Working with low-level signals is always a PITA.


    Always interested in your progress,

    Dave
  • davejamesdavejames Posts: 4,047
    edited 2012-05-17 14:31
    RDL2004 wrote: »
    I hooked up a BS2 to an ADC0831 this morning and did some experimenting.

    RDL - good on you for setting up an experiment. :thumb:

    I've wanted to, but no parts.


    One of the things I love about this Forum: people are willing to take the time and dig into a problem.
  • RDL2004RDL2004 Posts: 2,554
    edited 2012-05-17 16:08
    It looks like people are just hooking the sensor up directly to a digital panel meter and calling it done...

    El Cheapo II Analyzer Kit Review
  • willembadwillembad Posts: 47
    edited 2012-05-17 17:25
    That's exactly what I'm doing now using a cheap dvm board/display. I looked at the schematic today that I built that from and it has 10k load between sensor outputs parallel with dvm input. The reason I want to read with the stamp is so that I could leave it alone for little bit of time and have it stay inside set parameters. Right now I have to personally monitor it and make manual adjustments. After few hours staring at a dvm you'll be motivated to do this to.

    I have to say thank you one more time. I agree that this forum has been a tremendous resource and can not be thankful enough.

    This is not the exact one I'm using but as far as I can tell it's the same specs. http://www.teledyne-ai.com/pdf/r-17med.pdf
    a
    nd http://www.teledyne-ai.com/pdf/schem_b45398.pdf

    N
    ot much to work with :(
  • davejamesdavejames Posts: 4,047
    edited 2012-05-17 18:00
    ...wow...just wow. Not much is right!

    I did find on the b45398.pdf drawing that the sensor requires a 10k Ohm load, so that explains why there's one in the schematic you're using. Doesn't say 'why' it's required though.

    And the output voltage range is 7mV to 13mV?!? To describe a %oxygen range of 0 to 100?!? How's that work?

    Would have been nice if Teledyne included some sort of "response chart" showing the effects of pressure vs. output voltage and %oxygen vs. voltage output.

    Maybe write Teledyne for more info?
  • willembadwillembad Posts: 47
    edited 2012-05-17 18:21
    I was thinking that as well but there's a problem. Teledyne would much rather have me buy an "approved" piece of equipment. Breathing gasses other than air is not rocket science ( or electronics ;) ) but they will not easily support anything that seems like a liability. They have already discontinued their support for the sensors used in re-breathers that are much more critical to life support. For what I'm doing I get to check the contents of a scuba tank after I mixed it with an independent analyzer to confirm the gas before I breathe it.

    Anyway, the 7 - 13 mV is the standard output range of any given cell in air(20.9% O2 - .21 ATA partial pressure) at set temp and humidity. It is very close to linear from 0mv at 0 ATA partial pressure of O2, through 9.2mV at .21 ATA in the case of my specific cell. That means my sensor would read 9.2/.21 or 43.8 mV in 100% o2 (1 ATA partial pressure). I'm not interested in that range since anything over 40% or ~18mV in my case presents a real danger of blowing up the compressor - blow up like in the movies - BOOM. This is where the stamp comes in. It monitors the % O2 going into the compressor and adjusts it to maintain a set %. It also shuts everything down and sounds alarm when % goes over 38% (my limit for safety)
  • willembadwillembad Posts: 47
    edited 2012-05-18 07:36
    PROGRESS! I got ~600mV output swing with a 0-10mV input. Problem is that it varies based on where I stand in the room, believe it or not. I'm now sure that I will have this figured out when the rest of my parts arrive. I'm building a proper RFI screen on the input and should be able to de-couple the power supply much more efficiently then.
  • willembadwillembad Posts: 47
    edited 2012-05-23 15:06
    Dual supply circuit with OP291 opamp failed. Got the AD623 with dual supply left to try but have not had time. I might have to settle for the ~.6V I can get and go from there.
  • willembadwillembad Posts: 47
    edited 2012-05-29 11:33
    Update:

    It's ALIVE!!! I finally took all the circuitry associated with decoupling the supply off and left the filter in the sensor input. Switched back to the original AD622 in-amp and voila. Had to use dual supply to make it work though, but I'm on to the next phase of my build. After I put all the hardware together I will be back I'm sure. My code will need some tweaking then ;)

    Here's the schematic that I ended up with

    O2-Sensor_Amp.jpg
    1024 x 768 - 420K
  • davejamesdavejames Posts: 4,047
    edited 2012-05-29 11:59
    willembad wrote: »
    It's ALIVE!!!

    WoooHOOOO! Glad to hear! :thumb:

    What kind of readings are you getting? Is the output stable? Was the "circuit associated with decoupling the supply" actually causing problems?


    Curious in San Jose.
  • willembadwillembad Posts: 47
    edited 2012-05-29 12:16
    Hi Dave,

    Still can't say for sure if the output is pure dc but it's more than stable enough for what I'm doing. I hooked the circuit up to the adc and it's working perfectly. I have a trimmer to set the gain on the amp and have it set for 2.25V out in air with my current sensor (9.2mV in). This gives me ~ 4V out for my normal range of use and <4.5V when things have to be shut down. That's less than the high rail voltage of the AD622. Resolution at the adc is 10x what I really need so I'm happy.

    With the de-coupling circuit in place the amp worked over a larger range but I was getting close to 0V out when the sensor was in air. I think it was "leaking" through the coupling caps and this caused the output to be non-linear, which for my application was no good. I'm using 0V-0% O2 and xV-21% O2 (air) as my calibration ratio to calculate higher percentages, so it had to be linear from 0v to max out. Glad I got this part done. I'll be sure to bother you later with code questions.

    Thanks again for the help and support.
  • willembadwillembad Posts: 47
    edited 2012-06-01 12:05
    Got the electronics together and sorted some power supply issues. Everything checks out now as far as supplies and the amp functions as expected. Next step is to write some code and see if I can make this thing work.
  • willembadwillembad Posts: 47
    edited 2012-06-06 10:36
Sign In or Register to comment.