Giter Site home page Giter Site logo

fish's Introduction

Open Source Robotic Fish

This repository is dedicated to the development of the predatory robotic fish, developed at the Theoretical Ecology and Evolution Laboratory, Indian Institute of Science.

⚠️ Code is buggy ⚠️

Introduction:

The robotic fish developed was used to study the aggregation and swarming characteristics of the Serpae tetra species of fish.

Construction:

  • The body of the Fish is made of extruded polystyrene (thermocol). The design was made in SolidWorks, and carved using a crafting blade.

  • The Fish is maneuvered using a joystick controller through the pygame library for Python. A list of supported controllers is given here. We have tried out a number of joysticks, such as the XBox 360 controller, and the Logitech Extreme 3D Pro Gamepad.

  • The Fish is controlled through an Arduino UNO, which communicates with the computer running pygame through a Bluetooth module, mounted on it's head.

  • A SHARP Distance Sensor GP2Y0A21YK0F was used to judge the distance between the fish and obstacles up ahead.

  • The Fish was encased in a layer of polythene to ensure waterproofing while operating underwater. Specifically, the joints between successive links was encased in a skin-like layer of polythene.

  • The necessary propelling movements were provided by a series of 3 Tower SG90 Servo Motors.

  • A pair of 9V batteries were used in series to provide the necessary electric power for the operation of the fish.

Fritzing Diagram:

Fritzing Diagram

Fig 1. Fritzing diagram of electrical wiring. Note: 3.7V LiPo is for representation purposes only.

SolidWorks Model:

SolidWorks Model

Fig 2. SolidWorks assembly of mechanical structure.

Command Flowchart:

Command flowchart

Fig 3. Flowchart of commands.

Working:

  1. The electrical connections are made as shown in the Fritzing diagram.

  2. Once the connections are made and checked (to prevent short circuiting underwater!), the batteries are connected to the battery headers provided in the circuit.

  3. The SHARP sensors are obstructed to check if the necessary commands are executed (in this case the C_MOVE() function would be executed).

  4. Once the Joystick.py has been executed, wait for 5 seconds as the EEPROM_Code.cpp script executes and flushes the EEPROM on-board the UNO to prevent interferences from previous stored values.

  5. The Fish can be maneuvered as required using the left analog stick of the joystick. Three movements are possible:

    • Forward- The Fish moves in an S-type movement.
    • Left- The Fish moves in a C-type movement, deflecting towards the left.
    • Right- The Fish moves in a C-type movement, deflecting towards the right.
    • Obstacle Avoidance- The Fish moves in a C-type movement, deflecting towards the left.
  6. The Fish operates either through the controls of the user, through the joystick, or it continuously moves in an S-type fashion, until it encounters an obstacle, thereafter which it executes a C-type movement.

Build-log:

You can check out the build-log for a detailed progress report.

Known Issues:

  1. Occasionally, the Bluetooth module on-board losses communication link with the Bluetooth on the PC. When this happens, close the pygame dialog and rerun the Joystick_Code.py script to establish control once again (this issue has now been resolved by connecting the Bluetooth module to a 3.3V voltage supply.)

  2. The Arduino will reboot, if sufficient power is not provided. Thus, we suggest the use of LiPo batteries to provide a more reliable and lasting power source. We are currently using 12V, 2000mAh LiPo batteries (testing this right now).

  3. Communication link between the UNO and the computer will not be active until the EEPROM_Flush_Code.cpp has been executed (approx 5 seconds), thereafter which the LED on the UNO associated with GPIO pin 13 will glow a bright orange (depending on the make of the Arduino board).

fish's People

Contributors

sarthakjshetty avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.