I thought I would write a few blog posts on an Arduino powered aquarium and aquaponics controller that I have been planning for some time. I have tried to start this project a few times now with various micro controllers, but each time I reach a point where I had some sensors logging to a SD Card and then the project falls over. With my recent desire to learn more about the Arduino community, I figured why not try again but this time document my success (or failure) for the world to see.
To start off, I will take a look at the hardware options, the ones I have chosen and why. Bear in mind, especially if you are new to electronics, that there is no right or wrong way to do things. If you see merit in another way then do it. Make it your own project. You will learn far more than just copying me. If you do go another way, then let me know. I would love to hear why you went a different route and how successful you have been.
Initially I will just be looking at a simple system, looking at water and air temperature as well as the water level in the aquarium. I plan to add more to the system over time, but I wanted to start simple and actually get something working. With that in mind lets dive into the hardware.
The Arduino Brains
There are quite a few Arduino boards available that can do what we want. There are the official Arduino boards and then the plethora of home brew boards to choose from. Some considerations that need to be taken into account include:
- Processing Power
- Inputs and Outputs (I/O)
I decided that an official Arduino board was going to be the most simple solution. It has a wide range of shields available, easily accessible and I think it will have the processing power to do the job. I ended up ordering an Arduino Uno R3 board from Adafruit (see the link below) as the brains for this project.
There are a wide range of communication protocols available on the Arduino. Some more useful than others at getting the information out of the Arduino and available to view by ourselves. We could use serial communications to a PC or Raspberry Pi, use a LCD screen directly, we could use LED indicators on a panel. Anyway that you could imagine to display the data, there is a way to do it. Some limitations for me included being able to remotely view the data and in the future control the system. The simplest ways to do this were to use a Raspberry Pi to get the data out to the world, or use the Arduino to do it directly.
I chose the latter because I wanted to minimise the amount of components that the system required. While I was looking at the Adafruit website I found a shield and tutorial that was exactly what I wanted to do. I will talk about the tutorial at a later date, however you can check out the CC3000 wifi shield in the link below. This shield allows the Arduino Uno to connect to a wireless network and talk to the world wide web. That gives me remote access at the grandest of scales.
Temperature is one of those types of inputs that is so common that there is a massive choice. We can quickly narrow down our choice by considering the temperature range we want to monitor and the accuracy in which we want to do it. There are options like the DS18B20 which uses a proprietary but free protocol, the TMP36 which is an analogue temp sensor, thermistors, thermocouples and the list goes on. I chose the DS18B20 due to a few reasons. Firstly they are available in waterproof packages which makes it much easier to measure the water temperature. You can also run multiple sensors on a single pin of the Arduino which allows for a lot more flexibility in how many temperatures we wanted to log. I managed to source ten of these sensors very cheaply on eBay.
Much like temperature sensors, levels sensors are a wide and varied lot. There are ultrasonics, wave guided radar, eTape resistive, capacitive, floats and so on. After reading about a lot of the types a question I kept asking myself was ‘What if bioslime starts to grow on it?’ Sure we could put a capacitive type sensor in the water, but how will the output change as bacteria start growing on it over time? After trying to think of different ways to build a setup to ensure the sensor didn’t loose its calibration, I had a thought. What about using an ultrasonic ping sensor that I had in the cupboard. A quick test confirmed that the ping sensor could get a reading from the water interface and a quick Google revealed that I definitely wasn’t the first person to think of the idea! Even better is that they are cheap as chips on eBay so we can measure as many levels as we want!
While we are not breaking new ground in what the Arduino can do, or data logging and control systems that have been built at home, for us new kids this is a great start. Through taking time to consider our options we can add flexibility to the system (stay tuned) and impress our friends. But more importantly we are learning something new and expanding our horizons. Stay tuned for the next post where I will have a look at assembling our hardware and taking it for a test drive! I will leave you with the following image to help us feel technologically advanced and futuristic. To see the next article in this series check out Part 2.