For this project, we will be creating a fish tank monitor application using an Arduino micro controller. Specifically we will need these pieces for the project:
1 Arduino Micro Controller
1 Full Size Breadboard
1 Water Leveler Sensor
1 LCD Screen
1 Simple Button
A Bundle of Copper Wires
1 10K Ohm Resistor
2 220 Ohm Resistors
Step 1: Connect the LCD Screen and Potentiometer
At this point we will begin our project's creation. The first step is to connect the LCD screen and potentiometer to the Arduino micro controller. To begin, run a wire from the 5V pin on the Arduino to the power rail (+) on the breadboard. Furthermore, you should connect a wire from the GND pin on the breadboard to the ground rail (-) on the breadboard. From here, you can begin connecting the LCD screen. Place the LCD screen into the bottom right of the breadboard. Starting at pin 12 and running through pin 7, place a copper wire. Place the other end of the wire in the correct place as indicated by the image provided. Also make sure to properly connect the potentiometer to both the power rail & ground rail. This potentiometer will have the analog signal connected to the LCD screen to control its display.
Step 2: Add LED Lights
The LCD screen and potentiometer should be connected to the Arduino and breadboard at this point. In this step, we will connect two LED lights (red and green) and a button to reset the fish feeding counter. The LED's should have their short end connected to the ground rail. The bent side of the LED should be connected to pins 2 & 3 and have a 220 Ohm resistor attached to it. The button should be placed on the board as well. You should connect the button to pin 6. Add a 10K Ohm resistor to the opposite side of the button as well. Finish this step by also connecting the button to the ground rail (-).
Step 3: Connect the Water Level Sensor
With all other components connected, we can now connect our water sensor. The water sensor should have the 'S' pin connected to analog pin 'A1'. The sensor should also have the '+' pin connected to the power rail and the '-' pin connected to the ground rail. Refer to the provided image for further details.
Step 4: Testing Your Application
Now that everything is ready to go, we can test our application. I have attached source code that should correctly run your project. It is wise to consider what the purpose of this application is. Ideally, the water level should be within certain boundaries in our fish tank. If it is not, the red light will light up. If the water is within a specific boundary, the green light will activate, indicated the water level is okay. An additional message will be displayed on the LCD screen describing the current water status (too low, okay, or too high). Also, a timer is in place for the fish's hunger level inside your tank. After so long, a message appears telling you that your pet is hungry. This message increases in seriousness until your fish is "dead". The timer can be restarted with the attached button.