Posts: 2
Joined: Mon Sep 08, 2014 11:46 am

Fish Tank Sensor Monitor

Mon Sep 08, 2014 12:09 pm

Hi there,

I've been looking at some of the fantastic projects in this forum, this maybe slightly tame in comparison, but I'm new. :D

I have a few fish tanks which need to be kept at certain temperatures and PH levels so I thought as a first project as a "noob" what better to create a program which can monitor these for me.

To start out I will just try to monitor the water temperature.

I guess I'm just looking for any advice or opinions for a newbie starting this sort of project.

Much appreciated


Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Fish Tank Sensor Monitor

Mon Sep 08, 2014 1:55 pm

Hi and welcome to the forum.
Temperature is easy enough to measure via varying methods. I have used a sealed Chinese chip via eBay for measuring the temp of my homebrew process.
It comes with a long cable and is embedded in a sealed 'can', so waterproof. It uses the DS18B20
thermometer chip.
https://encrypted-tbn2.gstatic.com/imag ... _aKItAaPKg

PH measurement is another story - how do you intend to do this?

Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Fish Tank Sensor Monitor

Thu Sep 11, 2014 2:13 pm

texy wrote:
PH measurement is another story - how do you intend to do this?

It should be easy enough to add an analogue to digital converter to this setup and get the PH reading. Just use the Voltage rectifier, Ground Reference and amplifier sections from this drawing and connect a ADC to the output of the amplifier section.
Overview & Theory of Operation

A pH electrode works like a small battery. When placed in the aquarium, the electrode puts out 60 millivolts (mV) for each pH unit that the aquarium water is above or below neutral (pH 7). For example, the pH electrode puts out 0 volts when immersed in water that is pH 7, 60 mV at pH 6, 120 mV at pH 5, and so on. The polarity reverses if the water's is above pH 7, so the electrode puts out -60 mV at pH 8, -120 mV at pH 9, and so on. (For a more detailed discussion of pH and its measurement please see Omega Engineering's pH Primer and pH Electrode Basics.) Fundamentally, all that's required to measure pH is to measure this electrode voltage. The problem is that the pH electrode has a "source impedance" of about a billion ohms — it's as if you were trying to measure the voltage from a tiny 60 mV battery that had a billion-ohm resistor in series with it. Because of this high source impedance, simply measuring the pH electrode voltage with a common voltmeter is out of the question. Fortunately, this high source impedance signal isn't a problem for the inexpensive operational amplifier (op amp) integrated circuits (ICs) that are now cheaply and readily available, like the Texas Instruments TL082 which is the heart of this circuit. When the pH electrode's output is connected to the TL082 op amp, it is simultaneously converted to a low source impedance signal and amplified about 17 times. After passing through this stage a 60 mV signal equals one volt (17 * .06 = 1), so a change of one pH unit produces a change of one volt at the circuit output.

Because this circuit uses a cheap, easy-to-find DC power supply that doesn't provide plus and minus voltages plus ground, an artificial "reference ground" must be developed. (This is covered in more detail below.) Because this reference ground is set to be exactly 7 volts above the power supply negative voltage, the circuit output is 7.00 volts with a pH 7 input. The only other difficulty is that the voltage from the pH probe gets more negative (that is, lower) as the pH gets higher. By inverting the signal in the next stage, it's turned right-way-around so the voltages get smaller as pH gets lower, and a pH 6 solution gives an output of 6 volts, not 8. This output can then be read with either a digital voltmeter or a digital panel display, the voltage being identical to the aquarium pH.

For the controller circuit, the output voltage is compared with a user-set reference voltage, the "turn on the CO2" pH-level. A comparator circuit accomplishes this, and turns on both a light and a valve-actuating transistor at the appropriate, user-defined pH.

One limitation of this circuit is that it will only read pHs in the range of about 3.5 to 10.5. This is a far broader range than any aquarist will ever encounter in the aquarium, and it still allows the use of the standard pH 4 or pH 10 electrode calibration solutions.
Building Management Systems Engineer.

Posts: 1
Joined: Wed Nov 05, 2014 5:18 am

Re: Fish Tank Sensor Monitor

Wed Nov 05, 2014 5:21 am


Is from the Mag Pi article about a Web Enable fish tank monitor & control.

I've built a modified version and am looking to add the pH monitoring as well and perhaps dissolved oxygen.

User avatar
Posts: 180
Joined: Sun May 20, 2012 7:58 am
Location: Italy
Contact: Website

Re: Fish Tank Sensor Monitor

Wed Nov 05, 2014 2:17 pm

I tried to build my own version too (not related to the fish-pi project).
You can take a look at this post for further info, or head to https://github.com/dentex/piac.
One of my projects with the Raspberry Pi:
(Raspberry) Pi Aquarium Controller: https://github.com/dentex/piac

Return to “Automation, sensing and robotics”