Introduction: Carassus_IoT_electronic_project

This document is meant to allow you to build a semi-automated pond with a minimal human interaction.

Thanks to an Arduino, this project is going to feed the fish of a pond. The fish food is stored in a tank. A filter pump starts if the climatic conditions, measured by temperature sensors and photoresistive cell, are met.

Step 1: Materials

In order to carry out this project, several materials are necessary. Recycled and raw materials were mostly used for the building of the frame. Here is a list of the components we used :

  • Wooden plank to build the frame (recycled materials)
  • Electrical box (recycled materials)
  • Electrical terminal block (recycled materials)
  • Arduino Uno (bought on Amazon)
  • Circuit breakers 10A C curve (recycled materials)
  • Arduino servo motor (bought on Amazon)
  • Photocell (bought on Amazon)
  • Contactor 5V (bought on Amazon)
  • Real time clock (RTC DS3231) (bought on Amazon)
  • Cold junction compensator MAX6675 (Purchased from Amazon)
  • K thermocouple probe (bought on Amazon)
  • Pond filter pump 230V (recycled materials)
  • 220 Ohms resistor (bought on Amazon)
  • Breadbord (bought on Amazon)
  • An empty 5 liters plastic bottle (recycled materials)
  • Pipes (recycled materials)
  • 3D printed valve

Step 2: Structure

A wooden structure was made in order to support all the components. This structure the 5L bottle to fill it with fish food. A pipe system brings the food to a valve (printed in 3D) and manages the quantity of food that is delivered.

The pipes is made of PVC pipe assembled together with glue. The valve is fixed in the pipes and is splited in 2 parts : the axis and the valve. First, the axis has to be fixed transversely through the PVC pipes and then the axis can be assembled with the valve plate via a screw connection.

The valve can be printed with the stp file.

Step 3: Electronic Box

An electrical box installed next to the wooden structure protects the entire electrical system. In our case, the electrical box is installed under the board that supports the food supply.

The circuit breaker is used to protect the 230V pump from a short-circuit, several electrical terminals allow the wiring of the pumps.

The Arduino Uno and the breadboard are attached in the electrical box : The Arduino is glued with silicone the breadbord is self-adhesive.

Two holes are made in the electrical box so that the pump power cable and the general power cable can be passed through.

The raspberry is powered via its transformer that must be plugged into a 230V outlet that is not visible on the diagram above. The plug module inserted next to circuit breakers can be purchased separately. We use an external USB battery.

Step 4: Wiring the Electrical Box

The project wiring is made in two parts: one in very low voltage (5V) and the other part in low voltage (230V).

The low voltage part supplies the pump through the control contacts of the 5V contactors, and also supplies the Raspberry via its transformer.

The very low voltage supplies the Raspberry, the Arduino and the operation of all the electronic components (RTC, cold junction compensator, Photocell, 5V contactor,...).

This power is supplied by the transformer to the Raspberry and then it powers the Arduino via a USB connection. The USB cable also recovers data in the Arduino to generate the charts.

Here is how to wire the Arduino very low voltage part :

A cable from the TGBT is brought in to supply the low voltage to the electrical box. Then it passes through the circuit breaker 10A to protect the pump.

Here is how to wire the Arduino low voltage part :

Step 5: Programmation Arduino, Python and PHP

Installation of the web server

We need to install a webserver to visualize the chart. We are going to use apache for its PHP compatibilty and ease of install. To do that we connect to the raspberry pi using SSH and we execute the following commands :

sudo apt install apache2 php php-mbstring

sudo chown -R pi:www-data /var/www/html

sudo chmod -R 770 /var/www/html

Now everything we put in the /var/www/html directory will be in our webserve. To try if everything works we will use ask PHP to give ussome information when we access the server.

sudo rm /var/www/html/index.html

echo "" > /var/www/html/index.php

If we access the pi’s IP address in a web browser we will see some informations about PHP. By default we do not need to put anything after the pi’s IP because it will use any file named index. Now we just need to put our files in the/var/www/html directory and we can access the chart and reload it at will.

To start de, we need to append new line in the rc.local, We have to access on the raspberry by ssh protocol write this line to modify the rc.local :

nano /etc/rc.local

now we can append this line : /usr/bin/python3 /var/www/html/Projet/ & to start directly the file.

We need to put the HTML directory in the path /var/www/. When the raspberry is powered, it recovers the temperature and light data every second in the Arduino to create a chart.



    • Creative Misuse Contest

      Creative Misuse Contest
    • Metalworking Contest

      Metalworking Contest
    • Fix It! Contest

      Fix It! Contest


    Cool ideas, thank you for sharing :)