loading

Smart controlled fishbowl for beginner with video fully described

  • ET fishbowl is a smart controlled robot that automatically feeds your fish at a given time, control light, oxygen, filter, water level, and add or remove water all by itself using Arduino + 1sheeld.

Functions

  • 1. Control light
  • 2. Control oxygen
  • 3. Control filter
  • 4. Auto feeder (dropping fish food at a certain time)
  • 5. Add and remove water
  • 6. LCD display (read temperature and water level)

Auto Feeder really is a useful feature you could use it if:

  • 1. You are forgetful
  • 2. Are busy and working all the time
  • 3. Are on vacation and need to feed the fish when you aren't there.
  • 4. Want the best care for your fishes.

All steps have been written in detail so as to make it as easy as possible for anyone to make this themselves!

Step 1: Materials and Project Details

a)Skills Required:

1. Experience with Arduino and electronics.

2. Experience with coding.

b) Materials:


1. An Arduino Board: I used ARDUINO UNO

2. 1sheeld board

3. Smart phone

4. Bulb

5. 6channel relay

6. Fishbowl

7. Filter

8. Servo motor

9. Lm35

10. power supply 24v DC

Step 2: Download Arduino and 1sheeld Application

a) download Arduino application from the following link

b)download 1shield application on your smartphone from play store

Step 3: Download Code

Step 4: Download 1Sheeld Library

download 1Sheeld Library from the following link

Step 5: Extract 1sheeld Library Files


  1. Extract 1sheeld library files
  2. open arduino libraries
  3. make new folder
  4. rename it onesheeld
  5. past extracted 1sheeld library files on it

Step 6: Select the Required Shields From 1sheeld Application

  • TEXT_TO_SPEECH_SHIELD
  • VOICE_RECOGNIZER_SHIELD
  • GAMEPAD_SHIELD
  • TERMINAL_SHIELD
  • LCD_SHIELD
  • SLIDER_SHIELD
  • CLOCK_SHIELD

Step 7: How All Functions Works (connections and Coding )

A) Control light, oxygen and filter

  • Initialize Arduino pins
int bulb_pin=13;               // connect relay_bulb to pin 13;
int filter_pin=11;             // connect filter to pin 11;
int oxygen_pin=4;              // connect oxygen_pin to pin 9;
  • Initialize Arduino pins as (INPUT OR OUTPUT)
pinMode(filter_pin,OUTPUT);    // Set the filter_pin as output;
pinMode(oxygen_pin,OUTPUT);    // Set the filter_pin as output;
pinMode(bulb_pin,OUTPUT);      // Set the bulb_pin as output;

B) HOW TO CONTROL LIGHT, OXYGEN AND FILTER

1.USING clock shield

  • select the required shield from 1sheeld application in smart phone
  • we must define it in Arduino
#define INCLUDE_CLOCK_SHIELD
  • we must select hour, minute and second in arduino
 hour = Clock.getHours();
 minute = Clock.getMinutes();
 second = Clock.getSeconds();
if(hour == xx && minute == xx && second == xx) //change hours, minute,second to the desired time;
  {

// code                   //fully described in the code;<br> }
if(hour == xx && minute == xx && second == xx )  //change hours, minute,second to the desired time;
{
//code                    //fully described in the code;<br> }

2.Using GAMEPAD SHIELD

  • select the required shield from 1sheeld application in smart phone
  • define it in Arduino code
#define INCLUDE_GAMEPAD_SHIELD
  • open and close filter using orange button and close it again using the same button
if ( (GamePad.isOrangePressed()) && (change_button_state_O==0) )
 {
open and close filter           / /  fully described in the code;<br> }
  • open and close bulb using Red button and close it again using the same button
if ( GamePad.isRedPressed() && change_button_state_R==0)
{
open and close bulb      / /  fully described in the code<br>}
  • open and close oxygen using Greenbutton and close it again using the same button
if ( GamePad.isGreenPressed() && change_button_state_G==0)
{
open and close oxygen         / /  fully described in the code<br>}

3. Using { VOICE_RECOGNIZER_SHIELD} and {TEXT_TO_SPEECH_SHIELD}

  • select the required shield from 1sheeld application in smart phone
#define INCLUDE_TEXT_TO_SPEECH_SHIELD
#define INCLUDE_VOICE_RECOGNIZER_SHIELD
  • choose Voice commands

  • const char firstCommand[]="hello";
    const char secondCommand[]="control servo";
    const char thirdCommand[]="turn on light";
    const char fourthCommand[]="turn off light";
    const char fifthCommand[]="turn on filter";
    const char sixthCommand[]="turn off filter";
    const char oxygen_openCommand[]="turn on oxygen";
    const char oxygen_closeCommand[]="turn off oxygen";
    const char seventhCommand[]="add";
    const char eighthCommand[]="remove";
    const char ninthCommand[]="yes";
    const char tenthCommand[]="no";
  • Sets a certain individual function written by the user in the sketch to be called and runs its functionality once a new command is given .
VoiceRecognition.setOnNewCommand(&myFunction);
void myFunction (char *commandSpoken)
{
// control light, oxygen and filter using voice recognition     / /  fully described in the code<br>}

c) How FEEDER WORKS

1) USING clock shield

  • select the required shield from 1sheeld application in smart phone

  • define it in Arduino
#define INCLUDE_CLOCK_SHIELD
  • we must select hour, minute and second in arduino
hour = Clock.getHours();  
minute = Clock.getMinutes();
second = Clock.getSeconds();


if(hour == xx && minute == xx&& second == xx)  // change hours, minute,second to the desired time
  {
// code           / /  fully described in the code  (control servo position)</p><p>  <br> }
if(hour == xx && minute == xx && second == xx )    
  {
//code           / /  fully described in the code   (control servo position)<br>   } 
  • Include servo library
#include <Servo.h>
  • put a variable to store servo position
int pos = 0;                   // variable to store the servo position
  • attaches the servo on pin 9 to the servo object
myservo.attach(9);             // attaches the servo on pin 9 to the servo object

2) USING SLIDER SHIELD

  • select the required shield from 1sheeld application in smart phone
  • define it in Arduino code
#define INCLUDE_SLIDER_SHIELD
  • Sets a certain individual function written by the user in the sketch to be called and runs its functionality once a slider position is changed giving a new value
Slider.setOnValueChange(&servo);
  • put the following function outside the loop
void servo (byte sliderValue)

{
  pos=sliderValue*90/255;       // scale convert from (0 to 255) to (0 to 90 degree) 
  myservo.write(pos);           // tell servo to go to position in variable 'pos' 
  delay(2);
}

D) HOW TO USE LCD

  • WE ARE USING LCD TO SHOW temperature DEGREE AND WATER LEVEL USING LM35 AND WATER LEVEL SENSORS
  • define it in Arduino code
#define INCLUDE_LCD_SHIELD
  • select the required shield from 1sheeld application in smart phone
  • Initialize temperature pin
int tempPin = A0;              // lm35 temperature sensor is connected to pin A0
  • Initialize water level sensor pin
int water_sensor = A1;         // water level sensor is connected to pin A1
  • lcd code
<p> LCD.setCursor(0,0);              //Set the cursor to begin writing from the first row and first column.<br> LCD.print("temp = ");
 int value = analogRead(tempPin); 
 float mv = ( value/1024.0)*5000; 
 float cel = mv/10;
 LCD.setCursor(0,7);               // Set the cursor to begin writing from the first row and 8 column.
 LCD.print(cel);                   // Print cel value
 LCD.setCursor(1,0);               // Set the cursor to begin writing from the second row and first column.
 LCD.print("water level= ");       // Print water level= .
 LCD.setCursor(1,12);              // Set the cursor to begin writing from the second row and column 13.
 LCD.print( analogRead(A1));       // Print water level value .</p>

E) HOW TO USE PUMP

  • we are using pump to add and remove water

1)using game pad

  • select the required shield from 1sheeld application in smart phone
<p>#define INCLUDE_GAMEPAD_SHIELD</p>
  • add and remove water using up and down arrow
<p>if(GamePad.isUpPressed())             // start adding water<br>    {</p><p>    //code       / /  fully described in the code</p><p>   }</p><p>    if(GamePad.isDownPressed())           // start removing water
    { 
    //code       / /  fully described in the code</p><p>    }</p>
  • stop adding and removing water using blue button
<p>if ( GamePad.isBluePressed() )           // stop adding or removing water<br>  {
 //code    / /  fully described in the code</p><p>  }</p>

2)using voice recognizer

  • fully described in the code

Step 8: Schematic Diagram

Step 9:

<p>That's neat :) I hve a friend with a bunch of tanks that would love to have this setup.</p>

About This Instructable

133views

1favorite

License:

More by khaled ET:Aquarium Controlling and Monitoring Using Arduino + 1sheed 
Add instructable to: