How I invented the bicycle, or rather the submarine with control through the mobile Internet

Hello everyone, I once saw that models of long-range submarines are not sold, less tolerable functionality and less than the price of a new iphone and decided to make it myself.


It is controlled via the Internet, and now the mobile Internet covers a large area of ​​Russia. Small ponds are completely covered by it, and from the shores of large Internet there is even tens of kilometers from the coast.



Also, Ilon Musk announced the creation of a worldwide Internet.

I decided to print the boat on a 3D printer, the models are made in compass_3d. The code is written in python 3.
Link to github .

Equipment and materials


• 3d printer
• Single-board computer Raspberry pi
• 4g modems (2 pieces)
• laptop (2 pieces 1st - transmitter, 2nd - server)
• servomotors
• webcam
• engine
• Pb batteries
• other (relay, soldering iron, sensors, adhesives, paints, sealants ...).

Details


As already mentioned, parts are printed on a 3D printer with a 0.3 mm layer of a 0.4 mm nozzle
on an aluminum table with a substrate of glue bf2 for better adhesion, the longest parts were printed about 14 hours. Bottom assembly drawing.



Tightness


For tightness, the servomotors and the leading BC engine are sealed with silicone sealant and grease. The boat itself, due to the size of its parts and the tendency of abs plastic to shrink (resized after printing), these places are cracked in places covered with PVC glue, in places of bolted joints aquarium sealant silicone.

Nutrition


As a power source, two 6 v-series lead-acid batteries capable of delivering 3.3 AmH, lead batteries are used because they are cheaper, less contacts need to be taken out for charging outside the boat and they are also heavy (the boat is too bulky, and its average density should be about 1000 kg / m ** 3).

Data transfer


Now the main thing is data transfer.

Since the water absorbs EMW, you need to bring the modem to the top, so that boat works with a float.

In the local network, a server is installed at home, transmitting everything coming to it from one address to another. At the moment, the boat is transmitting the video, and the laptop is the management team. This is all organized through sockets.

Since I wanted to do as much as possible, so that it was more interesting , and in order to reinvent the wheel , I did the video transfer myself, as I said, so I didn’t think of anything better, I decided to transfer not video, but jpg frames. One picture is transmitted, then the stop word “stop” is poisoned, and since it is not found in jpg, the code easily separates where and when to display the picture.

while bytes('stop','utf-8') notin data:
          image_result.write(data)#записывает картинку по 1 Кб в файл
          data = sock.recv(1024)#принимает данные с сервера 1 Кб  if bytes('stop','utf-8')  in data: 
            image_result.write(data[:data.index(bytes('stop','utf-8'))])#записывает в файл то что пришло до стоп слова



Reproduction of a picture, and reception from the camera by means of opencv. No compression yet occurs, so the delay is as much as 9-13 seconds. The control buttons are written using Tkinter.

3D model of the bottom


During the loading of the 3D model on github, I saw what the stl file consists of, and decided to write the code also to create a 3d model of the bottom relief from the list of distances to it taken with an ultrasonic rangefinder (which has not yet been installed).

example of tetrahedron.stl in txt
solid
facet normal 0 0 0
outer loop
vertex 0 0 0
vertex 2 0 0
vertex 1 1 2
endloop
endfacet
facet normal 0 0 0
outer loop
vertex 2 0 0
vertex 1 2 0
vertex 1 1 2
endloop
endfacet
facet normal 0 0 0
outer loop
vertex 0 0 0
vertex 1 2 0
vertex 1 1 2
endloop
endfacet
facet normal 0 0 0
outer loop
vertex 0 0 0
vertex 1 2 0
vertex 2 0 0
endloop
endfacet
endsolid



Next are interesting and not very interesting photos.

























Summarizing


This is actually all that I wanted to tell, the main idea of ​​mine who did not understand was the creation of a device that allows receiving information from under the water at a great distance from the controlling laptop. Bye, until the next article.

Only registered users can participate in the survey. Sign in , please.

To make an article about creating 3d models with python tools?


Also popular now: