RC Submarine 4.0 – background (1/10)

This project began from a simple question: how to keep a submarine depth at a constant level? Unsteady depth had been a nuisance with the three submarines I made earlier, especially subs 1 and 3. Those submarines were always either at the bottom or at the surface. A good challenge to overcome.

I thought PID control might resolve the problem. I had some previous experience using PID with a Reaction Wheel Inverted Pendulum, so I knew the basics and had some parts already available, e.g. Raspberry Pi Zero 2. I could buy a pressure sensor and use that as an input for the controller. The whole idea that you could measure depth with a pressure sensor felt very intriguing.

There were other things I wanted to try. For the hull I would try a see-though acrylic plastic cylinder, which would be narrower than the previous hulls and therefore faster underwater. I would make the end caps myself, which would enable me to use very thin material, good for magnetic couplings to transfer a lot of torque. The previous subs had a separate Li-Po battery for radio control, which I wanted to get rid off and use only one battery onboard. Extra weight had been steel plates or lead pellets in previous subs, but now I wanted to try tungsten pellets to save space for other stuff. So, a lot of new things, that’s the way I like it.

How to maintain depth?

I struggled with this question with my first submarine. What physical principle makes the submarine go to depth X? Then I realized, it doesn’t go to depth X automatically. You need to drive it there, the same way a car needs to be driven to position X by pressing the gas pedal and the brake pedal. The forces in a submarine are buoyancy and gravity. The depth is the result of these forces over time, following Newton’s second law. In mathematics, this would be a double integral: force / acceleration -> velocity -> position.

Buoyancy is an upward force caused by the surrounding liquid. It equals the weight of the liquid being displaced. If the submarine volume is 2400 ml, then the displacement is also 2400 ml. 2400 ml of water weighs about 2400 grams. To keep the submarine in neutral buoyancy, not moving up or down, the gravity should be equal to the buoyant force. In this example, the mass of the submarine, including the hull, motors, propellers, tungsten pellets and everything else, should be 2400 grams.

Note that the buoyant force does not depend on depth. If your submarine is 5 grams negatively buoyant, meaning it has slightly more mass than is being displaced, it will sink at the same downward force from surface to bottom. That assumes the submarine stays unaffected during the dive. If the submarine leaks, it’s mass will increase, which will make it sink faster. Or if the hull compresses under water pressure, it’s volume of displacement will decrease, which will again make it sink faster.

Respect the force of pressure

When you as a human dive in a swimming pool, you don’t feel the pressure. That’s why it is surprising how large it is. I had first hand experience of it with my Submarine 2.0 that had a soft plastic lid. I calculated that in 1.5 meters of depth, a normal swimming pool depth, the water pressure will press the lid with 35 kg force. That is like a frigging small human standing on it. No wonder it bent heavily. It resulted in a loss of buoyancy, which I measured to be 66 grams. That was enough to prevent the submarine from rising from the bottom, as the propellers didn’t have enough thrust force. The problem was finally fixed when I added red Lego beams under the lid to support it from bending.

Red Lego bars under the lid help it withstand water pressure.

How to control depth

I’ve tried three methods for controlling the depth of a submarine. Submarine 2.0 had propellers pushing water up or down. In this method the submarine is weighed to be neutrally buoyant. Gravity and buoyancy stay always the same while the propellers exert force. In my experience this is the easiest to control. You get fast response to radio control buttons. You see the submarine immediately start moving up or down, and when you stop pressing the buttons, it will quickly slow to to a halt due to water resistance. Maybe the only problem I see is that the weighing has to be very accurate, otherwise the sub is always sliding up or down.

The two red Lego constructs in front are the propellers for controlling depth. They rotate the opposite direction from each other to prevent yaw.

Submarine 3.0 was equipped with an air compressor and a balloon. When the balloon is filled with compressed air, it will expand and displace more water, and thus increase buoyancy force. In this method, gravity stays always the same. In my experience this is the most difficult to control. It takes time to inflate the balloon, at least when using inefficient Lego compressors, and therefore the response time from radio control buttons to actual movement is long. Moreover, you’re always at a loss where the neutral buoyancy point is. You need to guess from the sub movement whether to inflate or deflate the balloon. Even worse, as the balloon air compresses under pressure, you’ll lose buoyancy as it goes deeper. 60 ml balloon will shrink to 52 ml at 1.5 m depth, so you’ve gone from neutrally buoyant to 8 grams negatively buoyant while diving to the swimming pool floor. This will make the depth position inherently unstable.

The yellow balloon is inflated through the blue hose that connects to a compressor inside the hull.

Submarine 1.0 had a piston ballast to suck water in. Here a motor moves a syringe, which has a hose connected to outside the hull, through which water will move into the syringe chamber. In this method the sucked-in water acts as an extra weight that will increase gravity. Buoyancy stays always the same. This has a lot of the same problems as the balloon method, having a poor response time to buttons and difficulty to know neutral buoyancy position for the syringe. In one respect this is better, as the syringe will not compress under pressure like the air balloon does, leading to better stability.

Submarine 1.0 has a syringe to suck water in.

I’ll try to use syringe ballast for Submarine 4.0.

Why? For one reason, you can measure the piston position with an Lego EV3 motor that contains a tachometer. That will help the control loop. With an air balloon you would have to measure the deflation time, which would be less accurate. The best method out of the three would probably be propellers as in Submarine 2.0, but the hull shape would need to be less streamlined.

Ok, let’s start building.

8 thoughts on “RC Submarine 4.0 – background (1/10)

    1. Dani

      Awesome work. I really enjoy your videos and ideas. I would like to start building your “vehicles” to play with my children but I don’t know what Legos buy first to have enough parts (motors, gears, shafts…)
      Could you give me some advice?

      Like

      Reply
  1. Anonymous

    Great, great! It’s something I’ve been thinking on as well. Build a submarine to go to the deep sea.
    Please, just don’t say it’s gravity, because it’s density that pushes things to the ground.

    Like

    Reply
  2. Pingback: Un sous-marin semi autonome piloté par un Raspberry Pi

  3. Jim

    1) This is completely badass; I’m excited and impressed. 2) I believe the Piston Ballast does change the buoyancy, as the plunger is a moveable wall of the sub. When retracted, the sub (the capsule + the mechanisms + the air inside) weighs the same, but occupies less space = denser / less buoyant. Had we used the plunger-driver to push against the lid of the IKEA sub, we’d see the same effect. The shape / location of the water cavity is negligible. Unless we sealed the water inside the sub with an additional valve, the water is always outside the craft.

    Like

    Reply
    1. BrickExperimentChannel Post author

      I agree, you could call it buoyancy as well. I think it is a matter of semantics. Is the water inside the syringe part of the submarine (increases weight) or part of the surrounding water (decreases buoyancy)? I chose the former because I feel it is easier to understand. In the end, it doesn’t matter. You get the same end result, negative/positive buoyancy, which makes the sub move, because it is a subtraction of the two forces.

      Like

      Reply
  4. Pingback: Raspberry Pi project ideas: Pi+Lego submarine and "Pieca" camera — PiCockpit | Monitor and Control your Raspberry Pi: free for up to 5 Pis!

  5. Pingback: A handyman built a submarine out of Lego. It has a camera, a syringe and an ingenious movement system - NewsWep

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s