Shop OBEX P1 Docs P2 Docs Learn Events
?????Measuring pH and Salinity with the Basic Stamp?????? — Parallax Forums

?????Measuring pH and Salinity with the Basic Stamp??????

Anthony240Anthony240 Posts: 24
edited 2006-02-23 02:47 in BASIC Stamp
Hello,
·
I am working on my senior design project at Purdue University.· I am building a fish tank monitor that will monitor water parameters such as temp, salinity, pH etc...· I have chosen to use the Basic Stamp 2 to do my programming in.· I was wondering if anybody knows what circuit and/or code I could use to·measure salinity and/or pH levels.· I have been reviewing the Applied Sensors V1.3 book and in there is a way to measure conductance, which can be converted into salinity using some complex algorithms but I have not been able to successfully convert conductance to salinity.· I would appreciate any help anybody could provide on this subject.
·
Thank you
Anthony

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2006-02-22 15:06
    Anthony,

    Temperature is easiest. You can use some of the temperature modules discussed in this and other forums. Also have a look at the Parallax products pages.

    Given the sensitivity of tropical fish to their environment, I'd probably use proven sensors from one of the instrumentation companies; Hache, Omega, etc. Unless part of the project is to learn how to build the sensors, buy the sensors. With some sort of analog output ( 0 - 5 volt, 4 - 20 mA, etc) and A/D converter ( I use LTC1298, also available from Parallax, I think) which the stamp can access. Also on the market are smart sensors that can talk to the Stamp via RS-232 serial communication.

    Regards
  • steve_bsteve_b Posts: 1,563
    edited 2006-02-22 15:11
    Just curious....does the boiling temperature of water change with salinity?
    I know the freezing point does.

    What I'd suggest by this is, if water with a high salinity takes X more power to heat it by Xdegrees above ambient...then that might be a way to make salinity measurements.
    You could pulsout something to heat (or some such way of controlled heating via the stamp) and also put a temp sensor in the water you're measuring.
    The thing is....you'd need a measured volume to do this in.
    So you'd have to make a sampler that would take a certain amount of water from the tank (at what level?...does salinity change from the top of the tank to the bottom?).
    Maybe you could weigh the sampled water to determine it's amount.

    As far as pH goes....all i know is, the more acidic it is, the more it acts like a battery.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve

    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • cyberbiotacyberbiota Posts: 79
    edited 2006-02-22 17:00
    Anthony-

    The resistance of the water drops as salt ion concentration increases. The easiest way to measure resistance with the stamp is with the RCTime function and a simple resistor/capacitor circuit. You could also use one of the many analog to digital converter IC's that are out there with a resistor divider circuit (one of the legs would be the resistance of the tank water).

    For pH you are going to have the best luck buying a pH electrode. I wouldn't try to make one.

    peter

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Peter C. Charles

    Director, Research and Technology
    CyberBiota, Incorporated
    Peter.charles@cyberbiota.com
    http://www.cyberbiota.com
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2006-02-22 17:05
    The thing about conversion of conductance to salinity is that different ions have different mobility in solution, and the conductance also depends on pH (which is of course the highly mobile hydrogen ion). If all factors are controlled but one, it can be done with some degree of precision. But if the soup contains many different ingredients with independently varying concentrations, it can become very dicey. There are electrodes that can detect specific ions, just as a pH electrode detects the hydrogen ion specifically, without much interference from other constituent ions.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • cyberbiotacyberbiota Posts: 79
    edited 2006-02-22 17:17
    Dr. Allen is, of course, correct. Sodium chloride is not the only ion in the tank that will effect the conductance. But "salinity" usually refers to all of the salts that are in the water (at least years ago when I had a marine aquarium). Thus, when you are talking about "salinity" of the tank water, the contribution by sodium chloride is just one part (albeit the biggest part) of the equation. Moreover, the measure of salinity that is used for these tanks is the specific gravity, which is also dependent upon all of the compounds dissolved in the water (not just the sodium chloride). While I don't know that the approximation of salinity by conductance would be as accurate as the approximation by specific gravity, it would be interesting to see a comparison of the two techniques.

    peter

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Peter C. Charles

    Director, Research and Technology
    CyberBiota, Incorporated
    Peter.charles@cyberbiota.com
    http://www.cyberbiota.com
  • gibbmangibbman Posts: 98
    edited 2006-02-23 01:19
    Anthony et al.,

    Not trying to hijack a thread here, but I also am working on a project to take estuarine measurements for our Marine Science program (trying to involve that program with the electronics/computer folks). I am wondering about oxygen levels in the water, though salinity and pH would also be interesting target data. Am I correct in assuming salinity sensors might run to the expensive side?

    Thanks, and I'll get out of your thread now....

    Jim

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    In the end, it seems that it's all about getting the LEDs to blink....
  • cyberbiotacyberbiota Posts: 79
    edited 2006-02-23 02:47
    Anthony and Jim-

    Ion-specific electrodes can be purchased for ~$60 (US) up to > $600 (US) from scientific equipment suppliers like Fisher Scientific (https://www1.fishersci.com/index.jsp) or manufacturers like Cole Parmer (http://www.coleparmer.com). The common ones (such as pH and chloride) tend to be less expensive than the more exotic ones (lead or ammonium ions). I don't know how feasible it is to interface them to a Stamp, but my guess is that given some patience; a good, high-gain, low-noise instrument amplifier with excellent common-mode rejection ( like the Burr-Brown INA114; see- http://focus.ti.com/docs/prod/folders/print/ina114.html); and a stable ten or twelve bit ADC you might be able to get a decent monitoring system running. It won't be cheap or easy, but think of the marvelous learning oppurtunity! I, for one, would be very interested to hear how you do if it works out (or even if it doesn't).

    Best of luck!

    peter

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Peter C. Charles

    Director, Research and Technology
    CyberBiota, Incorporated
    Peter.charles@cyberbiota.com
    http://www.cyberbiota.com
Sign In or Register to comment.