• You liked BFD7 now you should join this forum and of course become a club member to see what CCA is all about.
  • Thank you to everyone who registered and showed up for the BIG Fish Deal #7.

My aquarium monitoring project

Jt731

Members
Purpose: I am a huge techy/geek who loves gadgets and this is how I keep myself occupied so I don't do stupid things

Goal: Sensor based modular monitoring (possibly automation) system that will allow for monitoring just a few tanks to entire fish rooms. Sensors will be driven by arduino based logics that will report to central raspberry pi monitoring systems that will be monitored by splunk for analytics/reporting

Phase one: Building the monitoring blocks. Using arduino mega base units, build systems that will monitor ph temperature and water level and display locally

Phase two: build the rasberry pi systems. Linux based systems to aggregate monitoring blocks, log everything, present information remotely and allow for scale.

Phase three: use splunk to collect logs from Linux aggregators and build alerting/reporting

Once I have all this I can figure out what to do next. I have ordered the arduino stuff to start off phase 1.
 

chriscoli

Board of Directors
Staff member
Aaaah so awesome! The guys at wok are really into arduino and have been trying to get me to try it in my fishroom!

I need to know how your project goes! Please keep us posted!
 

Jt731

Members
I have begun the process of procuring parts. At this time, price isn't necessarily the biggest choice, as I'm unfamiliar with all this I plan on prototyping and then doing specific part lists. At the same time, for scale I am trying to find affordable choices. The float valves are about 2 bucks a part and the temp sensors 3. I have Amazon prime so I'm using Amazon but for the final I may go to ebay for cheaper parts.

I have ordered the following:
SunFounder Mega 2560 R3 Project Super Starter Kit For Arduino UNO R3 Mega2560 Mega328 Nano
https://www.amazon.com/gp/product/B00KUNKR3M/ref=oh_aui_detailpage_o02_s01?ie=UTF8&psc=1RioRand 5pcs 3M Waterproof Digital Temperature Temp Sensor Probe DS18b20
2pcs Addicore nRF24L01+ 2.4GHz Wireless Transceiver in Antistatic Foam Arduino Compatible
SainSmart 2-Channel Relay Module
uxcell 5 Pieces ZP4510 Liquid Water Level Sensor Vertical Float Switches

And lastly:
Vilros Raspberry Pi 3 Complete Starter Kit--Clear Case Edition

Of course, the Raspberry Pi is for Phase 2 and has shown up first. It's pretty slick. The complete starter kit came with everything I needed to hook up and get started except for keyboard and mouse. I did order a wireless keyboard/mouse combo to start, but eventually will move to remote access through ssh only. I did set it up so that I could make sure nothing was broke. I have pictures of the whole process later for when I make a guide. Basically the kit comes with a microSD card preloaded with NOOBS, which is a easy bootloader for Raspberry pie. This particular version only had the Raspberry PI debian linux flavor, there are versions of NOOBS that have everything from debian to media servers etc.... For my purposes debian linux will be just fine. After assembling everything, I plugged it into my tv, plugged in my wireless keyboard mouse dongle and got it up and running. Other than making sure it burns in properly and connects to wifi, this will be the extent of play with this box until I begin phase 2.

Almost all of my parts for phase 1 will arrive tomorrow. The only thing left, and I can start without, is the parts for the ph probe. I've found several solutions that are around the 35 dollar range. On the one hand, this will get pricey at scale, on the other hand, this used to be a lot more expensive. So I may go ahead with this, but I would like the opinion of those with a lot of tanks, would 40 bucks a tank for sensors be too high (there would be additional costs for the arduino unit/etc....). 40 Bucks is just sensors. And if you wanted, especially for those with centralized water systems, you could just do 1 ph sensor for a group of tanks, bringing down that cost to a couple of bucks, max of like 5, per tank.
 

chriscoli

Board of Directors
Staff member
The guys here at work have also been doing a combination of Amazon and eBay. The downside of eBay is the length of time that some of the parts take to arrive.

So, since I'm 99% ignorant on Arduino and Raspberry Pi.....let me ask a newbie question. When do you decide to use one vs. the other? I realize they don't do exactly the same thing, but I'm still unclear on the difference.
 

Jt731

Members
Arduino has KB of memory. I don't have the exact amount handy. It's designed to do simple things. If a sensor is below a threshold turn on the red light, for example. Or show the value on a lcd screen. Arduino is purpose built to collect data from electronic sensors, and requires a lot less work to program than a full computer. But if you want to be able to see things like temperature trends over weeks it can't store that data for that long.

Raspberry Pi is a fully functioning computer. Due to memory you'll probably only run linux and never windows, but I'm running linux with a full user interface on it. So if I want to do anything fancy, like presenting a web page or passing the information to splunk (more later), I need this. Raspberry PI runs SD cards, so you can have 64GB or more in memory. People have run sensors off of PI but it's not built to do that and is a lot more complicated.

For my meager number of tanks, I probably don't need more than Arduino displaying information to a lcd display. But I started thinking about people with fish rooms and decided I needed to have a scalable solution. At some point, I'm going to figure out I can only run x number of tanks off a single arduino controller. So I decided I needed to have a central device to collect all the data from the arduino controller block, and at that point I need something that could collect and log the data over time. And maybe present it as a webpage so you don't have to walk into your fish room to see all your data.

To greatly simplify it maybe think of arduino as your nervous system and raspbery pi is your brain.

Does that help?
 

Hawkman2000

Members
Would it be possible to run the entire system from an android box. USB to some kind of hub, then tie in all the arduino...

In theory you would be able to make an app to inteface with everything.

If all yor tanks are on a combined system, you could install servo valves and automate/regulate water changing, CO2 ingection, even feeding.
 

Jt731

Members
Yep, you can replace the rasberry pi with android. No need to run all that usb, there is wifi for the arduino.

There's a few reasons I went with pi over android, one major one being what I can do if I'm running with Linux and eventually analytics. Another is I'm not an android guy and already having to figure out how to use arduino. Also, if I use a web interface versus android, I can run it off almost any device versus just android.
 

Jt731

Members
Ok,

I've made a little progress. It's a little slow because I last worked with electronics in the mid 90s.

The first thing I didn't do is pay attention to what size resistor I needed and they weren't in the kit. The resistor keeps the voltage on the data line high (5V) unless it is specifically changed. I found some stuff on the internet about not using a resistor, but it basically said if you want large numbers of sensors you need the resistor.

At this point without radio shack I can't emphasize how awesome amazon prime is. So I have the necessary resistors now.

The next thing is whoever built the waterproof ds18s did a really lazy crappy job with tinning the end of the wires, which are stranded. Pushing stranded cables into a breadboard is not fun. I have ordered pins that will allow me to crimp the cable on, but out of the 5 temp cables I found one that would stay pushed into the breadboard. More on this when the pins I ordered come.

So with all this, I have successfully had a temp sensor report back to the arduino the temperature. See screenshot

temp.jpg
 

Jt731

Members
Multiple sensors on same bus, I'm holding one in my hand to up the temperature to prove they are different.

multiple.jpg
 

Jt731

Members
Right, been a little bit, I've been waiting on parts before the next part, water level.

I have two methods I'm going to play with, both in the picture. The white with yellow wire is a simple float valve. Basically, it's an on off switch. Once the water drops enough the circuit opens or closes and therefore can act like an alarm. Boring, but cheap


A bit more expensive is the other thing, an ultrasonic emitter. Think radar or sonar. Will be able to more accurately keep track of the water level which will be way cooler later with analytics. More expensive, and I'll have to do more work on how to mount them. The waterproof versions are pretty expensive, so I'd like to see what I can do mounting wise

image.jpg
 

Jt731

Members
One photo is the arduino to breadboard with the ultrasonic sensor

Second photo is how I planned to test that it shows different values. Approximately same water level but glass will hold the sensor at different heights

image.jpg
 

Jt731

Members
Output while on the two glasses, note one has a return value of 8 while the other is 3.

Next up, temp and water height at the same time, and displaying on a little led screen I have.

high_height.jpg

low_height.jpg
 

KateAhmed

New Member
Purpose: I am a huge techy/geek who loves gadgets and this is how I keep myself occupied so I don't do stupid things

Goal: Sensor based modular monitoring (possibly automation) system that will allow for monitoring just a few tanks to entire fish rooms. Sensors will be driven by arduino based logics that will report to central raspberry pi monitoring systems that will be monitored by splunk for analytics/reporting

Phase one: Building the monitoring blocks. Using arduino mega base units, build systems that will monitor ph temperature and water level and display locally

Phase two: build the rasberry pi systems. Linux based systems to aggregate monitoring blocks, log everything, present information remotely and allow for scale.

Phase three: use splunk to collect logs from Linux aggregators and build alerting/reporting

Once I have all this I can figure out what to do next. I have ordered the arduino stuff to start ios off phase 1.
It is great , Thank you very much
Aaaah Very awesome! The guys at wok are really into arduino and have been trying to get me to try it in my fishroom!
 
Top