Introduction: Automated Aquarium Control (IoT)

About: DIYer / Programmer / Fixer

Most people like having an aquarium for joy. Looking at the fish swimming across the aquarium is a pleasing experience that could help clam your mind or reduce the stress. But maintaining the aquarium is a tedious task sometimes. If we could automate some of the trivial tasks like feeding fish and switching lights, it would a great help for your busy life.

The system that I made is pretty simple and consists of 3 main components

  1. Feeding Mechanism
  2. Micro-controller and electronics
  3. Software and cloud service integration

Step 1: Creating the Feeding Mechanism

While I searching for a model, I found this great 3d model on the Thingiverse

It is using an Archimedes screw to push the food out of the nozzle and could store the food using a commonly used pet bottle.

I used 3D printer to print this. It requires a geared DC motor to operate. (Model DC geared N20 mini motor)

Step 2: Micro-Controller and Electronic Components

I used NodeMCU (which consists of ESP8266 Chip) as the controller because it can be easily programmed with the Arduino IDE and contains build-in wifi access. (Also super cheap :D). For controlling the DC motor I used the LD293D IC. Also for the lights, I used a simple 5v relay module.

Step 3: Programming and Cloud Integration Service - Sign Up for Remoteme

For controlling the IoT device, I found this as a convenient and free service that can be used for any type of IoT related project. First, you have to sign up

Step 4: Programming and Cloud Integration Service - Defining the Variables

Most IoT devices use a cloud-based variable to maintaining the status of some activity. Here we need 2 variables to control.

  1. "Relay_1" - for lighting (Boolean variable for keep on/off status)
  2. "Fish_Feeder" - Fish feeder motor (Numeric variable for keeping the timing for the motor in seconds)

We can create those from click on the "Variables" tab and click on the "Add" button.

Step 5: Programming and Cloud Integration Service - Add Network Device

Here we can add the device that we are going to control via this platform.

You need to select Arduino as the "type" and you can enter any name for the "name" field.

It will automatically provide the deviceId.

Click on the submit button after completing the form.

Step 6: Programming and Cloud Integration Service - Template Code Generation for NodeMCU

After creating the device you can generate the template for the Microcontroller with this wizard.

You need to fill the body of some methods in order to work accordingly.

Please refer this GitHub repo

NodeMCU needs to be flashed with this code.

Step 7: Programming and Cloud Integration Service - Creating the Webhooks

In order to set the variables that were defined earlier remote-me site facilitates creating webhooks for each variable. You can set those webhooks by clicking the hamburger icon on the right-hand top corner in the variables section for each variable.

Step 8: Programming and Cloud Integration Service - IFTTT and Siri / Google Assistant Integration

Using the previously created webhooks we can send HTTP post messages.

I created 2 ways to control the aquarium.

  1. Schedule the Lighting and Feed Feeder using the IFTTT time feature.
  2. Create and IOS shortcut to add voice commands to control using new Shortcuts app

First Time Author Contest

Participated in the
First Time Author Contest