Mechanical design

The fish totally has 6 degrees of freedoms. 4 DC motors for the motions of tail which helps the fish swim forward, backward and make a turn. To make the fish able to swim vertically in water. There are 2 servo controlled fins imitates the pelvic fin of real fish.

To make parts easily 3d printed, the tail of robot are made up with 4 same modular. In order to cut the cost of robot, I used N20 motor on the tail of the robot. This kind of motor can be easily found with a reasonable price. Also, you can control them easily. A potentiometer is connected to the axis on each joint modular to feed back the position. 9g servos are prefect to control the motion of fins because they are small, cheap and ready to control. The body of the fish attaches the battery and all the electronic parts. To cut off the weight of the whole system, I tried to design it as simple as possible

 Electronic design

The system is controlled by 2 arduino pro mini. To make the controlled part light-weighted, I designed the motor driver PCB with 3 L9110s motor driver IC. You can check out the layout of PCB here. 2 arduino are communicating via IIC. When it comes to the power source, I chose a 18650 lion battery from Panasonic. Runs with 3200mah at 3.7v, The battery is enough for the fish to run a solid 30 minute. For the further development, I’m thinking about using a raspberry pi zero for some more complicated tasks like computer vision and wireless control, However, this part is still unfinished.

 Control

The swimming posture of fish is vital to the speed of swimming. As you can see in the demo, currently I finished the PID control of each joint. The master device manages the position of fish and sent them to the slave which controls motor at real time.