SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Mee_n_Mac
#136491
Just to have something to look at and refer to here's an initial block diagram of the basic parts that I think you need.
DivingDisplayBD.jpg
By Mee_n_Mac
#136551
atedeschi wrote:I could not view the image. Here is my email if that will work better: atedesch@gmail.com
Yeah, I'm letting that post stay AFU so the SF admin can see it. I'll try again below.
By Mee_n_Mac
#136610
Just to talk abou the above for a bit. The MCU could be the Arduino Pro Mini mentioned above. My guess is'that it's small enough to fit whatever packaging you'll end up with and can be run off single 3+V battery. Similarly the op-amps can be run of the same and would need a gain of something like 15x-20x to make the O2 output readable by the ADC. The precision voltage reference is to allow a stable offset voltage compensation in the op-amps. So it really comes down to finding a suitable display, one that ideally runs of a battery in the range of 3.0 - 3.6V. I wonder if some graphical display, even where you'd only be using it for number type readouts, might be the way to go ?
By atedeschi
#137465
Thanks, Im going to order some parts now, I got side tracked with work and holidays. Plus work wants me to build a digital depth gauge so I can now multitask in my research.
By atedeschi
#139204
I know its been awhile but I have not given up and you advice has not gone on heard. This is what I have come up with and was wondering what you thought. Also is my gain correct for the amps? I know you had said something about a voltage regulator but your image is gone and I am not familiar with using those.

Here is my first run at it:
https://picasaweb.google.com/1032740155 ... directlink
By Mee_n_Mac
#139352
atedeschi wrote:I know its been awhile but I have not given up and you advice has not gone on heard. This is what I have come up with and was wondering what you thought. Also is my gain correct for the amps? I know you had said something about a voltage regulator but your image is gone and I am not familiar with using those.

Here is my first run at it:
https://picasaweb.google.com/1032740155 ... directlink
There are a couple of things I see right off that need some changing. First the gain is not R1/R2 but rather 1 + the ratio of th resistors for a non-inverting op-amp configuration. See the wiki on this ...
http://en.wikipedia.org/wiki/Operationa ... _amplifier
Second the resistors should be in the kohms to 10's of Kohms range and not ohms and 100's of ohms.

When I get home I can put my take on your circuit into the Spice simulator to get a baseline of what to expect for offset voltages and tolerances and such. One question I did have when looking at this back when, was whether the sensors were like thermocouples, which generally use a special amp arrangement. I'll want to look this (your sensor info) up again. I don't think the guy who did this with the Datel displays worried about this so it may be unnecessary.

I'll try to repost the block diagram I had before as well. The precision voltage reference was to provide a stable, known voltage to the A/D converter so it's output would be the same independant of the battery voltage, which will change as the battery discharges. I don't think you want the apparent O2 readings to vary with battery voltage.
By atedeschi
#139464
Thanks for the info about the gain. I agree I don't think I'll need the precision voltage reference. What do you think about it overall once the gain is adjusted.
By Mee_n_Mac
#139492
I found the block diagram I posted before. I've not had time to sim your circuit but I am cautious re: your choice of an op-amp. The LM358 is not a "rail to rail" op-amp. Meaning it can output up to the +V or down to the -V supplies. Now if you use a 9V battery the +rail is not an issue but not being able to output a voltage near 0V may be.

Have you figured out what you want for a display ?
{It seems as the N&I SF forum is still borked when it comes to uploading and displaying pics in a post}
DivingDisplayBD.jpg
You do not have the required permissions to view the files attached to this post.
By atedeschi
#139519
Could you recommend a better op amp? I was thinking a display like this possible http://www.sparkfun.com/products/9678
But I was going to just have it talk with the computer while testing and get the LED version working first. Then once that is all working make a duplicate with no leds and a screen.
By Mee_n_Mac
#139821
atedeschi wrote:Could you recommend a better op amp? I was thinking a display like this possible http://www.sparkfun.com/products/9678
But I was going to just have it talk with the computer while testing and get the LED version working first. Then once that is all working make a duplicate with no leds and a screen.
I had a chance this weekend to look at this a bit more and I think your LM358 might be OK afterall, so long as you're using the 9V (or at least 5V) supply you showed. While the LM358 can't output more than 1.5V below the + supply, it can go pretty close to the -supply rail ... close enough for your purposes. I do want to do a noise analysis but you can limit the bandwidth of the circuit to a small amount so I don't expect this to become an issue.

I looked again at the general circuit used in the Datel displays and it's pretty much what you're doing, nothing special apparently needed like a differential amplifier. I added a low pass filter (LPF) to reduce the noise, the BW is about 16 Hz. If you wanted a smaller size cap, you could decrease it's value by a factor of 10 (BW = 160 Hz) w/o appreciably affecting the noise output (my guess).

If you have an O2 sensor handy, I'd suggest breadboarding up a circuit and using it to verify everything works as expected and to use as a software development tool. You wanted an easy way to calibrate the systems and that's something the needs some discussion.
NonInvOpampLPF.jpg
You do not have the required permissions to view the files attached to this post.
Last edited by Mee_n_Mac on Thu Feb 16, 2012 12:25 pm, edited 2 times in total.
By Mee_n_Mac
#139830
rebelzach wrote:I'm wondering if you could send a lower voltage to the "aref" pin using a resistor from the 3.3v on the Arduino. Effectively recalibrating the ADC to read from a much smaller range. See here http://arduino.cc/en/Reference/AnalogRe ... rence.AREF
That was one of my earlier thoughts for the OP to ponder. While you could reduce the gain of the op-amp circuit this way, I think you'll still need some amplification to get the A/D resolution (and quantization error) to where the OP wanted it. That said I think he'll want to use some external precision voltage reference @ 2.8 - 3.0 V to get a stable, reliable reading.

ps - I think the Arduino allows an external reference down to ~1 V but I thought I read about another limitation in that the ext ref can only be so many volts lower than the supply voltage, ie - 1.1V ext ref is a nogo with a 5V Arduino. Am I remembering this correctly or ???
By atedeschi
#139964
I thought with the external precision voltage the reading will change as the battery power becomes less.
By Mee_n_Mac
#139965
atedeschi wrote:I thought with the external precision voltage the reading will change as the battery power becomes less.
Just the opposite. The A/D outputs a count that is the ratio of the input voltage to the reference voltage. If the ref voltage is just the battery voltage, which changes as the battery discharges, then the A/D counts will change even when the input voltage from the sensors stays the same. You want a reference voltage that stays the same even as the battery changes.