PH Probe A/D Coverter ?


Closed Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Dec 2004
    Location
    nebraska
    Posts
    79

    Default PH Probe A/D Coverter ?

    I am trying to interface a PH probe to a pic 18F458. The amplifier and buffer circuit for the probe puts out 0 - 14 volts correlating to the ph scale. I tried using the on board AD converter but the resolution is not good enough. I ran the signal threw a voltage divider so that I could scale down my 0 - 14 Volt ph reading. And calibrating the probe could be a problem because Vref+ is 5v. Calibration is at 4, 7, and 10. 10v / 2 = 5 which would be at the top of my vref with no room for error. I've looked all over the internet for an ad converter to fit my purpose but can't find one. This is what I am looking for and why. I want a 14 bit AD chip that is I2C bus capable, its Vref+ needs to be able to goto at least 16.384 volts and vref- needs to be 0v.The 16.384 v is so that I would have a resolution of 1mV. The I2C bus is needed because it is easy. I would try SPI but I am not very good at the protocol. Is there an AD chip thats Vref+ goes that hi. Does anyone know where to look for a chip like this. I looked at MC and Maxim but did not see anything close. They both had chips but nothing that has a Vref+ that hi.
    Thanks
    Shawn

  2. #2
    Join Date
    Dec 2004
    Location
    nebraska
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Another question to help me solve this problem. When I first started playing with the VREF on the pics I thought you could raise vRef+ above vdd, well looking at the data sheets I learned I was wrong. My next question is can I raise Vref- above ground, say 1.33v or does vref have to be ground. The reason I ask, is because if I divide the output of ph probe amplifier by 3 then I should be able to get the range I want out of it in a 2V swing. If I can set vref+ to 2.354V and Vref- to 1.036V I will get a 2mV/Bit of resolution which I think will work for what I want to do.
    It would still be nice to find an AD chip so I do not have to use voltage dividers.

    Shawn

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by shawn View Post
    My next question is can I raise Vref- above ground, say 1.33v or does vref have to be ground.
    Yep, you can put Vref- to anything you want (>Vdd not included )
    If your crafty enough, you can even use a couple of the PICs pins to make an R-2R ladder so a guy can even vary Vref+ and Vref- to suit the conditions. (i.e. read 0 on the A/D, lower Vref-, read 1023 on the A/D, raise Vref+, and so on...)

  4. #4
    Join Date
    Nov 2006
    Posts
    70


    Did you find this post helpful? Yes | No

    Default multiple splitters?

    Not a real answer to your hardware questions, but could you rig up a simple manual switch that lets you select from among 3 or 4 voltage-divider arrangements? Whenever I've used a ph meter I have always known whether I had a strong acid, something more or less neutral, or a strong base before getting an exact reading. If you have a clue as to what your are testing beforehand and can anticipate a reasonable range of output, you might be able to tailor the voltage divider to the output and get a lot more out of the 10-bit ADC.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by brid0030 View Post
    but could you rig up a simple manual switch that lets you select from among 3 or 4 voltage-divider arrangements?
    That's what I was saying with using the extra pins.
    If you take the extra pins, bring them out, connect a 1K (for example) in between each pin, put +5v and the top, ground at the bottom of the string, and change the pins from input to output (or back), and high to low (or whatever), you can dynamically change the Vref (+ and -) points without having to slide a switch...let the software do the work. Start wide and dial the reading down to a tight reading.
    For that matter, you could even use a couple of digital pot's as a variable voltage divider under software control.

  6. #6
    Join Date
    Dec 2004
    Location
    nebraska
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Ok guys this is what I did. When I think of a voltage divider I think of 2 resistors thus divide by 2 which does not get it done. So what I did was use a 3 resistor voltage divider to divide by 3 which puts me under 5v max output. The highest ph reading I need is a little over 10 for calibration purposes. Dividing the 0 - 10V ph reading by 3 gives me .00333 volt change for every hundredth in ph degree. So then to figure my Vref+ I used this (vref+ / 1024 = .00333)
    Now my variable that is read from the ad port is my exact ph +/- a hundredth, which I can live with since measuring ph is pretty much a joke anyways.

    My next question is, what is a good way to make a non drifting precision regulator. Accurate to the mV and will hold voltage in rm temp. I hate using pots and caps on LM317 regulators it always seems like they drift allot, is there a better way.

  7. #7
    Join Date
    Dec 2004
    Location
    nebraska
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Another question for you guys involving my ph probe project. Right now my amplification circuit for the ph probe has pots for calibration. I wanted to add digital pots instead. I realize that the digital pots are low amperage but I am having a problem. I hooked up the pot and wrote a program to vary the wiper position, and it works fine.Its a 10k digital pot by the way and its a mcp 41010. But when I hook my 12v regulated voltage to it (PA0), they burn up, they burn up without the wiper attached to anything and without the other side of the resistor hooked up (PB0). I don't understand with just the 12 volts hooked up there should be no amperage. Is there a better digital pot that will handle higher voltages/amperages.

    Shawn

  8. #8
    Join Date
    Nov 2006
    Posts
    70


    Did you find this post helpful? Yes | No

    Default power source

    If you only want a single voltage divider you can adjust the values of the two resistors to get whatever level of voltage drop you want. Sorry if you knew this already, but that wasn't clear from your post. Just make the 'first' resistor twice as big as the 'second,' which is essentially what you do when you use three resistors

    For a stable power source you could try a switching power supply. I have used a LM2672 by national semiconductor with good success--I think it is the simplest in terms of a low part count. If that does not give you enough stability, you could use two regulators: a switching supply followed by a linear regulator. Also, maybe a fixed linear regulator would give better stability than one that is adjusted using a pot.

    Sorry I know nothing about digital pots.

  9. #9
    Join Date
    Dec 2004
    Location
    nebraska
    Posts
    79


    Did you find this post helpful? Yes | No

    Default Varying Vref best way.

    brid0030

    Thanks for the ideas. I hadn't thought about the first resistor being twice the size of the second resistor. That is a good idea, better idea. I've already scratched the voltage divider idea and have just lowered the gain of the probe amplifier. I'm going to look into the switching regulator, I have never played with one.

    I have the amp working good now but the varying voltage on the vref pins is throwing me for a loop. I may have questions for you on the switching regulator. The vrefs need to hold within preferably 1 or 2 mV, which is maybe an unobtainable goal. For my temp probe I am going to need 1.024 v on Vref+ and 0V on Vref-. This gives me 1mV resolution for my temp probe, a LM34.
    For my ph probe I need Vref+ to be 3.41V and Vref- to be 0V.
    For my orp probe I need Vref+ to be 3.354V and Vref- to be 2.333V This again gives me a resolution of 1mV. The reason Vref- for the orp probe has to be 2.333V is because the ph probe and the orp probe will both be in the water at the same time and they are both referenced at 2.333v, which is a virtual ground because both probes can read + or - . Both probes have to be at the same potential. This Vref problem I am having is a stupid problem but I am pretty sure it is obtainable even for a novice like me.

    Thanks Shawn

  10. #10
    Join Date
    Nov 2006
    Posts
    70


    Did you find this post helpful? Yes | No

    Default

    You appear to be groping your way through. Sounds familiar. I'm no expert on power supplies, so I don't know how much stability is improved by a switching supply. Fortunately, they are pretty easy to set up (though not as easy as a linear regulator). On the national semiconductor webpage, you can find a web-based and a downloadable tool for designing a power supply. Both with present you with various options and output a parts list and a circuit diagram for you. By the way, most of the components are available as free samples.

    Can you get over the wobble in the Vrefs by sampling over a longer period, or by averaging lots of ADC readings?

  11. #11
    spec's Avatar
    spec Guest


    Did you find this post helpful? Yes | No

    Red face i would like to have a copy of your ph schematic

    im busy to connecting a ph sensor to a controller
    but searshing for a solution for a convertor to 0-10V

    is there a way to help me?
    regards

Similar Threads

  1. 12f675 A/d Miseries
    By MARAD75 in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 16th December 2008, 02:16
  2. 12F675 A/D and GPIO sleep interrupt
    By macinug in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 8th September 2008, 14:39
  3. Need advice on A/D
    By james in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 24th August 2007, 19:30
  4. A/D converter fails?
    By egberttheone in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 13th February 2006, 18:57
  5. 18F2525 A/D, Comparator and Vref modules
    By fbraun in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 20th May 2005, 23:17

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts