This project is a masterclass in miniaturized marine robotics, proving that sophisticated autonomous swarming no longer requires a laboratory budget. It is a rare, high-quality fusion of control theory and DIY ingenuity that successfully democratizes complex underwater engineering.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Engineering Micro-Submarines To Replace Fish
Added:Normal fish in an aquarium can be quite entertaining. But the problem is you have to clean the aquarium and feed the fish and they don't even listen to you even though they are your own pets.
That's why for the past 3 months we've been developing a swarm of robotic fish.
Micro submarines that behave just like normal fish except they are better. No need to clean. They dock to a charging station instead of eating. And whenever we want extra entertainment, with a press of a button, we can change their movement pattern or even play a game like tag controlling one fish with an RC radio. This idea was originated by Peter's dad about 5 years ago, who really wanted an aquarium, but didn't want the hustle of taking care of living fish. So, at the end, we'll show it to him to get his reaction. However, it turns out that replicating tiny animals with tiny electronics is harder than we thought. And it turned out to be easily our hardest project to date.
>> And it just broke a second ago.
>> The biggest problem is that our fish need to be aware of their surroundings.
Okay, so we have the option to make each fish really smart so that they detect each other and communicate. But that's actually really hard. And there's a better way to do it. We can look at them from the outside and tell them exactly what to do. It's like bunch of stupid fish, but perfect at executing instructions. Great. That's what we're going to do. But now, how can we communicate with them while underwater?
Well, for that, we got this special radio.
>> So, my first idea is to use this module for wireless communication.
>> You need to know that normally it's really hard to send radio waves underwater. That's why we've never done this before. But with a small frequency, it should theoretically be good enough for a size of an aquarium. So before building anything, we need to see if it works. So right now, these two modules are communicating together. And as you can see, it just sends numbers. I'm going to put this module underwater, and we'll see if the communication breaks.
Let's go.
Ha, it works. We even plugged in these radios to our CPS3 drone and our custom remote and could steer it completely remotely. This is the first component of our new build. Now, our aquarium is quite small, so all other components that make up the fish need to be tiny, especially the motors. This is a motor which we use for our jetpack seaglide thing. This is for our cave exploration drone. Our autonomous drone as electric skateboard, a big one actually. This is for our CPS 5 and three. So, small underwater drones. Very tiny flying drones, but still we'll need to use an even smaller brushed motor. So, we designed this simple shape as a preliminary prototype.
>> It's not perfect. I think it's good enough for the first prototype.
>> It can fit three motors. It's cuz we'll just need it to swim forwards and back, up and down, and turn right, left. What should we put inside? We connected this radio to a small microcontroller, Arduino Pro Mini, which sends the signal to the motor driver, which powers the motor, and all of that powered using a small tiny Whoop battery. That's the smallest form factor we could get it to.
All right, let's see if I can steer it.
Go.
If you want to learn more about these electronics and interesting details which we had to omit in this video, follow our newsletter called the build blog. Every Friday, we show our new builds and updates on what we're currently doing. After building this, we were faced with a standard issue of making it waterproof. The plan was to put epoxy resin on all of this, which hardens into solid, but that would increase the weight. We don't want sinking fish, and we would need to put buoyancy foam on top, which would make it too big, like much bigger. So, our alternative option was to 3D print a small waterproof enclosure with air inside, which also looks like a submarine. But 3D prints aren't waterproof, or are they? Well, we didn't have the technology at the time, over a year ago, and that's why we put this project on a shelf and came back to it 10 months later once we had a good 3D printer to do that. Turns out 3D prints can be waterproof if it's printed out of resin. We tested that out once few years ago, but designing parts for resin is slightly different than normal. We haven't done this much, but this is what we've created in On Shape. The entire fish submarine hole is made out of two parts. One goes into another and it's sealed with this one O-ring against a smooth non-ircular surface. Here we put the motors. And you may notice that there's four of them. So, one more because we can't put the vertical motor in the middle. That would obstruct the electronics. Instead, we split its job for two thrusters. By the way, we shared this file and the final version in the description if you'd like to modify and print it yourself. It's an on shape link, so you don't even need to install on shape. It runs on any computer in a browser. We made the main hull with the loft feature, then enclose and shell.
You can go back in the edit history here on the left, so you can use this program for free. And if you're an engineer, you can get six free months of On Shape Pro with our link in the description. Thank you on shape for sponsoring this video.
Cool. But now we ended up with a few microscopic parts like these propellers.
I haven't mentioned it before, but we tried to print them earlier with normal FDM printers and they didn't come out great. Very uneven. However, now with this resin SLA printer form form 4, we can not only make parts waterproof, but also with much more detail. A tiny little propeller.
Here's the result. As you can see, there are these tiny holes for the motor cables.
>> Oh, yes.
>> Which we also needed to seal. We just used UV epoxy. I think it should do the job. Hopefully, it doesn't bite us back later. The electronics stayed basically the same, and we reoriented the components into this one rectangle. But the fish are so buoyant now that we needed to glue some lead weights. We place them at the bottom so that it self-levels.
>> We got weights and fit.
>> And this is the most toxic part. You can get cancer from this. Nice. So, I just replaced every printed part in this submarine. And I think now it should work. So, we're going to test it. Let's do a fish maiden voyage.
This is awesome. What? So, we can maneuver now. Right, left.
Oh, yes. Down, up. And after just a few tweaks, we finally have the fish that we can steer with a remote. I need to show you how controllable this is.
>> You need to be very gentle with it so that it's doesn't become too fast and still is pretty controllable.
>> But it's still far from a real fish.
First of all, it can't swim by itself or do any cool tricks that require autonomy, like playing tag. It also still can't charge underwater. We need a swarm of them, and it's gray and doesn't look like a fish. After completing all of this, we'll be ready to get Peter's dad reaction. Let's begin and make it autonomous. Okay, so we have this one big brain idea and we know how to communicate with the fish. But what exactly do we tell them to do? To figure that out, we need to know their three-dimensional position at all times.
So for that task, we need some cameras.
They need to be at the correct distance to cover all of the aquarium. So let's just build it.
Initially, we thought that we'd need three of them on three sides for each dimension. But position itself will not be enough. We also need to know their rotation. Turns out the easiest way to do that is to put these markers on each fish. Each Aruko marker is very distinguishable. And based on its size in the camera, a program can tell how exactly it's rotated and also where it is as long as it's in the frame. So, where to put it so that it's always in the frame? Well, the fish won't turn upside down, so we can just put them on top. Double-sided the tape. And we just needed to set up the marker recognition software.
>> All right, I made it work. Look at this.
Now, it crashed again.
>> We connected the camera to this Raspberry Pi, which gets really hot really quickly. So, we just needed to cool it better.
>> Please be happy. Let's try again.
>> Look at this. It's perfect now. Now we can track everything with just one camera. It should work as long as the water is clean. What's the next thing you're going to do?
>> Next thing is I want to make it swim by itself without me. I mean, I can try that right now, but but this error is out.
>> It's just jiggling there. It's just a cute jiggly submarine.
It's a very unhealthy fish.
>> So, so a lot of debug is needed, but it's going to be like a very nice debug.
>> So, Peter sat down to his very nice debug, and after the next few days, so I just managed to create a dead fish.
>> Yeah, I I I need to make some more progress.
>> What we needed is to replicate what we've just built inside of a computer. I heard that you are happy for some reason. Yes, I'm happy because I managed to create a program that visualizes how the submarines move in space. This is a simulation. So, this is like the physics simulation and everything. This is the simulation. This is the simulated camera view. And here underneath is the result of what the camera in the simulation reads.
>> Exactly.
>> We can visualize it as a chain of events. We've created a sufficiently accurate simulation of the aquarium with the fish and the camera from which we can get the top-down camera view. Now we can test the software using only the camera feed itself. We use the locations to calculate the distance and direction to the target way point and then how to turn the motors to get there. Then the radio sends direct commands back to the submarines. After we make sure the software works, we can just swap the simulation for real hardware and actually start testing and tweaking it knowing that software is not at fault.
It's useful because now I can take my real hardware uh which is here. Uh we know that it works in a simulation with a simulated camera. Now we just need to check if it worked with a real camera.
>> So it was time to improve hardware until it catches up with the software. I need to fix the delay because there is a delay between between when I move it and when it thinks it moved. See that?
>> Mhm.
>> I want to make sure that it never loses tracking even if it moves super fast. I will now change the exposure time. So, I just spent 6 hours trying to make the delay from the camera slightly smaller. I went from 0.4 seconds. You can see it. It's trying, right? The image looks much worse, but maybe it will be better. Oh, yeah. It's perfect, man. to about now it's like 150 milliseconds. It's getting getting there getting to be good enough. This is by the way my patented system for making the edges of water visible. I made the camera I put the camera lower. So it was like here now it's here. So as you can see the problem was that there are just very small amount of pixels left to calculate it. Just the resolution was the biggest problem. I think >> the delay was now sufficiently low.
>> Here's a better dead fish.
But now the program would often overshoot or undersshoot the commands and we needed to simply calibrate it.
It's called P which is simpler said than done. So I've improved the depth keeping a lot by tuning the P. And let's see how it works right now.
It doesn't look that bad. Honestly, now we're calibrating Y.
But it still oscillates. Okay, let's fix it and try again. All right, I've tuned it. See this now.
And after many tests, P was well tuned.
>> I think it pretty much works. Which means both forward speed, yaw, and depth are calibrated.
>> Isn't this cool?
>> Like this is the thing that we wanted to achieve, right?
>> Yes. Yes. This is the behavior of a fish.
>> It swims to randomly generated way points.
>> Wo, this is awesome.
I mean I I saw it simulated many times before. So So it's like >> it's the same. Yeah.
>> So it's the same. We'll make it more advanced once we make more of them.
Okay. Let's duplicate them. But even before duplicating, it was time for a slight redesign with which they will finally be able to charge underwater instead of eating. That way in a perfect world, we wouldn't even have to take them out of the water ever. One way to do it would be with some sort of a connector, but exposed conductive metal with electricity running would corrode very quickly. That's why we wanted to do something wireless, just like Magsafe on iPhones. Here's a coil which changes electric current into magnetic field.
And then we needed to put a smaller receiving coil on the bottom of the electronics. It changes the magnetic field back into electric current and connects to the battery. We don't know whether it will work well underwater, but in order to work at all, we found that both coils need to align pretty precisely. The way Apple solves this is by having a bunch of magnets that snap together. Great idea. We tried placing magnets in the middle here, but that disrupts the charging. So, the magnets need to be outside of the coil. The thing is, the submarine doesn't have enough power to just snap out of any magnet. We needed to turn it on and off using electromagnets. Here's one of these. As you can see, when it's off, it doesn't attract this piece of metal. But when it's on, it's getting hot in my fingers, but it works. We can put two on opposite sides at an angle so that they touch an incoming fish. Then we just needed a case for all of that in which we could pot everything.
>> Nice. Like that. Yes. The submarines just need two new spots for small steel plates that will snap to electromagnets aligning charging coils. And since we are redesigning it already, we made the Aruko markers integrate with the roof.
Now we just needed to rebuild the fish with the new electronics and then we could see if the charger works.
>> I will try to dock it now.
need to be precise.
>> Perfection. And oh, and now it's charging.
>> Oh, so let's try to release it. All right, it's released. It does work. So, in order to have our little school of fish, we began mass production.
We've decided to print five more sets of the submarines with the charging dock.
That would be six in total. A lot of fish.
At this point, we just try to optimize the production process. It's kind of surprising how many parts can fit in such a small space.
>> It took me an entire day to build four of these. This is an entirely terrible way to make fish. Like, one fish can lay a thousand eggs. True.
>> In like probably 10 minutes. We need to still beat fish at reproducing.
>> Unfortunately, on top of the fact that it takes a lot of time, the design also wasn't as easily replicable as we wanted. Now, I'm going to test if any of these leak.
So, this one totally leaks.
No. Turns out the sealing method for the motors with the UV resin isn't that great, and still the water often leaks through. The way we troubleshooted that is with this special rig. It connects to the front or the rear and it has a vent through which you pump high pressure air. In order to see where the air comes out, we spray the outside with soapy water. And here we can see the bubbles.
Then we know where to add more resin.
Most often is these motor holes. So after a couple more days of testing. Oh yeah, my poor desk. Okay. So, three seem to be not super leaky.
>> Mhm.
>> We started with five of these fish, but due to these leaking problems, at the end, we were left with just three. This is not a horrible result, right?
>> Mhm.
>> Six would be better than three, but we'll still be able to test our algorithms. But in order to do that, we'll of course need it to look somewhat presentable.
Now, the fun part. That includes the fish tank. We bought some authentic decorations.
>> Why did you buy this?
>> Like, no wonder we are losing money.
You're spending all of our money on dinosaur skulls.
And while we prepared a fish tank and paint the submarines, I have to say that although our subs are unique because of their small size, you can't really use them in any lake or ocean. That's why we created a sort of bigger, more powerful version of these that additionally have an FPV camera and you steer it with the same remote. It's called CPS3. In February this year, Jos built CPS3 himself with the components from our kit. And while doing so, he even modified the remote with a 3D print. He shared that on our Discord. After a few adjustments in his bathtub, he made the drone neutrally buoyant and could go to a lake to find some hidden wildlife.
Recently, he even attended a festival showcasing his build. So, if you'd like to build an underwater drone yourself, for a limited time, we're giving a completely free full instruction manual with design files, code, and everything.
So, after watching this video, sign up and get all instructions with the link in the description. Again, it's free and if you decide to build it, you can get a DIY kit from us with all the components you need already in the box. Back to the fish epoxy.
>> We painted it manually with acrylic paint and covered with clear coat. Now, it looks like a famous fish, but meanwhile in the aquarium, there appeared a lot of dust.
>> I think the water needs to be more clear because the fish cannot see where they're going. The water is so opaque that we cannot even see the fish on the bottom. Turns out the tiny gravel rocks made the aquarium really muddy even though we washed them thoroughly multiple times beforehand. But I think we may have found a solution in a pet shop. A liquid which clumps together the dirt and the water. Then it just filtered out with a pump.
>> All right, next day. Perfectly clear and transparent. It's time to surpass 500 million years of evolution and make the fish do tricks. Our main goal was to make the fish autonomously play tag with us by always chasing the submarine that's being controlled. However, additionally, we thought of a couple new synchronous movements that we'd like to test out. All right, so we've made a couple of cool modes in the simulations.
So for instance, this one is sort of meant to resemble real school of fish and so they are sort of aligning with each other and swimming in roughly the same directions. And the next mode is the snake mode. So they are trying to align in sort of snake pattern. So uh the first one does some movements and then the second one tries to follow what the first one does. So as you can see the sub number one. So this one is the leader and then the next subs are trying to position themselves like right after the leader. And my favorite mode of all is the twirl mode which basically makes all of the submarines go in one circle.
Okay. Nice, nice, nice. Wow.
>> Right.
>> Okay. I want to see that.
>> Fortunately, we don't have five submarines, only three. But still, >> even though the fish worked earlier, unfortunately, we faced some more issues just as we were ready to test the final results. The fish clearly lifted up a lot of dust. I guess the real fish don't don't do this as much. I know we're probably just inexperienced with this stuff, but the dirt from the rocks was so troublesome that we decided to give up on them and we just replaced the floor with artificial grass.
The fish are ready for the display.
Before calling Peter's dad, we invited our friends to get their reaction.
>> What?
>> We can release the fish at the same time, and we can also dock them into the charging stations where they sit for about an hour to get a full charge. The random mode works and with that we can replicate the fish behavior pretty well.
They just swim from waypoint to waypoint. Although they can't avoid obstacles. We haven't coded that in yet.
There's a couple more things that don't work. But first, we turned on the chase mode. This fish will turn autonomous and always try to get to the exact current position of the chased fish.
That also means that I can outsmart it.
swimming around obstacles.
It's honestly a fun game. So, we found Peter's dad, who was the originator of this idea about 5 years ago.
If you want to see us replace every fish in every aquarium, subscribe for part two. Here's what didn't work and we would need to improve. We tried to make docking autonomous, but the submarines aren't precise enough for now. The flock, snake, and twirl modes don't work for the same reason. They are out of sync. It's most likely because the UV epoxy entered some of the motors, and their speeds are very inconsistent.
Remember about the free instructions on how to build an underwater drone yourself. The link is in the description.
>> Nice.
>> Nice. Thank you. Can I eat it? Miss No.
Related Videos

Setting up a curved screen with Immersive Calibration Pro 4 and multiple cameras (P3D v4)
FlyerOneZero
23K views•2019-07-21

Robot Learning with Sparsity and Scarcity
allenai
379 views•2025-10-14

Jorge Mendez-Mendez: Unlocking Lifelong Robot Learning With Modularity (2023-10-05)
umassmlfl
237 views•2024-01-06

Northwestern’s MS in Robotics: Student Robotics Projects, 2023
NorthwesternEngineering
1K views•2024-05-31

"Perfect" Turns: Turning by the Gyro - FIRST LEGO League (FLL) SPIKE Prime + EV3 RePlay Programming
ZacharyTrautwein
94K views•2020-10-02

Gorkem Secer: TSLIP-based Deadbeat Running Control of Bipedal Robot ATRIAS
DynamicWalking-wv6qm
298 views•2018-06-22

Self-Driving Cars Need Lessons On Human Drivers | Maddie About Science
skunkbear
26K views•2018-08-21

Milrem Robotics’ THeMIS UGVs used in a live-fire manned-unmanned teaming exercise
MilremRobotics
99K views•2021-05-20
Trending

Ben Crump dealt MAJOR BLOW after His Own Nolan Wells Autopsy FACT CHECKS him
DeVoryDarkins
50K views•2026-07-23

Gremlin Arrives… While Dorothy May Takes Another Step Forward
The-moons
10K views•2026-07-23

Playstation NO DISC/NO BUY Fight Is Over...
DavidJaffeGames
4K views•2026-07-23

Daystar: The Great Grift & Prostituting the Gospel
LauraLynnThompson
14K views•2026-07-23