# DIY Raspberry Pi Aquarium Controller



## fishyfishy (Apr 21, 2011)

Hello everyone - I'm looking to build an aquarium controller using a Raspberry Pi. Anyone else working on a similar project?

I've picked up a Pi 3, a waterproof 1 wire DS18B20 temperature sensor and a 4 port relay board so far. 

What I'd like to start with is controlling a heater but I have very little experience coding. I understand how the logic would work but have no idea how to implement the code. 

I've found Python code to setup and read the temperature but I do not know how to compare that value over to a user defined set point for temperature and switch the relay board on and off.

Any help would be much appreciated I believe that if I can find a good example of code that has been heavily commented to explain what is going on then i would be able to make any necessary changes and continue building on my project.


----------



## fishyfishy (Apr 21, 2011)

So just an update for anyone that is following.

I have added an Arduino Mega to control the temperature sensor and relay module. In testing it seems to be working well at the moment.

I am currently working on the code to automate dosing of fertilizer for the plants.

Next on the list would be a co2 and pH sensor in order to automate co2 dosing.

Getting there slowly but surly!


----------



## larrysy (Jul 21, 2014)

I came across this while browsing for something else. I thought this might be of help to your project.


----------



## fishyfishy (Apr 21, 2011)

Thanks larrysy there was definitely useful information in that link!


----------



## fishyfishy (Apr 21, 2011)

So sorry for the delays in updating here, its been a slow go. My peristaltic pump finally came in and I finally have it calibrated properly. It was shipped out with the rollers installed backwards and the inconsistency drove me nuts!

I flipped them around and now it is dosing the amount I ask for 

I am now working on the code to setup a dosing schedule. 

I have also added a second temperature sensor to be able to read temperature from both display and sump.

PH sensor will be picked up and added in the summer.

Thanks everyone for tagging along.


----------

