Aquarium monitor


19 posts
by yarker » Fri Sep 07, 2012 3:29 pm
Hi, im thinking about getting a Pi to use as an aquarium monitor, i'll be using this to monitor things like water temperature, ph level, oxygen levels etc.
Can any of you recomend a program that will display the readings of at least 4 sensors. And is this something that will be fairly easy to do (i.e - getting the various sensors to work with the Pi) as i haven't really messed about with electronics and programming since i was in college about 12 years ago!

Cheers, Lee
Posts: 1
Joined: Fri Sep 07, 2012 3:19 pm
by mahjongg » Fri Sep 07, 2012 5:41 pm
Its all about having sensible sensors that can be interfaced easily to the PI, having software to read the sensors out and producing a nice graph or so is really secondary.

Let's see, you need sensors for:

* Water height, a simple water feeler sensor (water is conductive) would take care of that.
* Temperature, a temperature sensor is also relatively easy, commercial sensors cost a few euro, and are precise to about a quarter of a degree (Celcius/Kelvin) and can be connected to the I2C interface.
* pH level, don't know any cheap sensors that measure acidity (probably expensive)
*oxygen levels, as pH level, but much more so!

So if you are serious about this I would start by researching of the difficult sensors exist!
User avatar
Forum Moderator
Forum Moderator
Posts: 5865
Joined: Sun Mar 11, 2012 12:19 am
by morphy_richards » Fri Sep 07, 2012 5:50 pm
You could look for threads related to analog to digital converter or adc in the interfacing section of the forums. Nice idea for a project. Have you looked into the specific sensors you are going to use for this? (as pointed out by Mahjong) What about optimal amount of fish food and performing partial water changes?
User avatar
Posts: 886
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by pygmy_giant » Sat Sep 08, 2012 12:12 am
The software in this thread could be a good starting point for your solution: viewtopic.php?f=44&t=15257&p=168132&hilit=GPIO+browser#p168132

It could give you control, warning and peace of mind while away from home.

You might have to hack existing aquarium gadgets to connect to the pi - I have seen sophisticated microcontroller controlled life support systems with remote internet access advertised in the marine aquarium trade and can see how the the pi could be cheaper.

Most of your head scratching may end up being aroud physically connecting the pi's GPIO. Sensors with a switched output require just a few additional resistors but sensors with an analogue output can be a bit of a headache as the GPIO inputs are binary, unless utilising the I2C / SPI protocol, in which case you may do well to consider something like a Gertboard...
Ostendo ignarus addo scientia.
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by pygmy_giant » Sat Sep 08, 2012 12:44 am
Edit: Hack-a-day says:

"Right now WebIOPi is only able to turn GPIO pins on and off. That will change as [Eric] implements UART, SPI, and I2C in his project, making it possible to do a lot of cool stuff without having to write much – if any – code."

so maybe its not quite good to go yet....?

... the official website is here: http://trouch.com/2012/08/21/webiopi-co ... a-browser/
Ostendo ignarus addo scientia.
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by rleyden » Sat Sep 08, 2012 3:38 am
Adding the sensors for an aquarium monitor need not be all that complicated or expensive.

I'm considering a hydroponic system controller which would include a similar group of sensors as well as pump and valve control. So far I've added a 1-wire temperature sensor and an analog humitidy sensor via MCP3008 analog to digital interface. This is running as parts of a webcam server while I consider the next steps.
The 1-wire temperature sensor was less than $3 relatively easy to set up following directions in another forum thread. The MCP3008 was also only a few $ from Adafruit which has an excellent tutorial.
(http://learn.adafruit.com/reading-a-analog-in-and-controlling-audio-volume-with-the-raspberry-pi/connecting-the-cobbler-to-a-mcp3008)

I did invest in the Adafruit Pi plate ($16) which gives you an easier and more stable access to the GPIO pins.
Phidgets has a nice assortment of enviromental sensors including a low cost pH probe for $24.
( http://www.phidgets.com/products.php?category=6 )

pH probes(as well as oxygen probes) put out a mV range signal so you would need to build an instrument amplifier circuit or buy an adapter ($30-Phidgets).
I have a koi pond oxygen sensor with an attached meter which I bought for about $120, so it stand to reason the sensor by itself should be less. The probe isn't intended for continuous monitoring. The documentation implies that it can get easily fouled. So, you need to research that.

For my hydroponic garden I dream of adding ion specific sensor electrodes which would allow me to monitor/adjust ammonium, potassium, etc. Lab grade ion specific sensors are $300 and up, per ion. In theory, these could be built pretty cheaply but I haven't seriously pursued that yet.
User avatar
Posts: 57
Joined: Thu Jun 14, 2012 2:17 am
by pygmy_giant » Mon Sep 10, 2012 9:29 pm
There is some interesting ADC info on the PCF8591 here: http://quick2wire.com/category/i2c/
Ostendo ignarus addo scientia.
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by morphy_richards » Fri Sep 14, 2012 11:08 am
pygmy_giant wrote:There is some interesting ADC info on the PCF8591 here: http://quick2wire.com/category/i2c/


from http://quick2wire.com/category/i2c/
The next I2C board we’ll be testing is based on the PCF8591 from nxp (formerly Phillips) [...]


I spent quite a lot of time fiddling with this ADC a few months ago as did a few others on here. I think we all seemed to hit the same wall which was, although we could get the chip to communicate with the pi - when it came to trying to read a voltage and convert this to a digital value and pass to the pi via I2C - we just kept on getting the binary equivalent of "hello I've just been switched on" over and over again, despite multiple attempts in various different ways.

I'm interested to know if the quick2wire people (or anyone) managed to get any further than this with their testing of this integrated circuit.
User avatar
Posts: 886
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by stimac » Mon Nov 05, 2012 12:38 am
I have been considering buying a RP for the exact same purpose. I love aquariums and have kept them for most of my life and would a love a way to nearly fully automate them. I would really like to set up the ultimate DIY nano reef including DIY sump/fuge, canister for polishing, venturi skimmer, chiller, top off and parameter monitoring. Having one clean interface would be the ideal. I don't know which, if any probes, would interface well with the RP, but I do know that there are copious probes for pH, conductivity, ORP, TDS, temperature, etc. One of the trickier aspects that I have no experience in is solenoid control for auto top off. My tank is still in the planning stages and probably will be for quite some time. Is there a community desire to collaborate on something like this? I have a feeling that if some of us could develop an automation tool and provide clear, vernacular documentation there would be a good number of people interested in implementing it especially considering the cost of propriety systems currently available. It would be nice to provide an open source solution that the common aquarist could piece together and plug and play.
Posts: 2
Joined: Mon Nov 05, 2012 12:25 am
by AdvancedNewbie » Mon Nov 05, 2012 1:55 pm
Check out my environment controller at: https://sourceforge.net/projects/envirocontrol/

I use the arduino mostly for the sensors and driving the LCD Screen and GUI on that (along with the relays, etc...)

The Raspberry Pi is responsible for the Graph Generating and PHP site hosting via Apache. A Python Script is used for Arduino <--> Pi serial comm's. GnuPlot for generating graphs.
Posts: 3
Joined: Mon Nov 05, 2012 1:52 pm
by stimac » Tue Nov 06, 2012 7:13 pm
@AdvancedNewbie - It looks fantastic. The Web Interface looks super nice - simple and to the point. Would it be much work to add additional hardware like ORP probe, or solenoid control? Are your arduinos made for specific probes. Are you writing the software as well?

Also worth looking into is this project: http://www.openreefs.com/
It looks like it's one guy. He is planning on producing a very thorough aquarium automation system, however he is producing extras that must be paid for. I can understand the monetary drive to do so, but I think the finished hardware and software support/development is where a little money could be made.
Posts: 2
Joined: Mon Nov 05, 2012 12:25 am
by itavor » Fri Nov 16, 2012 4:23 am
I'm working on one of these gizmos. I'm a bit farther along (at least in theory) and am going down a more custom route (fully custom-made software, custom interface electronics). My controller started as Arduino-based but grew up. I spent a lot of time looking at what other people have done in this field and have cherry-picked useful bits of circuitry for my controller.

I'm trying to stay simple and low cost - that means freshwater only, only the most useful and essential features (i.e. PH and TDS/EC sensors yes, oxygen sensor no, auto top-off no), and finding ways to repurpose cheap probes (for example, a pro TDS probe costs ten times more than a simple hand-held TDS meter, so I just have to break one of those meters up and figure out how to plug it into my controller).

I'm not posting anything more detailed yet, as I've been known to start and abandon hobby projects before. But if anyone is interested, the project will be open source and open hardware.

Itai
Posts: 1
Joined: Fri Nov 16, 2012 4:11 am
by pesie » Fri Feb 08, 2013 10:25 am
Hi Itavor,
I'm really interestes to your project.
Could you give me more information?
Posts: 8
Joined: Fri Feb 08, 2013 10:19 am
by davidbraith » Fri Feb 08, 2013 5:19 pm
Hi All,

Have a look at this rather cool aquarium project by a PI user in Austrailia,

http://www.thereefuge.com.au/threads/ra ... ject.3475/

The RKPT mdc can be purchased from,

http://rkonlinestore.co.uk

Laters :D
Posts: 12
Joined: Sat Aug 25, 2012 11:54 am
by puccino » Sun Feb 10, 2013 9:28 pm
stimac wrote:@AdvancedNewbie - It looks fantastic. The Web Interface looks super nice - simple and to the point. Would it be much work to add additional hardware like ORP probe, or solenoid control? Are your arduinos made for specific probes. Are you writing the software as well?

Also worth looking into is this project: http://www.openreefs.com/
It looks like it's one guy. He is planning on producing a very thorough aquarium automation system, however he is producing extras that must be paid for. I can understand the monetary drive to do so, but I think the finished hardware and software support/development is where a little money could be made.


The software for openreefs seems to be free, but all the hardware needed seems like it adds up. How much is it? You can get a Seneye monitor for a tank for between $110 to $190.
Posts: 5
Joined: Mon Jan 21, 2013 1:37 pm
by AdvancedNewbie » Sat Mar 30, 2013 10:38 pm
I have since updated my software and it has a new home... http://www.yieldbuddy.com This could very easily be modified for aquarium use with ORP probes, etc... Actually the phidgets pH module I'm using does ORP as well, just a 0 - 5V signal and the formula's on their datasheet. I've just added email alerts, along with the features that were there already; set points, web cam, graphs, timers, relay control, etc... all accessible via the web interface. I'm going to be adapting some old touchscreen code I made before into this project as well. But the web interface is pretty much done.
Posts: 3
Joined: Mon Nov 05, 2012 1:52 pm
by aurelienf » Mon Jun 03, 2013 6:48 am
rleyden wrote:Adding the sensors for an aquarium monitor need not be all that complicated or expensive.

I'm considering a hydroponic system controller which would include a similar group of sensors as well as pump and valve control. So far I've added a 1-wire temperature sensor and an analog humitidy sensor via MCP3008 analog to digital interface. This is running as parts of a webcam server while I consider the next steps.
The 1-wire temperature sensor was less than $3 relatively easy to set up following directions in another forum thread. The MCP3008 was also only a few $ from Adafruit which has an excellent tutorial.
(http://learn.adafruit.com/reading-a-analog-in-and-controlling-audio-volume-with-the-raspberry-pi/connecting-the-cobbler-to-a-mcp3008)

I did invest in the Adafruit Pi plate ($16) which gives you an easier and more stable access to the GPIO pins.
Phidgets has a nice assortment of enviromental sensors including a low cost pH probe for $24.
( http://www.phidgets.com/products.php?category=6 )

pH probes(as well as oxygen probes) put out a mV range signal so you would need to build an instrument amplifier circuit or buy an adapter ($30-Phidgets).
I have a koi pond oxygen sensor with an attached meter which I bought for about $120, so it stand to reason the sensor by itself should be less. The probe isn't intended for continuous monitoring. The documentation implies that it can get easily fouled. So, you need to research that.

For my hydroponic garden I dream of adding ion specific sensor electrodes which would allow me to monitor/adjust ammonium, potassium, etc. Lab grade ion specific sensors are $300 and up, per ion. In theory, these could be built pretty cheaply but I haven't seriously pursued that yet.


Hi rleyden,
Where are you in your project ? I would like also to use Raspberry for monitoring my window farms.

Have you find a way for avoiding to use ion sensors ($300 each) ?
Posts: 1
Joined: Thu May 30, 2013 10:02 am
by ebharding » Sat Oct 12, 2013 6:55 am
I'm looking at doing something similar, how is you work going?

itavor wrote:I'm working on one of these gizmos. I'm a bit farther along (at least in theory) and am going down a more custom route (fully custom-made software, custom interface electronics). My controller started as Arduino-based but grew up. I spent a lot of time looking at what other people have done in this field and have cherry-picked useful bits of circuitry for my controller.

I'm trying to stay simple and low cost - that means freshwater only, only the most useful and essential features (i.e. PH and TDS/EC sensors yes, oxygen sensor no, auto top-off no), and finding ways to repurpose cheap probes (for example, a pro TDS probe costs ten times more than a simple hand-held TDS meter, so I just have to break one of those meters up and figure out how to plug it into my controller).

I'm not posting anything more detailed yet, as I've been known to start and abandon hobby projects before. But if anyone is interested, the project will be open source and open hardware.

Itai
Posts: 3
Joined: Sun Oct 06, 2013 9:40 pm
by fjk » Mon Mar 17, 2014 7:35 pm
Hello,

im trying to build something similar but this ORP probes was to expensive to me, so cheapest option that I found is
http://www.sparkyswidgets.com/product/miniph/, and cheapest ph probe from ebay.
Im successfully take readings from probe by i2c, but im not strong enough in programming to make calibration script.
Posts: 4
Joined: Tue Jul 31, 2012 6:27 pm