Pages: [1]   Go Down
Author Topic: PH fish tank  (Read 1197 times)
0 Members and 1 Guest are viewing this topic.
Florida
Offline Offline
God Member
*****
Karma: 2
Posts: 559
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, I'm trying to measure the PH levels of my fish tank. Spark Fun sells a kit (see link below) but I don't know if this would work for my project. I need my Arduino to check the ph level continually and dump a mix into the tank if the ph falls below 10.5. Would this kit work for this application? If so does anybody know where I could look at a sample program like this. The programs they have seem to send the values to the computer which is not what I need.

Also, If anybody knows of a different kit that would work better or is cheaper that would be awesome.


Thanks!!!

https://www.sparkfun.com/products/10972
Logged

Offline Offline
God Member
*****
Karma: 17
Posts: 721
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow.  What kind of fish like pH over 10.5?  I've kept just about everything out there but that's a new one to me.

That seems like a doable project.  A pH probe puts out a mV signal and you simply read that.  You will need some method to calibrate what mV value corresponds to what pH and that will need to be recalibrated pretty often. 
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17259
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The programs they have seem to send the values to the computer which is not what I need.

No, the sparkfun code example shows the PH module talking to the arduino on pins 2 and 3 using the softserial library so the measured values will be received by the arduino and available to use as you wish in your sketch.

Lefty
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That kit puts out the pH as a serial signal, which you can read using the Arduino.

A less expensive solution would be to buy a pH probe (available from ebay), use an instrumentation amplifier to amplify the probe output and add an offset, and read the amplifier output using an Arduino analog input.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Inland Empire, California, US
Offline Offline
Sr. Member
****
Karma: 5
Posts: 274
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, you can use this to adjust the pH of your aquarium, but you will need to write some code.  The kit is a very good starting point if you are new to measuring pH with glass electrodes. the probe generates a very small voltage that must be properly amplified for it to be usable. the stamp does this automatically, making it very easy to "plug-and-play". The probe must be calibrated regularly hence the buffer solutions. if you already have the buffers, you can find a probe ($20) and stamp ($25) on eBay.
Logged

Florida
Offline Offline
God Member
*****
Karma: 2
Posts: 559
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for all the input!! I still have a few questions.


From what I saw it seemed like you could just leave the PH sensor in the tank for long periods of time with out attention. Is that correct? Also, if I use the wiring diagram (link below) could anybody show me how to get the value from the sensors into an integer so I could use the numbers in my program. 

http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/Biometric/Wiringdiagram.pdf

Also, this is not for fish. It's for algae.

http://www.algaelab.org


Thanks for all of your help!!!!
Logged

Inland Empire, California, US
Offline Offline
Sr. Member
****
Karma: 5
Posts: 274
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
From what I saw it seemed like you could just leave the PH sensor in the tank for long periods of time with out attention.
In very clean water, possibly, and even then the chemistry of the probe has a tendency shift over time.  The surface of the bulb needs to be clean for a good measurement. On top of that I'm guessing you'll be growing algae... In my experience, you'll find yourself cleaning it about once a month( probably more in your case) and calibrating every week or so. It depends also on what the alga's tolerances are.

Quote
Also, this is not for fish. It's for algae.
I was gonna say, poor fisshies smiley-sad
Logged

Florida
Offline Offline
God Member
*****
Karma: 2
Posts: 559
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Spark fun gives you 3 bottles; 250ml Red Buffer Solution - pH 4.0, 250ml, Yellow Buffer Solution - pH 7.0, 250ml Blue Buffer Solution - pH 10.0. How long do you think that will last? Also do I just leave the sensor in the tank or do i need to extract a sample from the water and place it into the sensor.

Thanks,
Drew Davis
Logged

Inland Empire, California, US
Offline Offline
Sr. Member
****
Karma: 5
Posts: 274
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
How long do you think that will last?
I use 20-30ml in a small medicine cup, once a week, so 250ml should easily last at least 10 weeks.
Quote
Also do I just leave the sensor in the tank or do I need to extract a sample from the water and place it into the sensor.
Have you used glass pH electrodes before (the handheld kind, possibly)? If not, I would strongly encourage you to do a google search and research them. Anything left in the tank is going to quickly acquire a nice layer of scum within a few days, therefore requiring frequent cleaning. How much the algae growth affects your reading, I couldn't tell you, maybe not at all. (In my situation, accuracy mattered greatly.) And frequent cleanings run the risk of damaging the sensitive bulb. If it were me, I would get two probes and keep one in the tank and properly store the other. When it is time to take your measurements, place the clean probe in the tank and let it stabilize for a minute, then compare the two readings.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Also, this is not for fish. It's for algae.

http://www.algaelab.org

Interesting link! Glad you said it was for algae as I was surprised like Delta_G with what fish you were trying to turn into caustic soup  smiley-eek

If you look up aquarium controllers a lot of the pH probes are damn expensive. I'm not sure if that's just because they're made to last while continually in the tank, or also because aquarium equipment is often overpriced. Some of the well-known manufacturers recommend cleaning them at least every couple of months. Many people use undiluted white vinegar or lemon juice for this. Even then the probes only last up to 18 months or so.

As for the buffer solutions, since you're only concerned with a pH of 10-11, did you know a borax solution can be used to calibrate near this range? It will produce a buffer solution of around pH 9.2, so this method requires a controller that will allow calibration using arbitrary buffers. That Sparkfun kit doesn't do that.

EDIT:
I just did some searching and apparently these probes are pretty popular for the price:
http://www.bulkreefsupply.com/brs-brand-ph-probe.html
« Last Edit: December 30, 2012, 01:52:59 am by jabbado » Logged

Inland Empire, California, US
Offline Offline
Sr. Member
****
Karma: 5
Posts: 274
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
did you know a borax solution can be used to calibrate near this range? It will produce a buffer solution of around pH 9.2, so this method requires a controller that will allow calibration using arbitrary buffers.That Sparkfun kit doesn't do that.
Because it already has set calibration points.    4.0, 7.0, and 10.0 are very commonly used and widely available buffer solutions. And at $25, the stamp is the cheapest I have found.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
did you know a borax solution can be used to calibrate near this range? It will produce a buffer solution of around pH 9.2, so this method requires a controller that will allow calibration using arbitrary buffers.That Sparkfun kit doesn't do that.
Because it already has set calibration points.    4.0, 7.0, and 10.0 are very commonly used and widely available buffer solutions. And at $25, the stamp is the cheapest I have found.
But he's only interested in the 10.0 range, the 4,0 and 7.0 is useless. Considering the OP is only interested in a small range of pH values, it would be cheaper to purchase a Ph probe, use a single-chip instrumentation amp and do the calibration on the Arduino itself. The pH 10 buffers don't keep very well as they absorb CO2 from the atmosphere.
Logged

Florida
Offline Offline
God Member
*****
Karma: 2
Posts: 559
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for all the help! I think I will probably buy the kit from spark fun and learn how to measure different ph levels before using it to grow algae.

Thanks again,
Drew
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Drew I don't know if I am too late, but I have recently released a ph shield for arduino on tindie. I'll be writing a in depth tutorial on how to control ph in the few weeks too.
Logged

Arduino PH Shield:
http://tinyurl.com/a3ald3f

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I actually did this some years ago.  I started out with an arduino, but ended up doing this with x-10 modules and a set-point ph monitor.  The monitor sent a signal to the x-10 wall module, which was sent over the home wiring to a usb wall outlet receiver and finally to the computer.  I used a wall x-10 wall receptacle to plug a surplus medical dosing pump into to deliver the carbonate.  The whole thing was programmed and controlled by (I forget the name) x-10 software.  I got the idea and instructions from someone else on ReefCentral.com.  The discussion is probably archived.

Mike
Logged

Pages: [1]   Go Up
Jump to: