Go Down

Topic: pH sensor, Salinity sensor and Dissolved Oxygen sensor. (Read 24557 times) previous topic - next topic

Hawhaw

Is it possible to make those sensors using Arduino? And can you use just one Arduino board for all those sensors? And I'm also beginner on Arduino and programming.

FirstName

#1
Mar 08, 2013, 12:11 am Last Edit: Mar 08, 2013, 12:17 am by FirstName Reason: 1

Is it possible to make those sensors using Arduino? And can you use just one Arduino board for all those sensors? And I'm also beginner on Arduino and programming.

Yes i think. In two words. First you need to find a data-sheet of you sensor (probe). Then you can connect probe directly to your arduino board. Or first make a little intermediate board to regulate your current tension etc. But i think in most of probe (sensor) you can find already intermediate board (look the price).
For example.

robtillaart


You can connect (most) existing sensors to the Arduino, you should look at the voltage level of course.
PH - there exists a nice sensor from atlas scientific which is discussed on the forum many times (google arduino ph atlas scientific)
Salinity - I think by measuring resistance of the water?
Oxygen - ?

you could be inspired by this - http://nznano.blogspot.nl/2011/12/homemade-spectrometerspectrophotometer.html -
(there are more spectrometers out there)
DOn't know how well they will detect dissolved atoms...
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Hawhaw

Thanks for your replies. I guess I'll have to learn more about Arduino then

michinyon

Quote
Is it possible to make those sensors using Arduino?


What do you mean by this ?

If you have got a sensor from somewhere,   it is almost certainly possible to use it with an arduino.  The exception may be some sensors which use high voltage.

But can you "make" these sensors with an arduino ?   Like "make your own" ?  Probably not.  The operating principles of these sensors are not simple and require materials and fabrication techniques that you probably don't have.


ODwyerPW

What you can do with the Arduino that is very useful is to receive signals from these probes/circuits and make them available for display, data archiving and control.

There are a number of folks doing things with these probes to control their aquariums. Just search on Aquariums. I've seen handmade ph, temperature and conductivity probes. I recall one user that has even custom built PH, ORP and Conductivity Shields. (search Arduarium)

BTW, Salinity can be calculated from a conductivity probe.  In fact, Conductivity, Salinity and Total Dessolved Solids can be derived together.

Atlas Scientific has nice stuff (I am using it for two projects that involve Arduino for prototyping). It is expensive, but is pretty much system agnostic (they standardized on serial communications to interface with their sensor/circuitboard combos.)
Quiero una vida simple en Mexico...nada mas.

michinyon

Conductivity is easy to measure.   You can easily calculate a dissolved salt amount which is equivalent to that,   provided you are happy to assume that the conductivity is caused by salt and not by something else.

mchetan133

Please provide me the links where I can buy Dissolved oxygen and salinity sensor

ODwyerPW

Quiero una vida simple en Mexico...nada mas.

erikyo

I know this post is old but if you're still interested I've done a function that allows you to calculate the maximum concentration of dissolved oxygen in the water... not by reading a sensor but calculating with temperature and (optionally) with pressure and tds ppm.

It can help to establish maxDO (but not a real reading!) and automate, for example, an air pump in hydroponics.

cheers, Erik


gist: https://gist.github.com/erikyo/3baa42d4d1f07e93913eaedb76fe64dc


Code: [Select]
// --------- Max Dissolved Oxigen Saturation ------------//
//
// Equation for the Henry coefficient as a function of temperature and salinity is used to calculate values
// for unit standard atmospheric concentrations (USAC) in freshwater and seawater in equilibrium with air at a total pressure
// of 1 atmosphere. It is estimated that the possible error in the new USAC values is no greater than $\pm 0.1%$ and probably less.
// Tables and equations are presented for obtaining accurate USAC values in the ranges $0^\circ < t < 40^\cir C and 0 < S < 40$.
// Simple procedures are given for calculating standard atmospheric concentrations at pressures different from 1 atm.
//
// Reference https://water.usgs.gov/software/DOTABLES/
// Dissolved oxygen (DO) solubility over a range of user-specified values for
// water temperature, barometric pressure, and salinity or specific conductance.
// Low memory usage function for Arduino, esp 8266 who can estimate the DO,
// useful for water testing, hydroponics and aquarium automation etc

// Functions
float getMaxDO(float wt, float pres = NULL, int ppm = NULL) {
  float sat,tk, bp, sal, sc;
 
  // compute Kelvin temperature
  tk = wt + 273.15;

  // compute oxygen solubility in freshwater at 1 atm and input temperature
  sat = exp(-139.34411 +(1.575701E5 +(-6.642308E7 +(1.2438E10 -8.621949E11/tk)/tk)/tk)/tk);

  // if have pressure data
  if (pres) {
   
    // convert bp to atmospheres
    bp /= 1013.25;
     
    // compute pressure correction
    float u, theta;
    u  = exp(11.8571 +(-3840.70 -216961/tk)/tk);
    theta = 0.000975 -1.426E-5 * wt +6.436E-8 * wt * wt;
    sat *= (bp - u)*(1 - theta * bp)/((1 - u)*(1 - theta));
 
  }

  // if ec
  if (ppm) {
   
    // will use the original dotable variable name
    sc = ppm;
   
    // convert ppm to salinity
    sal = 5.572E-4 * sc + 2.02E-9 * sc * sc;

    // compute salinity correction
    sat *= exp(-1 * sal * (0.017674 +(-10.754 +2140.7/tk)/tk));

  }

  return sat; 
}

void setup() {
}

void loop() {
  // your vars
  float my_wt = 25.00;
  float my_pres = 1010.00; // input pressure expressed in millibars
  int my_ppm = 1000; // input your TDS PPM
 
  float MaxDO; // our return var
 
  MaxDO = getMaxDO(my_wt, my_pres, my_ppm);
 
  Serial.print("Max Dissolved oxygen (DO) solubility of ");
  Serial.print(MaxDO);
  Serial.print("mg/L at ");
  Serial.print(my_wt);
  Serial.print("°");
 
  if (my_pres) {
    Serial.print(" with ");
    Serial.print(my_pres);
    Serial.print("millibars");
  }
 
  if (my_ppm) {
    Serial.print(" and at ");
    Serial.print(my_ppm);
    Serial.print(" TDS PPM");
  }
 
  Serial.println();
}
http://www.codekraft.it

https://github.com/codekraft-studio

Go Up