3D Printed Lego robot accessory

Welcome to Hungarian school 3D printing subpage.

In this lesson you can see how 3D printing can be integrated as a support mechanism for other projects you are working on. For example you may be working on a project (building something etc.) and at some point you may realize that you're missing a very specific detail to finish everything up. In cases like that 3D printers may be very useful. As long as you can draw it up in a CAD program - you can print it! 

Aim of the project

The aim of the project is building a treasure hunt LEGO robot with the knowledge gained during related subjects. Create missing parts using 3D printing. Demonstrating the practical possibilities of 3D printing in industry and everyday life. 

Steps taken in accomplishing the robot

I. LEGO robot planning

II. LEGO robot programming

III. 3D metal detection programming

IV. 3D metal detection building

V. Converting the EV3 cable

VI. Connecting the robot and the sensor

VII. 3D plan magnetholder

VIII. 3D plan contollerholder

IX. 3D controllerholder parts assembly

IX. 3D printing

X. Final assembly test

Introduction to the LEGO robot

lego robot_sub_in_out.mp4

Here the teacher introduces the lego robot. 

She explains how the robot works - what is the point of the robot in general and what components are used to achieve the main functionality of it.

Lego robot construction timelapse

Here you can see the process of building the lego robot in a sped up manner. It gives you a quick overlook on how it's done!


Lego robot "Treasure Hunter" demo!


3D printing lesson plans for the LEGO robots.

Now to the 3D printing! The lego robot they built needed a holder for a magnet that is involved with the build. The first thing we need is planning out the required dimensions for the part we need to print. After that we draw out the part using CAD software and use a slicer program to make the model understandable for the printer. Finally we can print it.


The lego robot has a controller circuit board that needs to be mounted to the robot. It's the most crucial part of the robot, since it controls it's actions and movement. But without a place to properly mount it, it has no use. That's where we could use a 3D printer to help out.

As with the magnet holder, we also first need to figure out the required dimensions for the part. After that we can Draw it out, run it through the slicer and finally print it!

Drawings and STL's for the magnet and controller holder

Electromagnet holder


Controller holder body, top and bottom parts dimensions

Controller body


Controller top


Controller bottom


Controller holder body, top and bottom parts fit together


Electromagnet holder dimendsions and files

Micropython code for the EV3 controller