close-circle
Close
0%
0%

Aquariumatic

Automated aquarium monitor with Web GUI. daisychain units can control multiple tank all from the one master unit. PI/Arduino/ESP Powered

Similar projects worth following
close
This Project is to document the progress of a joint project between myself and my good buddy Liam O'Reilly.
The aim is to create an automated aquarium monitor to control and maintain several tanks, and provide feedback and manual control to the user via an easy to use interface.
The project started as a College project, but we are extremely interested in taking our rough-and-ready Proof of Concept and creating a professional looking unit suitable for industrial or commercial use.

The initial plan was something like this:

The aim was to use a Raspberry Pi as a Webserving i2c master. This would provide a user interface accessible over the network on any device, and also the ability to relay commands to multiple i2c devices.

These slave devices contain Arduino Nanos operating as i2c slaves, with multiple relays (for controlling a tank's lights, heaters, pumps etc) and also pH and Temperature sensors for monitoring the tank's current state.

All data collected by the Slaves would be returned to the master when requested for display on the web GUI when the page is requested. For example if the user were to access page /23 on the web interface the device would make a request to the slave configured for Tank 23.

In theory I would like the master to be able to provide a set of parameters to the slave; things such as temperature and pH thresholds, to be saved to the Arduino's EEPROM. This would allow the arduino to constantly monitor the Tank's state and respond to some any anomolies:

  • Trigger the heater if the temperature drops below the provided threshold
  • Send warning messages back to the Pi if anything is amiss.

This would allow the user to preset configure each individual slave for the type of fish they are keeping in that tank. Ideal for a multi tank setup, or even a pet store.

----------CURRENT PLAN----------

While the plan has not changed, the way in which I hope to achieve the functions required has evolved following lots of trial and error and also following me picking up a great deal of practice using wifi communication.

As a result the following updates have been made to the project:

  • The arduino in the slave device has been changed to a Wemos D1. It retains the Uno footprint required for use with the enclosure we are using, but enables WiFi to be used as a comms protocol
  • i2c is no longer required for linking the Pi (the 'Hub') to the Slaves (the 'Control Units'); The Hub will use a USB Dongle in AP mode alongside it's onboard Wifi, and the ESP8266-powered Control Units will connect to this AP.
  • The Control Units no longer require the Hub to operate; the Units will now server their own simple web GUI to allow for standalone use (great for home use).
  • The Control Units will also host the data via a second web page in JSON. The Pi-powered hub will scrape this information using a Python script.
  • The Hub will relay all scraped information in a single web interface for ease of viewing,
  • The Hub will also pass data to an IoT site to allow for monitoring from anywhere.

View all 8 components

  • Development update

    Craig Hissett5 days ago 0 comments

    Tonight I've had a bit of time to have a look at how to reinforce my network communication between the various units that could be used to make up an Aquariumatic install.

    After hearing a lot about MQTT (and subsequently watching a lot of related videos) I decided that integrating the protocol would improve my communication between not only the devices but the user.

    I have installed an MQTT Broker (like a server) onto a Pi and it runs great. I'll be able to run this on the Pi Powered hub in my setup. The original plan was to go figure the Pi as an Access Point and have all the devices connect to it; this is great, as all the devices will have access to the broker.

    I've also had an MQTT client running on an ESP8266, successfully publishing data to a test channel. I've installed a client on my android phone and it was possible to subscribe to the test channel and see the data updating.

    While early days I'm really excited at the prospect of rewriting my hub and controller scripts and exploring what MQTT can bring to my setup.

    I'm going to need to write a python MQTT client to take the published data from the channel/channels on the Pi and use it to populate a Web GUI with useable data for the user.

    Also I'd like to publish data in a JSON string to a channel but I'm not sure if that's possible - I'll keep working on it. Id also like to publish data in a more user-friendly manor to a second channel.

    Also very soon I am going to be liaising with a company with a great pedigree in taking ideas and making in them into professional products, with a view to creating the product versions of my prototyping setups.

    I'm really hoping that u can keep this momentum up and bring this to life very very soon!

  • Behold: PROGRESS!!

    Craig Hissett09/06/2017 at 20:16 0 comments

    On the top rail in my portable case is currently my ArduiBox Open and two Raspibox Zero models, all by @Hartmut Wendt . These units will demo my #Aquariumatic  setup and also my General Home Automation core. I'd like to add some more units to this rail to demonstrate the multi-unit wireless setup that is capable with both projects.

    The bottom rail will contain all power and on/off switches to the left of the rail, and the rest of the rail will be dedicated to other projects (such as this Pi/4xRelay/LCD build I'm going to use to simulate the Bin Sensor unit I currently have running in a factory for testing). For power (for now) I'm going to be running power into the switch, then to the two variable power supplies (set at 12v and 5v) and then split to all the units in the case.
    I'll then look to add some covering to mask the cable runs.
    Happy with today's Progress, I must say!


  • Demo rig Update

    Craig Hissett08/26/2017 at 22:04 0 comments

    in past posts I have alluded to the idea of creating a portable 'demo rig' for the Aquariumatic; a fully functional setup that is easily portable and can be quickly set up to demonstrate to anyone who is interested in seeing the system work.

    I have finally settled on an idea to build up such a case, and will be getting stardom on it next week hopefully.

     The case itself is a small blue flight case with a workable width of around 16", and the plan is to mount a DIN rail in the lid of the case and one in the Base of the case. The rail in the lid will hold the Aquariumatic setup of one Control unit and also on Pi Hub unit; when the case is opened it will be easily displayed.

    This rail will be powered by a DIN rail variable power supply.

    the rail in the Base of the case will hold a switch, another variable power supply and have space to add further components.

    I am also going to fit some additional Wemos D1 boards with arduino lcd Shields to act as dummy control units. These will be handy when demonstrating how the Pi Hub handles multiple tank data sources. 

    Eventually I would like to have power included in the display case, but until then I am happy to plug the case into mains to power it.

    I am going to run mains to the switch and then from the switch to the two power supplies; this way I can control the whole unit from the one switch.

    I'm open to any suggestions on how to assemble this little rig. Feel free to comment!!

    Cheers!

  • DFROBOT Wifi Bee ESP 1.0

    Craig Hissett08/05/2017 at 01:22 0 comments

    A month or two ago I was lucky enough to he selected to trial the titular wifi module by dfrobot:

    ESP WiFi Bee

    I applied for the review programme as I was looking for some simple methods of adding wifi to my arduino-based control unit. The module came a while ago, but I chose to order a Bee-compatible Arduino shield to make connecting the board to the Arduino easy. To test the module out I am going to add it to an Arduino Uno with a Nokia display shield to create a 'test control unit' to fire sample data to my Hub unit when demonstrating my multi-tank setup:


    Using the WiFi Bee is fantastically simple when using Bee-compatible boards; just plug it in. Although it has a lot of pins I was relieved to find it only uses a handful; 3.3v, ground, and two pins for serial.

    The shield I have bought in the above picture has two Bee ports; one for connecting to the hardware serial port on the Arduino, and one for connecting to a software serial port.

    I have opted to use a software serial port for it, leaving the hardware serial port clear for uploading sketches without having to remove it.

    Next step I will tweak my code to work with the Uno (currently written for a Wemos D1) and report my findings here.

    If the code is easily tweaked I may opt to use my Arduino back in the control unit and use the Wifi Bee for wifi communication. The Arduino enclosure I am using (the ArduiBox by @Hartmut Wendt ) features a nice open prototyping area meaning i could easily solder the Bee in and use it along with my Relay shield.

    So far - loving it!

  • Software work continues

    Craig Hissett07/19/2017 at 22:29 0 comments

    I've been quiet for quite a while on here, but work is still underway.

    I have been focusing on writing and rewriting the sketches for the monitor units; at the moment the units work using a Wemos D1 to monitor sensors and relays, display the data on a simple Web page and also serve the data on  a json page.

    This means the monitors can operate standalone (for home use or for single tank operation) but can also operate as part of a network of monitors via the Pi-powered hub.

    I've written a nice little python function which is capable of scraping json data from the json pages. This means I can easily get hold of each monitor 's data for display on a single Web page, and can also be easily uploaded to anot iot site.

    I will aim to post more regularly!

  • Wemos <-> Uno Pins

    Craig Hissett06/15/2017 at 14:44 1 comment

    This is just a quick map to show how the pins differ on the Wemos D1 compared to the Arduino Uno.

    They share the same footprint but their pins are somewhat different.

    For my project I need to work out which Pins trigger the relay shield's 4 relays and also the maps for the remaining digital pins for connecting the pH sensor and temperature sensors.

    the i2c pins are also required for running the oled screen and buttons.

    Work is underway with the Wemos D1 code. The device will run a webserver to display data locally for users, and will also offer a json page for the Pi to collect data.

    Good times!

  • Current Build

    Craig Hissett06/15/2017 at 14:29 2 comments

    I just wanted to add a picture showcasing my current build using my enclosures from @Hartmut Wendt:

    This thing is going to look incredible when mounted in it's display case on the DIN rail!

    The DIN rail power supply has arrived today, so I can hopefully start to put together my case as soon as I have the rail fitted.

    Mains will be connected to an on/off switch I have, and that switcxh will route the power to the relays and also to the power supply. The power supply will then power the Pi Zero W-based Hub and the Wemos-based Control Unit.

    :-)

  • Process Report

    Craig Hissett06/07/2017 at 21:01 0 comments

    Currently I have the following:

    Pi Zero W in DIN enclosure

    Wemos D1 in DIN enclosure w/oled display and relay shield

    DIN on/off switch

    Currently on order awaiting delivery:

    DIN power supply

    DIN rail

    DIN brackets

    In order to make this iteration of the Aquariumatic look the absolute balls I'm going to mount a rail in a small flight case on some angled brackets. This will look great for presentation and also will allow it to be really transportable.

  • Oled screen arrived!

    Craig Hissett05/30/2017 at 20:41 0 comments

    Today is another good day.

    My oled add-on screen for my Arduino enclosure from Hartmut Wendt has arrived.

    Great service from Hartmut - the first one didn't arrive so was quick to repost.

    The screen has 3 buttons with the screen, meaning ingredients I can add a small onboard menu for toggling displayed data etc, which is great.

    Today I've also found some good example code of a python websocket client. This is fantastic, as I can now put a websocket server on my esp8266 units and use the python client to request data from the all.

    Boom!

  • What a day!

    Craig Hissett05/04/2017 at 14:23 9 comments

    You know when you order so many little parts and components from various places you forget what you've ordered, and a few months down the line they all start arriving and every day is like Christmas, and the parts that arrive actually solve some project problems that you didn't have when you ordered them?

    Welcome to my Thursday!

    Today's delivery of note: a Wemos D1.

    ESP8266-based, and compatible with the Uno footprint, I'll be able to plug this into my enclosure instead of my Uno and have Wifi included without needing to add another module.

    Wunderbar!!

View all 18 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates